]> git.saurik.com Git - bison.git/blame - ChangeLog
gnulib: update.
[bison.git] / ChangeLog
CommitLineData
11c073b7
AD
12009-03-26 Akim Demaille <demaille@gostai.com>
2
3 gnulib: update.
4 * gnulib: Update to latest.
5 * src/local.mk (AM_CFLAGS): Move to...
6 * Makefile.am: here.
7 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
8 AM_CFLAGS.
9
91be6b28
AD
102009-03-02 Akim Demaille <demaille@gostai.com>
11
12 Comment changes.
13
cbf25ce7
AD
142009-03-02 Akim Demaille <demaille@gostai.com>
15
16 Share b4_yytranslate_define.
17 * data/lalr1.cc (b4_yytranslate_define): Move to...
18 * data/c++.m4: here.
19
882f02ed
AD
202009-03-02 Akim Demaille <demaille@gostai.com>
21
22 Use locations in the variant example.
23 Yes, this obfuscates the point of this example, variants only. But glr.cc
24 cannot work (yet?) without locations. This change makes it easier to use
25 this example with glr.cc.
11c073b7 26
882f02ed
AD
27 * examples/variant.yy (assert): %define it.
28 (locations): Request them.
29 (yylex): Bind the location to the stage.
30
0623bacc
AD
312009-03-02 Akim Demaille <demaille@gostai.com>
32
33 Dub make_TOKEN as a public type interface.
34 * data/c++.m4 (b4_symbol_constructor_declare)
35 (b4_symbol_constructor_define): New empty stubs.
36 (b4_public_types_declare, b4_public_types_define): Use them.
37 * data/lalr1.cc (b4_symbol_constructor_declare)
38 (b4_symbol_constructor_declare_)
39 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
40 Move to...
41 * data/variant.hh: here.
42 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
43 needed.
44 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
45 b4_symbol_constructor_declare, as it is now done by
46 b4_public_types_define and b4_public_types_declare.
47
5f5a90df
AD
482009-03-02 Akim Demaille <demaille@gostai.com>
49
50 Coding style changes.
51 * data/lalr1.cc (b4_symbol_constructor_declaration_)
52 (b4_symbol_constructor_declarations)
53 (b4_symbol_constructor_definition_)
54 (b4_symbol_constructor_definitions)
55 (b4_yytranslate_definition): Rename as...
56 (b4_symbol_constructor_declare_)
57 (b4_symbol_constructor_declare)
58 (b4_symbol_constructor_define_)
59 (b4_symbol_constructor_define)
60 (b4_yytranslate_define): these.
61 * data/variant.hh (b4_variant_definition): Rename as...
62 (b4_variant_define): this.
63
b47b6ff7
AD
642009-03-02 Akim Demaille <demaille@gostai.com>
65
66 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
67 * data/bison.m4 (b4_percent_define_if_define): New.
68 * data/c++.m4 (b4_variant_if): Move to...
69 * data/bison.m4: Here, using b4_percent_define_if_define.
70 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
71 * data/bison.m4: Here, using b4_percent_define_if_define.
72
1d6b689b
AD
732009-03-02 Akim Demaille <demaille@gostai.com>
74
75 Dub symbol_type_base as a public type.
76 * data/c++.m4 (b4_public_types_declare): Now define
77 symbol_type_base and symbol_type.
78 (b4_public_types_define): New.
79 In both cases, the definitions are taken verbatim from lalr1.cc.
80 * data/lalr1.cc: Adjust.
81
4f84717d
AD
822009-03-02 Akim Demaille <demaille@gostai.com>
83
84 b4_public_types_declare.
85 * data/c++.m4 (b4_public_types_declare): New.
86 * data/glr.cc, data/lalr1.cc: Use it.
87
b9e4eb5b
AD
882009-03-02 Akim Demaille <demaille@gostai.com>
89
90 b4_semantic_type_declare.
91 * data/c++.m4 (b4_semantic_type_declare): New.
92 Factors and generalizes what was in glr.cc and lalr1.cc.
93 * data/variant.hh (b4_semantic_type_declare): Redefine it for
94 variants.
95 * data/lalr1.cc, data/glr.cc: Use it.
96
6a6e7f0c
AD
972009-02-26 Akim Demaille <demaille@gostai.com>
98
99 Upgrade gnulib.
100 * gnulib: Upgrade from master.
101 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
102 Regen.
103
e9e61b00
AD
1042009-02-25 Akim Demaille <demaille@gostai.com>
105
106 Remove useless arguments.
107 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
108 relevant.
109
3eead995
AD
1102009-02-25 Akim Demaille <demaille@gostai.com>
111
112 Comment changes.
113 * data/lalr1.cc: here.
114
87f28efe
AD
1152009-02-25 Akim Demaille <demaille@gostai.com>
116
117 Fix glr.cc's debug level handling.
118 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
119 glr.c which is used.
120 (debug_level, set_debug_level): Adjust.
121
9be2a009
AD
1222009-02-25 Akim Demaille <demaille@gostai.com>
123
124 Copyright years.
125 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
126
07a6e87d
AD
1272009-02-25 Akim Demaille <demaille@gostai.com>
128
129 Style changes.
130 * etc/bench.pl.in (generate_grammar_list): Consitently use
131 location_type, not yy::location.
132
33c78bd2
AD
1332009-02-25 Akim Demaille <demaille@gostai.com>
134
135 Comment change.
136 * data/lalr1.cc: here.
137
49572920
AD
1382009-02-19 Akim Demaille <demaille@gostai.com>
139
140 Make yyparser::error public.
141 * data/lalr1.cc: here.
142 There is no good reason to keep it private (and it is convenient
143 to use it from the scanner for instance). It is already public in
144 glr.cc.
145
88654b47
AD
1462009-02-19 Akim Demaille <demaille@gostai.com>
147
148 Comment changes.
149 * data/glr.cc: here.
150
4524c55b
AD
1512009-02-19 Akim Demaille <demaille@gostai.com>
152
153 Remove trailing blanks.
6a6e7f0c
AD
154 The epilogue has its own ending \n, no need to add another.
155
4524c55b
AD
156 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
157 epilogue.
158 * data/glr.cc: dnl when extending the epilogue.
159 Remove stray "private:".
160
6ceccee8
AD
1612009-02-19 Akim Demaille <demaille@gostai.com>
162
163 Use b4_c_modern.
164 * data/c.m4 (b4_c_function_decl): Here.
165
9c6a8966
AD
1662009-02-19 Akim Demaille <demaille@gostai.com>
167
168 Comment changes.
169 * data/lalr1.cc: here.
170
507aa0e2
AD
1712009-02-19 Akim Demaille <demaille@gostai.com>
172
173 Extract variant.hh
174 * data/variant.hh: New, extracted from...
175 * data/lalr1.cc: here.
176 Adjust.
177 * data/local.mk: Adjust.
178
51bacae6
AD
1792009-02-19 Akim Demaille <demaille@gostai.com>
180
181 Extract stack.hh from lalr1.cc.
182 * data/stack.hh: New.
183 * data/lalr1.cc: Extract from here.
184 * data/local.mk: Adjust.
185
06c3084f
JD
1862009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
187
188 Add reminder about uploading public key to keys.gnupg.net.
189 * HACKING (Release Procedure): Here.
190
0ea583d2
AD
1912009-01-28 Akim Demaille <demaille@gostai.com>
192
193 * NEWS: Update information about 2.4.1 and 2.4.2.
194
402b123d
AD
1952008-11-04 Akim Demaille <demaille@gostai.com>
196
197 Reformat NEWS.
198 * NEWS: Use more outline-mode markup.
199 Suggested by Jim Meyering.
200
74553c98
AD
2012009-01-08 Akim Demaille <demaille@gostai.com>
202
203 Fix grep portability issues.
204 Grep on Solaris does not support -q.
205 Reported by Summum Bonum.
206
207 * NEWS: Add a stub for 2.4.2.
208 * THANKS: Add Summum Bonum.
209 * tests/atlocal.in (EGREP): New.
210 (CC, CXX, XSLTPROC): Make it possible to override them via
211 envvars.
212 * tests/java.at: Use $EGREP instead of egrep.
213 Use AT_CHECK's ignore instead of grep's -q.
214
84eedf86
AD
2152008-12-11 Akim Demaille <demaille@gostai.com>
216
217 Pass the token type to yysyntax_error.
218 * data/yacc.c (yysyntax_error): Take the transated token instead
219 of the raw number.
220 Adjust callers.
221 * TODO: Update.
222
5860cc8c
AD
2232008-12-11 Akim Demaille <demaille@gostai.com>
224
225 Formatting changes.
226 * data/glr.c: Formatting changes.
227
2b008529
AD
2282008-12-11 Akim Demaille <demaille@gostai.com>
229
230 Propagate i18n changes into glr.c.
231 * TODO: Update.
232 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
233 building the error message format dynamically.
234 * data/lalr1.java: Formatting changes.
235
2cd1af95
AD
2362008-12-11 Akim Demaille <demaille@gostai.com>
237
238 Use testsuite -C.
239 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
240 Solves problems when top_srcdir is an absolute path.
241 Suggested by Eric Blake.
242 * configure.ac: Require Autoconf 2.62.
243
eeb29422
AD
2442008-12-11 Akim Demaille <demaille@gostai.com>
245
246 Simplify the i18n of the error messages.
247 * data/lalr1.cc: Comment changes.
248 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
249 lalr1.cc instead of building dynamically the format string.
250
6617622c
AD
2512008-12-08 Akim Demaille <demaille@gostai.com>
252
253 Fix portability issue in the test suite.
254 * tests/local.at (AT_MATCHES_CHECK): New.
255 Based on Perl instead of Sed. Sed has too many portability
256 pitfalls, not ever Sed is GNU Sed.
257 * tests/actions.at (Fix user actions without a trailing semicolon):
258 Use it.
259
2ca1136c
AD
2602008-12-08 Akim Demaille <demaille@gostai.com>
261
262 Update data/README.
263 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
264
6c63b895
AD
2652008-12-08 Akim Demaille <demaille@gostai.com>
266
267 Install autoconf as a submodule to get m4sugar.
268 * .gitmodules: Add submodules/autoconf.
269 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
270 submodules/autoconf.
271
417e31d2
AD
2722008-12-08 Akim Demaille <demaille@gostai.com>
273
274 Test token.prefix in all the skeletons.
275 * data/java.m4 (b4_token_enum): Use the token.prefix.
276 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
277 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
278 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
279 * tests/java.at: Comment changes.
280 (AT_CHECK_JAVA_MINIMAL): Define the END token.
281 (Java parser class and package names): Add token.prefix check.
282
97abf544
AD
2832008-12-08 Akim Demaille <demaille@gostai.com>
284
285 Fix regeneration of atconfig.
286 * tests/local.mk (tests/atconfig): The rule was incorrect, but
287 remove it: now that there is no tests/Makefile.am, the top-level
288 Makefile properly updates atconfig when needed.
289
e8cd1ad6
DJ
2902008-12-07 Di-an Jan <dianj@freeshell.org>
291
292 Implement the FIXME that ends an user action with a semicolon
293 if it seems necessary.
294 * src/scan-code.l (flex rules section): Flag cpp directive from
295 any `#' to the first unescaped end-of-line. Semicolon is not
296 needed after `;', `{', '}', or cpp directives and is needed after
297 any other token (whitespaces and comments have no effect).
298 * tests/actions.at (Fix user actions without a trailing semicolon):
299 New test.
300 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
301 to make user actions complete statements.
302 Adjust column numbers in error messages.
303 * tests/regression.at (Fix user actions without a trailing semicolon):
304 Remove. Covered by new test.
305
ce9447fc
AD
3062008-12-07 Akim Demaille <demaille@gostai.com>
307
308 Update gnulib.
309 * gnulib: Update from master.
310
d333175f
EB
3112008-12-05 Eric Blake <ebb9@byu.net>
312
313 Avoid compiler warning.
314 * src/output.c (muscle_insert_item_number_table): Delete unused
315 function.
316
215b40ac
EB
3172008-12-02 Eric Blake <ebb9@byu.net>
318
319 Build testsuite with newer autoconf.
320 * tests/output.at (m4_expand): Don't override in newer autoconf,
321 where the underlying implementation changed.
322 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
323 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
324 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
325 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
326 since some of them contain unbalanced ')'.
327
3bb21113
AD
3282008-12-01 Akim Demaille <demaille@gostai.com>
329
330 Use b4_symbol for printers and destructors everywhere.
331 * data/bison.m4 (b4_symbol_action_location): New.
332 * data/c.m4 (b4_symbol_actions): Remove.
333 Adjust all callers to use by b4_symbol_foreach and the corresponding
334 b4_symbol_printer/destructor macro.
335 * data/glr.cc: Adjust.
336 * data/lalr1.java: Adjust the %destructor sanity check.
337 * src/output.c (symbol_code_props_output): Remove, we no longer
338 need the b4_symbol_printers/destructors tables.
339
fb7c5b1f
AD
3402008-12-01 Akim Demaille <demaille@gostai.com>
341
342 Use b4_symbol_case_.
343 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
344 b4_symbol_case_.
345
cf6fb222
AD
3462008-12-01 Akim Demaille <demaille@gostai.com>
347
348 Move b4_symbol based macro to bison.m4.
349 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
350 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
351 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
352 (b4_type_foreach): Move to...
353 * data/bison.m4: Here.
354 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
355 b4_symbol_value_template instead of b4_symbol_value.
cf6fb222 356
e3c52a63
AD
3572008-12-01 Akim Demaille <demaille@gostai.com>
358
359 b4_symbol/type_foreach.
360 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
361 Use them.
362
2bde9113
AD
3632008-12-01 Akim Demaille <demaille@gostai.com>
364
365 Use the symbol properties to output the printer/destructor for lalr1.cc.
30c10faf
AD
366 Instead of defining complex list of tuples to define various
367 properties of the symbols, we now prefer to define symbols as
368 "structs" in m4: using the symbol key (its number), and the
369 property name, b4_symbol gives it value. Use this to handle
370 destructors and printers.
371
2bde9113
AD
372 * src/output.c (CODE_PROP): New.
373 (prepare_symbol_definitions): Use it to define the printer and
374 destructor related attributes of the symbols.
375 * data/lalr1.cc (b4_symbol_actions): Rename as...
376 (b4_symbol_action): this.
377 Use b4_symbol instead of 6 arguments.
378 (b4_symbol_printer, b4_symbol_destructor): New.
379 Use them instead of b4_symbol_actions.
380
44494bf6
AD
3812008-12-01 Akim Demaille <demaille@gostai.com>
382
383 Avoid capturing variables too easily.
384 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
385 v__ and p__ instead of v and p.
386
fad814bd
AD
3872008-12-01 Akim Demaille <demaille@gostai.com>
388
389 Remove spurious empty line before syncline.
390 * data/bison.m4 (b4_syncline): Don't output an empty line before
391 the output.
392
feda5527
AD
3932008-11-26 Akim Demaille <demaille@gostai.com>
394
395 Convert lib/Makefile.am into lib/local.mk.
396 The real problem is rather gnulib.mk, which itself is extracted
397 from a Makefile.am that gnulib expects to the "recursive". The
398 tool prefix-gnulib-mk converts such a gnulib.mk to be
399 non-recursive. Also, some AC_SUBST variables need to be adjusted.
400
401 * etc/prefix-gnulib-mk: New.
402 * bootstrap (slurp): Use it to convert further gnulib.mk.
403 No longer try to avoid re-creation of lib/gnulib.mk as the changes
404 are deeper.
405 * lib/Makefile.am: Rename as...
406 * lib/local.mk: this.
407 Adjust to be prefixed.
408 * Makefile.am, configure.ac: Adjust.
409 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
410
56ddee7f
AD
4112008-11-26 Akim Demaille <demaille@gostai.com>
412
413 s/_FLAGS/FLAGS/.
414 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
415 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
416 Reported by Eric Blake.
417
728e89a0
AD
4182008-11-26 Akim Demaille <demaille@gostai.com>
419
420 Use b4_parser_tables_define in glr.cc.
421 * data/glr.c: Use b4_parser_tables_define instead of defining the
422 (deterministic integral) tables by hand.
423
2c1bf9bd
AD
4242008-11-26 Akim Demaille <demaille@gostai.com>
425
426 Use b4_parser_tables_define in Java.
427 * data/java.m4 (b4_typed_parser_table): Rename as...
428 (b4_typed_parser_table_define): this, for consistency.
429 Accept a comment as $4.
430 Move $2 into yy*_.
431 (b4_integral_parser_table): Rename as...
432 (b4_integral_parser_table_define): this.
433 * data/lalr1.java: Adjust all uses.
434 Use b4_parser_tables_define instead of generation by hand.
435
ba206cf4
AD
4362008-11-26 Akim Demaille <demaille@gostai.com>
437
438 Prepare the convergence bw C style and Java table generation.
439 * data/bison.m4 (b4_tables_map, b4_tables_declare)
440 (b4_tables_define): Rename as...
441 (b4_integral_parser_tables_map, b4_parser_tables_declare)
442 (b4_parser_tables_define): these.
443 * data/c.m4 (b4_table_define): Rename as...
444 (b4_integral_parser_table_define): this.
445 * data/lalr1.cc: Adjust.
446 (b4_table_define, b4_table_declare): Rename as...
447 (b4_integral_parser_table_define)
448 (b4_integral_parser_table_declare): these.
449 (yyrline_): Move the comment where it is actually used.
450 * data/yacc.c: Adjust.
451 (yyrline): Use b4_integral_parser_table_define.
452
d12f8e49
AD
4532008-11-26 Akim Demaille <demaille@gostai.com>
454
455 Regen.
456 * src/parse-gram.h, src/parse-gram.c: Regen.
457
0991e29b
AD
4582008-11-26 Akim Demaille <demaille@gostai.com>
459
460 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
461 * data/lalr1.cc (b4_tables_map): Move to...
462 * data/bison.m4: here.
463 Update the comment for yytable during the flight.
464 (b4_tables_declare, b4_tables_define): New.
465 * data/lalr1.cc: Use them.
466 * data/c.m4 (b4_table_define): New.
467 * data/yacc.c: Use b4_tables_define instead of output the tables
468 by hand.
469 * tests/regression.at (Web2c Actions): Adjust the expected output,
470 the order of the tables changed.
471
3d3bc1fe
AD
4722008-11-26 Akim Demaille <demaille@gostai.com>
473
474 Get rid of (yy)rhs and (yy)prhs.
475 These tables are no longer needed in the parsers, and they don't seem to
476 be useful. They are not documented either.
feda5527 477
3d3bc1fe
AD
478 * src/output.c (prepare_rules): Get rid of rhs and prhs.
479 Adjust the computation of (yy)r2.
480
08c81469
AD
4812008-11-26 Akim Demaille <demaille@gostai.com>
482
483 Rule length is unsigned.
484 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
485
932b0c96
AD
4862008-11-26 Akim Demaille <demaille@gostai.com>
487
488 Get rid of lalr1-split.cc.
489 It was no longer maintainer.
feda5527 490
932b0c96
AD
491 * data/lalr1-split.cc: Remove.
492 * etc/bench.pl.in (bench_fusion_parser): Remove.
493 Adjust.
494
8452c667
AD
4952008-11-26 Akim Demaille <demaille@gostai.com>
496
497 Use yy* consistently.
498 * data/glr.c: Now that yyrhs no longer exists as a global
499 variable, rename local "rhs" variables into "yyrhs" for
500 consistency.
501
783aa653
AD
5022008-11-25 Akim Demaille <demaille@gostai.com>
503
504 Get rid of yyrhs and yyprhs in glr.c.
505 * data/glr.c (yyrhs, yyprhs): Remove.
506 Instead, use the state stack and yystos.
507
6130b755
AD
5082008-11-25 Akim Demaille <demaille@gostai.com>
509
510 Flag glr tests.
511 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
512 as an Autotest keyword.
513
95a7b1c9
AD
5142008-11-25 Akim Demaille <demaille@gostai.com>
515
516 Prefer TESTSUITE_FLAGS.
517 TESTSUITEFLAGS is barely readable.
feda5527 518
95a7b1c9
AD
519 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
520 for backward compatibility.
521 Use the former instead of the latter.
522
b4f18401
AD
5232008-11-25 Akim Demaille <demaille@gostai.com>
524
525 Get rid of yyrhs and yyprhs in larl1.java.
526 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
527 (yy_reduce_print): Rather, use yystos_ and the state stack.
528
c265fd6b
AD
5292008-11-25 Akim Demaille <demaille@gostai.com>
530
531 Formatting changes.
532
68dbdee8
AD
5332008-11-25 Akim Demaille <demaille@gostai.com>
534
535 Get rid of yyrhs and yyprhs in yacc.c.
30c10faf
AD
536 They were used to get the symbol types, given a rule number, when
537 displaying the top of the stack before a reduction. But the
538 symbol type is available from the state stack. This has two be
539 benefits: two tables less in the parser (making it smaller), and a
540 more consistent use of the three stacks which will help to fuse
541 them.
feda5527 542
68dbdee8
AD
543 * data/yacc.c (yyprhs, yyrhs): Remove.
544 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
545 (yy_reduce_print): Take yyssp as argument.
546 Use it, together with yystos, to get the symbol type.
547 * tests/regression.at (Web2c Report): Remove these tables from the
548 expected output.
549
6ab1adbe
AD
5502008-11-25 Akim Demaille <demaille@gostai.com>
551
552 b4_tables_map.
553 The point is to factor the generation of the tables across skeletons.
554 This is language dependant.
feda5527 555
6ab1adbe
AD
556 * data/c.m4 (b4_comment_): New.
557 Should be usable to define how to generate tables independently of
558 the language.
559 (b4_c_comment): New.
560 (b4_comment): Bounce to b4_c_comment.
561 Now support $2 = [PREFIX] for indentation.
562 * data/lalr1.cc (b4_table_declare): Don't output a comment if
563 there is no comment.
564 Indent it properly when there is one.
565 Output the ending semicolon.
566 (b4_table_define): Space changes.
567 Output the ending semicolon.
568 (b4_tables_map): New.
569 Use it twice instead of declaring and defining the (integral)
570 tables by hand.
571
0fddb3d5
AD
5722008-11-25 Akim Demaille <demaille@gostai.com>
573
574 b4_table_declare.
575 * data/lalr1.cc (b4_table_declare): New.
576 Use it to declare the tables defined with b4_table_define.
577 (b4_table_define): Declare a third arg to match b4_table_declare
578 signature.
579 Move all the comments around invocations of b4_table_define into
580 the invocations itselves.
581 Move things around to have the order for declarations and
582 definitions.
583
c4ddc0fb
AD
5842008-11-25 Akim Demaille <demaille@gostai.com>
585
586 Formatting changes.
587 * data/lalr1.java: here.
588
e0c653e7
AD
5892008-11-25 Akim Demaille <demaille@gostai.com>
590
591 b4_args is more general than only C++.
592 * data/lalr1.cc (b4_args, _b4_args): Move to...
593 * data/bison.m4: here.
594
4182a0a1
DJ
5952008-11-21 Di-an Jan <dianj@freeshell.org>
596
597 Implement no-XXX arguments for --warnings, --report, --trace.
598 * src/getargs.c (flags_argmatch): Handles no-XXX.
599 Fix typo in doxygen comment.
600
01466c3e
AD
6012008-11-21 Akim Demaille <demaille@gostai.com>
602
603 Display the changes in cross-options.texi.
604 * build-aux/cross-options.pl ($sep): New, to separate items.
605 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
606 changes.
607
a7c09cba
DJ
6082008-11-20 Di-an Jan <dianj@freeshell.org>
609
610 Improves options in the manual.
611 * doc/bison.texinfo (-g, -x): Add space before argument.
612 (Option Cross Key): Implement FIXME: listing directives also.
613 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
614 (Short Option): Special case -d. Put arguments inside @option.
feda5527 615 (Bison Directive): Add column, automatically extracted from
a7c09cba
DJ
616 src/scan-gram.l (actual name passed as the first argument)
617 with special case for %define.
618 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
619 to build-aux/cross-options.pl.
620 * src/getargs.c (usage): Document limitations of cross-options.pl.
621 * src/scan-gram.l: Likewise.
622
6c88b51e
JD
6232008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
624
625 Fix unexpanded macros in GLR defines file.
626 Reported by Csaba Raduly at
627 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
628 * THANKS (Csaba Raduly): Add.
629 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
630 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
631 lexer in a separate module that includes the defines file.
632 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
633 source.
634 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
635 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
636 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
637 (AT_DATA_SOURCE_PROLOGUE): New.
638 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
639 (AT_DATA_SOURCE): New.
640 (AT_FULL_COMPILE): Extend to support an additional source file.
641
1e034807
AD
6422008-11-18 Akim Demaille <demaille@gostai.com>
643
644 More TODO.
645 * TODO: More short term issues.
646
e3dda35c
AD
6472008-11-18 Akim Demaille <demaille@gostai.com>
648
649 Regen.
650 * src/parse-gram.h, src/parse-gram.c: Regen.
651
bd187d7b
AD
6522008-11-18 Akim Demaille <demaille@gostai.com>
653
654 Use b4_subtract where possible.
655 * data/lalr1.cc (b4_subtract): Move to...
656 * data/bison.m4: here.
657 * data/glr.c (b4_rhs_data): Use it.
658 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
659
6085ab0d
AD
6602008-11-18 Akim Demaille <demaille@gostai.com>
661
662 Remove incorrect mode specification.
663 * data/glr.cc: Don't pretend it's C code.
664
9ce405ce
JD
6652008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
666
667 Simplify last patch slightly.
668 * src/getargs.c (getargs): Here.
669
a8beef7e
JD
6702008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
671
672 Fix last warning from --enable-gcc-warnings.
673 * src/getargs.c (getargs): Don't assign const address to non-const
674 pointer.
675
d50eea6d
JD
6762008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
677
678 Don't let maintainer-*-check targets force a version update.
679 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
680 handled.
681
f5f419de
DJ
6822008-11-17 Di-an Jan <dianj@freeshell.org>
683
684 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
685 Align menus. Adjust word wrapping. Use node names for menu names.
686 (Examples): Don't abbreviate node names.
687 (LocalWords): Remove abbreviations.
688 (Copying): Make description a sentence.
d50eea6d 689 (Java Action Features): Remove period to match the rest of menu.
f5f419de 690
d73e55e0
DJ
6912008-11-17 Di-an Jan <dianj@freeshell.org>
692
693 Handles several --enable-gcc-warnings.
694 * src/getargs.c (command_line_location): Set parameters to void.
695 * src/output.c (symbol_type_name_cmp): Make static.
696 (symbols_by_type_name): Set parameters to void.
697 (symbol_definitions_output): Remove unused parameter. Rename as...
698 (prepare_symbol_definitions): this.
699 (muscles_output): Move symbol_definitions_output to...
700 (output): here as prepare_symbol_definitions.
701 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
d50eea6d 702 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
d73e55e0 703
68c989de
DJ
7042008-11-17 Di-an Jan <dianj@freeshell.org>
705
706 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
707 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
708
23ce6f4c
AD
7092008-11-16 Akim Demaille <demaille@gostai.com>
710
711 Add missing $(EXEEXT).
712 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
713 "src/bison$(EXEEXT)".
714 Reported by Di-an Jan.
715
dd704c35
AD
7162008-11-15 Akim Demaille <demaille@gostai.com>
717
718 * TODO: Update.
719
dab244d5
AD
7202008-11-15 Akim Demaille <demaille@gostai.com>
721
722 Formatting changes.
723 * tests/input.at: here.
724
4b4da9fb
AD
7252008-11-15 Akim Demaille <demaille@gostai.com>
726
727 Remove duplicate header inclusion.
728 * src/LR0.c: here.
729
4ea3f53d
AD
7302008-11-15 Akim Demaille <demaille@gostai.com>
731
732 * src/parse-gram.h, src/parse-gram.c: Regen.
733
cb823b6f
AD
7342008-11-15 Akim Demaille <demaille@gostai.com>
735
736 Support parametric types.
b06df3c2
AD
737
738 There are two issues to handle: first scanning nested angle
739 bracket pairs to support types such as std::pair< std::string,
740 std::list<std::string> > >.
741
742 Another issue is to address idiosyncracies of C++: do not glue two
743 closing angle brackets together (otherwise it's operator>>), and
744 avoid sticking blindly a TYPE to the opening <, as it can result
745 in '<:' which is a digraph for '['.
746
cb823b6f
AD
747 * src/scan-gram.l (brace_level): Rename as...
748 (nesting): this.
749 (SC_TAG): New.
750 Implement support for complex tags.
b06df3c2 751 (tag): Accept
cb823b6f
AD
752 , but not <.
753 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
754 (b4_symbol_variant): Leave space around types as parameters.
755 * examples/variant.yy: Use nested template types and leading ::.
756 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
757 Rename as...
758 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
759 * tests/c++.at: Test parametric types.
760
7b6e6753
AD
7612008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
762
763 Test token.prefix.
764 This is not sufficient, but we test at least that the make_SYMBOL
765 interface is not affected by token.prefix. A more general test
766 will be implemented when the support of token.prefix is generalized
767 to more skeletons.
b06df3c2 768
7b6e6753
AD
769 * tests/c++.at: One more variant test, using token.prefix.
770
dddec537
AD
7712008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
772
773 Test the make_TOKEN interface.
774 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
775 Factor the common code in yylex.
776 Use it to test "%define lex_symbol".
777
7d3e21ba
AD
7782008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
779
780 Formatting change.
781
4fc55348
AD
7822008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
783
784 Simplify code for variants bench marks.
785 * etc/bench.pl.in (&generate_grammar_list): Define and use
786 location_type.
787 Factor the common code in yylex.
788
070e6509
AD
7892008-11-15 Akim Demaille <demaille@gostai.com>
790
791 Better error message.
792 * bootstrap (find_tool): Fix the error message.
793
0078681b
AD
7942008-11-15 Akim Demaille <demaille@gostai.com>
795
796 Update variant.yy to newest interface.
797 * examples/variant.yy: Define lex_symbol.
798 Adjust.
799
ff084799
AD
8002008-11-15 Akim Demaille <demaille@gostai.com>
801
802 Don't use locations in variant.yy.
803 * examples/variant.yy: Adjust to not using locations.
804
b0d79ec6
AD
8052008-11-15 Akim Demaille <demaille@gostai.com>
806
807 Comment changes.
808 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
809 comments for the license.
810
d4977ce3
AD
8112008-11-15 Akim Demaille <demaille@gostai.com>
812
813 Remove tests/Makefile.am.
814 * tests/Makefile.am: Rename as...
815 * tests/local.mk: this.
816 * Makefile.am, configure.ac: Adjust.
817 * Makefile.am (DISTCLEANFILES): Define.
818 (maintainer-check, maintainer-xml-check, maintainer-push-check):
819 Remove, we no longer need to bounce to the real targets.
820
87f1149a
AD
8212008-11-15 Akim Demaille <demaille@gostai.com>
822
823 Comment changes.
824
36415906
AD
8252008-11-15 Akim Demaille <demaille@gostai.com>
826
827 djgpp/local.mk.
828 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
829 * djgpp/local.mk: this new file.
830
e2c2f696
AD
8312008-11-15 Akim Demaille <demaille@gostai.com>
832
833 Remove doc/Makefile.am.
834 * doc/Makefile.am: Rename as...
835 * doc/local.mk: this.
836 Adjust paths
837 * Makefile.am, configure.ac: Adjust.
838 * Makefile.am (MOSTLYCLEANFILES): New.
839 * src/local.mk: Adjust.
840
2ead32e6
AD
8412008-11-15 Akim Demaille <demaille@gostai.com>
842
843 Move sc_tight_scope into maint.mk.
b06df3c2
AD
844 It does not work, and I don't know how it was supposed to work: it
845 seems to be looking for sources in the build tree. I just moved
846 it at a better place, fixing it is still required.
847
2ead32e6
AD
848 * src/local.mk (echo): Remove.
849 (sc_tight_scope): Move to...
850 * maint.mk: here.
851
2df9ec37
AD
8522008-11-15 Akim Demaille <demaille@gostai.com>
853
854 Regen.
855 * src/parse-gram.h, src/parse-gram.h: Regen.
856
0305d25e
AD
8572008-11-15 Akim Demaille <demaille@gostai.com>
858
859 Remove src/Makefile.am.
860 * src/Makefile.am: Rename as...
861 * src/local.mk: this.
862 Prefix all the paths with src/.
863 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
864 (AM_CPPFLAGS): Find find in builddir/src.
865 (YACC): Move the flags into...
866 (AM_YFLAGS): here.
867 * maint.mk (sc_tight_scope): Disable.
868 It used to bounce to the version in src/Makefile.am which is now
869 part of this very Makefile.
870 * Makefile.am, configure.ac: Adjust.
871 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
872 include "..." to find files "here": we are no longer in src/, so
873 qualify the includes with src/.
874 * doc/Makefile.am (PREPATH): No longer include the top_builddir
875 prefix.
876 (.x.1): Adjust to be able to create src/foo from the top level
877 Makefile, instead of going bounce to src/Makefile the creation of
878 foo.
879
5277c0a3
AD
8802008-11-15 Akim Demaille <demaille@gostai.com>
881
882 Remove useless variable.
883 * doc/Makefile.am (srcsrcdir): Remove.
884
6a5aa0cd
AD
8852008-11-15 Akim Demaille <demaille@gostai.com>
886
887 Remove data/Makefile.am.
888 * data/Makefile.am: Rename as...
889 * data/local.mk: this.
890 Adjust paths.
891 * Makefile.am, configure.ac: Adjust.
892
7cb794dc
AD
8932008-11-15 Akim Demaille <demaille@gostai.com>
894
895 Remove etc/Makefile.am.
896 * etc/Makefile.am: Rename as...
897 * etc/local.mk: this.
898 Adjust.
899 * Makefile.am, configure.ac: Adjust.
900
cd409e3b
AD
9012008-11-15 Akim Demaille <demaille@gostai.com>
902
903 Remove examples/local.mk.
904 examples/calc++/Makefile.am might be interesting to keep as is, since
905 it is an example in itself.
2df9ec37 906
cd409e3b
AD
907 * examples/Makefile.am: Rename as...
908 * examples/local.mk: this.
909 Adjust.
910 * Makefile.am, configure.ac: Adjust.
911
9a1e4214
AD
9122008-11-15 Akim Demaille <demaille@gostai.com>
913
914 Remove build-aux/Makefile.am.
915 Recursive Makefiles are really way too slow, let's get rid of some of
916 them.
2df9ec37 917
9a1e4214
AD
918 * build-aux/Makefile.am: Rename as...
919 * build-aux/local.mk: this.
920 Adjust paths.
921 * Makefile.am, configure.ac: Adjust.
922
0634493c
AD
9232008-11-15 Akim Demaille <demaille@gostai.com>
924
925 Provide convenience constructors for locations and positions.
926 * data/location.cc (position::position): Accept file, line and
927 column as arguments with default values.
928 Always qualify initial line and column literals as unsigned.
929 (location::location): Provide convenience constructors.
930
fe1b448a
AD
9312008-11-15 Akim Demaille <demaille@gostai.com>
932
b06df3c2
AD
933 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
934 token type.
fe1b448a
AD
935 Using template buys us nothing, and makes it uselessly complex to
936 construct a symbol. Besides, it could not be generalized to other
937 languages, while make_FOO would work in C/Java etc.
2df9ec37 938
fe1b448a
AD
939 * data/lalr1.cc (b4_symbol_): New.
940 (b4_symbol): Use it.
941 (b4_symbol_constructor_declaration_)
942 (b4_symbol_constructor_definition_): Instead of generating
943 specializations of an overloaded template function, just generate
944 several functions whose names are forged from the token names
945 without the token.prefix.
946 (b4_symbol_constructor_declarations): Generate them for all the
947 symbols, not just by class of symbol type, now that instead of
948 specializing a function template by the token, we generate a
949 function named after the token.
950 (b4_symbol_constructor_specialization_)
951 (b4_symbol_constructor_specializations): Remove.
952 * etc/bench.pl.in: Adjust to this new API.
953
5679f311
AD
9542008-11-13 Akim Demaille <demaille@gostai.com>
955
956 %define token.prefix.
b06df3c2
AD
957 Provide a means to add a prefix to the name of the tokens as
958 output in the generated files. Because of name clashes, it is
959 good to have such a prefix such as TOK_ that protects from names
960 such as EOF, FILE etc. But it clutters the grammar itself.
2df9ec37 961
5679f311
AD
962 * data/bison.m4 (token.prefix): Empty by default.
963 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
964 * data/lalr1.cc (b4_symbol): Ditto.
965
3204049e
AD
9662008-11-13 Akim Demaille <demaille@gostai.com>
967
968 Compute at M4 time some of the subtractions.
90290ce5 969 * data/lalr1.cc (b4_subtract): New.
3204049e
AD
970 (b4_rhs_data): Use it.
971
202598d3
AD
9722008-11-13 Akim Demaille <demaille@gostai.com>
973
974 symbol::token.
b06df3c2 975 This allows the user to get the type of a token returned by yylex.
2df9ec37 976
202598d3
AD
977 * data/lalr1.cc (symbol::token): New.
978 (yytoknum_): Define when %define lex_symbol, independently of
979 %debug.
980 (yytoken_number_): Move into...
981 (symbol::token): here, since that's the only use.
982 The other one is YYPRINT which was not officially supported
983 by lalr1.cc, and anyway it did not work since YYPRINT uses this
984 array under a different name (yytoknum).
985
fc2476c7
AD
9862008-11-13 Akim Demaille <demaille@gostai.com>
987
988 YYERRCODE.
989 * TODO (YYERRCODE): Mention the case of $undef.
990
865f1e9f
AD
9912008-11-13 Akim Demaille <demaille@gostai.com>
992
993 TODO: YYPRINT.
994 * TODO (YYPRINT): New.
995
cb0b136a
AD
9962008-11-13 Akim Demaille <demaille@gostai.com>
997
998 Comment changes.
999 * data/lalr1.cc, data/yacc.c: Fix the description of the
1000 yytranslate and yytoknum tables.
1001
2c086d29
AD
10022008-11-13 Akim Demaille <demaille@gostai.com>
1003
1004 Define make_symbol in the header.
b06df3c2
AD
1005 To reach good performances these functions should be inlined (yet
1006 this is to measure precisely). To this end they must be available
1007 to the caller.
2df9ec37 1008
2c086d29
AD
1009 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
1010 location_type with the class name.
1011 Since will now be output in the header, declare "inline".
1012 No longer use b4_symbol_constructor_specializations, but
1013 b4_symbol_constructor_definitions in the header.
1014 Don't call it in the *.cc file.
1015
1c4af381
AD
10162008-11-13 Akim Demaille <demaille@gostai.com>
1017
1018 Define yytranslate in the header for lex_symbol.
1019 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
1020 into the header file when using %define lex_symbol.
1021 (yytranslate_): Declare inline.
1022
e51b0a82
AD
10232008-11-13 Akim Demaille <demaille@gostai.com>
1024
b06df3c2
AD
1025 Define the constructors of symbol_type in
1026 b4_symbol_constructor_definitions.
e51b0a82 1027 The constructors are called by the make_symbol functions, which a
b06df3c2
AD
1028 forthcoming patch will move elsewhere. Hence the interest of
1029 putting them together.
2df9ec37 1030
b06df3c2
AD
1031 The stack_symbol_type does not need to be moved, it is used only
1032 by the parser.
2df9ec37 1033
e51b0a82
AD
1034 * data/lalr1.cc: Move symbol_type and symbol_base_type
1035 constructors into...
1036 (b4_symbol_constructor_definitions): here.
1037 Adjust.
1038
78835571
AD
10392008-11-13 Akim Demaille <demaille@gostai.com>
1040
1041 Make it easier to move the definition of yytranslate_.
1042 Forthcoming changes will make it possible to use yytranslate_
1043 from outside the parser implementation file.
2df9ec37 1044
78835571
AD
1045 * data/lalr1.cc (b4_yytranslate_definition): New.
1046 Use it.
1047
c1e6c88c
AD
10482008-11-13 Akim Demaille <demaille@gostai.com>
1049
1050 Remove useless class specification.
1051 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1052 to refer to the class name to use a type defined by the class for
1053 arguments of member functions.
1054
4654b0c0
AD
10552008-11-13 Akim Demaille <demaille@gostai.com>
1056
1057 Finer input type for yytranslate.
1058 This patch is debatable: the tradition expects yylex to return an int
1059 which happens to correspond to token_number (which is an enum). This
1060 allows for instance to return characters (such as '*' etc.). But this
1061 goes against the stronger typing I am trying to have with the new
1062 lex interface which return a symbol_type. So in this case, feed
1063 yytranslate_ with a token_type.
2df9ec37 1064
4654b0c0
AD
1065 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1066 expect a token_type.
1067
dd735e4e
AD
10682008-11-13 Akim Demaille <demaille@gostai.com>
1069
1070 Honor lex-params in %define lex_symbol mode.
1071 * data/lalr1.cc: Use b4_lex_param.
1072
6659366c
AD
10732008-11-13 Akim Demaille <demaille@gostai.com>
1074
1075 Simplify names.
1076 * src/output.c (symbol_definitions_output): Rename symbol
1077 attributes type_name and has_type_name as type and has_type.
1078 * data/lalr1.cc: Adjust uses.
1079
e9805e57
AD
10802008-11-13 Akim Demaille <demaille@gostai.com>
1081
1082 Use b4_type_names for the union type.
b06df3c2
AD
1083 The union used to compute the size of the variant used to iterate
1084 over the type of all the symbols, with a lot of redundancy. Now
1085 iterate over the lists of symbols having the same type-name.
2df9ec37 1086
e9805e57
AD
1087 * data/lalr1.cc (b4_char_sizeof_): New.
1088 (b4_char_sizeof): Use it.
1089 Adjust to be called with a list of numbers instead of a single
1090 number.
1091 Adjust its caller for new-line issues.
1092
aea10ef4
AD
10932008-11-13 Akim Demaille <demaille@gostai.com>
1094
1095 Define the "identifier" of a symbol.
b06df3c2
AD
1096 Symbols may have several string representations, for instance if
1097 they have an alias. What I call its "id" is a string that can be
1098 used as an identifier. May not exist.
2df9ec37 1099
b06df3c2
AD
1100 Currently the symbols which have the "tag_is_id" flag set are
1101 those that don't have an alias. Look harder for the id.
2df9ec37 1102
aea10ef4
AD
1103 * src/output.c (is_identifier): Move to...
1104 * src/symtab.c (is_identifier): here.
1105 * src/symtab.h, src/symtab.c (symbol_id_get): New.
1106 * src/output.c (symbol_definitions_output): Use it to define "id"
1107 and "has_id".
1108 Remove the definition of "tag_is_id".
1109 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1110 "tag_is_id" were used to produce code.
1111 We still use "tag" for documentation.
1112
2ea7730c
AD
11132008-11-11 Akim Demaille <demaille@gostai.com>
1114
1115 Locations are no longer required by lalr1.cc.
1116 * data/lalr1.cc (_b4_args, b4_args): New.
1117 Adjust all uses of locations to make them optional.
1118 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
1119 (AT_CHECK_NAMESPACE): Check the use of locations.
1120 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
1121 without locations with lalr1.cc.
1122 Test these cases.
1123 * tests/output.at: Check lalr1.cc with and without location
1124 support.
1125 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
1126 Don't use locations.
1127
7ca2266a
AD
11282008-11-11 Akim Demaille <demaille@gostai.com>
1129
1130 AT_FULL_COMPILE.
1131 * tests/local.at (AT_FULL_COMPILE): New.
1132 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
1133
1a7a65f9
AD
11342008-11-11 Akim Demaille <demaille@gostai.com>
1135
1136 Support parens in calc++.
1137 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
1138 * examples/calc++/test (run): Check the expected output.
1139 Adjust callers.
1140 Check parens too.
1141
c944f7f2
AD
11422008-11-11 Akim Demaille <demaille@gostai.com>
1143
1144 Simplify lalr1.cc since %defines is mandatory.
1145 * data/lalr1.cc: Remove useless calls to b4_defines_if.
1146
dada3cd1
AD
11472008-11-11 Akim Demaille <demaille@gostai.com>
1148
1149 TODO: yyfmt.
1150 * TODO (yysyntax_error): New item.
1151
422c18f4
AD
11522008-11-11 Akim Demaille <demaille@gostai.com>
1153
1154 Prefer M4 to CPP.
1155 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1156 YYERROR_VERBOSE.
1157
a0ffc175
AD
11582008-11-11 Akim Demaille <demaille@gostai.com>
1159
1160 Support i18n of the parse error messages.
1161 * TODO (lalr1.cc/I18n): Remove.
1162 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1163 error messages, as done in yacc.c.
1164 Stay within the yy* pseudo namespace.
1165
00a8a083
AD
11662008-11-11 Akim Demaille <demaille@gostai.com>
1167
1168 More TODO.
1169 * TODO (single stack, yysyntax_error): New.
1170
09277875
AD
11712008-11-11 Akim Demaille <demaille@gostai.com>
1172
1173 Make it possible to return a symbol_type from yylex.
1174 * data/lalr1.cc (b4_lex_symbol_if): New.
1175 (parse): When lex_symbol is defined, expected yylex to return the
1176 complete lookahead.
1177 * etc/bench.pl.in (generate_grammar_list): Extend to support this
1178 yylex interface.
1179 (bench_variant_parser): Exercise it.
1180
64c1b92a
AD
11812008-11-11 Akim Demaille <demaille@gostai.com>
1182
1183 Remove useless bench case.
1184 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
1185 no longer used.
1186
2722aa42
AD
11872008-11-11 Akim Demaille <demaille@gostai.com>
1188
1189 Improve display of directives.
1190 * etc/bench.pl.in (parse_term): Don't add useless eol.
1191
918eb7c5
AD
11922008-11-11 Akim Demaille <demaille@gostai.com>
1193
1194 Use string_cast in the bench.
1195 * etc/bench.pl.in (generate_grammar_list): Define and use
1196 string_cast.
1197
39be9022
AD
11982008-11-11 Akim Demaille <demaille@gostai.com>
1199
1200 Replace yychar with a Boolean.
1201 * data/lalr1.cc (parse::yychar): Replace by...
1202 (parse::yyempty): this.
1203
a2e3fa77
AD
12042008-11-11 Akim Demaille <demaille@gostai.com>
1205
1206 Factor the tables.
1207 * TODO: New item.
1208
aba12ad1
AD
12092008-11-11 Akim Demaille <demaille@gostai.com>
1210
1211 Let yytranslate handle the eof case.
1212 * data/lalr1.cc (yytranslate_): Handle the EOF case.
1213 Adjust callers.
1214 No longer expect yychar to be equal to yyeof_, rather, test the
1215 lookahead's (translated) kind.
1216
27cb5b59
AD
12172008-11-11 Akim Demaille <demaille@gostai.com>
1218
1219 yychar cannot be empty in yyerrlab.
1220 * TODO (yychar == yyempty_): New.
1221 * data/lalr1.cc: Remove the handling of this case.
1222 This eases forthcoming changes related to yychar and yytranslate.
1223
fce629c0
AD
12242008-11-11 Akim Demaille <demaille@gostai.com>
1225
1226 Bench: syntactic sugar for %define/#define.
1227 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
1228 (&bench_push_parser, bench_variant_parser): Use this feature.
1229 (&eat): New.
1230 Use it.
1231
ce671960
AD
12322008-11-11 Akim Demaille <demaille@gostai.com>
1233
1234 Less memory pressure on the "list" bench.
1235 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
1236 the values, to limit memory pressure.
1237
2873fdf8
AD
12382008-11-11 Akim Demaille <demaille@gostai.com>
1239
1240 Introduce make_symbol.
b06df3c2
AD
1241 make_symbol provides a means to construct a full symbol (kind,
1242 value, location) in a single shot. It is meant to be a Symbol
1243 constructor, parameterized by the symbol kind so that overloading
1244 would prevent incorrect kind/value pairs. Unfortunately
1245 parameterized constructors do not work well in C++ (unless the
1246 parameter also appears as an argument, which is not acceptable),
1247 hence the use of a function instead of a constructor.
2df9ec37 1248
2873fdf8
AD
1249 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1250 (b4_symbol_constructor_declarations)
1251 (b4_symbol_constructor_specialization_)
1252 (b4_symbol_constructor_specializations)
1253 (b4_symbol_constructor_definition_)
1254 (b4_symbol_constructor_definitions): New.
1255 Use them where appropriate to generate declaration, declaration of
1256 the specializations, and implementations of the templated
1257 overloaded function "make_symbol".
1258 (variant::variant): Always define a default ctor.
1259 Also provide a copy ctor.
1260 (symbol_base_type, symbol_type): New ctor overloads for value-less
1261 symbols.
1262 (symbol_type): Now public, so that functions such as yylex can use
1263 it.
1264
8be046d7
AD
12652008-11-11 Akim Demaille <demaille@gostai.com>
1266
1267 Inform m4 whether a tag is a valid id.
1268 * src/output.c (is_identifier): New.
1269 (symbol_definitions_output): Use it to define tag_is_id.
1270 But maybe this should be done at m4 level?
1271
de62edee
AD
12722008-11-11 Akim Demaille <demaille@gostai.com>
1273
1274 Test 214 was failing: it greps with a pattern containing [ ]*
1275 which obviously meant to catch spaces and tabs, but contained only
1276 spaces. Tabulations in sources are a nuisance, so to simplify the
1277 matter, get rid of all the tabulations in the Java sources. The
1278 other skeletons will be treated equally later.
1279
1280 * data/java.m4, data/lalr1.java: Untabify.
1281 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
1282 tabulations are no longer generated.
1283
905f0697
PB
12842008-11-11 Paolo Bonzini <bonzini@gnu.org>
1285
1286 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1287 * configure.ac: Adjust usage.
1288 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1289 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1290 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1291
09ccae9b
DJ
12922008-11-10 Di-an Jan <dianj@freeshell.org>
1293
1294 Workaround Java's ``code too large'' problem for parser tables
1295 in most cases, by using one function per initialization.
1296 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
1297 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
1298 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
1299 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
1300 (yytname_): Use b4_typed_parser_table.
1301 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
1302 ``code too large'' error.
1303
1979121c
DJ
13042008-11-10 Di-an Jan <dianj@freeshell.org>
1305
1306 * NEWS: Document them.
de62edee 1307
1979121c
DJ
1308 General Java skeleton improvements.
1309 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
1310 using gcj < 4.3 in the testsuite, according to comments in
1311 gnulib/m4/javacomp.m4.
1312 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
1313 location_type, position_type): Remove extraneous brackets from
1314 b4_percent_define_default.
1315 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
1316 m4_define and m4_define_default.
1317 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
1318 which marks the end of user code with appropriate syncline, like all
1319 the other skeletons.
1320 (b4_user_post_prologue): Add. Don't silently drop.
1321 (yylex): Remove.
1322 (parse): Inline yylex.
1323 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
1324 (%{...%}): Fix typo of %code imports.
1325 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
1326
1327 Support annotations on parser class with %define annotations.
1328 * data/lalr1.java (annotations): Add to parser class modifier.
1329 * doc/bison.texinfo (Java Parser Interface): Document
1330 %define annotations.
1331 (Java Declarations Summary): Document %define annotations.
1332 * tests/java.at (Java parser class modifiers): Test annotations.
1333
1334 Do not generate code for %error-verbose unless requested.
1335 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
1336 Make private. Make conditional on %error-verbose.
1337 (getErrorVerbose, setErrorVerbose): New.
1338 (yytnamerr_): Make conditional on %error-verbose.
1339 (yysyntax_error): Make some code conditional on %error-verbose.
1340 * doc/bison.texinfo (Java Bison Interface): Remove the parts
1341 about %error-verbose having no effect.
1342 (getErrorVerbose, setErrorVerbose): Document.
1343
1344 Move constants for token names to Lexer interface.
1345 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
1346 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
1347 (parse): Qualify EOF to Lexer.EOF.
1348 * doc/bison.texinfo (Java Parser Interface): Move documentation of
1349 EOF and token names to Java Lexer Interface.
1350 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
1351
1352 Make yyerror public.
1353 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
1354 (yyerror): Change to public. Add Javadoc comments. Use longer
1355 parameter names. Make the body rather than the declarator
1356 conditional on %locations.
1357 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
1358
1359 Allow user to add code to the constructor with %code init.
1360 * data/java.m4 (b4_init_throws): New, for %define init_throws.
1361 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
1362 Add %code init to the front of the constructor body.
1363 * doc/bison.texinfo (YYParser.YYParser): Document %code init
1364 and %define init_throws.
1365 (Java Declarations Summary): Document %code init and
1366 %define init_throws.
1367 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
1368 (Java constructor init and init_throws): Add tests.
de62edee 1369
42f832d6
AD
13702008-11-10 Akim Demaille <demaille@gostai.com>
1371
1372 Update TODO.
1373 * TODO (-D): is implemented.
1374 (associativity): Same precedence must have the same associativity.
1375 For instance, how can a * b / c be parsed if * is %left and / is
1376 %right?
1377 (YYERRORCODE, YYFAIL, YYBACKUP): New.
1378
247efe34
AD
13792008-11-10 Akim Demaille <demaille@gostai.com>
1380
1381 Formatting changes.
1382
5d731440
AD
13832008-11-10 Akim Demaille <demaille@gostai.com>
1384
1385 More information about the symbols.
1386 * src/output.c (type_names_output): Document all the symbols,
1387 including those that don't have a type-name.
1388 (symbol_definitions_output): Define "is_token" and
1389 "has_type_name".
1390 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
1391 type-name, now that they are defined too in b4_type_names.
1392
21db118b
AD
13932008-11-10 Akim Demaille <demaille@gostai.com>
1394
1395 Regen.
1396
6ed15cde
AD
13972008-11-10 Akim Demaille <demaille@gostai.com>
1398
1399 Make parser::yytranslate static.
b06df3c2
AD
1400 Small speedup (1%) on the list grammar. And makes yytranslate_
1401 available in non member functions.
de62edee 1402
6ed15cde
AD
1403 * data/lalr1.cc (yytranslate_): Does not need to be a instance
1404 function.
1405
30bb2edc
AD
14062008-11-10 Akim Demaille <demaille@gostai.com>
1407
1408 Avoid trailing spaces.
1409 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
1410 * data/lalr1.cc: Don't indent before rule and symbol actions, as
1411 they can be empty, and anyway this incorrectly indents the first
1412 action.
1413
b3a28fd4
AD
14142008-11-10 Akim Demaille <demaille@gostai.com>
1415
1416 Comment changes.
1417
914202bd
AD
14182008-11-10 Akim Demaille <demaille@gostai.com>
1419
1420 Use "enum" for integral constants.
1421 This is just nicer to read, I observed no speedup.
de62edee 1422
914202bd
AD
1423 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
1424 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
1425 (yyuser_token_number_max_, yyundef_token_): Move into...
1426 (yytranslate_): here.
1427
c17f9a4a
AD
14282008-11-10 Akim Demaille <demaille@gostai.com>
1429
1430 Shortcuts in bench directives.
1431 * etc/bench.pl.in (parse_dirs): New.
1432 Use it.
1433 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
1434 Create the benches in "benches/".
1435
b9855ea5
AD
14362008-11-10 Akim Demaille <demaille@gostai.com>
1437
1438 Formatting changes.
1439 * data/lalr1.cc: here.
1440
6e097787
AD
14412008-11-10 Akim Demaille <demaille@gostai.com>
1442
1443 Adjust verbose message to using emacs.
1444 * etc/bench.pl.in: Inform compilation-mode when we change the
1445 directory.
1446 (generate_grammar_list): Recognize %define "variant" in addition
1447 to %define variant.
1448
4c3cc7da
AD
14492008-11-10 Akim Demaille <demaille@gostai.com>
1450
1451 Classify symbols by type-name.
1452 * src/uniqstr.h (UNIQSTR_CMP): New.
1453 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
1454 (type_names_output): New.
1455 (muscles_output): Use it.
1456 * data/lalr1.cc (b4_symbol_action_): Remove.
1457 (b4_symbol_case_, b4_type_action_): New.
1458 Adjust uses of b4_symbol_action_ to use b4_type_action_.
1459
d69c9694
AD
14602008-11-10 Akim Demaille <demaille@gostai.com>
1461
1462 Change the handling of the symbols in the skeletons.
1463 Before we were using tables which lines were the symbols and which
1464 columns were things like number, tag, type-name etc. It is was
1465 difficult to extend: each time a column was added, all the numbers had
1466 to be updated (you asked for colon $2, not for "tag"). Also, it was
1467 hard to filter these tables when only a subset of the symbols (say the
1468 tokens, or the nterms, or the tokens that have and external number
1469 *and* a type-name) was of interest.
de62edee 1470
d69c9694
AD
1471 Now instead of monolithic tables, we define one macro per cell. For
1472 instance "b4_symbol(0, tag)" is a macro name which contents is
1473 self-decriptive. The macro "b4_symbol" provides easier access to
1474 these cells.
de62edee 1475
d69c9694
AD
1476 * src/output.c (type_names_output): Remove.
1477 (symbol_numbers_output, symbol_definitions_output): New.
1478 (muscles_output): Call them.
1479 (prepare_symbols): Define b4_symbols_number.
1480
5263bea9
AD
14812008-11-10 Akim Demaille <demaille@gostai.com>
1482
1483 --trace=muscles
1484 * src/getargs.h, src/getargs.c (trace_muscle): New.
1485 (trace_types, trace_args): Support it.
1486 * src/output.c (output_skeleton): Use it.
1487
4175f6bb
AD
14882008-11-10 Akim Demaille <demaille@gostai.com>
1489
1490 muscles_output.
1491 * src/output.c (muscles_output): New, extracted from...
1492 (output_skeleton): here.
1493 Adjust.
1494
1de69d6a
AD
14952008-11-10 Akim Demaille <demaille@gostai.com>
1496
1497 Formatting changes.
1498
36db78a7
AD
14992008-11-10 Akim Demaille <demaille@gostai.com>
1500
1501 Update the variant example.
1502 * examples/variant.yy: Formatting changes.
1503 One stage build.
1504
e5eb92e7
AD
15052008-11-10 Akim Demaille <demaille@gostai.com>
1506
1507 Support constructor with an argument.
1508 This improves the "list" bench by 2%.
de62edee 1509
e5eb92e7
AD
1510 * data/lalr1.cc (variant::build): Add an overloaded version with
1511 an argument.
1512 * tests/c++.at (AT_CHECK_VARIANT): Check it.
1513
76307410
AD
15142008-11-10 Akim Demaille <demaille@gostai.com>
1515
1516 Test variants.
1517 * tests/c++.at (AT_CHECK_VARIANTS): New.
1518 Use it with and without %define assert.
1519
d78f0ac9
AD
15202008-11-10 Akim Demaille <demaille@gostai.com>
1521
1522 Add %precedence support.
1523 Unfortunately it is not possible to reuse the %prec directive. This
1524 is because to please POSIX, we do not require to end the rules with a
1525 semicolon. As a result,
de62edee 1526
d78f0ac9 1527 foo: bar %prec baz
de62edee 1528
d78f0ac9
AD
1529 is ambiguous: either a rule which precedence is that of baz, or a rule,
1530 and then a declaration of the precedence of the token baz.
de62edee 1531
d78f0ac9
AD
1532 * doc/bison.texinfo: Document %precedence.
1533 (Precedence Only): New.
1534 * src/assoc.h, src/assoc.c (precedence_assoc): New.
1535 * src/conflicts.c (resolve_sr_conflict): Support it.
1536 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
1537 Parse it.
1538 * tests/calc.at: Use %precedence for NEG.
1539 * tests/conflicts.at (%precedence does not suffice)
1540 (%precedence suffices): New tests.
1541
c85be41a
AD
15422008-11-09 Akim Demaille <demaille@gostai.com>
1543
1544 Make benches in a sub dirs.
1545 * etc/bench.pl.in ($dir): New.
1546 Use it.
1547 Check the use of constructors with an argument.
1548 (bench_variant_parser): Fix.
1549
db65ca1f
AD
15502008-11-09 Akim Demaille <demaille@gostai.com>
1551
1552 fix eof condition
1553
9b0efa5b
AD
15542008-11-09 Akim Demaille <demaille@gostai.com>
1555
1556 Fix --help.
1557
432ac57a
AD
15582008-11-09 Akim Demaille <demaille@gostai.com>
1559
1560 Require the generation of parse-gram.output.
1561 * src/Makefile.am (YACC): Pass --report=all.
1562
deef2a0a
AD
15632008-11-09 Akim Demaille <demaille@gostai.com>
1564
1565 Formatting changes.
1566
df72984a
AD
15672008-11-09 Akim Demaille <demaille@gostai.com>
1568
1569 Update TODO.
1570 * TODO: Remove obsolete items.
1571 Update others.
1572
f10e19fd
AD
15732008-11-09 Akim Demaille <demaille@gostai.com>
1574
1575 Enhance bench.pl.
1576 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
1577 (@token, $grammar, $bench): New.
1578 (generate_grammar_variant): Rename as...
1579 (generate_grammar_list): this.
1580 (generate_grammar): Adjust.
1581 (bench_grammar): Rename as...
1582 (bench): this.
1583 Use it in the various bench-marking routines.
1584 (-b, -g): New options.
1585
5de9c593
AD
15862008-11-09 Akim Demaille <demaille@gostai.com>
1587
1588 Use a static hierarchy for symbols in the C++ parser.
1589 * data/lalr1.cc (symbol_base_type, symbol_type)
1590 (stack_symbol_type): Make it a static hierarchy.
1591 Adjust dependencies.
1592
757f8f98
AD
15932008-11-09 Akim Demaille <demaille@gostai.com>
1594
1595 bench.pl -d, --directive.
1596 * etc/bench.pl.in (@directive): New.
1597 (&bench_grammar): Use it.
1598 (&bench_list_grammar): New, to provide access to the "variant"
1599 grammar.
1600 Use it.
1601 (getopts): Support -d, --directive.
1602
d3be4f6d
AD
16032008-11-09 Akim Demaille <demaille@gostai.com>
1604
1605 Use inline for small operations.
1606 * data/lalr1.cc (symbol_base_type, symbol_type)
1607 (stack_symbol_type): Declare constructor and other operations as
1608 inline.
1609 (yy_destroy_): Inline.
1610
1f7d007b
AD
16112008-11-09 Akim Demaille <demaille@gostai.com>
1612
1613 Introduce a hierarchy for symbols.
1614 * data/lalr1.cc (symbol_base_type, symbol_type): New.
1615 (data_type): Rename as...
1616 (stack_symbol_type): this.
1617 Derive from symbol_base_type.
1618 (yy_symbol_value_print_): Merge into...
1619 (yy_symbol_print_): this.
1620 Rename as...
1621 (yy_print_): this.
1622 (yydestruct_): Rename as...
1623 (yy_destroy_): this.
1624 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
1625 (parser::parse): yyla is now of symbol_type.
1626 Use its type member instead of yytoken.
1627
bc0b0477
AD
16282008-11-09 Akim Demaille <demaille@gostai.com>
1629
1630 Rename data_type and stack_symbol_type.
1631 * data/lalr1.cc (data_type): Rename as...
1632 (stack_symbol_type): this.
1633
57295d14
AD
16342008-11-09 Akim Demaille <demaille@gostai.com>
1635
1636 Handle semantic value and location together.
1637 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
1638 yydata.value and yydata.location.
1639 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
1640 (YY_SYMBOL_PRINT): Now take semantic value and location as a
1641 single arg.
1642 Adjust all callers.
1643 (yydestruct_): New overload for a stack symbol.
1644
e9b0834e
AD
16452008-11-09 Akim Demaille <demaille@gostai.com>
1646
1647 Push a complete symbol, not connected parts.
1648 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
1649 state, value and location.
1650 Adjust callers.
1651
6082531a
AD
16522008-11-09 Akim Demaille <demaille@gostai.com>
1653
1654 Agregate yylval and yylloc.
1655 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
1656 (parser::yyla): this.
1657
33c195cc
AD
16582008-11-09 Akim Demaille <demaille@gostai.com>
1659
1660 Rely on the state stack to display reduction traces.
b06df3c2
AD
1661 To display rhs symbols before a reduction, we used information
1662 about the rule reduced, which required the tables yyrhs and
1663 yyprhs. Now use rely only on the state stack to get the same
1664 information.
de62edee 1665
33c195cc
AD
1666 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
1667 Use them.
1668 (parser::yyrhs_, parser::yyprhs_): Remove.
1669 (parser::yy_reduce_print_): Use the state stack.
1670
e1f93869
AD
16712008-11-09 Akim Demaille <demaille@gostai.com>
1672
1673 Fuse yyval and yyloc into yylhs.
1674 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
1675 yylhs.
1676 (parse): Replace yyval and yyloc with yylhs.value and
1677 yylhs.location.
1678 After a user action, compute yylhs.state earlier.
1679 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
1680 fresh error_token.
1681
2935744b
DJ
16822008-11-09 Di-an Jan <dianj@freeshell.org>
1683
1684 Remove unused variable.
1685 * src/output.c (type_names_output): Remove unused variable sep.
1686
bbf9ca37
PB
16872008-11-09 Paolo Bonzini <bonzini@gnu.org>
1688
1689 Change tests/output.at quoting.
1690 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
1691 expanding arguments.
1692
d9a9b96b
JD
16932008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1694
1695 Don't add a semicolon to actions for %skeleton or %language.
1696 It breaks Java test cases as reported by Akim Demaille.
1697 * src/scan-code.l: Implement.
1698
51365192
JD
16992008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1700
1701 Clean up %skeleton and %language priority implementation.
1702 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1703 remove static qualifier because others will soon need to see it.
1704 (language_prio): Likewise.
1705 (getargs): Use command_line_prio rather than 0.
1706 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1707 enum fields.
1708 (skeleton_prio): Extern it.
1709 (language_prio): Extern it.
1710 * src/parse-gram.y: Use grammar_prio rather than 1.
1711
9380cfd0
AD
17122008-11-07 Akim Demaille <demaille@gostai.com>
1713
1714 Moving push traces into yypush_.
1715 * data/lalr1.cc (yypush_): Now takes a optional trace message.
1716 Adjust all uses.
1717
8901f32e
AD
17182008-11-07 Akim Demaille <demaille@gostai.com>
1719
1720 The single-stack C++ parser is now the standard one.
1721 * data/lalr1.cc: Rename as...
1722 * data/lalr1-split.cc: this.
1723 * data/lalr1-fusion.cc: Rename as...
1724 * data/lalr1.cc: this.
1725 * etc/bench.pl.in: Adjust.
1726
8cdabf02
AD
17272008-11-07 Akim Demaille <demaille@gostai.com>
1728
1729 Avoid empty-if warnings.
1730 Reported by Quentin Hocquet.
de62edee 1731
8cdabf02
AD
1732 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
1733 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
1734
5a893c2b
AD
17352008-11-07 Akim Demaille <demaille@gostai.com>
1736
1737 Pass command line location to skeleton_arg and language_argmatch.
1738 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1739 The location argument is now mandatory.
1740 Adjust all dependencies.
1741 (getargs): Use command_line_location.
1742
58697c6d
AD
17432008-11-07 Akim Demaille <demaille@gostai.com>
1744
1745 -D, --define.
1746 * src/getargs.c (usage): Document -D.
1747 Fix help string for --locations.
1748 (command_line_location): New.
1749 (short_options, long_options, getargs): Support -D, --define.
1750 (getargs): Move -d support at the right place.
1751 * doc/bison.texinfo (Bison Options): Update.
1752 * tests/input.at (%define, --define): New.
1753
9fe5a457
AD
17542008-11-07 Akim Demaille <demaille@gostai.com>
1755
1756 Initialize the muscle table before parsing the command line.
1757 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1758 (getargs): Define file_name.
1759 * src/main.c (main): Initialize muscle_tab before calling
1760 getargs.
1761 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1762 its value is not available yet.
1763
56c5eca9
AD
17642008-11-07 Akim Demaille <demaille@gostai.com>
1765
1766 Locations without columns for command line arguments.
1767 * src/location.c (location_print): Don't display negative columns.
1768 * src/location.h: Document this.
1769
9b9e0a7d
AD
17702008-11-07 Akim Demaille <demaille@gostai.com>
1771
1772 Fix --help.
1773 * src/getargs.c (usage): Fix help string for -W.
1774
74eae918
AD
17752008-11-07 Akim Demaille <demaille@gostai.com>
1776
1777 Handle more general types of option arguments.
1778 * build-aux/cross-options.pl: The argument ends at the first
1779 space, not the first non-symbol character.
1780 Use @var for each word appearing the argument description.
1781
a3d4c6fb
AD
17822008-11-07 Akim Demaille <demaille@gostai.com>
1783
1784 Destroy the variants that remain on the stack in case of error.
1785 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
1786 destructor.
1787 Display the value only if yymsg is nonnull.
1788 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
1789
2d32fc9f
AD
17902008-11-07 Akim Demaille <demaille@gostai.com>
1791
1792 Add "%define assert" to variants.
1793 This is used to help the user catch cases where some value gets
1794 ovewritten by a new one. This should not happen, as this will
1795 probably leak.
de62edee 1796
2d32fc9f
AD
1797 Unfortunately this uncovered a bug in the C++ parser itself: the
1798 lookahead value was not destroyed between two calls to yylex. For
1799 instance if the previous lookahead was a std::string, and then an int,
1800 then the value of the std::string was correctly taken (i.e., the
1801 lookahead was now an empty string), but std::string structure itself
1802 was not reclaimed.
de62edee 1803
2d32fc9f
AD
1804 This is now done in variant::build(other&) (which is used to take the
1805 value of the lookahead): other is not only stolen from its value, it
1806 is also destroyed. This incurs a new performance penalty of a few
1807 percent, and union becomes faster again.
de62edee 1808
2d32fc9f
AD
1809 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
1810 (b4_variant_if): New.
1811 (variant::built): New.
1812 Use it whereever the status of the variant changes.
1813 * etc/bench.pl.in: Check the penalty of %define assert.
1814
f6038cb8
AD
18152008-11-07 Akim Demaille <demaille@gostai.com>
1816
1817 Use "%define variant" in bench.pl.
1818 * etc/bench.pl.in: No longer use the pseudo directive %variants,
1819 just use %define variants.
1820
ccde1f98
AD
18212008-11-07 Akim Demaille <demaille@gostai.com>
1822
1823 Regen.
1824 * src/parse-gram.h, src/parse-gram.c: Regen.
1825
58bd33b7
JD
18262008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1827
1828 Fix user actions without a trailing semicolon.
1829 Reported by Sergei Steshenko at
1830 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1831 * THANKS (Sergei Steshenko): Add.
1832 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1833 * tests/regression.at (Fix user actions without a trailing semicolon):
1834 New test case.
1835
639867b5
AD
18362008-11-04 Akim Demaille <demaille@gostai.com>
1837
1838 Use b4_copyright_years.
1839 * data/yacc.c (b4_copyright_years): New.
1840 Fix its value according to the comments in the file.
1841 Use it and undefine it.
1842
3c262606
AD
18432008-11-04 Akim Demaille <demaille@gostai.com>
1844
1845 Formatting changes.
1846 * data/lalr1-fusion.cc, src/parse-gram.y: here.
1847
a2b93d52
AD
18482008-11-04 Akim Demaille <demaille@gostai.com>
1849
1850 Formatting changes.
1851 * data/lalr1-fusion.cc: here.
1852
3a2803df
AD
18532008-11-04 Akim Demaille <demaille@gostai.com>
1854
1855 Use strict on bench.pl.
1856 * etc/bench.pl.in (&run, &generate_grammar): New.
1857 Rename the grammar generating functions for consistency.
1858 Change the interface so that the list of benches to run is passed
1859 as (optionless) arguments.
1860 (&compile): Use &run.
1861
a0d4650a
AD
18622008-11-04 Akim Demaille <demaille@gostai.com>
1863
1864 Remove spurious initial empty lines.
1865 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1866 * data/yacc.c: End the @output lines with an @.
1867
cac9e09b
AD
18682008-11-04 Akim Demaille <demaille@gostai.com>
1869
1870 Improve the display of sizes.
1871 * etc/bench.p.in: Higher precision.
1872 Sort by decreasing size.
1873
4af4348a
AD
18742008-11-04 Akim Demaille <demaille@gostai.com>
1875
1876 Don't memcpy C++ structures.
1877 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
1878 arguments.
1879 (variant::build): New overload for
1880 copy-construction-that-destroys.
1881 (variant::swap): New.
1882 (parser::yypush_): Use it in variant mode.
1883
ef05c4d6
AD
18842008-11-04 Akim Demaille <demaille@gostai.com>
1885
1886 Better defaults for bench.pl.
1887 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
1888 default values.
1889 Adjust &verbose uses.
1890 (-q, --quiet): New.
1891
9718cfa9
AD
18922008-11-04 Akim Demaille <demaille@gostai.com>
1893
1894 Make variant.yy more complex.
1895 std::list cannot be copied via memcpy, they are more demanding than
1896 std::string. Use one std::list to strengthen the test.
de62edee 1897
9718cfa9
AD
1898 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
1899 Adjust.
1900 Create a list of strings, instead of a single large string.
1901
a6df593d
AD
19022008-11-04 Akim Demaille <demaille@gostai.com>
1903
1904 bench.pl --bench.
1905 * etc/bench.pl.in (--bench, $bench): New.
1906
006a0303
AD
19072008-11-04 Akim Demaille <demaille@gostai.com>
1908
1909 Sort methods.
1910 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
1911 Define it after as().
1912
faef3466
AD
19132008-11-04 Akim Demaille <demaille@gostai.com>
1914
1915 Useless parens.
1916 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
1917
2141aded
AD
19182008-11-04 Akim Demaille <demaille@gostai.com>
1919
1920 Issue missing synclines after user actions.
1921 * data/c.m4 (b4_case): Issue synclines on the output file.
1922
e426d17b
AD
19232008-11-04 Akim Demaille <demaille@gostai.com>
1924
1925 Remove trailing empty line.
1926 * data/lalr1-fusion.cc: Don't add an empty line after the user's
1927 epilogue.
1928
a9ce3f54
AD
19292008-11-04 Akim Demaille <demaille@gostai.com>
1930
1931 Fix output of copyright years.
1932 * data/bison.m4 (b4_copyright): Fix the indentation of the
1933 copyright year paragraph.
1934 Use b4_copyright_years when no years are given.
1935 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
1936 (b4_copyright_years): New.
1937 Use it.
1938
59c544c2
AD
19392008-11-04 Akim Demaille <demaille@gostai.com>
1940
1941 Avoid the spurious initial empty line.
1942 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
1943 the end of @output request to suppress the empty line that
1944 results.
1945
96b15448
AD
19462008-11-04 Akim Demaille <demaille@gostai.com>
1947
1948 Remove parser::rhs_number_type.
1949 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
1950 (yyrhs_): Use b4_table_define.
1951
f0633174
AD
19522008-11-04 Akim Demaille <demaille@gostai.com>
1953
1954 Fix iteration type.
1955 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
1956
417b8004
AD
19572008-11-04 Akim Demaille <demaille@gostai.com>
1958
1959 Factor the declaration of the integer tables.
1960 * data/lalr1-fusion.cc (b4_table_define): New.
1961 Use it.
1962
1a5246c6
AD
19632008-11-03 Akim Demaille <demaille@gostai.com>
1964
1965 Fix indentation of tables in lalr1.cc
1966 * data/lalr1-fusion.cc: Fix the indentation.
1967
f8a95c9c
AD
19682008-11-03 Akim Demaille <demaille@gostai.com>
1969
1970 Destroy the lhs symbols after reduction.
1971 * data/lalr1-fusion.cc (parse): After the user action, when in
1972 variant mode, destroy the lhs symbols.
1973
d7f4d823
AD
19742008-11-03 Akim Demaille <demaille@gostai.com>
1975
1976 Simplify yysyntax_error_ use.
1977 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
1978 type, but make it unnamed in the declaration when it is not used.
1979
8b9c89fb
AD
19802008-11-03 Akim Demaille <demaille@gostai.com>
1981
1982 Let yy::variant::build return an lvalue.
1983 * data/lalr1-fusion.cc (variant::build): Return a reference to the
1984 object.
1985
83243c24
AD
19862008-11-03 Akim Demaille <demaille@gostai.com>
1987
1988 Define yy::variant only when needed.
1989 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
1990 used.
1991
429b4848
AD
19922008-11-03 Akim Demaille <demaille@gostai.com>
1993
1994 Bench the three-stack lalr1.cc.
1995 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
1996 one-stack one.
1997
414c76a4
AD
19982008-11-03 Akim Demaille <demaille@gostai.com>
1999
2000 Fail on parse error in calc++.
2001 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
2002 status.
2003 * examples/calc++/test ($me, $number, $exit, run): New.
2004 Use them to propagate errors to the exit status.
2005
8a5783fd
AD
20062008-11-03 Akim Demaille <demaille@gostai.com>
2007
2008 Don't specify the skeleton twice in the example.
2009 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
2010 file does what is needed.
2011
0cc5bead
AD
20122008-11-03 Akim Demaille <demaille@gostai.com>
2013
2014 bench: Improve output.
2015 * etc/bench.pl.in (bench_grammar): Tune the printf format.
2016
5b421a4e
AD
20172008-11-03 Akim Demaille <demaille@gostai.com>
2018
2019 bench: check impact of %debug on variants.
2020 * etc/bench.pl.in (variant_grammar): Fix the computation of
2021 $variant.
2022 Generate a grammar file that can work with or without %debug.
2023 Do use the @directive.
2024 (bench_variant_parser): Check impact of %debug.
2025 (@directives): Rename all the occurrences to...
2026 (@directive): this, for consistency.
2027
d11ee647
AD
20282008-11-03 Akim Demaille <demaille@gostai.com>
2029
2030 bench: report the size too.
2031 * etc/bench.pl.in ($iterations): Defaults to -3.
2032 (&bench_grammar): Require hireswallclock.
2033 Compute and display the size of the result.
2034 More comments.
2035
e1b74b92
AD
20362008-11-03 Akim Demaille <demaille@gostai.com>
2037
2038 bench: More use of the verbosity level.
2039 * etc/bench.pl.in ($verbose, &verbose): New.
2040 Use them.
2041 More POD documentation.
2042
7e5f9c54
AD
20432008-11-03 Akim Demaille <demaille@gostai.com>
2044
2045 bench.pl: a command line interface
2046 * etc/bench.pl.in: More doc.
2047 Some fixes in the documentation.
2048 ($cflags, $iterations, &help, &getopt): New.
2049 Use them.
2050 (&variant_grammar): Let the number of stages be 10 times what is
2051 specified.
2052
7109a18d
AD
20532008-11-03 Akim Demaille <demaille@gostai.com>
2054
2055 Bench the use of Boost.Variants.
2056 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2057 New.
2058 (&compile): Be ready to compile C++ parsers.
2059 (&bench_push_parser): Move debug information to the outermost
2060 level.
2061 * THANKS: Add Michiel De Wilde.
2062
922730fe
AD
20632008-11-03 Akim Demaille <demaille@gostai.com>
2064
2065 bench.pl: Pass directives as a list instead of as a string.
2066 * etc/bench.pl.in (&directives): New.
2067 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2068 directives.
2069 (&triangular_grammar): Do use the directives (were ignored).
2070 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2071 directives.
2072
7484f1d4
AD
20732008-11-03 Akim Demaille <demaille@gostai.com>
2074
2075 Improve genericity of bench.pl.
2076 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2077 argument.
2078 (&bench_push_parser): New.
2079 Call it.
2080
15129f25
AD
20812008-11-03 Akim Demaille <demaille@gostai.com>
2082
2083 Add documentation to bench.pl.
2084 * etc/bench.pl.in: Comment changes.
2085
0e0ed236
AD
20862008-11-03 Akim Demaille <demaille@gostai.com>
2087
2088 Fuse the three stacks into a single one.
de62edee 2089
b06df3c2
AD
2090 In order to make it easy to perform benchmarks to ensure that
2091 there are no performance loss, lalr1.cc is forked into
2092 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
2093 lalr1.cc.
2094
2095 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2096 exercized by the test suite, the user must install a symbolic link
2097 from lalr1.cc to it.
de62edee 2098
b06df3c2
AD
2099 Instead of having three stacks (state, value, location), use a
2100 stack of triples. This considerably simplifies the code (and it
2101 will be easier not to require locations as currently does the C++
2102 parser), and also gives a 10% speedup according to
2103 etc/bench (probably mainly since memory allocation is done once
2104 instead of three times).
de62edee 2105
0e0ed236
AD
2106 Another motivation is to make it easier to destruct properly
2107 semantic values: now that they are bound to their state (hence
2108 symbol type) it will be easier to call the appropriate destructor.
de62edee 2109
0e0ed236 2110 These changes should probably benefit the C parser too.
de62edee 2111
b06df3c2
AD
2112 * data/lalr1.cc: Copy as...
2113 * data/lalr1-fusion.cc: this new file.
0e0ed236
AD
2114 (b4_rhs_value, b4_rhs_location): New definitions overriding those
2115 from c++.m4.
2116 (state_stack_type, semantic_stack_type, location_stack_type)
2117 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
2118 (data_type, stack_type, yystack_): New.
2119 (YYLLOC_DEFAULT, yypush_): Adjust.
2120 (yyerror_range): Now based on data_type, not location_type.
2121
7dedf26e
AD
21222008-11-03 Akim Demaille <demaille@gostai.com>
2123
2124 Push the state, value, and location at the same time.
2125 This is needed to prepare a forthcoming patch that fuses the three
2126 stacks into one.
de62edee 2127
7dedf26e
AD
2128 * data/lalr1.cc (parser::yypush_): New.
2129 (parser::yynewstate): Change the semantics: instead of arriving to
2130 this label when value and location have been pushed, but yystate
2131 is to be pushed on the state stack, now the three of them must
2132 have been pushed before. yystate still must be the new state.
2133 This allows to use yypush_ everywhere instead of individual
2134 handling of the stacks.
2135
c4585f1e
AD
21362008-11-03 Akim Demaille <demaille@gostai.com>
2137
2138 Prefer references to pointers.
2139 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
2140 definition to use references instead of pointers.
2141 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
2142 Take the value and location as references.
2143 Adjust callers.
2144
56017c17
AD
21452008-11-03 Akim Demaille <demaille@gostai.com>
2146
2147 stack::size instead of stack::height.
2148 * data/lalr1.cc (stack::height): Rename as...
2149 (stack::size): this.
2150 Fix the output type.
2151 Comment changes.
2152
5ab8c47b
AD
21532008-11-03 Akim Demaille <demaille@gostai.com>
2154
2155 Use variants to support objects as semantic values.
b06df3c2
AD
2156 This patch was inspired by work by Michiel De Wilde. But he used
2157 Boost variants which (i) requires Boost on the user side, (ii) is
2158 slow, and (iii) has useless overhead (the parser knows the type of
2159 the semantic value there is no reason to duplicate this
2160 information as Boost.Variants do).
2161
2162 This implementation reserves a buffer large enough to store the
2163 largest objects. yy::variant implements this buffer. It was
2164 implemented with Quentin Hocquet.
de62edee 2165
5ab8c47b
AD
2166 * src/output.c (type_names_output): New.
2167 (output_skeleton): Invoke it.
2168 * data/c++.m4 (b4_variant_if): New.
2169 (b4_symbol_value): If needed, provide a definition for variants.
2170 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
2171 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
2172 (b4_char_sizeof, yy::variant): New.
2173 (parser::parse): If variants are requested, define
2174 parser::union_type, parser::variant, change the definition of
2175 semantic_type, construct $$ before running the user action instead
2176 of performing a default $$ = $1.
2177 * examples/variant.yy: New.
2178 Based on an example by Michiel De Wilde.
2179
1fa5d8bb
AD
21802008-11-03 Akim Demaille <demaille@gostai.com>
2181
2182 Parameterize the extraction of semantic values.
2183 To make future changes easier, no longer rely on ".TYPE" being the
2184 way to get a semantic value.
de62edee 2185
1fa5d8bb
AD
2186 * data/c.m4 (b4_symbol_value): New.
2187 Use it.
2188 * data/c++.m4, data/yacc.c: Use it.
2189 * data/glr.c: Use b4_symbol_value.
2190 (b4_rhs_data): New.
2191 Use it.
2192
91ba8a55
AD
21932008-11-03 Akim Demaille <demaille@gostai.com>
2194
2195 Prepare easier M4 changes.
2196 * data/lalr1.cc: Use escaped [] instead of literals to prepare
2197 future changes.
2198
c9ba9e59
JD
21992008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2200
2201 Initiate further development.
2202 * NEWS: Create an empty section for new entries.
2203 * gnulib: Update submodule to HEAD.
2204
bfb40910
JD
22052008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2206
2207 * NEWS: Version 2.4.
2208
241fda7a
JD
22092008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2210
2211 Prepare for next release.
2212 * NEWS: Briefly mention changes since 2.3b.
2213 * README: Say GNU m4 1.4.6, which we've been requiring in release
2214 announcements already, not 1.4.3, which breaks the build.
2215
ed4d67dc
JD
22162008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2217
2218 Say %language is experimental.
2219 We're thinking of extending it's effect on output file naming. See the
2220 thread at
2221 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2222 * NEWS: Say it's experimental.
2223 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2224 recommend it over %skeleton for now.
2225 (Bison Options): Likewise.
2226 (C++ Bison Interface): Use %skeleton not %language.
2227 (Calc++ Parser): Use %skeleton not %language.
2228 * src/getargs.c (usage): Say it's experimental.
2229
e254a580
DJ
22302008-11-01 Di-an Jan <dianj@freeshell.org>
2231 Paolo Bonzini <bonzini@gnu.org>
2232
2233 Support all Java parser class modifiers.
2234 * data/java.m4 (b4_percent_define_get3): New.
2235 (b4_final_if, b4_strictfp_if): New.
2236 * data/lalr1.java (final, strictfp, extends, implements): Support.
2237 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2238 documentation.
2239 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2240 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2241 (AT_CHECK_JAVA_GREP): New.
2242 (Java parser class modifiers): New test.
2243 (Java parser class extends and implements): New test.
2244
2245 Model exception propagation better with throws and lex_throws.
2246 * data/java.m4 (b4_list2): New.
2247 (throws): Change default.
2248 * data/lalr1.java (yyaction): Add throws.
2249 (parse): Add lex_throws in addition to throws.
2250 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2251 * tests/java.at (Java throws specifications): New test.
2252
2253 Improve documentation for Java parsers.
2254 * doc/bison.texinfo (Java Parsers): Add subsections.
2255 Don't quote first argument of %define.
2256 (Java Bison Interface): Document output files. Move documentation
2257 of parser class and merge into Java Parser Interface. Document
2258 features that error out. Document directives with no effect.
2259 Move note about Javadoc higher.
2260 (Java Semantic Values): Explicitly mention stype.
2261 Document that generic types cannot be used.
2262 (Java Location Values): Use @deftypeivar. Document constructors.
2263 Correct return value for toString.
2264 (Java Parser Interface): List undocumented constants/fields.
2265 Move documentation of fields added by %parse-param closer to list
2266 of members. Document that token names are added as fields.
2267 Document constructors accurately. Remove error method.
2268 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2269 Interface. Describe %code lexer and yylex accutately.
2270 Remove documentation that does not match the code.
2271 (Java Action Features): New.
2272 (Java Differences): Add reference. Add item on semantic values.
2273 Add note about @{ ... @}. Clarify %% epilogue placement.
2274 (Java Declarations Summary): New.
2275
2276 Fix Java skeleton.
2277 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2278 (b4_remove_comma): Quote test argument.
2279 (b4_identification): Remove "bison" field.
2280 * tests/java.at (Java parser class and package names): New test.
2281 (Java %parse-param and %lex-param): New test.
2282 (Java stype, position_class and location_class): New test.
2283
f259e4e6
PB
22842008-10-31 Di-an Jan <dianj@freeshell.org>
2285
2286 * data/lalr1.jave: Update copyright years.
2287 (YYParser): Correct name of "generated from" file in Javadoc:
2288 use b4_file_name instead of @ofile@.
2289 (Location constructor): Correct Javadoc parameter name.
2290 (yylloc): Add missing opening m4 quote after b4_location_if.
2291 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2292 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2293 (YYParser constructor): Correct Javadoc parameter name.
2294
cae5057f
JD
22952008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2296
2297 Always put auxiliary code files in the same dir as other output files.
2298 * src/files.c (compute_file_name_parts): When the user specifies
2299 --output but not --file-prefix, extract the directory prefix from the
2300 file prefix not from the grammar file name. This affects the location
2301 of files like location.hh generated by the C++ skeleton. The includes
2302 in the other output files require this fix.
2303 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2304 for expected output files.
2305 (Output files): Add a test for the above.
2306
4af432ba
JD
23072008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2308
2309 * gnulib: Update submodule to HEAD.
2310
e26d4e43
JD
23112008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2312
2313 Update copyright year.
2314 * src/files.c: Here.
2315
c0ee9e21
DJ
23162008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2317
2318 Don't overwrite the input file.
2319 * src/files.c (output_file_name_check): Fatal error if using input file
2320 for output.
2321 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2322 argument.
2323 (Conflicting output files): Add test.
2324
482dc52f
AD
23252008-10-28 Akim Demaille <demaille@gostai.com>
2326
2327 Space changes.
2328 * data/lalr1.cc: Formatting changes.
2329
52cbbe84
AD
23302008-10-28 Akim Demaille <demaille@gostai.com>
2331
2332 Don't define debugging functions when !YYDEBUG.
2333 * data/lalr1.cc (debug_stream, set_debug_stream)
2334 (debug_level_type, debug_level, set_debug_level): Don't
2335 declare them when YYDEBUG is not defined.
2336 The implementation are already YYDEBUG-aware.
2337
0925d5bf
AD
23382008-10-28 Akim Demaille <demaille@gostai.com>
2339
2340 Prefer "continue" for empty loop bodies.
2341 * etc/bench.pl.in: Use "continue" instead of {}.
2342
cf98343c
AD
23432008-10-28 Akim Demaille <demaille@gostai.com>
2344
2345 Space and comments changes.
2346 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2347 * data/c.m4, data/lalr1.cc: Space changes.
2348
9f467b7d
AD
23492008-10-28 Akim Demaille <demaille@gostai.com>
2350
2351 Make gnulib a submodule.
2352 * gnulib: New.
2353 * .gitmodules (gnulib): New.
2354
0f0e1ace
JD
23552008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2356
2357 Fix yyerror_range for user-defined location type in C++. Reported by
2358 Georg Sauthoff at
2359 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2360 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2361 * THANKS (Georg Sauthoff): Add.
2362
548e2104
JD
23632008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2364
2365 Update several administrative files mainly to facilitate releasing.
2366 * HACKING (Administrivia): Make the git-merge-changelog notes more
2367 helpful.
2368 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2369 (Release Procedure): Update for git and add numerous details that were
2370 previously missing.
2371 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2372 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2373 that announcements don't claim we bootstrapped with whatever bison
2374 happened to be in PATH. Add flex as a bootstrap tool.
2375 * Makefile.maint: Remove, previously replaced by maint.mk.
2376 * Makefile.cfg: Remove, and migrate settings to...
2377 * cfg.mk: ... here for the sake of `make announcement'.
2378 * bootstrap.conf (gnulib_modules): Add announce-gen.
2379 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2380 Berry.
2381
ddf17a6e
PB
23822008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2383
2384 Small but important bugfixes for the Java skeleton.
2385 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2386 (yy_symbol_print): Call toString on yyvaluep.
2387
e1145ad8
AD
23882008-08-29 Akim Demaille <demaille@gostai.com>
2389
2390 Clarify UPDATED use.
215b40ac 2391 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 2392 not to the release date of Bison.
215b40ac 2393 Reported by Joel E. Denny.
e1145ad8 2394
0df72d78
AD
23952008-08-29 Akim Demaille <demaille@gostai.com>
2396
2397 * README: Update FAQ pointer.
2398 Reported by Joel E. Denny.
2399
9a90b6bb
EB
24002008-08-27 Eric Blake <ebb9@byu.net>
2401
2402 Resync m4sugar from autoconf.
2403 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2404 (m4_init): Adjust to latest m4.git changes.
2405 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2406 effects.
2407 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2408 (_m4_list_cmp): Reduce side effects.
2409
65015668
AD
24102008-08-27 Akim Demaille <demaille@gostai.com>
2411
2412 Check yyerrok in calc.at.
215b40ac
EB
2413 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2414 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2415 expected.
65015668 2416
98e26a92
AD
24172008-08-27 Akim Demaille <demaille@gostai.com>
2418
2419 Support yyerrok in lalr1.cc.
2420 YYBACKUP is still to import back into lalr1.cc.
215b40ac 2421 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 2422
86c0e784
JD
24232008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2424
2425 For maintainer-check*, don't recompile for a $(VERSION) update.
2426 * cfg.mk: New file.
2427 (_is-dist-target): Override the one in GNUmakefile.
2428 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2429
88511166
JD
24302008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2431
2432 Update for recent change to gnulib.
2433 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2434 string.h now.
2435
6bbb2ed5
EB
24362008-08-15 Eric Blake <ebb9@byu.net>
2437
d67c52e8
EB
2438 Remaining m4sugar merge from autoconf.
2439 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2440 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2441 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2442 * src/output.c (output_skeleton): Tell m4 how to find it.
2443
6bbb2ed5
EB
2444 Partial m4sugar merge from autoconf: m4_map.
2445 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2446 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2447 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2448 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2449 for empty list.
2450 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2451 Likewise.
2452 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2453 declares it.
2454
8dce3875
JD
24552008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2456
2457 Keep .version and PACKAGE_VERSION in sync.
2458 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2459 dependency, and add comments justifying this in more detail. Discussed
2460 starting at
2461 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2462
882a1fbf
EB
24632008-08-06 Eric Blake <ebb9@byu.net>
2464
a3764451
EB
2465 Partial m4sugar merge from autoconf: m4_shiftn.
2466 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2467 (m4_shift2, m4_shift3): New macros.
2468 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2469 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2470 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2471 * data/java.m4 (b4_remove_comma): Likewise.
2472
882a1fbf
EB
2473 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2474 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2475 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2476 (m4_init): Consolidate wrapped text into single m4_wrap.
2477 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2478 in wrapped text.
2479
a30e920d
EB
24802008-08-05 Eric Blake <ebb9@byu.net>
2481
dfcc5959
EB
2482 Partial m4sugar merge from autoconf: builtins, version.m4.
2483 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2484 (m4_prepend): Remove, as it is unused and inherently quadratic,
2485 whereas m4_append is linear in newer m4.
2486 (m4_mkstemp): New builtin.
2487 (m4_symbols): Make rename conditional.
2488 (m4_version_prereq): Ensure fatal error if used in bison, which
2489 intentionally lacks version.m4.
2490
a30e920d
EB
2491 Fix comments in m4sugar.
2492 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2493
445b7470
JD
24942008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2495
2496 Update for recent .gitignore fix in Gnulib.
2497 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2498 anchored .gitignore entries.
2499
a1e50014
JD
25002008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2501
2502 Set gnu or gnits strictness.
2503 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2504 development and gnits strictness for releases. Based on Eric Blake's
2505 suggestion at
2506 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2507
d43f77e7
PB
25082008-07-31 Paolo Bonzini <bonzini@gnu.org>
2509
2510 * NEWS: Clarify documentation of %language.
2511
fee2ed87
PB
25122008-07-31 Paolo Bonzini <bonzini@gnu.org>
2513
2514 Support usage of git-merge-changelog.
2515 * .gitattributes: New.
2516 * HACKING: Document usage of git-merge-changelog.
2517 * bootstrap: Install git-merge-changelog entries in .git/config
2518 if appropriate.
2519
78029cd5
JD
25202008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2521
2522 Remove remaining dependence on CVS Id keyword.
2523 * ChangeLog: For the sake of people still using CVS, don't use dollars
2524 when mentioning Id.
2525 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2526 unusual anyway.
2527 * data/xslt/xml2dot.xsl: Likewise.
2528 * data/xslt/xml2text.xsl: Likewise.
2529 * data/xslt/xml2xhtml.xsl: Likewise.
2530 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2531 * doc/Makefile.am (neutralize): Remove, no longer needed.
2532 (.x.1): Don't use neutralize.
2533 (edit): Don't substitute for ID.
2534 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2535
c53d18b1
JD
25362008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2537
2538 Fix dependence on computed configure variables.
2539 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2540 $(top_srcdir)/configure.ac so that changes to computed variables, such
2541 as PACKAGE_VERSION, are seen.
2542 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2543
5523ac79
JD
25442008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2545
2546 Update copyright dates for recent changes.
2547 * Makefile.am: Here.
2548 * src/Makefile.am: Here.
2549 * src/reduce.c: Here.
2550 * tests/reduce.at: Here.
2551
8fa36911
JD
25522008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2553
2554 Use git-version-gen for version names between releases.
2555 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2556 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2557 * .prev-version: New.
2558 * .version.in: Remove.
78029cd5 2559 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
2560 revision.
2561 * GNUmakefile: Remove, now copied from Gnulib.
2562 * Makefile.am: Add code suggested by comments in
2563 build-aux/git-version-gen.
2564 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2565 .prev-version, and .version.
2566 * NEWS (2.3b+): Rename to...
2567 (?.?): ... this because we're dropping the "+" version naming scheme,
2568 but, in general, we still can't be sure of our next release name.
2569 * bootstrap: Add a quick hack to remove from .gitignore the
2570 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2571 entry. This should really be fixed in gnulib instead.
2572 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2573 * configure.ac (AC_INIT): Set version name by invoking
2574 build-aux/git-version-gen.
2575 (AC_CONFIG_FILES): Remove .version, now generated by
2576 build-aux/git-version-gen.
2577 * maint.mk: New, copied from coreutils.
2578 * doc/.cvsignore (bison.1): Add.
2579 * doc/.gitignore (/bison.1): Add.
2580 * doc/bison.1: Remove, generated.
2581 * src/.cvsignore (revision.c): Remove.
2582 * src/.gitignore (/revision.c): Remove.
2583 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2584 (BUILT_SOURCES): Remove revision.c.
2585 (revision.c): Remove.
2586 * src/getargs.c (version): Don't print revision after the VERSION.
2587 * src/revision.h: Remove.
2588
bcf07cb7
JD
25892008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2590
2591 Fix untranslatable composition of sentences. Reported by Goran
2592 Uddeborg at
2593 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2594 * THANKS (Goran Uddeborg): Add.
2595 * src/reduce.c (reduce_print): Report the number of nonterminals and
2596 rules useless in the grammar in separate sentences.
2597 * tests/reduce.at (Useless Rules): Update output.
2598 (Reduced Automaton): Likewise.
2599 (Underivable Rules): Likewise.
2600 (Empty Language): Likewise.
2601
9aacab9a
JD
26022008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2603
2604 Fix some .gitignore and .cvsignore problems.
2605 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2606 (insert_vc_ignore): ... this new function, which prepends `/' to all
2607 .gitignore entries before passing them to insert_sorted_if_absent.
2608 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2609 .cvsignore files are maintained even though Bison developers run
2610 bootstrap while using Git.
2611 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2612 unneeded by Bison.
2613 (gnulib): Add.
2614 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2615 unneeded. Reported by Eric Blake.
2616 * lib/.gitignore (/*~): Add.
2617 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2618 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2619 Blake.
2620 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2621
a9fc7990
JD
26222008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2623
2624 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2625 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2626 * bootstrap.conf (gnulib_modules): Add unsetenv.
2627 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2628 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2629 (/setenv.m4): Add.
2630 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2631 the first argument because it may become position-dependent, and unset
2632 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2633 Add comments explaining these issues in more detail.
2634
0f1d6f10
JD
26352008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2636
2637 Add .gitignore everywhere based on .cvsignore.
2638 * .gitignore: New.
2639 * build-aux/.gitignore: New.
2640 * data/.gitignore: New.
2641 * doc/.gitignore: New.
2642 * etc/.gitignore: New.
2643 * examples/.gitignore: New.
2644 * examples/calc++/.gitignore: New.
2645 * lib/.gitignore: New.
2646 * m4/.gitignore: New.
2647 * po/.gitignore: New.
2648 * runtime-po/.gitignore: New.
2649 * src/.gitignore: New.
2650 * tests/.gitignore: New.
2651
7bd1665a
JD
26522008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2653
2654 * NEWS (2.3b+): New section, empty for now.
2655 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2656
72c5b982
JD
26572008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2658
2659 * NEWS (2.3b): Update release date since there has been a delay in
2660 getting the announcements and tarballs out.
2661
bd02cd5d
JD
26622008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2663
2664 * NEWS: Version 2.3b.
2665 * configure.ac (AC_INIT): Likewise.
2666 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2667
9126263e
JD
26682008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2669
2670 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2671 been doing it for years.
2672 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2673 (Release Procedure): Add FIXME about make alpha being unmaintained.
2674
fa6aa7b3
JD
26752008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2676
2677 * data/yacc.c: Reformat m4 a little for readability.
2678 * src/lalr.c (build_relations): Correct comment.
2679
d30b312d
JMG
26802008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2681
2682 DJGPP specific issue.
2683 * djgpp/config.sed: Fixes required to run configure scripts generated
2684 by autoconf 2.62.
2685
138d4cd9
JD
26862008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2687
2688 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2689 coordinator@translationproject.org.
2690
8f7e2e1f
JD
26912008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2692
2693 * THANKS: Add Eric Blake.
2694
f55efa38
JD
26952008-04-23 Eric Blake <ebb9@byu.net>
2696
2697 Revert prior patch, by working around autoconf regression.
2698 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2699 ("Output file name: ("): Uncomment test.
2700 ("Output file name: )"): Likewise.
2701 Based on an idea from Noah Misch.
2702
096c9f9d
JD
27032008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2704
2705 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2706 2.61. Reported by Juan Manuel Guerrero at
2707 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2708 * tests/output.at ("Output file name: ("): Comment out test case for
2709 now.
2710 ("Output file name: )"): Likewise.
2711
0f664b89
JD
27122008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2713
2714 * GNUmakefile: Update git-version-gen invocation so make dist
2715 succeeds.
2716
1cfe6375
JD
27172008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2718
2719 Update to the current gnulib CVS repository, and fix trigraph handling
2720 in Bison.
2721 * bootstrap: Update gnulib CVS repository URL.
2722 (symlink_to_dir): Encapsulate the code that guarantees the destination
2723 directory exists into...
2724 (check_dst_dir): ... this new function, and...
2725 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2726 fail when copying files into lib/uniwidth/.
2727 * src/output.c (prepare_symbols): When writing yytname muscles, where
2728 symbol names will be encoded in C-string literals, tell quotearg to
2729 escape trigraphs. This used to be the default in gnulib.
2730 * tests/regression.at (Token definitions): Because of the change in
2731 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2732 escapes trigraphs in symbol names. Thus, yytname no longer has
2733 trigraphs unnecessarily doubly escaped. Update test case output.
2734 Extend test case to be sure Bison's own error messages will no longer
2735 have trigraphs in symbol names unnecessarily escaped once.
2736
74c52fc8
JD
27372008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2738
2739 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2740 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2741 * .cvsignore: Add .version.
2742 * .version.in: New.
2743 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2744 * configure.ac (AC_CONFIG_FILES): Add .version.
2745 * build-aux/.cvsignore: Add git-version-gen.
2746
8e55b3aa
JD
27472008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2748
2749 * NEWS (2.3a+): Mention that -g now takes an argument.
2750 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2751 consistency. Update the -g and -x entries now that they take
2752 arguments. Use brackets to indicate optional arguments.
2753 * src/getargs.c (usage): Explain the relationship between arguments of
2754 long and short options more completely. Document --defines and -d
2755 separately since the former takes an argument but, for POSIX Yacc, the
2756 latter does not.
2757 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 2758 (getargs): Sort cases.
8e55b3aa 2759
59c5ac72
AD
27602008-02-28 Akim Demaille <demaille@gostai.com>
2761
2762 * doc/bison.texinfo: Fix a few typos.
2763
118d4978
AD
27642008-02-28 Akim Demaille <akim@epita.fr>
2765
2766 * doc/bison.texinfo (Bison Options): Document -W.
2767 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2768
7020f1e9
AD
27692008-02-28 Akim Demaille <akim@epita.fr>
2770
2771 * src/getargs.c (short_options): Split and sort for readability.
2772 -g and -x take optional arguments, just like their long options.
2773 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2774 understand.
2775 Fix the handling of $opt which resulted in all the argument to be
2776 considered as optional.
2777
59da312b
JD
27782008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2779
2780 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2781 say its interface is experimental.
2782 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2783 Java.
2784 (Bison Options): In the -L and --language entry, mention Java.
2785 (Java Bison Interface): Say the interface is experimental.
2786 * src/getargs.c (usage): Mention -L and --language.
2787
2788 * NEWS (2.3a+): Say the push parsing interface is experimental.
2789 * doc/bison.texinfo (Push Decl): Likewise.
2790 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2791 (Push Parser Function): Likewise.
2792 (Pull Parser Function): Likewise.
2793 (Parser Create Function): Likewise.
2794 (Parser Delete Function): Likewise.
2795 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2796 yypull_parse, and yypush_parse entries.
2797
2798 * NEWS (2.3a+): Mention XML support, and say the schema is
2799 experimental.
2800 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2801 * src/getargs.c (usage): Say the XML schema is experimental.
2802
2803 * NEWS (2.3a+): Say option instead of flag.
2804
2bb3ebec
WP
28052008-02-21 Wojciech Polak <polak@gnu.org>
2806
2807 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2808 text.
2809
333e670c
JD
28102008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2811
2812 Fix impure push parser compile error reported by Bob Rossi at
2813 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2814 * data/yacc.c: Clean up whitespace in the output a little.
2815 (yypstate_allocated): Define for impure push parsers regardless of
2816 whether the pull interface is also requested.
2817 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2818 check impure push parsers without the pull interface.
2819
2820 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2821 yyerror takes arguments specified by %parse-param while yypstate_new
2822 does not.
2823 * doc/bison.texinfo (Parser Create Function): Document that
2824 yypstate_new returns 0 for multiple impure parser instances.
2825 * tests/push.at (Push Parsing: Multiple impure instances): Update
2826 expected stderr output.
2827
798096e1
JD
28282008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2829
2830 * runtime-po/POTFILES.in (push.c): Remove.
2831
9ca7f077
JD
28322008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2833
2834 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2835 * data/push.c: Rename to...
2836 * data/yacc.c: ... this, overwriting it.
2837 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2838 `%push-pull-parser' -> `%define api.push_pull "both"'.
2839 Remove old yacc.c tests, and update push.c tests to yacc.c.
2840
42ee26bb
JD
28412008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2842
2843 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2844 `"%code top" blocks' instead of `%code "top" blocks'.
2845 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2846 Clean up whitespace in the output a little.
2847
b1cc23c4
JD
28482008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2849
2850 Fix documentation problems reported by Tim Josling at
2851 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2852 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2853 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2854 integers. Explain the effect of literal string aliases on error
2855 messages. Copy token 0 documentation from the C++ skeleton
2856 documentation.
2857
ab7f29f8
JD
28582008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2859
2860 Accept a token number in a %left, %right, or %nonassoc for POSIX
2861 conformance. Reported by Tim Josling at
2862 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2863 * NEWS (2.3a+): Mention.
2864 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2865 and code numbers are treated by precedence declarations.
2866 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2867 of symbols.1.
2868 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2869 of symbol.
2870 (symbol.prec): New, just like symbol but allows INT.
2871 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2872 longer holds.
2873 * tests/regression.at (Token number in precedence declaration): New
2874 test case.
2875
a924ef36
JMG
28762008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2877
2878 DJGPP specific issues.
2879 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2880 be changed. Copyright timestamp adjusted.
2881 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2882 be changed. Copyright timestamp adjusted.
2883 * djgpp/config.site: Copyright timestamp adjusted.
2884 * djgpp/config_h.sed: Copyright timestamp adjusted.
2885 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2886 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2887 filename translation list.
2888 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2889 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2890 files shall be created. Before trying to use the temp dir where the
2891 environment variable points to check that the dir really exists. If
2892 not default to the cwd as temp dir. Copyright timestamp adjusted.
2893 * djgpp/subpipe.h: Copyright timestamp adjusted.
2894 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2895
389c8cfd
PE
28962008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2897
2898 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2899
5d1cfef4
PE
29002008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2901
2902 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2903 Problem reported by Claudio Saavedra in
2904 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2905
e2dcf996
WP
29062008-01-05 Wojciech Polak <polak@gnu.org>
2907
2908 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2909 document's title with the input grammar file name.
2910
da730230
JD
29112007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2912
2913 Automate regression testing of the XML/XSLT implementation. Discussed
2914 starting at
2915 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2916 * configure.ac (XSLTPROC): New substitution.
2917 * Makefile.am (maintainer-xml-check): New phony target invoking...
2918 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2919 invoking make maintainer-check with BISON_TEST_XML=1.
2920 * tests/atlocal.in (XSLTPROC): New.
2921 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2922 not to report reachable memory when Bison is expected to have a
2923 non-zero exit status and (2) to compare XML/XSLT output with --graph
2924 and --report=all output for every working grammar when
2925 BISON_TEST_XML=1.
2926 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2927 (AT_BISON_CHECK_XML): New.
2928 (AT_QUELL_VALGRIND): New.
2929 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2930 (AT_CHECK): ... don't redefine this since this was the old way to
2931 quell Valgrind.
2932 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2933 AT_BISON_CHECK invocations.
2934 * tests/c++.at: Likewise.
2935 * tests/calc.at: Likewise.
2936 * tests/conflicts.at: Likewise.
2937 * tests/cxx-type.at: Likewise.
2938 * tests/existing.at: Likewise.
2939 * tests/glr-regression.at: Likewise.
2940 * tests/headers.at: Likewise.
2941 * tests/input.at: Likewise.
2942 * tests/java.at: Likewise.
2943 * tests/output.at: Likewise.
2944 * tests/push.at: Likewise.
2945 * tests/reduce.at: Likewise.
2946 * tests/regression.at: Likewise.
2947 * tests/sets.at: Likewise.
2948 * tests/skeletons.at: Likewise.
2949 * tests/synclines.at: Likewise.
2950 * tests/torture.at: Likewise.
2951 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2952 tends to hang xsltproc.
2953 (Big horizontal): Likewise.
2954
408476bc
JD
29552007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2956
2957 In XML output, remove redundant class attribute on symbol element.
2958 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2959 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2960 look up a symbol to determine whether it's a nonterminal or terminal.
2961 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2962 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2963
2964 Add prec/assoc information to XML output.
2965 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2966 %prec, add a percent_prec attribute.
2967 * src/print-xml.c (print_grammar): For each terminal that has a
2968 precedence or associativity, add a prec or assoc attribute.
2969 (xml_indent): New.
2970 (xml_puts): Use xml_indent.
2971 (xml_printf): Use xml_indent.
2972 * src/print-xml.h (xml_indent): Prototype.
2973
2974 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2975 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2976
d4a26c48
JD
29772007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2978
2979 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2980 (bison:ruleByNumber): ... this for clarity.
2981 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2982 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2983 (xsl:template match="reduction"): Update.
2984 (xsl:template match="item"): Update.
2985 (xsl:template match="reduction"): Update.
2986
2987 In the XML output, don't print the list of rules where symbols appear.
2988 Compute it in XSLT instead. Discussed at
2989 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2990 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2991 (bison:ruleByRhs): New.
2992 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2993 bison:ruleByRhs.
2994 (xsl:template match="terminal/rule"): Remove.
2995 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2996 bison:ruleByRhs.
2997 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2998 Remove.
2999 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
3000 bison:ruleByRhs and mode="number-link" for rule template.
3001 (xsl:template match="terminal/rule"): Remove.
3002 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
3003 bison:ruleByRhs and mode="number-link" for rule template.
3004 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
3005 Rewrite as...
3006 (xsl:template match="rule" mode="number-link"): ... this.
3007 * src/print-xml.c (print_grammar): Don't print the list of rules.
3008
ef1b4273
JD
30092007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
3010
3011 Don't let --report affect XML output; always print all information.
3012 Discussed at
3013 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
3014 * src/conflicts.c (log_resolution): Implement.
3015 * src/print-xml.c (print_core): Implement.
3016 (print_state): Implement.
3017 (print_xml): Implement.
3018
3019 * NEWS (2.3a+): Fix quotes.
3020 * src/parse-gram.y (prologue_declaration): For consistency with -v,
3021 don't let %verbose clear the list specified by --report.
3022
0f6cd9e3
AD
30232007-11-26 Akim Demaille <akim@epita.fr>
3024
3025 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
3026
d80fb37a
JD
30272007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
3028
3029 In the XML output, list useless and unused symbols and rules with the
3030 useful ones and add a "usefulness" attribute. Discussed starting at
3031 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
3032 * src/gram.c (grammar_rules_partial_print_xml): Remove.
3033 (grammar_rules_print_xml): Print all rules instead of just those
3034 useful in the grammar, and add a "usefulness" attribute.
3035 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
3036 * src/print-xml.c (print_rules_useless_in_parser): Remove.
3037 (print_grammar): Print all nonterminals instead of just useful ones,
3038 and add a "usefulness" attribute to nonterminals and terminals.
3039 (print_xml): Don't print a separate "reductions" or
3040 "rules-useless-in-parser" element.
3041 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
3042 (reduce_xml): Remove.
3043 (reduce_token_unused_in_grammar): New.
3044 (reduce_nonterminal_useless_in_grammar): New.
3045 * src/reduce.h (reduce_xml): Remove prototype.
3046 (reduce_token_unused_in_grammar): Add prototype.
3047 (reduce_nonterminal_useless_in_grammar): Add prototype.
3048 * data/xslt/xml2text.xsl: Update for XML changes.
3049 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3050 * tests/reduce.at (Useless Terminals): Update output.
3051 (Useless Rules): Update output.
3052 (Reduced Automaton): Update output.
3053
3054 Say "Terminals unused in grammar" instead of "Unused terminals".
3055 * NEWS (2.3a+): Update.
3056 * doc/bison.texinfo (Understanding): Update example output.
3057 * src/reduce.c (reduce_output): Implement.
3058 * data/xslt/xml2text.xsl: Implement.
3059 * data/xslt/xml2xhtml.xsl: Implement.
3060
1bb2bd75
JD
30612007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3062
3063 Accept --report-file=FILE to override the default `.output' filename.
3064 * NEWS (2.3a+): Mention.
3065 * doc/bison.texinfo (Bison Options): Add an entry.
3066 * src/files.c (compute_output_file_names): Don't override
3067 spec_verbose_file if already set.
3068 * src/getargs.c (usage): Document --report-file.
3069 (REPORT_FILE_OPTION): New anonymous enum member.
3070 (long_options): Add entry for it.
3071 (getargs): Add case for it setting spec_verbose_file.
3072
3073 * build-aux/cross-options.pl: Don't record a short option just because
3074 there's an arg.
3075 * doc/.cvsignore: Add yacc.1.
3076
a005a9c4
AD
30772007-11-14 Akim Demaille <akim@epita.fr>
3078
3079 * doc/yacc.1.in: New.
3080 * configure.ac, doc/Makefile.am: Adjust.
3081 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3082 config.h symbol.
3083 Use AC_SUBST for assignments too.
3084 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3085
cff03fb2
JD
30862007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3087
3088 * src/gram.c: Remove comments that duplicate comments in gram.h.
3089
3090 When reporting useless rules and nonterminals, say "useless in grammar"
3091 instead of "useless", and say "useless in parser" instead of "never
3092 reduced". Discussed starting at
3093 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3094 * NEWS (2.3a+): Mention this change.
3095 * data/xslt/xml2text.xsl: Update output text and expected input XML
3096 element names to match changes below.
3097 * data/xslt/xml2xhtml.xsl: Likewise.
3098 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3099 Contents: "Rules useless in parser due to conflicts".
3100 * doc/bison.texinfo (Decl Summary): Reword a little.
3101 (Understanding): Update example output for changes below.
3102 * src/gram.c: (rule_useful_p): Rename to...
3103 (rule_useful_in_grammar_p): ... this.
3104 (rule_useless_p): Rename to...
3105 (rule_useless_in_grammar_p): ... this.
3106 (rule_never_reduced_p): Rename to...
3107 (rule_useless_in_parser_p): ... this.
3108 (grammar_rules_print): Update for renames.
3109 (grammar_rules_print_xml): Update for renames.
3110 (grammar_rules_never_reduced_report): Rename to...
3111 (grammar_rules_useless_report): ... this since it is used for either
3112 kind of useless rule.
3113 * src/gram.h: Reword comments and update function names in prototypes.
3114 * src/main.c (main): Say "rule useless in parser due to conflicts".
3115 * src/print-xml.c (print_rules_never_reduced): Rename to...
3116 (print_rules_useless_in_parser): ... this, and rename output XML
3117 element "rules-never-reduced" to "rules-useless-in-parser".
3118 (print_xml): Update for rename.
3119 * src/print.c (print_results): Say "Rules useless in parser due to
3120 conflicts".
3121 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3122 (nonterminals_reduce): Say "nonterminal useless in grammar".
3123 (reduce_output): Say "Nonterminals useless in grammar".
3124 Say "Rules useless in grammar".
3125 (reduce_xml): Rename output XML element "useless" to
3126 "useless-in-grammar".
3127 (reduce_print): Don't report the count of grammatically useless rules
3128 as "rules never reduced" just because %yacc is specified.
3129 In the correct report of this count, say nonterminal(s) and rule(s)
3130 "useless in grammar".
3131 * tests/conflicts.at (S/R in initial): Update expected output.
3132 (Defaulted Conflicted Reduction): Likewise.
3133 (Unreachable States After Conflict Resolution): Likewise.
3134 * tests/existing.at (GNU pic Grammar): Likewise.
3135 * tests/reduce.at (Useless Nonterminals): Likewise.
3136 (Useless Rules): Likewise.
3137 (Reduced Automaton): Likewise.
3138 (Underivable Rules): Likewise.
3139 (Empty Language): Likewise.
3140
66f0441d
JD
31412007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3142
3143 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3144 here document and before the EOF so that BSD's implementation of Bourne
3145 shell doesn't parse the delimiter as part of the here document.
3146 * doc/.cvsignore: Add cross-options.texi.
3147 * src/getargs.c (usage): Add a blank line after the warning categories.
3148
d0ee4105
PB
31492007-11-08 Paolo Bonzini <bonzini@gnu.org>
3150
3151 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3152
e8b1fb9b
AD
31532007-11-05 Akim Demaille <akim@epita.fr>
3154
3155 Remove Id: from bison.1.
3156 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3157 (perl -0777 -pi -e 's/\.PP\nId): New.
3158 (.x.1): Use it to ignore the version control revision.
3159
2f7a96b5
AD
31602007-11-05 Akim Demaille <demaille@gostai.com>
3161
3162 * build-aux/Makefile.am: Ship cross-options.pl.
3163 * doc/Makefile.am: Always refer to cross-options.texi with
3164 $(srcdir).
3165 (MAINTAINERCLEANFILES): Add it.
3166
f4101aa6
AD
31672007-11-04 Akim Demaille <demaille@gostai.com>
3168
3169 Generate the long/short option cross-table.
3170 * build-aux/cross-options.pl: New.
3171 * doc/Makefile.am (cross-options.texi): New.
3172 * doc/bison.texinfo: Use it.
3173
727a1401
AD
31742007-11-04 Akim Demaille <demaille@gostai.com>
3175
3176 Generate bison.1 using help2man.
3177 * doc/common.x, doc/bison.x: New.
3178 * doc/Makefile.am (bison.1, .x.1): New.
3179 The code is taken from autoconf-2.61/man/Makefile.am.
3180 * configure.ac: Look for help2man.
3181
6aeb9c57
AD
31822007-11-04 Akim Demaille <demaille@gostai.com>
3183
3184 Complete --help.
3185 * src/getargs.c (usage): Document -W, make it clear that -d,
3186 -g and -x have optional arguments.
3187
d7be4085
AD
31882007-11-04 Akim Demaille <demaille@gostai.com>
3189
3190 Find sha1sum when named gsha1sum.
3191 * bootstrap (find_tool): New.
3192 ($SHA1SUM): New.
3193
d9df47b6
JD
31942007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3195
3196 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3197 at
3198 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3199 * NEWS (2.3a+): Mention.
3200 * data/bison.m4 (b4_pure_if): Don't define it here.
3201 * data/c.m4 (b4_identification): Depend on individual skeletons to
3202 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3203 values of the %define variables api.pure or api.push_pull. Define
3204 YYPURE, YYPUSH, and YYPULL accordingly.
3205 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3206 glr.cc has already defined b4_pure_flag.
3207 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3208 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 3209 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
3210 * doc/bison.texinfo (Pure Decl): Update.
3211 (Push Decl): Update.
3212 (Decl Summary): Add api.pure to %define entry.
3213 In %pure-parser entry, say it's deprecated and reference %define.
3214 (Pure Calling): Update.
3215 (Error Reporting): Update.
3216 (C++ Scanner Interface): Update.
3217 (How Can I Reset the Parser): Update.
3218 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3219 reference %define.
3220 * src/getargs.c (pure_parser): Remove global variable.
3221 * src/getargs.h (pure_parser): Remove extern.
3222 * src/output.c (prepare): Don't define pure_flag muscle.
3223 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3224 wrapper around `%define api.pure'.
3225 * tests/calc.at (Simple LALR Calculator): Update.
3226 (Simple GLR Calculator): Update.
3227 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3228 Update.
3229 (GLR: Resolve ambiguity, pure, locations): Update.
3230 (GLR: Merge conflicting parses, pure, no locations): Update.
3231 (GLR: Merge conflicting parses, pure, locations): Update.
3232 * tests/glr-regression.at (Uninitialized location when reporting
3233 ambiguity): Update
3234 * tests/input.at (Unused %define api.pure): New test case.
3235 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3236 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3237 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3238
c373bf8b
JD
32392007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3240
3241 %define push_pull -> %define api.push_pull. Discussed starting at
3242 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3243 * data/push.c: Expect the new name.
3244 * data/yacc.c: Likewise.
3245 * doc/bison.texinfo (Push Decl): Update.
3246 (Decl Summary): Update %define entry.
3247 (Push Parser Function): Update.
3248 (Pull Parser Function): Update.
3249 (Parser Create Function): Update.
3250 (Parser Delete Function): Update.
3251 * tests/calc.at (Simple LALR Calculator): Update.
3252 * tests/input.at (%define enum variables): Update.
3253 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3254 (Push Parsing: Multiple impure instances): Update.
3255 (Push Parsing: Unsupported Skeletons): Update.
3256 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3257 (Exploding the Stack Size with Malloc): Update.
3258
3259 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3260 other entries some.
3261
32f19b6b
JD
32622007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3263
3264 For the XML output's terminal element, rename @number to @token-number,
3265 and add @symbol-number. In the nonterminal element, rename @number to
3266 @symbol-number. Discussed starting at
3267 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3268 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3269 renames.
3270 (xsl:template match="nonterminal"): Likewise.
3271 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3272 (xsl:template match="nonterminal"): Likewise.
3273 * src/print-xml.c (print_grammar): Implement.
3274
255a6b90
JD
32752007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3276
3277 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3278 2007-10-11 change, the child elements here are items not rules.
408476bc 3279 (xsl:template match="item"): New.
255a6b90
JD
3280 (xsl:template match="rule"): Update for new reduced itemset.
3281 (xsl:template match="point"): Remove.
3282 (xsl:template match="empty"): For consistency with --graph, don't
3283 output "/* empty */".
3284 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3285 line-wrap, don't pass a negative value as first-line-length since this
3286 won't work with the following changes.
3287 (xsl:template name="line-wrap"): Simplify slightly.
3288 (xsl:template name="ws-search"): Eliminate recursion.
3289 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3290 set next to an item whose dot is not at the end of the RHS even if it
3291 happens to be associated with the same rule.
3292
88c78747
JD
32932007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3294
31984206
JD
3295 Add %define lr.keep_unreachable_states.
3296 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3297 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3298 * src/main.c (main): Implement it.
3299 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3300 Extend to test it, and fix a typo.
3301
33022007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3303
3304 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
3305 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3306 the example .output text.
3307 * tests/regression.at (Extra lookahead sets in report): Improve wording
3308 of comments.
3309
b7a70162
WP
33102007-10-17 Wojciech Polak <polak@gnu.org>
3311
3312 * src/print-xml.c (print_grammar): Renamed
3313 <terminal> and <nonterminal> attributes:
3314 "type" to "number" and "symbol" to "name".
3315 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3316 Use new attribute names.
3317 (xsl:template match="nonterminal"): Likewise.
3318 * data/xslt/xml2xhtml.xsl: Likewise.
3319
a0de5091
JD
33202007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3321
3322 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3323 (Option Cross Key): Likewise.
3324
3325 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3326 next to an item whose dot is not at the end of the RHS even if it
3327 happens to be associated with the same rule.
3328 * src/print.c (print_core): Likewise.
3329 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3330 (Resolved SR Conflicts): Update output.
3331 * tests/regression.at (Extra lookahead sets in report): New test case.
3332
4c20d18d
WP
33332007-10-11 Wojciech Polak <polak@gnu.org>
3334
3335 * src/print-xml.c (print_core): Remove item set
3336 redundancy.
3337 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3338 Improve processing time. Suggested by Joel E. Denny.
3339 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3340 Write xsl:param "required" attribute as comment.
3341 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3342 (xsl:template match="rule"): Support new reduced itemset.
3343 (xsl:template match="point"): Remove.
3344 * data/xslt/xml2xhtml.xsl: Likewise.
3345
f506ad1c
JD
33462007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3347
3348 * src/getargs.c (version): Update copyright year.
3349
21f1b063
JD
33502007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3351
3352 Make xml2dot.xsl and --graph produce the same output.
3353 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3354 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3355 escaped later.
3356 (xsl:template name="output-node"): Use the new escape template instead
3357 of the string-replace template directly.
3358 (xsl:template name="output-edge"): Likewise.
3359 (xsl:template name="escape"): New, escapes backslashes and newlines in
3360 addition to quotation marks.
3361 * src/graphviz.c (start_graph, output_node, output_edge): Add
3362 whitespace to output for legibility.
3363
3364 Make xml2text.xsl and --report produce the same output, and remove the
3365 XML "conflicts" element since a conflict summary is easily extracted
3366 from the automaton.
3367 * data/xslt/bison.xsl: New.
3368 (xsl:template match="state" mode="bison:count-conflicts): New.
3369 * data/xslt/xml2text.xsl: Import bison.xsl.
3370 (xsl:template match="bison-xml-report"): Instead of styling the
3371 "conflicts" element, style the "automaton" element with mode
3372 "conflicts". Unlike the former, the latter lists S/R and R/R
3373 conflicts for a state on the same line.
3374 (xsl:template match="conflicts"): Remove.
3375 (xsl:template match="conflict"): Remove.
3376 (xsl:template match="terminal"): Line-wrap the list of rules in which
3377 the terminal is used.
3378 (xsl:template match="nonterminal"): Likewise for nonterminals.
3379 (xsl:template match="automaton" mode="conflicts"): New.
3380 (xsl:template match="state" mode="conflicts"): New.
3381 (xsl:template name="line-wrap"): New.
3382 (xsl:template name="ws-search"): New.
3383 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3384 (xsl:template match="bison-xml-report"): Instead of styling the
3385 "conflicts" element, style the "automaton" element with mode
3386 "conflicts."
3387 (xsl:template match="conflicts"): Remove.
3388 (xsl:template match="conflict"): Remove.
3389 (xsl:template match="automaton" mode="conflicts"): New.
3390 (xsl:template match="state" mode="conflicts): New.
3391 * src/conflicts.c (conflicts_output_xml): Remove.
3392 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3393 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3394 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3395 the corresponding XSLT is easier. Also, never wrap between a word and
3396 the comma that follows it.
3397
793fbca5
JD
33982007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3399
3400 Improve C++ namespace support. Discussed starting at
3401 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3402 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3403 b4_namespace_close): New macros that interpret the %define variable
3404 "namespace" so its value can contain "::" to indicate nested
3405 namespaces.
3406 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3407 the above macros.
3408 * data/lalr1.cc (b4_namespace): Likewise.
3409 * data/location.cc (b4_namespace): Likewise.
3410 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3411 inside a new table in the general %define entry. Document `%define
3412 namespace' there as well. Point the %name-prefix entry to it since it
3413 explains it more completely in the case of C++.
3414 (C++ Bison Interface): Mention `%define namespace' instead of
3415 %name-prefix.
3416 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3417 entry suffices.
3418 * tests/c++.at (Relative namespace references): New test case.
3419 (Absolute namespace references): New test case.
3420 (Syntactically invalid namespace references): New test case.
3421 * tests/input.at (C++ namespace reference errors): New test case.
3422
35b8730d
JD
34232007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3424
3425 Add syncline support and location accessor to internal %define
3426 interfaces.
3427 * data/bison.m4 (b4_percent_define_get_loc): New.
3428 (b4_percent_define_get_syncline): New.
3429 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3430 (b4_percent_define_default): Record defining location as line 1 rather
3431 than 0 for the sake of synchronizing #line's, and define
3432 b4_percent_define_syncline(VARIABLE).
3433 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3434 * src/muscle_tab.c (muscle_syncline_grow): New.
3435 (muscle_code_grow): Use muscle_syncline_grow.
3436 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3437 define b4_percent_define_syncline(VARIABLE).
3438 (muscle_percent_define_get_loc): New.
3439 (muscle_percent_define_get_syncline): New.
3440 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3441 remove some unused variables.
3442 (muscle_percent_define_default): Record defining location as line 1
3443 rather than 0 for the sake of synchronizing #line's, and define
3444 b4_percent_define_syncline(VARIABLE).
3445 (muscle_percent_define_check_values): Use
3446 muscle_percent_define_get_loc.
3447 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3448 (muscle_percent_define_get_syncline): Prototype.
3449 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3450 defaults): Update output for location change.
3451 (Complaining during macro argument expansion): Extend to test
3452 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3453
7dc4a694
JD
34542007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3455
3456 Fix some error-reporting macro bugs.
3457 * data/bison.m4 (b4_cat): New.
3458 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3459 to stdout so they don't become arguments to other macros. Update
3460 comments and add examples.
3461 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3462 add examples.
3463 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3464 after printing the error directive so that M4 doesn't report subsequent
3465 problems that are induced by this problem.
3466 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3467 instead of just in them. Recognize @\n in both places. Both expand to
3468 the empty string. Needed by b4_cat.
3469 * tests/skeletons.at (Complaining during macro argument expansion):
3470 New test case.
3471 (Fatal errors make M4 exit immediately): New test case.
3472
d4bd2295
JD
34732007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3474
3475 Implement --print-datadir.
3476 * src/getargs.c (usage): Mention.
3477 (PRINT_DATADIR_OPTION): New anonymous enum member.
3478 (long_options): Add entry for it.
3479 (getargs): Add case for it calling compute_pkgdatadir.
3480 * src/output.c (output_skeleton): Encapsulate data directory
3481 computation from here...
3482 (prepare): ... and from here...
3483 (compute_pkgdatadir): ... into this new function.
3484 * src/output.h (compute_pkgdatadir): Prototype.
3485
34cdeddf
JD
34862007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3487
3488 * src/print-xml.c (escape_bufs): New static global variable
3489 replacing...
3490 (xml_escape_n): ... the static local variable buf here.
3491 (print_xml): Free memory for escape_bufs.
3492 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3493
d782395d
JD
34942007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3495
3496 Replace `%push-parser' and `%push-pull-parser' with
3497 `%define push_pull "push"' and `%define push_pull "both"'.
3498 `%define push_pull "pull"' is the default.
3499 * doc/bison.texinfo (Push Decl, Push Parser Function,
3500 Pull Parser Function, Parser Create Function, Parser Delete Function):
3501 Update declarations.
3502 (Decl Summary, Table of Symbols): Replace %push-parser and
3503 %push-pull-parser entries with a %define push_pull entry.
3504 * data/bison.m4 (b4_percent_define_check_values): New macro.
3505 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3506 definitions...
3507 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3508 definitions...
3509 * data/push.c: ... to here and compute them from the value of the
3510 %define variable push_pull.
3511 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3512 parsing requests here...
3513 * data/yacc.c: ... hack this to switch to push.c any time
3514 b4_use_push_pull_flag or the %define variable push_pull is set. This
3515 will go away when we mv push.c yacc.c.
3516 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3517 push parsing is not supported since unused %define variables are
3518 reported anyway.
3519 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3520 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3521 comments for consistency with b4_percent_define_check_values.
3522 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3523 muscles.
3524 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3525 Remove.
3526 (prologue_declaration): Remove %push-parser and %push-pull-parser
3527 rules.
3528 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3529 * tests/calc.at: Update declarations.
3530 * tests/input.at (%define enum variables): New test case.
3531 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3532 declaration.
3533 (Push Parsing: Multiple impure instances): Update declaration.
3534 (Push Parsing: Unsupported Skeletons): New test case.
3535 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3536 declaration.
3537 (Exploding the Stack Size with Malloc): Update declaration.
3538
3f999f78
WP
35392007-09-24 Wojciech Polak <polak@gnu.org>
3540
3541 Add XSLT transformations.
3542
3543 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3544 * data/xslt/xml2text.xsl: Transform XML into plain text.
3545 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3546 * data/Makefile.am (xsltdir): New variable.
3547 (dist_xslt_DATA): Add xslt/*.xsl files.
3548
a4f75309
PE
35492007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3550
3551 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3552 Problem reported by Wojciech Polak.
3553 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3554 (xml_printf): Undo change I made on 21 September; that is,
3555 indent 2 spaces, not 1.
3556
ad5feac4
JD
35572007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3558
3559 Pacify ./configure --enable-gcc-warnings.
3560 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3561 `char const *' instead of `char *'.
3562 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3563 local variable `sep'.
3564
41d7a5f2
PE
35652007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3566
3567 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3568 elsewhere.
3569 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3570 (xml_printf): Indent just 1 space for level.
3571 (e_char, xlate_char): Remove.
3572 (xml_escape_string): Rewrite to avoid undefined behavior (used
3573 storage that was freed from the stack).
3574 (xml_escape_n): Don't bother checking for subscript error.
3575
3f999f78
WP
35762007-09-21 Wojciech Polak <polak@gnu.org>
3577
3578 Add Bison XML Automaton Report.
41d7a5f2
PE
3579
3580 Add support for an -x option to generate an XML report.
3581 It is not documented yet.
3582 * src/print-xml.c: New file.
3583 * src/print-xml.h: Likewise.
3584 * lib/timevar.def (TV_XML): New var.
3585 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3586 * src/conflicts.c: Include print-xml.h.
3587 (solved_conflicts_xml_obstack): New var.
3588 (log_resolution, conflicts_solve, conflicts_free):
3589 Add support for XML report.
3590 (conflicts_output_val): New function.
3591 * src/conflicts.h (conflicts_output_val): New decl.
3592 * src/files.c (spec_xml_file): New var.
3593 (compute_output_file_names, output_file_names_free): Add XML support.
3594 * src/files.h (spec_xml_file): New decl.
3595 * src/getargs.c (xml_flag): New var.
3596 (usage, short_options, long_options, getargs): Add XML support.
3597 * src/getargs.h (xml_flag): New decl.
3598 * src/gram.c: Include print-xml.h.
3599 (rule_lhs_print_xml, rule_rhs_print_xml):
3600 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3601 New functions.
3602 * src/gram.h: Declare external ones.
3603 * src/main.c: Include print-xml.h.
3604 (main): Add XML support.
3605 * src/reduce.c: Include print-xml.h.
3606 (reduce_xml): New function.
3607 * src/reduce.h: Declare it.
3608 * src/state.c: Include print-xml.h.
3609 (state_new): Add XML support.
3610 (state_rule_lookahead_tokens_print_xml): New function.
3611 * src/state.h: Declare it.
3612 (struct state): New member solved_conflicts_xml.
3613 * src/symtab.c (symbol_class_get_string): New function.
3614 * src/symtab.h: Declare it.
3615
6d8e724d
PE
36162007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3617
3618 * GNUmakefile: Switch to coreutils's version.
3619 * bootstrap: Likewise.
3620 * Makefile.cfg: Adjust to new GNUmakefile.
3621 * README-hacking: Likewise.
3622
3623 Import from gnulib:
3624
3625 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3626 Bruno Haible <bruno@clisp.org>
3627
3628 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3629 and is a script that invokes bison. Tighten the code. Add comments.
3630
922bdd7f
JD
36312007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3632
3633 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3634 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3635 * doc/bison.texinfo (Decl Summary): Fix.
3636 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3637 * tests/input.at (Boolean %define variables): Update output.
3638 * tests/skeletons.at (%define boolean variables: invalid skeleton
3639 defaults): Rename to...
3640 (%define Boolean variables: invalid skeleton defaults): ... this and
3641 update output.
3642
1b17b01d
JD
36432007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3644
3645 In impure push mode, don't allow more than one yypstate to be allocated
3646 since multiple impure parsers would corrupt yynerrs.
3647 * data/push.c (yypstate_allocated): New static global variable
3648 initialized to 0.
3649 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3650 exhaustion if yypstate_allocated is 1, but still return 2.
3651 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3652 already 1. Otherwise, set it to 1.
3653 (yypstate_delete): Set it to 0.
3654 * tests/push.at (Push Parsing: Multiple impure instances): New test
3655 case.
3656
9987d1b3
JD
36572007-08-17 Bob Rossi <bob@brasko.net>
3658
3659 * doc/bison.texinfo (Push Decl): Document the push parser.
3660 (Table of Symbols): Ditto.
3661 (Pure Decl): Ditto.
3662 (Decl Summary): Ditto.
3663 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3664 Parser Create Function, Parser Delete Function):
3665 Add new push parser symbols.
3666 (Table of Symbols): Document push-parser, push-pull-parser,
3667 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3668
f16b0819
PE
36692007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3670
3671 Update to GPLv3.
3672 * doc/gpl-3.0.texi: New file.
3673 * doc/gpl.texi: Remove.
3674 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3675 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3676 * README-hacking, TODO, bootstrap, bootstrap.conf:
3677 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3678 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3679 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3680 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3681 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3682 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3683 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3684 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3685 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3686 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3687 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3688 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3689 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3690 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3691 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3692 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3693 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3694 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3695 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3696 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3697 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3698 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3699 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3700 * src/complain.c, src/complain.h, src/conflicts.c:
3701 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3702 * src/files.h, src/flex-scanner.h, src/getargs.c:
3703 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3704 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3705 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3706 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3707 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3708 * src/print.c, src/print.h, src/print_graph.c:
3709 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3710 * src/reduce.h, src/relation.c, src/relation.h:
3711 * src/revision.h, src/scan-code.h, src/scan-code.l:
3712 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3713 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3714 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3715 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3716 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3717 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3718 * tests/existing.at, tests/glr-regression.at:
3719 * tests/headers.at, tests/input.at, tests/java.at:
3720 * tests/local.at, tests/output.at, tests/push.at:
3721 * tests/reduce.at, tests/regression.at, tests/sets.at:
3722 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3723 * tests/torture.at:
3724 Update to GPLv3.
3725
728c4be2
JD
37262007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3727
3728 Get rid of broken %no-parser, -n, and --no-parser implementation and
3729 documentation.
3730 * TODO: Don't mention them.
3731 * doc/bison.1: Likewise.
3732 * doc/bison.texinfo (Decl Summary): Likewise.
3733 (Bison Options): Likewise.
3734 (Option Cross Key): Likewise.
3735 * src/getargs.c (no_parser_flag): Remove global variable.
3736 (usage): Don't print description of -n and --no-parser.
3737 (long_options): Remove --no-parser entry here.
3738 (getargs): Remove -n case in the switch here.
3739 * src/getargs.h (no_parser_flag): Remove extern.
3740 * tests/regression.at (Web2c Actions): Remove comment that mentions
3741 --no-parser.
3742
5d31a216
JD
37432007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3744
3745 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3746 name user variables starting with `yy'. Just pass NULL instead of a
3747 dummy local &yylval to yypush_parse.
3748 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3749 starting with `yy'.
3750
a2ea208d
JD
37512007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3752
3753 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3754 true since it's then always used regardless of whether yyoverflow is
3755 defined. Reported by Christian Burger at
3756 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3757 * THANKS: Add Christian Burger.
3758
91661ebb
JD
3759 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3760 node names: say "Decl Summary" not "Bison Declaration Summary".
3761
cbd50549
JD
37622007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3763
3764 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3765 determine whether this function has already complained about an invalid
3766 value for a %define boolean variable, don't check whether Bison has
3767 ever examined the value. As written, the check was a tautology.
3768 Instead, record and check for this complaint using a separate muscle.
3769
eb1b0740
JD
37702007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3771
3772 Fix push parsing memory leak reported by Brandon Lucia at
3773 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3774 * THANKS: Add Brandon Lucia.
3775 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3776 but the parse never completed and thus freed it.
3777 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3778 * tests/testsuite.at: Include push.at.
3779 * test/push.at: New.
3780 (Push Parsing: Memory Leak for Early Deletion): New test case.
3781
9d774aff
JD
37822007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3783
3784 Improve handling of multiple S/R conflicts in the same state and of S/R
3785 conflicts involving multiple reductions.
3786 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3787 set for a state here or Bison will abort if it is reassigned on a
3788 later conflicted reduction in the same state.
3789 Similarly, don't finalize and assign the solved conflicts report here
3790 or it will be lost if it is reassigned on a later conflicted reduction
3791 in the same state.
3792 (set_conflicts): Instead, assign them both here after all S/R conflicts
3793 in the state have been fully examined.
3794 * src/print.c (shift_set): Rename to...
3795 (no_reduce_set): ... this.
3796 (print_reductions): Update for rename, and add %nonassoc error action
3797 tokens to no_reduce_set so that, when printing the first remaining
3798 reduction on an error action token, the reduction is enclosed in
3799 brackets.
3800 (print_results): Update for rename.
3801 * tests/conflicts.at (Solved conflicts report for multiple reductions
3802 in a state): New test case.
3803 (%nonassoc error actions for multiple reductions in a state): New test
3804 case.
3805
3806 * src/main.c (main): Don't depend on C99 features.
3807
10159d2a
JD
38082007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3809
3810 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
3811 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3812 uniwidth.
10159d2a 3813
953b3935
JD
38142007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3815
3816 * bootstrap (slurp): Create target directories that don't exist.
3817 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3818
6ce2d93a
JD
38192007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3820
3821 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3822 than item number.
3823 * closure.c (closure): Likewise.
3824 * state.h (reductions): Comment sorting of rules.
3825 (state): Comment sorting of items.
3826
ce3448d5
JD
38272007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3828
3829 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3830 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3831 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3832 definition in order to avoid Gnulib headers since we don't use config.h
3833 here.
3834 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3835 rather than AT_DATA so that config.h is included.
3836
8a86eef0
JD
38372007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3838
3839 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3840 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3841 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3842 and so that YYFPRINTF is guaranteed to be defined here.
3843
b1a81613
JD
38442007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3845
3846 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3847 with...
3848 (muscle_percent_define_check_values): ... this more helpful function.
3849 Again, it's not used yet, but it will be.
3850 * src/muscle_tab.h: Likewise.
3851
71b61d4d
JD
3852 Improve some comments in parser table construction.
3853 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3854 (generate_states): Don't mention ruleset, which is internal to closure.
3855 * src/closure.c (closure): Explain sorting of core and itemset, which
3856 is required for this function to behave correctly.
3857 * src/closure.h (closure): Mention sorting.
3858
2a6b783d
JD
38592007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3860
3861 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3862 move the check for disabled transitions to an aver since conflict
3863 resolution hasn't happened yet.
3864
3865 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3866 labels a state as inconsistent just because it has error transitions.
3867 The original form of this check appeared in revision 1.1 of lalr.c,
3868 which was committed on 1991-12-21. Now (at least), changing the
3869 consistency label on such a state appears to have no useful effect in
3870 any of the places it is examined, which I enumerate below. The key
3871 point to understanding each item in this enumeration is that a state
3872 with an error transition is labelled consistent in the first place only
3873 if it has no rules, so the check cannot matter for states that have
3874 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3875 to try to identify its conflicts, and a state must have *rules* to have
3876 conflicts. (2) Labelling a state as inconsistent will affect how
3877 action_row sets the default *rule* for the state. (3) Labelling a
3878 state as inconsistent will cause build_relations to add lookback edges
3879 to *rules* in that state.
3880 * src/state.h (struct state): Word the comment for member consistent
3881 more carefully.
3882
14462c2b
JD
38832007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3884
3885 Don't depend on C99 features.
3886 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3887 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3888 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3889 * src/state.c (state_mark_reachable_states): Fix for-loop.
3890 (state_remove_unreachable_states): Fix for-loop.
3891
3892 Don't widen struct state with member reachable just to temporarily
3893 record reachability. Instead, use a local bitset.
3894 * src/state.h (struct state): Remove member.
3895 * src/state.c (state_new): Don't initialize it.
3896 (state_mark_reachable_states): Rename to...
3897 (state_record_reachable_states): ... this, and use bitset.
3898 (state_remove_unreachable_states): Use bitset.
3899
5a43d418
JD
39002007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3901
3902 * src/Makefile.am (yacc): Quote target action commands properly so
3903 that the yacc script isn't corrupt. Reported by Hans Aberg at
3904 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3905
0c650a20
JD
3906 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3907 the case of pure parsers. Reported by Frans Englich at
3908 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3909 * THANKS: Add Frans Englich.
3910
61fee93e
JD
3911 * NEWS (2.3a+): In the %code entry, reference section `Bison
3912 Declaration Summary' from the manual now since the %code summary has
3913 moved there.
3914 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3915 in the rules section must be terminated by semicolons.
3916
f124d423
JD
39172007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3918
3919 Extend the front-end API for %define variables to more completely
3920 mirror the back-end. This will be useful in the future.
3921 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3922 Update comments to mention the new front-end counterparts of these
3923 macros.
3924 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3925 for muscle_string_decode and muscle_location_decode.
3926 (muscle_string_decode): New static function.
3927 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3928 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3929 functions.
3930 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3931 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3932 implementation more closely.
3933 (muscle_percent_define_invalid_value): New function.
3934 * src/muscle_tab.h (muscle_percent_define_get,
3935 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3936 Prototype.
3937
75ad86ee
JD
39382007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3939
3940 * NEWS (2.3a+): Mention yesterday's state-removal change.
3941 (2.3a): Remove the %language entry, which was added after 2.3a.
3942 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3943 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3944 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3945 tests/existing.at: Update copyright date.
3946
5967f0cf
JD
39472007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3948
3949 If conflict resolution makes states unreachable, remove those states,
3950 report rules that are then unused, and don't report conflicts in those
3951 states.
3952 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3953 New global function.
3954 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3955 function.
3956 * src/main.c (main): After conflict resolution, remove the unreachable
3957 states and update all data structures that reference states by number.
3958 * src/state.c (state_new): Initialize each state's reachable member to
3959 false.
3960 (state_mark_reachable_states): New static function.
3961 (state_remove_unreachable_states): New global function.
3962 * src/state.h (struct state): Add member bool reachable.
3963 (state_remove_unreachable_states): Prototype.
3964 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3965 New test case.
3966 * tests/existing.at (GNU pic Grammar): Update test case output now that
3967 an unused rule is discovered.
3968
b09f4f48
JD
39692007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3970
3971 Minor code cleanup in parser table construction.
3972 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3973 (new_itemsets, save_reductions): Update for rename to nitemset.
3974 * src/closure.c (nritemset): Rename to...
3975 (nitemset): ... this since the "r" appears to meaningless and isn't
3976 used in the comments.
3977 (closure): Update for rename.
3978 * src/closure.h (nritemset): Update extern to...
3979 (nitemset): ... this.
3980 * src/lalr.c (LA): Fix a typo in comments.
3981 * src/print.c (print_core): Update for rename to nitemset.
3982 * src/print_graph.c (print_graph): Likewise.
3983 * src/state.h: Fix some typos in header comments.
3984
bbb44d83
PE
39852007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3986
9b33de72
PE
3987 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3988 still sticks to ASCII. Sorry!
3989
bbb44d83
PE
3990 * README-hacking: New file, taken mostly from coreutils, with changes
3991 for Bison. Contains much of the contents of:
3992 * README-cvs: Remove.
3993 * bootstrap: Sync from gnulib.
3994 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3995 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3996
29553547
JD
39972007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3998
3999 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
4000 Setzer.
4001 (Java Differences): Fix some typos.
4002 * THANKS: Add Sebastian Setzer.
4003
01b477c6
PB
40042007-03-07 Paolo Bonzini <bonzini@gnu.org>
4005
730739e4
AD
4006 * data/java.m4 (b4_single_class_if): Remove.
4007 (b4_abstract_if): Look at "%define abstract".
4008 (b4_lexer_if): New.
4009 (b4_union_name): Rename...
4010 (b4_yystype): ... to this. Map to "%define stype".
4011 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
4012 b4_maybe_throws): Fix quoting.
4013 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
4014 * data/lalr1.java (Lexer interface): Always define.
4015 (Lexer interface within parser class): Remove.
4016 (YYLexer class): New, used when "%code lexer" is present.
4017 (constructor): When "%code lexer" is used, pass %lex-param
4018 to the lexer constructor.
4019 (yylex, yyparse): Remove %lex-param from method invocations
4020 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
4021
4022 * doc/bison.texinfo (Java Bison Interface): Mention "%define
4023 abstract". Rename "%define union_name" to "%define stype".
4024 Rename method names according to previous patch.
4025 (Java Scanner Interface): Describe "%code lexer" instead of
4026 "%pure-parser" and "%define single_class".
4027 (Java Differences): Mention "%code lexer".
4028
4029 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
4030 Include scanner here, using macros from tests/local.at.
4031 (AT_DATA_CALC_Y): Remove final argument.
4032 (_AT_CHECK_JAVA_CALC): Likewise.
4033 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
4034 of %locations and %error-verbose.
4035 (main): Test with and without %lex-param.
4036 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
4037 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 4038
122bea3a
JMG
40392007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4040
4041 DJGPP spefic issue. Inhibit the use of disallowed characters for
4042 file name genertion on Win98, WinXP, etc. These are |<>":?*\
4043 and concern testsuite case 46.
4044 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
4045 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
4046 * djgpp/config.bat: Inhibit the use of disallowed characters.
4047
9611cfa2
JD
40482007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4049
4050 Miscellaneous %define and %code cleanup.
4051 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4052 values are interpreted.
4053 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4054 documentation a little more.
4055 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4056 muscle_percent_define_insert, muscle_percent_code_grow): New
4057 functions/macros.
4058 * src/muscle_tab.h (muscle_percent_define_insert,
4059 muscle_percent_code_grow): Prototype.
4060 * src/parse-gram.y (prologue_declaration): Use
4061 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4062 %define and %code directives.
4063
4064 Make it easy to share %define boolean variables between the front-end
4065 and back-end. Though not used yet, this will be useful in the future.
4066 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4067 Bison uses of names rather than just skeleton uses of names.
4068 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4069 b4_percent_define_skeleton_variables(VARIABLE) to
4070 b4_percent_define_bison_variables(VARIABLE).
4071 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4072 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4073 b4_percent_code_bison_qualifiers(QUALIFIER).
4074 (b4_check_user_names_wrap): Update for renames.
4075 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4076 muscle_percent_define_default): New functions mimicking
4077 b4_percent_define_flag_if and b4_percent_define_default.
4078
4079 For %define variables, report locations for invalid values and
bbb44d83 4080 redefinitions.
9611cfa2
JD
4081 * data/bison.m4 (b4_percent_define_flag_if): Read
4082 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4083 value for VARIABLE.
4084 (b4_percent_define_default): Save a special location in
4085 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4086 must later be reported as invalid.
4087 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4088 functions.
4089 (muscle_percent_define_insert): Record the location of VARIABLE in
4090 muscle percent_define_loc(VARIABLE), and use it to report the previous
4091 location for a redefinition.
4092 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4093 (muscle_percent_define_default): Update like b4_percent_define_default.
4094 (muscle_grow_user_name_list): Rename to...
4095 (muscle_user_name_list_grow): ... this for consistency and use
4096 muscle_location_grow.
4097 * src/muscle_tab.h (muscle_location_grow): Prototype.
4098 * tests/input.at (%define errors): Update expected output.
4099 * tests/skeletons.at (%define boolean variables: invalid skeleton
4100 defaults): New test case.
4101
0bf92491
JD
41022007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4103
4104 * src/print.c (lookahead_set, state_default_rule): Remove.
4105 (print_reductions): Replace state_default_rule invocation with
4106 equivalent use of yydefact, which was computed in token_actions in
4107 tables.c.
4108 (print_results): Don't allocate lookahead_set.
4109
d3b12988
PB
41102007-02-27 Paolo Bonzini <bonzini@gnu.org>
4111
4112 * data/lalr1.java: Prefix all private members with yy.
4113
f57a7536
JD
41142007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4115
4116 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 4117 Sebastien Fricker at
f57a7536 4118 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 4119 * THANKS: Add Sebastien Fricker.
f57a7536
JD
4120 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4121 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4122 accept a variable number of arguments.
4123
6404a5bf
JD
41242007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4125
4126 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4127
e4e09639
JMG
41282007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4129
4130 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4131 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4132 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4133
d7e0a1a7
PE
41342007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4135
4136 Undo my 2007-02-07 change, switching back to the c-strcase module
4137 introduced in the 2007-02-03 change. Bruno Haible reported that
4138 the 2007-02-07 change would be dangerous in Turkish if we add a
4139 language whose name contains "i", since "i" is not lowercase "I"
4140 in Turkish.
4141 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4142 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4143 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4144 * m4/.cvsignore: Remove strcase.m4.
4145 * src/getargs.c: Revert 2007-02-07 change, as follows.
4146 Include c-strcase.h.
4147 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4148
deee93a1
JD
41492007-02-11 Bruno Haible <bruno@clisp.org>
4150
4151 Enable the Java related testsuite tests when the only Java compiler
4152 found is a gcj < 4.3. Discussed at
4153 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4154 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4155
574add85
JD
41562007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4157
4158 * data/Makefile.am: Update copyright date.
4159 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4160 yypstate_new returns NULL.
4161 (yypstate_new): Return NULL if malloc does.
4162 * src/reader.c (packgram): Move translation of rule actions from the
4163 beginning of packgram to...
4164 (check_and_convert_grammar): ... here right before packgram is invoked
4165 so it's easier to write more complete comments, and remove redundant
4166 code.
4167
e785ccf7
JD
41682007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4169
4170 As in semantic actions, make @$ in %initial-action, %destructor, and
4171 %printer imply %locations.
4172 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4173 scanning @$.
4174 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4175 (@$ in %initial-action implies %locations,
4176 @$ in %destructor implies %locations,
4177 @$ in %printer implies %locations): ... these new test cases.
4178
1cfe1ed7
PE
41792007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4180
4181 Undo most of the 2007-02-03 change, switching to the strcase module
4182 now that gnulib strcase has been fixed.
4183 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4184 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4185 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4186 * m4/.cvsignore: Add strcase.m4.
4187 * src/getargs.c: Revert 2007-02-03 change, as follows.
4188 Don't include c-strcase.h.
4189 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4190 strcasecmp has "unspecified behavior" outside the POSIX locale,
4191 but it works fine in practice if at least one argument is ASCII,
4192 as is the case in Bison.
4193
0049ec86
PB
41942007-02-07 Paolo Bonzini <bonzini@gnu.org>
4195
4196 * tests/java.at: Skip tests if only one of javac/java is present.
4197 Reported by Joel E. Denny.
4198 * tests/atlocal.in: Adjust copyright years.
4199
42002007-02-05 Paolo Bonzini <bonzini@gnu.org>
4201
4202 * data/lalr1.java (Stack): Work around old verifiers that disallow
4203 access to the private fields of an inner class, from the outer class.
4204 We can make Stack's fields public because user code doesn't have access
4205 to the instance of Stack used by parse(). Reported by Paul Eggert.
4206
2c2b7220
PE
42072007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4208
4209 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4210 the right spot for these files?
4211 * bootstrap.conf (gnulib_modules): Add c-strcase.
4212 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4213 c-strncasecmp.c.
4214 * src/getargs.c: Include c-strcase.h.
4215 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4216 to avoid unspecified behavior.
4217
b2b81dae
JD
42182007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4219
4220 * doc/bison.texinfo (Decl Summary): Correct typo.
4221
c1d19e10
PB
42222007-01-30 Paolo Bonzini <bonzini@gnu.org>
4223
4224 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4225 Complain if the value does not match empty, "true" or "false".
4226 * data/c++.m4: Adjust default definitions of %define variables.
4227 * data/java.m4: Adjust default definitions of %define variables.
4228 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4229 to above behavior.
4230 * tests/input.at (Boolean %define variables): Test new behavior.
4231
8405b70c
PB
42322007-01-29 Paolo Bonzini <bonzini@gnu.org>
4233
4234 * NEWS: Mention java.
4235 * TODO: Remove things that are done.
4236 * bootstrap.conf: Add javacomp-script and javaexec-script.
4237 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4238
4239 * data/Makefile.am: Add new files.
4240 * data/java-skel.m4: New.
4241 * data/java.m4: New.
4242 * data/lalr1.java: New.
4243
4244 * doc/bison.texinfo: Put "A Complete C++ Example" under
4245 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4246 under Other Languages.
4247
4248 * src/getargs.c (valid_languages): Add Java.
4249 * src/getargs.h (struct bison_language): Update size of string fields.
4250
4251 * tests/Makefile.am: Add java.at.
4252 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4253 * tests/java.at: New.
4254 * tests/testsuite.at: Include it.
4255
3eb82471
JD
42562007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4257
4258 Clean up.
4259 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4260 at_directive_argv arguments so these no longer have to be global
4261 variables. Also, update the implementation for the following changes.
4262 (fail_for_at_directive_too_many_args,
4263 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4264 (at_directive_name): Remove as at_directive_argv[0] will be used for
4265 this now.
4266 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4267 for the directive name.
4268 (at_directive_argc, at_directive_argv): Make these local within
4269 skel_lex instead of global.
4270 (INITIAL): Update directive start action for above changes.
4271 (SC_AT_DIRECTIVE_ARG): Rename to...
4272 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4273 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4274 (scan_skel): Move yylex_destroy to...
4275 (skel_scanner_free): ... here.
4276 * tests/skeletons.at (installed skeleton file name): Rename to...
4277 (installed skeleton file names): ... this.
4278
148d66d8
JD
42792007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4280
4281 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4282 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4283 Summary" not "Directives".
4284 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4285 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4286 since the former is now the more complete one.
4287 (Prologue Alternatives): Likewise and do the same for %defines.
4288 (Table of Symbols): Add summary of %code, add summary of %define, and
4289 move full %code documentation to...
4290 (Decl Summary): ... here for consistency with other entries in these
4291 sections.
4292 Move %define entry in order to keep this list alphabetized.
4293 Reword %define entry a little to put less emphasis on the skeleton
4294 concept, which most users shouldn't have to think about.
4295
665f0c24
PE
42962007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4297
4298 Adjust to recent gnulib changes.
4299 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4300 Add string.h, string_.h, unistd_.h, wchar_.h.
4301 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4302 * src/system.h: Don't include <stpcpy.h>; this is now done by
4303 <string.h>.
4304
592d0b1e
PB
43052007-01-23 Paolo Bonzini <bonzini@gnu.org>
4306
4307 Simplify implementation of unqualified %code, implement macros for
4308 uniform treatment of boolean %define flags. Document %define.
4309 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4310 b4_percent_code_ifdef): New.
4311 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4312 * data/c++.m4: Define default value for global_tokens_and_yystype.
4313 * data/glr.cc: Likewise.
4314 * data/location.cc: Use b4_percent_define_flag_if.
4315
148d66d8 4316 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
4317
4318 * src/parse-gram.y (Unqualified %code): Change muscle name to
4319 b4_percent_code().
4320 (content.opt): Default to empty.
4321
a7867f53
JD
43222007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4323
4324 Implement support for relative and absolute skeleton file names.
4325 Discussed starting at
4326 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4327 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4328 (Bison Options): Document in --skeleton entry.
4329 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4330 full_skeleton can't necessarily hold all of pkgdatadir.
4331 If the specified skeleton file name contains a `/', don't prepend
4332 pkgdatadir.
4333 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4334 file name contains a `/', prepend the grammar file directory.
4335 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4336 * skeletons.at: New file.
4337 (relative skeleton file names): New test case.
4338 (installed skeleton file names): New test case.
4339 * tests/testsuite.at: Include skeletons.at.
4340
4341 * bootstrap: Update copyright to 2007.
4342
830c9b18
PB
43432007-01-17 Paolo Bonzini <bonzini@gnu.org>
4344
4345 * bootstrap: Remove occurrences of .#bootmp from the files.
4346
a8c2e813
AD
43472007-01-17 Akim Demaille <akim@epita.fr>
4348
4349 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4350 nonterminals.
4351 Use per-type %printer.
4352
279cabb6
JD
43532007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4354
4355 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4356 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4357 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4358 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4359 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4360 tests/glr-regression.at, tests/input.at, tests/local.at,
4361 tests/output.at, tests/torture.at: Update copyright to 2007.
4362
bb32f4f2
AD
43632007-01-16 Akim Demaille <akim@epita.fr>
4364
4365 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4366 error code.
4367 (Calc++ Scanner): Exit with failure if we can't open the input
4368 file.
4369 Accept "-" standing for stdin.
4370 (Calc++ Top Level): Print the result only if the parsing was
4371 successful.
4372
7cff04b5
AD
43732007-01-16 Akim Demaille <akim@epita.fr>
4374
4375 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4376
a4e25e1d
JD
43772007-01-15 Paolo Bonzini <bonzini@gnu.org>
4378 and Joel E. Denny <jdenny@ces.clemson.edu>
4379
4380 Clean up %define and %code implementation in M4 some. Most
4381 importantly, rename all related macros to be in the b4_percent_define
4382 and b4_percent_code namespaces. Also, complete support for `.' in
4383 %define variable names and %code qualifiers.
4384 * data/bison.m4 (b4_check_user_names): Check for special
4385 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4386 m4_foreach loops.
4387 (b4_get_percent_define, b4_get_percent_code): Rename to...
4388 (b4_percent_define_get, b4_percent_code_get): ... these.
4389 Extend documentation with examples.
4390 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4391 b4_percent_define_skeleton_variables and
4392 b4_percent_code_skeleton_qualifiers.
4393 Expect any value for the %define variable `foo' to be stored in the
4394 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4395 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4396 expect any unqualified %code blocks to be stored in a macro named
4397 `b4_percent_code_unqualified'.
4398 Use m4_indir so that %define variable names and %code qualifiers can
4399 contain `.', which is allowed by the grammar parser.
4400 (b4_percent_define_default): New macro to set a default value for a
4401 %define variable.
4402 (m4_wrap): Update wrapped code, and fix some underquoting.
4403 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4404 Expect grammar uses of %define variables and %code qualifiers to be
4405 defined in b4_percent_define_user_variables and
4406 b4_percent_code_user_qualifiers.
4407 * data/c++.m4: Use b4_percent_define_default rather than
4408 m4_define_default. Fix some underquoting. Skeleton usage of %define
4409 variable define_location_comparison now implies skeleton usage of
4410 %define variable filename_type.
4411 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4412 data/push.c, data/yacc.c: Update macro names.
4413 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4414 muscle names.
4415
e37c665c
JMG
44162007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4417
4418 DJGPP specific issues.
4419
4420 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4421 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4422
7d2d521f
JD
44232007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4424
4425 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4426 run parsers in all tests so that Valgrind is invoked during
4427 maintainer-check-valgrind.
4428 (Duplicate representation of merged trees): Free all semantic values.
4429 (Duplicated user destructor for lookahead): Likewise.
4430
e0ac9b4b
JD
44312007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4432
4433 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4434 command-line prefix.
4435 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4436 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4437 miss Valgrind messages.
4438 (Exploding the Stack Size with Malloc): Likewise.
4439
78143faa
JD
44402007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4441
4442 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4443 locals. Reported by Juan Manuel Guerrero at
4444 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4445 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4446 Fix some indentation also.
4447 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4448 explaining this issue.
4449
7ecec4dd
JD
44502007-01-09 Paolo Bonzini <bonzini@gnu.org>
4451 and Joel E. Denny <jdenny@ces.clemson.edu>
4452
4453 Simplify union and prologue handling, and escape union and lex/parse
4454 params with digraphs.
4455 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4456 values to the empty string since these are no longer guaranteed
4457 initialized by the front-end.
4458 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4459 braces around b4_user_stype since this is no longer done by the
4460 front-end.
4461 * src/files.c, src/files.h (pre_prologue_obstack,
4462 post_prologue_obstack): Remove.
4463 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4464 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4465 with digraphs. This fixes lex params and parse params.
4466 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4467 * src/output.c (prepare): Remove muscle insertion of the prologues.
4468 (output): Remove freeing of pre_prologue_obstack and
4469 post_prologue_obstack.
4470 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4471 than prologue_augment for prologue parsing so you don't need prologue
4472 obstacks.
5c80250c
JD
4473 (grammar_declaration): For %union RHS, use `braceless' instead of
4474 "{...}" so that braces are already stripped and code is escaped with
4475 digraphs.
7ecec4dd
JD
4476 * src/reader.c (prologue_augment): Remove.
4477 (reader): Remove initialization of pre_prologue_obstack and
4478 post_prologue_obstack.
4479 * src/reader.h (prologue_augment): Remove.
4480
4481 * data/c.m4: Remove stray parenthesis.
4482
16dc6a9e
JD
44832007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4484
4485 Remove quotes from variables names in %define directives and from
4486 qualifiers in %code directives, and restrict the characters that are
4487 allowed in them to M4-friendly ones. For %define, continue to support
4488 the quoted form as a deprecated feature. Discussed starting at
4489 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4490 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4491 %code.
4492 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
4493 (Decl Summary): In %defines entry, update mention of `%code requires'
4494 and `%code provides'.
16dc6a9e
JD
4495 (C++ Location Values): Update %define uses.
4496 (Calc++ Parser Interface): Likewise.
4497 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 4498 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
4499 * src/parse-gram.y (prologue_declaration): For %define variables, use
4500 `variable' instead of `STRING'.
4501 (grammar_declaration): For %code qualifiers, use `ID' instead of
4502 `STRING'.
4503 (variable): New nonterminal that takes an `ID' or a `STRING'.
4504 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4505 and %define uses.
4506 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4507 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4508 (%define errors): Update %define uses.
4509
e9813cd4
JD
45102007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4511
4512 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4513 instead of muscle_insert for %define values so that M4-special
4514 characters are replaced with digraphs.
4515 * tests/input.at (%define errors): Extend to check weird values.
4516
6afc30cc
JD
45172007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4518
4519 Instead of having skeletons declare all valid %define variables and
4520 %code qualifiers, provide macros that retrieve the associated values
4521 and build these lists automatically. Thus Bison will now warn when a
4522 variable or qualifier is not used by the skeleton in the current
4523 invocation regardless of whether it might sometimes be used by that
4524 skeleton in other invocations. Also, move all %define value macros to
4525 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4526 form, which is replaced by %code.
4527 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4528 (b4_check_user_names): ... this, and change the series of valid name
4529 arguments to a single list argument for names used in the skeleton
4530 similar to the existing list argument for names used in the grammar.
4531 Warn instead of complaining.
4532 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4533 values and %code code, to format %code code properly, and to build
4534 lists of all %define variables and %code qualifiers used in the
4535 skeleton: b4_skeleton_percent_define_variables and
4536 b4_skeleton_percent_code_qualifiers.
4537 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4538 Remove, and...
4539 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4540 the skeleton names lists can finish building first. In place of
4541 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4542 expect the lists b4_user_percent_define_variables and
4543 b4_user_percent_code_qualifiers.
4544 * data/c++.m4: Where setting default values for b4_parser_class_name,
4545 b4_location_type, b4_filename_type, b4_namespace, and
4546 b4_define_location_comparison, update their names to the
4547 b4_percent_define_ namespace.
4548 * data/glr.c: Don't use b4_check_percent_define_variables and
4549 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4550 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4551 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 4552 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
4553 * data/location.cc: Use b4_get_percent_define.
4554 * data/push.c: Don't use b4_check_percent_define_variables and
4555 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4556 * data/yacc.c: Likewise, and don't call m4_exit in
4557 b4_use_push_for_pull_if or m4_wrap code will never execute.
4558 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4559 Rename to...
4560 (muscle_grow_user_name_list): ... this for consistency with the
4561 terminology used in bison.m4.
4562 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4563 %define variable names, and rename muscle used_percent_define_variables
4564 to user_percent_define_variables.
4565 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4566 user_percent_code_qualifiers.
4567 (content): Remove.
4568 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4569 {CODE} form is no longer accepted.
4570 * tests/input.at (Reject bad %code qualifiers): Rename to...
4571 (Reject unused %code qualifiers): ... this, and update test output.
4572 (%define error): Update test output.
4573
7eb8a0bc
JD
45742007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4575
4576 Check for unrecognized %define variables similar to checking for
4577 unrecognized %code qualifiers. Check for redefined %define variables.
4578 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4579 generalizes...
4580 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4581 (b4_check_percent_define_variables): New, also wraps it.
4582 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4583 variables using b4_check_percent_define_variables.
4584 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4585 all those exercised in the test suite and all those listed in the
4586 `Default values' section of c++.m4. Are there others?
4587 * data/push.c, data/yacc.c: Declare no valid %define variables.
4588 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4589 similar to muscle_find, but it works even when the muscle stores a
4590 const value.
4591 (muscle_grow_used_name_list): New function for constructing the used
4592 name list muscles that b4_check_for_unrecognized_names requires.
4593 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4594 %define'd more than once. Define the b4_used_percent_define_variables
4595 muscle with muscle_grow_used_name_list.
4596 (grammar_declaration): Abbreviate %code code with
4597 muscle_grow_used_name_list.
4598 * tests/input.at (%define errors): New.
4599
3fc65ead
JD
46002007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4601
4602 Provide warn_at, complain_at, and fatal_at function callbacks to the
4603 skeletons, and use this for %code qualifier complaints.
4604 * data/bison.m4 (b4_error_at): New, invoked by...
4605 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4606 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4607 @fatal_at(...@) directives.
4608 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4609 qualifiers in b4_used_percent_code_qualifiers and to use
4610 b4_complain_at.
4611 * src/location.c, src/location.h (boundary_set_from_string): New global
4612 function.
4613 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4614 function.
4615 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4616 to b4_used_percent_code_qualifiers.
4617 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4618 function.
4619 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4620 (lineno): Rename to...
4621 (out_lineno): ... this so I don't misunderstand it again.
4622 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4623 here; these newlines are in the input but not the output file.
4624 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4625 (at_directive_perform): ... this new static function, and add handling
4626 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4627 directives.
4628 * tests/input.at (Reject bad %code qualifiers): Update test output with
4629 locations and extend.
4630
4631 * tests/output.at (Output file name: [, Output file name: ]): Remove
4632 bogus comment about these tests failing.
4633
1c7b7e1d
JD
46342007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4635
4636 Clean up b4_check_percent_code_qualifiers a little.
4637 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4638 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4639 documentation and add examples.
4640 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4641 qualifiers here.
4642
08af01c2
JD
46432007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4644
4645 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4646 unreliable -- especially when they're hidden inside another macro.
4647 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4648 data/c.m4: Remove m4_divert(-1).
4649 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4650 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4651 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 4652 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
4653 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4654 pushed and popped by m4sugar, should be first on the stack.
4655
4656 Provide warn, complain, and fatal function callbacks to the skeletons.
4657 This provides more flexibility than m4_fatal, improves the error
4658 message format, and captures messages for translation. Discussed
4659 starting at
4660 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4661 * data/bison.m4 (b4_error): New, invoked by...
4662 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4663 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4664 directives. Because these M4 macros might be called when the current
4665 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4666 the previous removal of uses of m4_divert, which caused trouble.
4667 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4668 m4_fatal to report unrecognized %code qualifiers.
4669 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4670 push parser requests.
4671 * data/glr.c: Use b4_complain instead of m4_fatal to report
4672 non-deterministic push parser requests.
4673 Update @output usage to @output(...@) form.
4674 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4675 report missing %defines. Update @output usage to @output(...@) form.
4676 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4677 @output(...@) form.
4678 * src/main.c (main): Invoke skel_scanner_free.
4679 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4680 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4681 obstack_for_string from flex-scanner.h.
4682 (YY_DECL): Use to declare skel_lex static.
4683 (decode_at_digraphs): Remove; now handled in the new
4684 SC_AT_DIRECTIVE_ARG start condition.
4685 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4686 functions.
4687 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4688 at_directive_argv): New static globals.
4689 (INITIAL): Use fail_for_invalid_at.
4690 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4691 recognize the start of a generalized `@directive(...@)' form and
4692 start...
4693 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4694 directive args (using the new obstack_for_string), to decode the
4695 contained @ diagraphs, and to perform the directive. It recognizes
4696 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4697 @output(...@).
4698 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4699 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4700 `@,'.
4701 (scan_skel): Initialize obstack_for_string on the first call.
4702 (skel_scanner_free): New function to free obstack_for_string.
4703 * tests/input.at (Reject bad %code qualifiers): Update test output.
4704
8e0a5e9e
JD
47052007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4706
4707 Consolidate the 4 prologue alternative directives (%code, %requires,
4708 %provides, and %code-top) into a single %code directive with an
4709 optional qualifier field. Discussed at
4710 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4711 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4712 alternatives.
4713 * doc/bison.texinfo (Prologue Alternatives): Update.
4714 (Decl Summary): Update to %code "requires" and %code "provides".
4715 (Calc++ Parser): Update to %code "requires".
148d66d8 4716 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
4717 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4718 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4719 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4720 which are skeleton-specific.
4721 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4722 declare what %code qualifiers it supports and to complain if any other
4723 qualifiers were used in the grammar.
4724 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4725 and b4_user_code([b4_percent_code_provides]) in place of
4726 b4_user_requires and b4_user_provides.
4727 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4728 Add b4_user_code([b4_percent_code_top]) and
4729 b4_user_code([b4_percent_code]).
4730 Invoke b4_check_percent_code_qualifiers.
4731 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4732 PERCENT_REQUIRES): Remove.
4733 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4734 %requires. Rewrite the %code RHS as the unqualified form defining the
4735 muscle b4_percent_code. Add another RHS for the qualified %code form,
4736 which defines muscles of the form b4_percent_code_QUALIFIER and the
4737 b4_used_percent_code_qualifiers muscle.
4738 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4739 PERCENT_REQUIRES): Remove.
4740 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4741 %code "requires" and %code "provides".
4742 * tests/input.at (Reject bad %code qualifiers): New.
4743
95021767
JD
47442007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4745
4746 Use the new code_props interface for destructors and printers.
4747 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4748 printer_location members, and change the type of the destructor and
4749 printer members to code_props.
4750 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4751 symbol_printer_get, semantic_type_destructor_set,
4752 semantic_type_printer_set, default_tagged_destructor_set,
4753 default_tagless_destructor_set, default_tagged_printer_set,
4754 default_tagless_printer_set): Use code_props in arguments and return
4755 types in place of char const * and location.
4756 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4757 since the locations are now contained in the return of
4758 symbol_destructor_get and symbol_printer_get.
4759 * src/output.c (symbol_destructors_output, symbol_printers_output):
4760 Replace with...
4761 (symbol_code_props_output): ... this to eliminate duplicate code.
4762 (output_skeleton): Update to use symbol_code_props_output.
4763 * src/reader.c (symbol_should_be_used): Update use of
4764 symbol_destructor_get.
4765 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4766 Update uses of the various _destructor_set and _printer_set functions.
4767 * src/symtab.c: (default_tagged_destructor_location,
4768 default_tagless_destructor_location, default_tagged_printer_location,
4769 default_tagless_printer_location): Remove since we...
4770 (default_tagged_destructor, default_tagless_destructor,
4771 default_tagged_printer, default_tagless_printer): ... change the type
4772 of these to code_props.
4773 (symbol_new, semantic_type_new, symbol_destructor_set,
4774 semantic_type_destructor_set, symbol_destructor_get,
4775 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4776 symbol_check_alias_consistency, default_tagged_destructor_set,
4777 default_tagless_destructor_set, default_tagged_printer_set,
4778 default_tagless_printer_set): Update.
4779 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4780 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4781 code_props members.
4782 (symbol_print): Use SYMBOL_CODE_PRINT.
4783
f6857bbf
JD
47842007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4785
4786 Use the new code_props interface for rule actions.
4787 * src/symlist.h (symbol_list): Replace action, action_location, and
4788 used members with a code_props action_props member.
4789 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4790 grammar_midrule_action, grammar_current_rule_merge_set,
4791 grammar_current_rule_symbol_append, packgram): Update.
4792 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4793 * src/scan-code.l (handle_action_dollar): Update.
4794 (translate_rule_action): Remove, no longer used.
4795 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4796
7c0c6181
JD
47972007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4798
4799 Use the new code_props interface in parse-gram.y.
4800 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4801 Update all uses of translate_* functions to use the new code_props
4802 interface and to use gram_scanner_last_string_free and
4803 code_scanner_last_string_free where possible.
4804 (grammar_declaration): symbol_list_destructor_set and
4805 symbol_list_printer_set now perform the translation, so don't do it
4806 here. Use gram_scanner_last_string_free where possible.
4807 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4808 translate_code): Remove, no longer used.
4809 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4810 symbol_list_printer_set): Perform code translation here rather than
4811 depending on the caller to do so.
4812
4813 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4814 * src/scan-gram.h (gram_last_string): Remove declaration.
4815 * src/scan-gram.l (last_string): Declare it static.
4816
28e52c0d
JD
48172007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4818
4819 Encapsulate code properties and related functionality for the various
4820 destructors, printers, and actions into a code_props structure and
4821 interface. This patch merely implements code_props in scan-code.h and
4822 scan-code.l. Future patches will rewrite other modules to use it.
4823 Discussed starting at
4824 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4825 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4826 consistently initialize const structs that have an empty location
4827 field.
4828 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4829 to ensure consistency.
4830 * src/scan-code.h (code_props): New structure.
4831 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4832 function, macro, and const global variable for initializing a
4833 code_props with no code.
4834 (code_props_plain_init, code_props_symbol_action_init,
4835 code_props_rule_action_init, code_props_translate_code): The rest of
4836 the new code_props functional interface. Among other things, the init
4837 functions set the code_props kind field so that
4838 code_props_translate_code will know whether to behave like
4839 translate_symbol_action, translate_rule_action, or translate_code.
4840 These old translate functions must remain until all other modules are
4841 updated to use the new code_props interface.
4842 (code_scanner_last_string_free): New function similar to
4843 gram_scanner_last_string_free.
4844 (code_scanner_free): Add documentation.
4845 * src/scan-code.l: Implement the new interface.
4846 (code_lex): Make it static, add a code_props* argument, and remove the
4847 rule argument.
4848 (last_string): New static global similar to the one in scan-gram.l.
4849 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4850 instead of rule.
4851 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4852 code_props since Bison may one day use this information for destructors
4853 and printers.
4854 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4855 (handle_action_dollar): Use symbol_list_n_get and set used flag
4856 directly since symbol_list_n_used_set is removed.
4857 (translate_action): Add a code_props* argument and remove the rule,
4858 action, and location arguments. Pass the code_props* on to code_lex.
4859 (translate_rule_action, translate_symbol_action, translate_code):
4860 Rewrite as wrappers around the new code_props interface.
4861 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4862 it would eventually need to break the encapsulation of code_props.
4863
96034983
JD
48642007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4865
4866 * etc/.cvsignore: New.
4867
945e396c
JD
48682007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4869
4870 Add maintainer-push-check to run maintainer-check using push parsing in
4871 place of pull parsing where available.
4872 * Makefile.am (maintainer-push-check): New.
4873 * data/bison.m4 (b4_use_push_for_pull_if): New.
4874 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4875 appropriately based on their existing values.
4876 (yypush_parse): Don't print push-parser-specific diagnostics if push
4877 parsing is being used in place of pull parsing.
4878 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4879 push.c.
4880 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4881 variable, and insert b4_use_push_for_pull_flag into muscles.
4882 * tests/Makefile.am (maintainer-push-check): New.
4883
7d596384
JD
48842006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4885
4886 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4887 (whether successful or failed) so that yypush_parse can be invoked
4888 again to start a new parse using the same yypstate.
4889 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4890 check multiple yypull_parse invocations on the same yypstate. For pull
4891 mode, extend to check multiple yyparse invocations.
4892 (Exploding the Stack Size with Alloca): Extend to try with
4893 %push-pull-parser.
4894 (Exploding the Stack Size with Malloc): Likewise.
4895
4896 * tests/calc.at (Simple LALR Calculator): Don't specify
4897 %skeleton "push.c" since %push-pull-parser implies that now.
4898 * tests/headers.at (export YYLTYPE): Don't check for the push
4899 declarations. Otherwise, this test case can't be used to see if push
4900 mode can truly emulate pull mode.
4901 * tests/input.at (Torturing the Scanner): Likewise.
4902 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4903 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4904 AT_YACC_IF, which now includes the case of push mode since %skeleton
4905 need not be used for push mode. This will be more intuitive once
4906 push.c is renamed to yacc.c.
4907
7172e23e
JD
49082006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4909
4910 For push mode, convert yyparse from a macro to a function, invoke yylex
4911 instead of passing a yylexp argument to yypull_parse, and don't
4912 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4913 Discussed starting at
4914 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4915 * data/bison.m4 (b4_pull_if): New.
4916 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4917 * data/push.c: Improve M4 quoting a little.
4918 (b4_generate_macro_args, b4_parenthesize): Remove.
4919 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4920 any time a pull parser is requested.
4921 Don't #define this as a wrapper around yypull_parse. Instead, when
4922 both push and pull are requested, make it a function that does that
4923 same thing.
4924 (yypull_parse): If there's a b4_prefix, #define this to
4925 b4_prefix[pull_parse] when both push and pull are requested.
4926 Don't define this as a function unless both push and pull are
4927 requested.
4928 Remove the yylexp argument and hard-code yylex invocation instead.
4929 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4930 %push-parser.
4931 * src/getargs.c (pull_parser): New global initialized to true.
4932 * getargs.h (pull_parser): extern it.
4933 * src/output.c (prepare): Insert pull_flag muscle.
4934 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4935 (prologue_declaration): Set both push_parser and pull_parser = true for
4936 %push-pull-parser. Set push_parser = true and pull_parser = false for
4937 %push-parser.
4938 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4939 %push-parser since there's no backward-compatibility concern here.
4940 Scan %push-pull-parser.
4941 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4942 instead of %push-parser.
4943 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4944 prototype it in the module that calls yyparse.
4945 * tests/input.at (Torturing the Scanner): Likewise.
4946 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4947
2e7944cb
JD
49482006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4949
4950 Update etc/bench.pl. Optimize push mode a little (the yyn change
4951 deserves most of the credit).
4952 * Makefile.am (SUBDIRS): Add etc subdirectory.
4953 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4954 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4955 yytoken, yyval, and yyloc declarations to...
4956 (yyparse or yypush_parse): ... here to improve performance. For
4957 yypush_parse invocations after the first, be sure to assign yyn its old
4958 value again.
4959 (yypstate_new): Don't bother initializing the yyresult field since the
4960 initial value isn't used.
4961 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4962 remove the #define that, in push mode, set it to yyps->NAME.
4963 * etc/Makefile.am: New.
4964 * etc/bench.pl: Remove and build it instead from...
4965 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4966 "tests/bison" from the build directory by default rather than just
4967 invoking "bison" from $PATH.
4968 (calc_grammar): Update push parser code: don't declare yylval globally,
4969 don't define yyparse_wrapper, and don't #define yyparse.
4970 (bench_grammar): Update to check all working combinations of yacc.c,
4971 push.c, impure, pure, pull, and push.
4972
c3d50342
JD
49732006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4974
4975 For push mode, add pull wrappers around yypush_parse.
4976 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4977 (yypull_parse): New function wrapping yypush_parse.
4978 (yyparse): New #define wrapping yypull_parse.
4979 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4980 is declared.
4981 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4982 prototype yylex in the module that calls yyparse, and don't prototype
4983 yyparse there. Otherwise, the yyparse expansion won't compile.
4984 * tests/input.at (Torturing the Scanner): Likewise.
4985
94ebeba5
JD
49862006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4987
4988 Enable push parsers to operate in impure mode. Thus, %push-parser no
4989 longer implies %pure-parser. The point of this change is to move
4990 towards being able to test the push parser code by running the entire
4991 test suite as if %push-parser had been declared.
4992 * data/push.c (yypush_parse): For impure mode, remove the
4993 yypushed_char, yypushed_val, and yypushed_loc arguments.
4994 Instead, declare these as local variables initialized to the global
4995 yychar, yylval, and yylloc.
4996 For the first yypush_parse invocation only, restore the initial values
4997 of these global variables when it's time to read a token since they
4998 have been overwritten.
4999 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
5000 %push-parser.
5001 * tests/calc.at (Simple LALR(1) Calculator): Always declare
5002 %pure-parser along with %push-parser since this test case was designed
5003 for pure push parsers.
5004 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
5005 (AT_YACC_OR_PUSH_IF): New.
5006 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
5007 add a note that it's still wrong for some cases (as it has been for a
5008 while).
5009 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
5010 %push-parser no longer implies %pure-parser.
5011
a0633178
JD
50122006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5013
5014 Remove some unnecessary differences between the pull parser code and
5015 the push parser code. This patch enables yynerrs in push mode.
5016 * data/push.c: Reformat M4 a little.
5017 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
5018 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
5019 because push mode is on. Instead, if pure mode is on, move yynerrs
5020 to...
5021 (b4_declare_parser_state_variables): ... here.
5022 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
5023 to yyps->NAME so it can be used in yypush_parse.
5024 (yypush_parse): Don't omit uses of yynerrs in push mode.
5025
8646b6a3
JD
50262006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5027
5028 Fix bug such that the first pushed token's value and location are
5029 sometimes overwritten (sometimes by %initial-action) before being used.
5030 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
5031 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
5032 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
5033 more closely mimic the pull parser logic.
5034 Don't copy the pushed token to yychar, yylval, and yylloc until it's
5035 time to read a token, which is after any initialization of yylval and
5036 yylloc.
5037 (gottoken): Rename label to...
5038 (yyread_pushed_token): ... for clarity and to avoid infringing on the
5039 user namespace.
5040
9baf4d74
JD
50412006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
5042
5043 Rearrange initialization of the parser state variables so that the
5044 skeleton doesn't have to have a copy for pull mode and another for push
5045 mode. This patch also fixes at least a bug such that yylloc was not
5046 initialized (with b4_location_initial_line and
5047 b4_location_initial_column) upon calling yypush_parse. However, that
5048 initialization now overwrites the first token's location;
5049 %initial-action assigning @$ already did the same thing, and both bugs
5050 will be fixed in a later patch.
5051 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5052 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5053 yyss, yyvs, yyls, and yystacksize.
5054 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5055 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5056 yylsp.
5057 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5058 yyps->NAME so it can be used in yypush_parse.
5059 (yyparse or yypush_parse): For yypush_parse, don't print the
5060 "Starting parse" diagnostic for invocations after the first.
5061 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5062 yypush_parse, only do it for the first invocation.
5063 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5064 initialization to occur in yypush_parse but only on the first
5065 invocation.
5066
23522164
JD
50672006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5068
5069 * data/push.c: Add CPP guards around push parser declarations in both
5070 the header and the code file.
5071 In the code file, move the push parser declarations to the same place
5072 they appear in the header file.
5073 Clean up the M4 some, especially the inconsistent underquoting in
5074 some b4_c_function_def and b4_c_function_decl uses.
5075
bb010fe5
JD
50762006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5077
5078 Encapsulate the push parser state variables into an M4 macro so the
5079 push skeleton doesn't have to list them again for pull mode's yyparse.
5080 For push mode, remove yypush_parse's local equivalents of these
5081 variables to eliminate unnecessary copying between the two sets at
5082 run-time. This patch also fixes at least a bug related to multiple
5083 %initial-action invocations in push mode.
5084 * data/push.c (b4_declare_parser_variables): Rename to...
5085 (b4_declare_scanner_communication_variables): ... this for clarity and
5086 update both uses.
5087 (b4_declare_yyparse_variables): Remove and move its contents to the one
5088 spot where it was invoked.
5089 (b4_declare_parser_state_variables): New macro containing the parser
5090 state variables required by push mode.
5091 (struct yypstate): Replace all fields but yynew with
5092 b4_declare_parser_state_variables.
5093 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5094 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5095 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5096 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5097 parser state variable declarations with
5098 b4_declare_parser_state_variables.
5099 Don't initialize parser state variables when calling yypush_parse since
5100 yypstate_new already does that.
5101 Invoke the user's initial action only upon the first yypush_parse
5102 invocation.
5103 Remove all code that copies between the local parser state variables
5104 and the yypstate.
5105
2d212f8c
JD
51062006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5107
5108 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5109 prevent a name collision in a future patch where these names will
5110 sometimes be #define'd.
5111 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5112 since it no longer has the same name as the existing argument.
5113 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5114
e6e704dc
JD
51152006-12-19 Paolo Bonzini <bonzini@gnu.org>
5116 and Joel E. Denny <jdenny@ces.clemson.edu>
5117
5118 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5119 that the argument is case-insensitive, and there's no `=' here.
5120 For the %skeleton entry, mention that %language is better.
5121 (Bison Options): Likewise for --language and --skeleton. Move the
5122 --skeleton entry so that the `Tuning the parser' section is sorted
5123 alphabetically on long options.
5124 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5125 %language directive in detail here; cross-reference the %language
5126 documentation instead.
5127 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5128 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 5129 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
5130 * examples/extexi (normalize): Instead of replacing every %require
5131 argument with the current Bison version, just substitute for
5132 `@value{VERSION}'. This guarantees that we're testing what actually
5133 appears in the documentation.
5134 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5135 rather than `@VERSION@'.
5136
0e021770
PE
51372006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5138
fd575f05
PE
5139 * NEWS: Reword the %language news a bit, and put it earlier.
5140
0e021770
PE
5141 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5142 Rewrite to simplify the logic.
5143 (language_argmatch): Likewise.
fd575f05
PE
5144 (program_name): We now own this var.
5145 * src/getargs.h (struct bison_language): Use char[] rather than
5146 const char *.
0e021770
PE
5147
5148 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5149 Java is supported.
5150 * src/complain.c (program_name): Remove decl; no longer needed.
5151 * src/main.c (program_name): Remove; now belongs to getargs.
5152
51532006-12-18 Paolo Bonzini <bonzini@gnu.org>
5154
5155 * NEWS: Document %language.
5156
5157 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5158
5159 * data/c-skel.m4, data/c++-skel.m4: New files.
5160 * data/glr.c: Complain on push parsers.
5161
5162 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5163 over %skeleton.
148d66d8 5164 (Decl Summary): Document %language and %skeleton.
0e021770
PE
5165 (Command line): Document -L.
5166
5167 * examples/extexi: Rewrite %require directive.
5168 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5169
5170 * src/files.c (compute_exts_from_gc): Look in language structure
5171 for .y extension.
5172 (compute_file_name_parts): Check whether .tab should be added.
5173 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5174 (language, skeleton_arg, language_argmatch): New.
5175 (long_options): Add --language.
5176 (getargs): Use skeleton_arg, add -L/--language.
5177 * src/getargs.h: Include location.h.
5178 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5179 * src/output.c (prepare): Pick default skeleton from struct language.
5180 Don't dispatch C skeletons here.
5181 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5182 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5183 * src/scan-gram.l ("%language"): New rule.
5184
5185 * tests/calc.at: Test %skeleton and %language.
5186 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5187 (AT_GLR_IF): Look for %skeleton "glr.cc".
5188 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5189 (AT_YACC_IF): Reject %language.
5190
5691bf57
PE
51912006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5192
db06f0ce
PE
5193 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5194 since it wasn't used; only the typedef name 'semantic_type' is needed.
5195 Also, omit trailing white space.
5196
5691bf57
PE
5197 * bootstrap: Sync from coreutils.
5198 (gnulib_extra_files): Add build-aux/announce.gen.
5199 (slurp): Adjust .gitignore files like .cvsignore files.
5200 * build-aux/announce-gen: Remove from CVS, since bootstrap
5201 now creates this.
5202
791934e4
JD
52032006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5204
5205 Make %push-parser imply %pure-parser. This fixes several bugs; see
5206 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5207 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5208 pure_parser = true.
5209 * data/push.c: Don't bother testing b4_push_if when deciding whether
5210 to expand b4_declare_parser_variables globally.
5211 (yypush_parse): Likewise in here.
5212
5213 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5214 (yy_reduce_print): Reformat M4 for readability.
5215
ee5abb37
JD
52162006-12-15 Bob Rossi <bob@brasko.net>
5217 and Joel Denny <jdenny@ces.clemson.edu>
5218
5219 * data/push.c (yypstate): Add typedef, and update all uses of
5220 struct yypstate to just yypstate.
5221 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5222
16ca01f9
JD
52232006-12-14 Bob Rossi <bob@brasko.net>
5224
5225 * data/push.c (yypush_parse): Declare prototype regardless of
5226 %locations option.
5227
ab8e7e1a
JD
52282006-12-14 Bob Rossi <bob@brasko.net>
5229
5230 * data/push.c (yyparse): Remove the prototype and the #define when in
5231 push-parser mode.
5232
9bf32be3
JD
52332006-12-13 Bob Rossi <bob@brasko.net>
5234
5235 * data/push.c (yypstate_init): Rename to...
5236 (yypstate_new): ... this and use b4_c_function_def.
5237 (yypstate_delete): New.
5238 (yypush_parse): Change parameters yynval and yynlloc to be const.
5239 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5240 yypstate_delete functions.
5241
f02e2948
JD
52422006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5243
5244 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5245 strange test case titles. Reported by Bob Rossi.
5246
38eb7751
PE
52472006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5248
5249 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5250 of potential ambiguities in GLR grammers.
5251
bd9d212b
JD
52522006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5253
5254 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5255 `bison ', use m4_index instead of m4_substr since chopping up a string
5256 containing M4-special characters causes problems here.
5257
5258 Fix a couple of bugs related to special characters in user-specified
5259 file names, and make it easier for skeletons to compute output file
5260 names with the same file name prefix as Bison-computed output file
5261 names.
5262 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5263 b4_parser_file_name and b4_spec_defines_file instead of
5264 @output_parser_name@ and @output_header_name@, which are now redundant.
5265 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5266 b4_parser_file_name, b4_spec_defines_file, and the new
5267 @basename(FILENAME@) instead of @output_parser_name@ and
5268 @output_header_name@, which inappropriately escaped the file names as
5269 C string literals.
5270 * src/files.c (all_but_ext): Remove static qualifier.
5271 (compute_output_file_names): Move `free (all_but_ext)' to...
5272 (output_file_names_free): ... here since all_but_ext is needed later.
5273 * src/files.h (all_but_ext): Extern.
5274 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5275 exactly what MUSCLE_INSERT_STRING used to do.
5276 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5277 characters are escaped properly.
5278 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5279 all_but_ext.
5280 For pkgdatadir muscle, maintain previous functionality by using
5281 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5282 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5283 digraphs would never be expanded. Hopefully no one has M4-special
5284 characters in his Bison installation path.
5285 * src/scan-skel.l: Don't parse @output_header_name@ and
5286 @output_parser_name@ anymore since they're now redundant.
5287 In @output, use decode_at_digraphs.
5288 Parse a new @basename command that invokes last_component.
5289 (decode_at_digraphs): New.
5290 (BASE_QPUTS): Remove unused.
5291 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5292 (Output file name): New tests.
5293
3f7ca628
JD
52942006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5295
5296 Warn about output files that are generated by the skeletons and that
5297 conflict with other output files.
5298 * data/glr.c: Don't generate the header file here when glr.cc does.
5299 * src/files.c (file_names, file_names_count): New static globals.
5300 (compute_output_file_names): Invoke output_file_name_check for files
5301 not generated by the skeletons and remove existing checks.
5302 (output_file_name_check): New function that warns about conflicting
5303 output file names.
5304 (output_file_names_free): Free file_names.
5305 * src/files.h (output_file_name_check): Declare.
5306 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5307 the skeletons.
5308 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5309 (Conflicting output files): New tests.
5310
178e123e
PE
53112006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5312
5313 * doc/bison.texinfo: Fix a couple of typos.
5314
53152006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
5316
5317 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5318 Rename to...
5319 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5320 update all uses.
5321 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5322 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5323 local pv.
5324 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5325 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5326
ea17f233
JD
53272006-12-07 Bob Rossi <bob@brasko.net>
5328 and Joel Denny <jdenny@ces.clemson.edu>
5329
5330 * data/push.c (yypvarsinit): Change return type from void* to struct
5331 yypvars*. No longer cast to void* on return.
5332 (struct yypvars): Remove yylen since it need not be remembered between
5333 yypushparse invocations.
5334 (yypushparse): Don't copy between yylen and pv->yylen.
5335
55a30bda
JD
53362006-12-05 Bob Rossi <bob@brasko.net>
5337
5338 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5339 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5340 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5341 (struct yypvars): Remove b4_declare_parser_variables.
5342 (yypvarsinit): Remove init code for removed variables.
5343 (global scope): Do not declare b4_declare_parser_variables if
5344 push or pure mode.
5345 (yypushparse): Add b4_declare_parser_variables.
5346 Init new local variables, and remove init code for removed
5347 yypvars variables.
5348 (yyparse): Delete.
5349 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5350 and yyparse for other modes.
5351 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5352 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5353 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5354 (AT_PURE_LEX_IF): True if pure or push parser.
5355
85894313
JD
53562006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5357
5358 Document Yacc prologue alternatives and default %destructor's and
5359 %printer's as experimental. Don't mention Java yet. Discussed at
5360 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5361 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5362 (2.3a): Annotate this entry to say the old forms of these features were
5363 also experimental.
5364 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 5365 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
5366 of Java (we'll want this back eventually).
5367
02975b9a
JD
53682006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5369
5370 Support a file name argument to %defines. Deprecate `=' in
5371 %file-prefix, %name-prefix, and %output. Discussed at
5372 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5373 * NEWS (2.3a+): Mention.
148d66d8 5374 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
5375 form of %defines, and remove `=' from entries for %file-prefix,
5376 %name-prefix, and %output.
5377 * src/parse-gram.y (prologue_declaration): Implement.
5378 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5379 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5380 all but one occurrence of %name-prefix.
5381 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5382 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5383 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5384 occurrence of each of %file-prefix and %output. Add check for %defines
5385 with argument.
5386 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5387 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5388 Remove the `=' from %output.
5389
287b314e
JD
53902006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5391
5392 Don't escape $ in test case titles since Autoconf 2.61 now does that
5393 correctly.
5394 * tests/actions.at (Default %printer and %destructor are not for error
5395 or $undefined): Here.
5396 (Default %printer and %destructor are not for $accept): Here.
5397 * tests/input.at (Invalid $n and @n): Here.
5398
3ebecc24
JD
53992006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5400
5401 Rename <!> to <>. Discussed starting at
5402 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5403 * NEWS (2.3a+): Update.
148d66d8 5404 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
5405 Update.
5406 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5407 * src/scan-gram.l (INITIAL): Implement.
5408 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5409 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5410 comment.
5411 * tests/actions.at (Default tagless %printer and %destructor,
5412 Default tagged and per-type %printer and %destructor,
5413 Default %printer and %destructor are not for error or $undefined,
5414 Default %printer and %destructor are not for $accept,
5415 Default %printer and %destructor for mid-rule values): Update.
5416 * tests/input.at (Default %printer and %destructor redeclared,
5417 Unused values with default %destructor): Update.
5418
26b8a438
JD
54192006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5420
5421 Don't let %prec take a nonterminal.
5422 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5423 token.
5424 * tests/input.at (%prec takes a token): New test checking that %prec
5425 won't take a nonterminal.
5426
07c39ae9
JD
54272006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5428
405d53b7
JD
5429 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5430 it was double-quoted.
07c39ae9
JD
5431 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5432 grammar is maintained with Bison's highest standards.
5433 * src/getargs.c: Fix some typos in Doxygen comments.
5434
580b8926
JD
54352006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5436
5437 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5438 later. Reported by Paul Eggert in
5439 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5440 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5441 * src/scan-code.l (translate_action): Don't bother invoking
5442 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5443 (code_scanner_free): Instead of invoking
5444 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5445 which frees more.
5446 * src/scan-gram.l (gram_scanner_free): Likewise.
5447 * src/scan-skel.l (scan_skel): Likewise.
5448
4502eadc
JD
54492006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5450
5451 * src/files.c (tr): Change return type to void.
5452 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5453 has been called previously for the same key.
5454 (muscle_find): Return storage instead of value so that
5455 --enable-gcc-warnings doesn't produce warnings that the return discards
5456 const. aver that the value and storage are the same since storage
5457 could potentially be NULL when value is not.
5458 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5459 same as 0.
5460
7746c8f6
PE
54612006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5462
5463 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5464 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5465 us a slightly cleaner distribution, and also works.
5466 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5467 gnulib changes.
5468
eb095650
PE
54692006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5470 and Paul Eggert <eggert@cs.ucla.edu>
5471
5472 Don't let Bison leak memory except when it complains.
5473 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5474 (spec_defines_file, dir_prefix): Now char *, not const char *,
5475 since they are freed.
5476 * src/files.c: Likewise.
5477 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5478 Likewise.
5479 (tr): Now operates in-place. All uses changed.
5480 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5481 values.
5482 (compute_file_name_parts, compute_output_file_names): Don't store
5483 read-only data in variables that will be freed.
5484 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5485 src_extension, and header_extension.
5486 (output_file_names_free): New public function to free
5487 spec_verbose_file, spec_graph_file, spec_defines_file,
5488 parser_file_name, and dir_prefix.
5489 * src/getargs.c (getargs): Don't store read-only data in variables that
5490 will be freed.
5491 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5492 (which previously existed but was unused), and quotearg_free.
5493 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5494 * src/muscle_tab.c: Likewise.
5495 (muscle_entry): Make the value char const *,
5496 and add a new storage member that is char * and can be freed.
5497 (muscle_entry_free): New private function.
5498 (muscle_init): Use it instead of free.
5499 (muscle_insert, muscle_grow): Update and use new storage member.
5500 (muscle_code_grow): Free the string passed to muscle_grow
5501 since it's not needed anymore.
5502 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5503 add a new `char *code' member.
5504 ("{...}"): Declare semantic type as code.
5505 * src/scan-code.h (translate_rule_action):
5506 (translate_symbol_action, translate_code, translate_action): Return
5507 `char const *' rather than `char *' since external code should not free
5508 these strings.
5509 * src/scan-code.l: Likewise.
5510 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5511 which is "{...}" in the parser.
5512 * tests/Makefile.am (maintainer-check-valgrind): Set
5513 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5514 Valgrind.
5515 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5516 complain.
5517 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5518 expecting a non-zero exit status sets --leak-check=summary and
5519 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5520 this case, and we don't want to hear about it.
5521
ac564be4
PE
55222006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5523
5524 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5525 instead of from the template, to simplify configuration a bit.
5526 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5527 and m4/wint_t.m4, as they are needed with the latest gnulib.
5528
17bd8a73
JD
55292006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5530
5531 Disable unset/unused mid-rule value warnings by default, and recognize
5532 --warnings=midrule-values to enable them. Discussed starting at
5533 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5534 * NEWS (2.3a+): Mention.
5535 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5536 warnings): Add entry for midrule-values subargument.
5537 * src/reader.c (symbol_should_be_used): Don't return true just because
5538 the value is a set/used mid-rule value unless
5539 --warnings=midrule-values was specified.
5540 * tests/input.at (Unused values, Unused values before symbol
5541 declarations): Run tests with and without --warnings=midrule-values.
5542
5543 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5544 than LIST_FREE directly.
5545
89eb3c76
JD
55462006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5547
5548 Finish implementing --warnings=error, which should not be implied by
5549 --warnings=all (or by its synonyms -W and --warnings without
5550 subarguments).
5551 * src/complain.c (set_warning_issued): New function to report that
5552 warnings are being treated as errors and to record an error if so.
5553 Invoke...
5554 (warn_at, warn): ... here.
5555 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5556 "error - warnings are errors" does not appear above "all - all of the
5557 above".
5558 (getargs): For -W and --warnings without subarguments, don't let
5559 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5560 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5561
ba7560e2
JD
55622006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5563
5564 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5565 empty subargument list. For example: `bison --warnings= parser.y'.
5566
31283fc3
JD
55672006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5568
5569 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5570 the parser header file so that gcc doesn't warn.
5571
12e35840
JD
55722006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5573
5574 Split the default %destructor/%printer into two kinds: <*> and <!>.
5575 Discussed starting at
5576 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5577 * NEWS (2.3a+): Mention.
5578 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5579 previous change today related to mid-rules.
148d66d8 5580 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 5581 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
5582 (TYPE_TAG_ANY): Add as <*>.
5583 (TYPE_TAG_NONE): Add as <!>.
5584 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5585 for <*> and <!>.
5586 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5587 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5588 * src/symlist.c (symbol_list_default_new): Split into tagged and
5589 tagless versions.
5590 (symbol_list_destructor_set, symbol_list_printer_set): Split
5591 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5592 SYMLIST_DEFAULT_TAGLESS.
5593 * src/symlist.h: Update symbol_list_default*_new prototypes.
5594 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5595 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5596 * src/symtab.c (default_destructor, default_destructor_location,
5597 default_printer, default_printer_location): Split each into tagged and
5598 tagless versions.
5599 (symbol_destructor_get, symbol_destructor_location_get,
5600 symbol_printer_get, symbol_printer_location_get): Implement tagged
5601 default and tagless default cases.
5602 (default_destructor_set, default_printer_set): Split each into tagged
5603 and tagless versions.
5604 * src/symtab.h: Update prototypes.
5605 * tests/actions.at (Default %printer and %destructor): Rename to...
5606 (Default tagless %printer and %destructor): ... this, and extend.
5607 (Per-type %printer and %destructor): Rename to...
5608 (Default tagged and per-type %printer and %destructor): ... this, and
5609 extend.
5610 (Default %printer and %destructor for user-defined end token): Extend.
5611 (Default %printer and %destructor are not for error or $undefined):
5612 Update.
5613 (Default %printer and %destructor are not for $accept): Update.
5614 (Default %printer and %destructor for mid-rule values): Extend.
5615 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5616 (Unused values with default %destructor): Extend.
5617
f91b1629
JD
56182006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5619
5620 Don't apply the default %destructor/%printer to an unreferenced midrule
5621 value. Mentioned at
5622 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5623 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5624 like $@n instead of just @n so that the default %destructor/%printer
5625 logic doesn't see them as user-defined symbols.
5626 (symbol_is_dummy): Check for both forms of the name.
5627 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5628 name for which the midrule value is referenced in any action.
5629 * tests/actions.at (Default %printer and %destructor for mid-rule
5630 values): New test.
5631 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5632 for change to dummy symbol names.
5633
519d0004
JD
56342006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5635
5636 Warn about unset midrule $$ if the corresponding $n is used.
5637 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5638 $n usage.
5639 (packgram): Before invoking grammar_rule_check on any rule, make sure
5640 all actions have already been scanned in order to set `used' flags.
5641 Otherwise, checking that a midrule's $$ is set will not always work
5642 properly because the midrule check must forward-reference the midrule's
5643 parent rule.
5644 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5645 warning.
5646
a501eca9
JD
56472006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5648
5649 More improvements to the documentation of the prologue alternatives:
5650 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5651 Bison manual.
5652 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5653 some text to clarify the relative importance of the new directives and
5654 to show how these directives may be viewed as code labels.
5655
2cbe6b7f
JD
56562006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5657
5658 Similar to the recently removed %before-header, add %code-top as the
5659 alternative to the pre-prologue. Mentioned at
5660 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5661 Also, let the prologue alternatives appear in the grammar section.
5662 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5663 (prologue_declaration): Move the existing prologue alternatives to...
5664 (grammar_declaration): ... here and add %code-top.
5665 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5666
5667 Clean up and extend documentation for the prologue alternatives.
5668 * NEWS (2.3a+): Describe prologue alternatives.
5669 * doc/bison.texinfo (Prologue): Move discussion of prologue
5670 alternatives to...
5671 (Prologue Alternatives): ... this new section, and extend it to discuss
5672 all 4 directives in detail.
148d66d8
JD
5673 (Table of Symbols): Clean up discussion of prologue alternatives and
5674 add %code-top.
2cbe6b7f 5675
e557d3ea
JMG
56762006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5677
5678 DJGPP specific issues.
5679
5680 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5681 config.bat accordingly.
5682 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5683 * djgpp/config.site: Likewise.
5684
136a0f76
PB
56852006-10-16 Paolo Bonzini <bonzini@gnu.org>
5686
27bd5d67
PB
5687 Replace %*-header with %provides, %requires, %code. See discussion at
5688 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5689
136a0f76
PB
5690 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5691 (b4_user_start_header): Remove.
5692 * data/glr.c: Use new macros instead of b4_*start_header
5693 and b4_*end_header.
5694 * data/glr.cc: Likewise.
5695 * data/lalr1.cc: Likewise.
5696 * data/push.c: Likewise.
5697 * data/yacc.c: Likewise.
5698
5699 * doc/bison.texinfo: Remove %before-header, rename
5700 %{start,end,after}-header to %requires, %provides, %code.
5701
5702 * src/parse-gram.y: Likewise (also rename token names accordingly).
5703 * src/scan-gram.l: Likewise.
5704 * tests/actions.at: Likewise.
5705
10f429ef
PE
57062006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5707
5708 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5709 Problem reported by Joel E. Denny.
5710
57112006-10-14 Jim Meyering <jim@meyering.net>
5712
5713 (Sync from coreutils.)
5714 Work also when the working directory (with e.g. coreutils sources)
5715 is version controlled with git, rather than CVS.
5716 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5717 rather than CVS.
5718 In messages and comments, say e.g., "checked-out sources",
5719 rather than "CVS sources".
5720 (version_controlled_file): New function. Work for git as well as
5721 for CVS. Don't use grep's -q option.
5722 (slurp): Call it here, in place of CVS-specific code.
5723
c4bd5bf7
JD
57242006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5725
5726 Fix testsuite for ./configure --enable-gcc-warnings:
5727 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5728 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5729 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5730 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5731 * test/regression.at (Diagnostic that expects two alternatives):
5732 Likewise.
5733
46356ea4
PE
57342006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5735
231ed89a
PE
5736 * bootstrap.conf (gnulib_modules): Add config-h.
5737 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5738 worry about HAVE_CONFIG_H.
5739 * lib/abitset.c: Likewise.
5740 * lib/bitset.c: Likewise.
5741 * lib/bitset_stats.c: Likewise.
5742 * lib/bitsetv-print.c: Likewise.
5743 * lib/bitsetv.c: Likewise.
5744 * lib/ebitset.c: Likewise.
5745 * lib/get-errno.c: Likewise.
5746 * lib/lbitset.c: Likewise.
5747 * lib/subpipe.c: Likewise.
5748 * lib/timevar.c: Likewise.
5749 * lib/vbitset.c: Likewise.
5750 * lib/bitset.c: Include "bitset.h" first, to test interface.
5751 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5752 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5753 * lib/bitsetv.c: Include "bitsetv.h" first.
5754 * lib/get-errno.c: Include "get-errno.h" first.
5755 * m4/.cvsignore: Add config-h.m4.
5756 * tests/actions.at (Default %printer and %destructor for ...):
5757 Adjust expected line numbers in output to reflect removal of #if
5758 HAVE_CONFIG_H lines.
5759 * tests/glr-regression.at (Missed %merge type warnings when ...):
5760 Likewise.
5761 * tests/regression.at (Braced code in declaration in rules section):
5762 Likewise.
5763 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5764 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5765 Include <config.h> unconditionally.
5766
46356ea4
PE
5767 * bootstrap: Sync from coreutils, as follows:
5768
5769 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5770
5771 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5772 variable was sometimes used without being initialized. This
5773 messed up the installation of the INSTALL file in some cases.
5774
5775 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5776
5777 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5778 --copy. Inspired by a suggestion from Bruno Haible.
5779
5780 2006-10-03 Jim Meyering <jim@meyering.net>
5781
5782 * bootstrap: Undo last change to this file, since now gnulib-tool
5783 sticks with the automake default in generating dependencies.
5784
dd4bf078
PE
57852006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5786
cf2a5f7c
PE
5787 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5788 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5789
5790 * doc/bison.1: Add copyright notice.
5791
5792 * data/glr.c: Don't include <stdarg.h>; not used.
5793
35fe0834
PE
5794 * NEWS: The -g and --graph options now output graphs in Graphviz
5795 DOT format, not VCG format.
5796 * doc/bison.1: Likewise.
5797 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
5798 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5799 of this change in
5800 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
5801 * TODO: Remove Graphviz entry.
5802 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5803 remove vcg.c, vcg.h, vcg_defaults.h.
5804 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5805 * src/graphviz.c, src/graphviz.h: New files.
5806 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5807 * src/files.h: Make comment more generic.
5808 * src/main.c (main): Likewise.
5809 * src/print_graph.h: Likewise.
5810 * src/getargs.c (usage): Make usage description more generic.
5811 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5812 (static_graph, fgraph): Remove. All uses changed to pass
5813 arguments instead of sharing a static var.
5814 (print_core, print_actions, print_state, print_graph):
5815 Output graphviz format rather than VCG format.
5816 * tests/.cvsignore: Remove *.vcg; add *.dot.
5817 * tests/output.at: Expect *.dot files, not *.vcg files.
5818
dd4bf078
PE
5819 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5820 accommodates the 2006-10-08 change.
5821
efdd7421
PE
58222006-10-11 Bob Rossi <bob@brasko.net>
5823
5824 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5825 (b4_yyssa, b4_yyerror_range): New macros.
5826 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5827 (yypvarsinit): Remove init of removed fields.
5828 (yypushparse): Remove use of removed fields; use new macros instead.
5829
96a1981a
PE
58302006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5831
5832 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5833 in a push parser. Reindent slightly to match yacc.c better.
5834
58352006-10-11 Bob Rossi <bob@brasko.net>
5836
46356ea4
PE
5837 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5838 yymsg_alloc fields.
5839 (yypvarsinit, yypushparse): Remove init of removed fields.
5840 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 5841
c1630a8b
PE
58422006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5843
5844 * THANKS: Add Paolo Bonzini and Bob Rossi.
5845
90b9908d
PB
58462006-10-08 Paolo Bonzini <bonzini@gnu.org>
5847
5848 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5849 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5850 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5851 b4_define_user_cde and uses): Remove.
5852 (b4_comment, b4_prefix, b4_sync_start): New.
5853 * data/bison.m4: New file, with most of the content removed from c.m4.
5854 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5855 * src/output.c (output_skeleton): Pass bison.m4.
5856 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5857 only if specified.
5858
cf806753
PE
58592006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5860
5861 Fix test failure reported by Tom Lane in
5862 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5863 and try to make such failures easier to catch in the future.
5864 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5865 that's now the caller's responsibility.
5866 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5867 Set yychar = YYEOF if it's negative.
5868 * tests/actions.at (yylex): Abort if asked to read past EOF.
5869 * tests/conflicts.at (yylex): Likewise.
5870 * tests/cxx-type.at (yylex): Likewise.
5871 * tests/glr-regression.at (yylex): Likewise.
5872 * tests/input.at (yylex): Likewise.
5873 * tests/regression.at (yylex): Likewise.
5874 * tests/torture.at (yylex): Likewise.
5875
0e2f006a
PE
58762006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5877
5878 Fix problems with translating English-language diagnostics.
5879 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5880 respect to bison-runtime pot generation. The YY_ stuff
5881 wasn't being captured.
5882 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5883 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5884 * runtime-po/POTFILES.in: Add data/push.c.
5885
e3ddc1e3
PE
58862006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5887
5888 Merge bootstrap changes from coreutils.
5889
5890 2006-09-28 Jim Meyering <jim@meyering.net>
5891
5892 Automatically generated dependencies are important even
5893 when all of the sources in a directory come from gnulib.
5894 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5895 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5896
5897 2006-09-23 Jim Meyering <jim@meyering.net>
5898
5899 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5900
5901 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5902
5903 * bootstrap: Add support for --force.
5904 (usage): New function. Describe usage less tersely.
5905 (CVS_only_file): New var.
5906
01e972b3
PE
59072006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5908
5909 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5910 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5911 Adjust white space and comments to match GNU style better.
5912
c63d3e90
PE
59132006-09-20 Bob Rossi <bob@brasko.net>
5914
5915 * data/push.c (yyresult_get): Remove function.
5916 (YYPUSH_MORE): Add #define.
5917 (yypushparse): Modify return value.
5918
e70f46d1
PE
59192006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5920
5921 * stamp-h.in: Remove; no longer needed.
5922 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5923 Remove config.h, config.hin, intl (no longer created).
5924 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5925 stamp-h1.
5926
5927 Sync bootstrap from coreutils, as follows:
5928
5929 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5930
5931 * bootstrap (symlink_to_gnulib): New function.
5932 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5933 to copies-of-gnulib.
5934 (cp_mark_as_generated, slurp, gnulib_files):
5935 Avoid making a copy if it's the same as the old version.
5936 (gnulib_files): Add support for this variable (used by Bison).
5937
a92be413
PE
59382006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5939
5940 * src/getargs.c (usage): Rework to use conventions similar to
5941 coreutils, to make translation a bit easier and the code a bit
5942 smaller. Problem reported by Tim Van Holder.
5943
4f82b42a
PE
59442006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5945
3b2942e6
PE
5946 Use some of gnulib's new modules, taken from coreutils.
5947
5948 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5949 * bootstrap.conf: New file.
5950 (gnulib_modules): Add configmake, inttypes, unistd.
5951 (XGETTEXT_OPTIONS): Add complain, complain_at,
5952 fatal, fatal_at, warn, warn_at, unexpected_end.
5953 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5954 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5955 (gl_EARLY): Add.
5956 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5957 (gl_INIT): Add
5958 (GNULIB_AUTOCONF_SNIPPET): Remove.
5959 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5960 the pickiest.
5961 * lib/.cvsignore: Add inttypes_.h.
5962 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5963 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5964 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5965 no-longer-necessary initializations.
5966 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5967 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5968 use the unistd module.
5969 * src/system.h: Likewise.
5970 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5971 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5972 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5973 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5974 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5975 * src/system.h: Include inttypes.h unconditionally, now that we
5976 use the inttypes module. Don't bother to include stdint.h, since
5977 inttypes.h now does that for us.
5978 (LOCALEDIR): Remove, now that we use the configmake module.
5979 * src/getargs.c: Include configmake.h.
5980 * src/main.c: Likewise.
5981 * src/output.c: Likewise.
5982 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5983 not from $abs_top_builddir, since config.h moved.
5984
5985
4f82b42a
PE
5986 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5987 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5988
5989 * src/parse-gram.y (symbol_declaration): Don't put statements
5990 before declarations; it's not portable to C89.
5991 * src/scan-code.l (handle_action_at): Likewise.
5992
5993 * src/scan-code.l: Always initialize braces_level; the old code
5994 left it uninitialized and therefore had undefined behavior.
5995
5996 Don't attempt to redefine 'assert', since it runs afoul of
5997 systems where standard headers (mistakenly) include <assert.h>.
5998 Instead, define and use our own alternative, called 'aver'.
5999 * src/reader.c: Don't include assert.h, since we no longer
6000 use assert.
6001 * src/scan-code.l: Likewise.
6002 * src/system.h (assert): Remove, replacing with....
6003 (aver): New function, taking a bool arg. All uses changed.
6004 * src/tables.c (pack_vector): Ensure that aver arg is bool,
6005 not merely an integer.
6006
31c10e38
PE
60072006-09-15 Bob Rossi <bob@brasko.net>
6008
6009 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
6010 * data/c.m4 (YYPUSH): New.
6011 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
6012 * src/getargs.c (push_parser): New var.
6013 * src/getargs.h (push_parser): New declaration.
6014 * src/output.c (prepare): Add macro insertion of `push_flag'.
6015 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
6016 (prologue_declaration): Parse %push-parser.
6017 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
6018 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
6019 list of removed lines from the traces observed.
6020 (AT_CHECK_CALC_LALR): Added push parser tests.
6021
fa7b79c0
PE
60222006-09-13 Paul Eggert <eggert@cs.ucla.edu>
6023
21fe08ca
PE
6024 * NEWS: Version 2.3a.
6025 * configure.ac (AC_INIT): Likewise.
6026
e8ec4d9b
PE
6027 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
6028 "#define YYSTYPE int" that caused "make maintainer-check" to fail
6029 due to header ordering dependencies. I don't know why the #define
6030 was there.
6031
fa7b79c0
PE
6032 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
6033 runtime cost when YYDEBUG is not defined, and so that some tests
6034 that used to fail now work. Problem and initial suggestion by
6035 Paolo Bonzini.
6036 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
6037 * data/glr.cc (b4_parser_class_name):
6038 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
6039 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
6040 (yydebug_) [YYDEBUG]: New member.
6041 (yycdebug_): Now defined only if YYDEBUG.
6042 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
6043 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
6044 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
6045 if YYYDEBUG.
6046 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6047 Define only if YYDEBUG.
6048 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6049 set_debug_level.
6050 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6051 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6052 AT_CHECK_CALC_GLR_CC that are working now.
6053
4ec13d60
PE
60542006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6055
6056 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6057 We don't need them in glr.cc, and glr.c defines them.
6058 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6059 assumes that defining it to anything is the same as defining
6060 it to 1. Problem reported by Paolo Bonzini.
6061
8e1687ae
PE
60622006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6063
6064 * data/c.m4 (b4_null, b4_case): Define.
6065 * src/output.c (prepare_symbols): Use b4_null.
6066 (user_actions_output): Use b4_case.
6067
3dc5e96b
PE
60682006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6069
aef3da86
PE
6070 * data/glr.c (b4_shared_declarations): Put start-header first,
6071 before any #includes that we generate, so that feature-test
6072 macros work. Problem reported by Michael Deutschmann in
6073 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6074 * data/lalr1.cc: Likewise.
6075 * doc/bison.texinfo (Prologue): Document that feature-test macros
6076 should be defined before any Bison declarations.
6077 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6078 that depend on location.hh after, not before, Bison decls, since
6079 we now include location.hh after the first user prologue.
6080
3dc5e96b
PE
6081 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6082 Sander Brandenburg in
6083 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6084 Also, fix minor white space and comment issues.
aef3da86
PE
6085 (Prologue): Mention that it's better to define feature-test macros
6086 before Bison declarations. Problem reported by Michael Deutschmann.
6087
6088 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6089 by Jim Meyering.
6090 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6091 This adjusts to recent gnulib changes.
3dc5e96b 6092
b2a0b7ca
JD
60932006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6094
6095 Finish implementation of per-type %destructor/%printer. Discussed
6096 starting at
6097 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6098 and
6099 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6100 * NEWS (2.3+): Add a description of this feature to the default
6101 %destructor/%printer description.
6102 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6103 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6104 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6105 list node contains a semantic type.
6106 * src/symtab.c, src/symtab.h: Extend with a table that associates
6107 semantic types with their %destructor's and %printer's.
6108 (semantic_type_from_uniqstr, semantic_type_get,
6109 semantic_type_destructor_set, semantic_type_printer_set): New functions
6110 composing the public interface of that table.
6111 (symbol_destructor_get, symbol_destructor_location_get,
6112 symbol_printer_get, symbol_printer_location_get): If there's no
6113 per-symbol %destructor/%printer, look up the per-type before trying
6114 the default.
6115 * tests/actions.at (Per-type %printer and %destructor): New test case.
6116 * tests/input.at (Default %printer and %destructor redeclared):
6117 Extend to check that multiple occurrences of %symbol-default in a
6118 single %destructor/%printer declaration is an error.
6119 (Per-type %printer and %destructor redeclared, Unused values with
6120 per-type %destructor): New test cases.
6121
3be03b13
JD
61222006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6123
6124 Require default %destructor/%printer to be declared using
6125 %symbol-default instead of an empty symbol list, and start working on
6126 new per-type %destructor/%printer. Discussed at
6127 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6128 * NEWS (2.3+): Add %symbol-default to example.
6129 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 6130 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
6131 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6132 (generic_symlist, generic_symlist_item): New nonterminals for creating
6133 a list in which each item is a symbol, semantic type, or
6134 %symbol-default.
6135 (grammar_declaration): Use generic_symlist in %destructor and %printer
6136 declarations instead of symbols.1 or an empty list.
6137 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6138 for changes to symbol_list.
6139 * src/reader.c: Update for changes to symbol_list.
6140 * src/scan-code.l: Likewise.
6141 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6142 * src/symlist.c, src/symlist.h: Extend such that a list node may
6143 represent a semantic type or a %symbol-default in addition to just an
6144 ordinary symbol. Add switched functions for setting %destructor's and
6145 %printer's.
6146 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6147 %destructor/%printer declarations.
6148
3508ce36
JD
61492006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6150
6151 Whether the default %destructor/%printer applies to a particular symbol
6152 isn't a question of whether the user *declares* that symbol (in %token,
6153 for example). It's a question of whether the user by any means
6154 *defines* the symbol at all (by simply using a char token, for
6155 example). $end is defined by Bison whereas any other token with token
6156 number 0 is defined by the user. The error token is always defined by
6157 Bison regardless of whether the user declares it with %token, but we
6158 may one day let the user define error as a nonterminal instead.
6159 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6160 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6161 the meaning of "user-defined".
6162 * tests/actions.at (Default %printer and %destructor for user-declared
6163 end token): Rename to...
6164 (Default %printer and %destructor for user-defined end token): ...
6165 this.
6166
6167 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6168 computation of whether to apply the default, don't maintain a list of
6169 every Bison-defined symbol. Instead, just check for a first character
6170 of '$', which a user symbol cannot have, and check for the error token.
6171
9350499c
JD
61722006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6173
6174 Don't apply the default %destructor or %printer to the error token,
6175 $undefined, or $accept. This change fits the general rule that the
6176 default %destructor and %printer are only for user-declared symbols,
6177 and it solves several difficulties that are described in the new test
6178 cases listed below.
6179 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6180 * tests/actions.at (Default %printer and %destructor are not for error
6181 or $undefined, Default %printer and %destructor are not for $accept):
6182 New test cases.
6183
4d7370cb
JD
61842006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6185
6186 Allow %start after the first rule.
6187 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6188 when parsing the first rule.
6189 (check_and_convert_grammar): Search for it here after all grammar
6190 declarations have been parsed. Skip midrules, which have dummy LHS
6191 nonterminals.
6192 * src/symtab.c (symbol_is_dummy): New function.
6193 * src/symtab.h (symbol_is_dummy): Declare it.
6194 * tests/input.at (%start after first rule): New test.
6195
6d0ef4ec
JD
61962006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6197
6198 Redo some of the previous commit: add back the ability to use
6199 non-aliased/undeclared string literals since it might be useful to
6200 those declaring %token-table.
6201 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6202 commit: don't worry about complaints from symbols_pack.
6203 * src/symtab.c (symbol_new, symbol_class_set,
6204 symbol_check_alias_consistency): Undo changes in previous commit: count
6205 each string literal as a new symbol and token, assign it a symbol
6206 number, and don't complain about non-aliased string literals.
6207 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6208 and token counts but does still set aliased tokens to the same number,
6209 symbol_pack_processor now leaves empty slots in the symbols array.
6210 Remove those slots.
6211 * tests/regression.at (Undeclared string literal): Remove test case
6212 added in previous commit since non-aliased string literals are allowed
6213 again.
6214 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6215 remove unnecessary string literal declarations.
6216 * tests/sets.at (Firsts): Likewise.
6217
965537bc
JD
62182006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6219
6220 Don't allow an undeclared string literal, but allow a string literal to
6221 be used before its declaration.
6222 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6223 symbols_pack complained.
6224 * src/symtab.c (symbol_new): Don't count a string literal as a new
6225 symbol.
6226 (symbol_class_set): Don't count a string literal as a new token, and
6227 don't assign it a symbol number since symbol_make_alias does that.
6228 (symbol_make_alias): It's not necessary to decrement the symbol and
6229 token counts anymore. Don't assume that an alias declaration occurs
6230 before any uses of the identifier or string, and thus don't assert that
6231 one of them has the highest symbol number so far.
6232 (symbol_check_alias_consistency): Complain if there's a string literal
6233 that wasn't declared as an alias.
6234 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6235 symbol_pack asserts that every token has been assigned a symbol number
6236 although undeclared string literals have not.
6237 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 6238 string literal): New test cases.
965537bc
JD
6239 (Characters Escapes, Web2c Actions): Declare string literals as
6240 aliases.
6241 * tests/sets.at (Firsts): Likewise.
6242
47aee066
JD
62432006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6244
6245 In the grammar scanner, STRING_FINISH unclosed constructs and return
6246 them to the parser in order to improve error messages.
6247 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6248 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6249 * tests/input.at (Unclosed constructs): New test case.
6250 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6251 seen.
6252
6253 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6254 unused global.
6255
1f6b3679
JD
62562006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6257
6258 Handle string aliases for character tokens correctly.
6259 * src/symtab.c (symbol_user_token_number_set): If the token has an
6260 alias, check and set its alias's user token number instead of its own,
6261 which is set to indicate the alias. Previously, every occurrence of
6262 the character token in the grammar overwrote that alias indicator with
6263 the character code.
6264 * tests/input.at (String aliases for character tokens): New test.
6265
219741d8
JD
62662006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6267
6268 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6269
11daa4e7
PE
62702006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6271
6272 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6273 to prevent failures when building on older platforms.
6274 Check for autopoint failure.
6275 Set XGETTEXT_OPTIONS to values that check for C format strings,
6276 so that translators are warned about them (this also helps
6277 prevent core dumps).
6278
6279 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6280 function, since it simplifies our code a bit.
6281
6282 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6283 rather than -W, so we don't get bogus warnings about sign comparisons.
6284 Add -Wpointer-arith, since that warning is useful (it reports code
6285 that does not conform to C89 and that some compilers reject).
6286 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6287 since it's no longer needed.
6288
f9bfc42a
JD
62892006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6290
6291 Clean up scanners a bit.
6292 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6293 definitions so gcc won't warn when obstack_for_string is unused.
6294 * src/scan-code.l: config.h and system.h are already #include'd by
6295 scan-code-c.c, so get rid of them here.
6296 * src/scan-gram.l: Likewise.
6297 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6298 definitions rather than duplicating the rest of it.
6299 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6300
06e8700a
JD
63012006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6302
6303 Suppress signed/unsigned comparison warnings for yycheck.
6304 * data/c.m4 (b4_safest_int_type): New macro.
6305 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6306 a signed int type, cast it to b4_safest_int_type first.
6307 * data/yacc.c: Likewise.
6308 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6309 also overwritten.
6310
9c437126
PE
63112006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6312
6313 * doc/bison.texinfo: Fix some typos.
6314
284d8a13
PE
63152006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6316
6317 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6318 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6319
6320 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6321 the latest gnulib does this a different way.
6322 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6323 translation was patched, so stop omitting it.
6324
ec5479ce
JD
63252006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6326
6327 Enable declaration of default %printer/%destructor. Make the parser
6328 use these for all user-declared grammar symbols for which the user does
6329 not declare a specific %printer/%destructor. Thus, the parser uses it
6330 for token 0 if the user declares it but not if Bison generates it as
6331 $end. Discussed starting at
6332 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6333 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6334 and
6335 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6336 * NEWS (2.3+): Mention.
6337 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6338 declare a %destructor for a mid-rule's semantic value. It's just
6339 impossible to declare one specific to it.
6340 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6341 code. Describe default %destructor form.
6342 * src/parse-gram.y (grammar_declaration): Parse default
6343 %printer/%destructor declarations.
6344 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6345 and symbol_destructor_location_get rather than accessing the destructor
6346 and destructor_location members of struct symbol.
6347 (symbol_printers_output): Likewise but for %printer's.
6348 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6349 again.
6350 * src/symtab.c (default_destructor, default_destructor_location,
6351 default_printer, default_printer_location): New static global
6352 variables to record the default %destructor and %printer.
6353 (symbol_destructor_get, symbol_destructor_location_get,
6354 symbol_printer_get, symbol_printer_location_get): New functions to
6355 compute the appropriate %destructor and %printer for a symbol.
6356 (default_destructor_set, default_printer_set): New functions to set the
6357 default %destructor and %printer.
6358 * src/symtab.h: Prototype all those new functions.
6359 * tests/actions.at (Default %printer and %destructor): New test to
6360 check that the right %printer and %destructor are called, that they're
6361 not called for $end, and that $$ and @$ work correctly.
6362 (Default %printer and %destructor for user-declared end token): New
6363 test to check that the default %printer and %destructor are called for
6364 a user-declared end token.
6365 * tests/input.at (Default %printer and %destructor redeclared, Unused
6366 values with default %destructor): New tests to check related grammar
6367 warnings and errors.
6368
868d2d96
JD
63692006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6370
6371 Clean up handling of %destructor for the end token (token 0).
6372 Discussed starting at
6373 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6374 and
6375 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6376
6377 Make the skeletons consistent in how they pop the end token and invoke
6378 its %destructor.
6379 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6380 state, which has token number 0, since this would invoke the
6381 %destructor for the end token.
6382 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6383 until after shifting the end token, or else it won't be popped.
6384 * data/yacc.c (yyparse): Likewise.
6385
6386 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6387 it's the end token. Upon termination, destroy an unshifted lookahead
6388 even when it's the end token.
6389 * data/lalr1.cc (yy::parser::parse): Likewise.
6390 * data/yacc.c (yyparse): Likewise.
6391
6392 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6393 value warnings for the end token when the user gives the end token a
6394 %destructor.
6395
6396 * tests/actions.at (Printers and Destructors): Test all the above.
6397
62a9592d
PE
63982006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6399
6400 Update to latest gnulib and gettext versions.
6401 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6402 Add fopen-safer.
6403 (gnulib_files): Add m4/warning.m4. Don't worry about files
6404 overwritten by autopoint.
6405 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6406 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6407 rejects them.
6408 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6409 so that we can remove the intl files at a better time.
6410 (intl_files_to_remove): Remove aclocal.m4, since it gets
6411 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6412 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6413 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6414 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6415 Remove datarootdir hack; no longer needed.
6416 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6417 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6418 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6419 strdup.h.
6420 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6421 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6422
10d6970f
PE
64232006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6424
6425 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6426 it with --assume-autoconf='latest-stable'.
6427
50a33993
JD
64282006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6429
6430 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6431 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6432 YYSTYPE' and `{'.
6433 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6434 those from muscle_tab.c since the old ones are misleading.
6435
2ce4ed68
AD
64362006-07-13 Akim Demaille <akim@epita.fr>
6437
6438 Support %define "KEY" {VALUE}.
6439 * src/scan-code.h, src/scan-code.l (translate_action)
6440 (translate_rule_action, translate_symbol_action, translate_code):
6441 Return char *, not const char *.
6442 * src/parse-gram.y (declaration): Rename as...
6443 (prologue_declaration): this.
6444 (string_content): Remove this nonterminal, use STRING.
6445 (braceless, content, content.opt): New nonterminal.
6446 Use them.
6447 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6448 as value.
6449 * src/scan-gram.l (getargs.h): Don't include it.
6450
db7e5eb5
PE
64512006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6452
6453 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6454 rather than a for-loop that declares a local bool variable. This
6455 should work around a compatibility problem with a Cray x1e C++
6456 compiler reported by Hung Nguyen in
6457 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6458 The for-loop was introduced in the 2004-11-17 change but I don't
6459 know why it was needed.
6460
a5d80ba5
AD
64612006-07-12 Akim Demaille <akim@epita.fr>
6462
6463 * data/c.m4: Comment changes.
6464
23eb2a69
AD
64652006-07-10 Akim Demaille <akim@lrde.epita.fr>
6466
6467 * src/complain.c (error_message, ERROR_MESSAGE): New.
6468 To factor...
6469 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6470 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6471
ddc8ede1
PE
64722006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6473
6474 * NEWS: Instead of %union, you can define and use your own union type
6475 YYSTYPE if your grammar contains at least one <type> tag.
6476 Your YYSTYPE need not be a macro; it can be a typedef.
6477 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6478 (Union Decl, Decl Summary): Document this.
6479 * data/glr.c (YYSTYPE): Implement this.
6480 * data/glr.cc (YYSTYPE): Likewise.
6481 * data/lalr1.cc (YYSTYPE): Likewise.
6482 * data/yacc.c (YYSTYPE): Likewise.
6483 * src/output.c (prepare): Output tag_seen_flag.
6484 * src/parse-gram.y (declaration, grammar_declaration):
6485 Use 'union_seen' rather than 'typed' to determine whether
6486 %union has been seen, since grammars can now be typed without
6487 %union.
6488 (symbol_declaration, type.opt, symbol_def):
6489 Keep track of whether a tag has been seen.
6490 * src/reader.c (union_seen, tag_seen): New vars.
6491 (typed): remove.
6492 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6493 * src/scan-code.l (untyped_var_seen): New variable.
6494 (handle_action_dollar): Adjust to above changes.
6495 (handle_action_dollar, handle_action_at):
6496 Improve overflow checking for outlandish numbers.
6497 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6498 avoid new diagnostics generated by above changes.
6499 * tests/regression.at (YYSTYPE typedef): Add test to check
6500 for type tags without %union.
6501
6502 * src/symlist.c (symbol_list_length): Return int, not unsigned
6503 int, since callers expect int. This may need to get revisited
6504 once we have proper integer overflow checking.
6505
6506 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6507 object is now static.
6508
6509 * src/getargs.c (flags_argmatch): Return void, not int,
6510 to pacify ./configure --enable-gcc-warnings.
6511
6512 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6513 since last_string is already defined to FLEX_PREFIX (last_string).
6514
7b42569e
AD
65152006-07-09 Akim Demaille <akim@lrde.epita.fr>
6516
6517 Implement --warnings/-W.
6518 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6519 replaced by...
6520 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6521 Adjust callers.
6522 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6523 (warnings_args, warnings_types): New.
6524 (getargs, short_options, long_options): Accept -W/--warnings.
6525 Sort the options by alphabetical order, upper case letter right
6526 before its lower case.
6527
3b452f4e
JD
65282006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6529
6530 Change %merge result type clash warnings to errors. Discussed at
6531 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6532 * src/reader.c (record_merge_function_type): Use complain_at.
6533 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6534 declared later): Update test case results.
6535
b8a41559
AD
65362006-07-09 Akim Demaille <akim@lrde.epita.fr>
6537
6538 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6539 to be in alphabetical order.
6540 (trace_args): Spelling fixes.
6541
cd9e1ba2
PE
65422006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6543
6544 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6545 so they don't collide with user-defined macros.
6546 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6547 this was never guaranteed, and now that we're using gnulib stdint,
6548 which defines int_fast16_t to long int, the problem is exposed.
6549
cb48f191
PE
65502006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6551
b8445a15
PE
6552 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6553 need the full POSIX semantics (and weren't implementing them
6554 anyway).
6555
cb48f191
PE
6556 Adjust to Autoconf 2.60 and today's gnulib.
6557 * bootstrap (gnulib_modules): Add stdint.
6558 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6559 no longer copies it.
6560 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6561 since stdint needs the former and wcwidth (which is now required
6562 by mbswidth) needs the latter.
6563 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6564 work around a compatibility glitch between gettext 0.14.6 and
6565 Autoconf 2.60.
6566 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6567 Do not check for uintptr_t, since new stdint module does the right
6568 thing.
6569 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6570 Add stdint.h, stdint_.h, wcwidth.h.
6571 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6572 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6573 stdint.m4, wchar_t.m4, wcwidth.m4.
6574 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6575 usual order for ../lib/*.h files.
6576 (file_name_split): Use last_component, not base_name, to adjust
6577 to gnulib changes.
6578 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6579 for ../lib/*.h files.
6580 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6581 Define unconditionally, since we now assume the stdint module.
6582 * src/scan-skel.l: Include <dirname.h>.
6583 (BASE_QPUTS): Use last_component, not base_name.
6584 * src/system.h: Include <unlocked-io.h> in the usual order
6585 for ../lib/*.h files. Include <stdint.h> unconditionally,
6586 since we now use the stdint module.
6587 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6588 HAVE_UINTPTR_T, since we now use the stdint module.
6589 (base_name): Remove decl, since files now include <dirname.h>
6590 to get the decl.
6591
cd48d21d
AD
65922006-07-08 Akim Demaille <akim@lrde.epita.fr>
6593
6594 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6595 New, default to 1.
6596 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6597 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6598 default.
6599 * tests/calc.at: Adjust.
6600
8ec0a172
AD
66012006-07-08 Akim Demaille <akim@lrde.epita.fr>
6602
b8445a15 6603 * data/c.m4 (b4_basename): New.
8ec0a172
AD
6604 (b4_syncline): Also output the location of its invocation (from
6605 the skeleton).
6606 (b4_user_action, b4_define_user_action, b4_user_actions)
6607 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6608 (b4_user_stype): New.
6609 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6610
4a678af8
JD
66112006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6612
6613 In the grammar file, the first column is 1 not 0 on the first line as
6614 on every other line.
6615 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6616 * tests/input.at (Torturing the Scanner): Update output.
6617
6618 * src/scan-gram.l (scanner_cursor): Declare it static.
6619
dd60572a
JD
66202006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6621
6622 In warnings, say "previous declaration" rather than "first
6623 declaration".
6624 * src/symtab.c (redeclaration): Do that here.
6625 * src/reader.c (record_merge_function_type): In the case of a result
6626 type clash, report the previous declaration rather than the very first
6627 one in the grammar file.
6628 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6629 declared later): Add a third declaration to check this behavior.
6630 * tests/input.at (Incompatible Aliases): Update output.
6631
2073e1b6
AD
66322006-06-27 Akim Demaille <akim@epita.fr>
6633
6634 * doc/Doxyfile.in: New.
6635 * doc/Makefile.am: Use it.
6636 * src/lalr.h, src/symtab.h: Initial doxygenation.
6637
8ee5b538
JD
66382006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6639
6640 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
6641 declared after the %merge. This continues the effort of the previous
6642 patch.
8ee5b538
JD
6643 * src/reader.c (get_merge_function): Don't set the merger type yet.
6644 (record_merge_function_type): New function for setting the merger type
6645 and checking for clashes.
6646 (grammar_current_rule_merge_set): Set the location of the %merge for
6647 the current rule.
6648 (packgram): Invoke record_merge_function_type for each rule now that
6649 all symbol type declarations have been parsed.
6650 * src/reader.h (merger_list.type_declaration_location): New member
6651 storing the location of the first %merge from which the type for this
6652 merging function was derived.
6653 * src/symlist.h (symbol_list.merger_declaration_location): New member
6654 storing the location of a rule's %merge, if any.
6655 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6656 declared later): New test to catch the error fixed by the above patch.
6657
ffa4ba3a
JD
66582006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6659
6660 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
6661 declarations appear after the rules. Discussed at
6662 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6663 and
6664 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6665 Don't mistake the type of $$ in a midrule to be that of its parent
6666 rule's $$.
ffa4ba3a
JD
6667 * src/reader.c (grammar_current_rule_end): Don't invoke
6668 grammar_rule_check yet since not all symbol declarations may have been
6669 parsed yet.
6670 (grammar_midrule_action): Likewise.
6671 Don't record whether the midrule's $$ has been used yet since actions
6672 haven't been translated yet.
6673 Record the midrule's parent rule and its RHS index within the parent
6674 rule.
6675 (grammar_current_rule_action_append): Don't translate the action yet
6676 since not all symbol declarations may have been parsed yet and, thus,
6677 warnings about types for $$, $n, @$, and @n can't be reported yet.
6678 (packgram): Translate the action and invoke grammar_rule_check now that
6679 all symbol declarations have been parsed.
6680 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6681 after parsing the entire grammar file, the symbol list here in the case
6682 of a midrule is actually the midrule's empty RHS, so reference its
6683 parent rule's RHS where necessary.
6684 On the other hand, now that you can already know it's a midrule, you
6685 aren't forced to think $$ has the same type as its parent rule's $$.
6686 (handle_action_at): In the case of a midrule, reference the parent rule
6687 where necessary.
6688 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6689 members.
6690 (symbol_list_length): Now that this is invoked after all rules have
6691 been parsed, a NULL symbol (rather than a NULL symbol list node)
6692 terminates a rule. symbol_list_print already does this correctly.
6693 * src/symlist.h (symbol_list.midrule_parent_rule,
6694 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6695 remember their relationships with their parents.
6696 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6697 fixed by the above patch.
6698 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6699 implementing...
6700 (Unused values): ... this old test case and...
6701 (Unused values before symbol declarations): ... this new test case.
6702 This one is the same as `Unused values' except that all symbol
6703 declarations appear after the rules in order to catch the rest of the
6704 errors fixed by the above patch.
6705
e256e17f
JD
67062006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6707
300a1930
JD
6708 More cleanup.
6709 * src/reader.c (current_rule): Declare it static since it's no longer
6710 used outside this file.
6711 (grammar_current_rule_action_append): Remove redundant arguments from
6712 translate_rule_action invocation.
6713 * src/reader.h (current_rule): Remove this unused extern.
6714 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6715 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 6716
381ecb06
JD
67172006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6718
6719 Clean up yesterday's patch.
6720 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6721 to...
6722 * src/reader.c (grammar_current_rule_action_append): ... here for
6723 consistency with grammar_current_rule_symbol_append.
6724 * tests/regression.at (Braced code in declaration in rules section):
6725 Make yyerror and yylex static as usual.
6726
4210cd0b
JD
67272006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6728
6729 Fix bug that mistakes braced code in a declaration in the rules section
6730 to be a rule action. Mentioned at
6731 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6732 * src/scan-gram.l: Move midrule action detection from the start of the
6733 scanning of any braced code to...
6734 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6735 action. For readability, use $2 and @2 rather than the equivalent
6736 global variables.
6737 * tests/regression.at (Braced code in declaration in rules section):
6738 New test to catch the error fixed by the above patch.
6739
6740 Work on code readability some.
6741 * src/scan-code.l (current_rule): Get rid of this misleading and
6742 redundant declaration: it's actually extern'ed in reader.h.
6743 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6744 translate_action): Add a rule argument and use it instead of the global
6745 current_rule.
6746 (translate_rule_action): This already receives current_rule through an
6747 argument, so pass it on to translate_action instead of assigning
6748 current_rule to current_rule.
6749 (translate_symbol_action, translate_code): Pass rule = NULL to
6750 translate_action.
6751
34f98f46
JD
67522006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6753
6754 Rename %before-definitions to %start-header and %after-definitions to
6755 %end-header. Don't use these declarations to separate pre-prologue
6756 blocks from post-prologue blocks. Add new order-independent
6757 declarations %before-header and %after-header as alternatives to the
6758 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6759 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6760 * NEWS (2.3+): Update for these changes.
6761 * data/glr.c (b4_before_definitions): Update to...
6762 (b4_start_header): ... this.
6763 (b4_after_definitions): Update to...
6764 (b4_end_header): ... this.
6765 * data/glr.cc: Likewise.
6766 * data/lalr1.cc: Likewise.
6767 * data/yacc.c: Likewise.
6768 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6769 prologue blocks with %*-header declarations.
6770 (Calc++ Parser): Likewise.
91661ebb 6771 (Decl Summary): Update names.
148d66d8 6772 (Table of Symbols): Update description.
34f98f46
JD
6773 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6774 (PERCENT_END_HEADER): ... this.
6775 (PERCENT_BEFORE_DEFINITIONS): Update to...
6776 (PERCENT_START_HEADER): ... this.
6777 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6778 (declaration): Update token names and m4 macro names.
6779 When parsing %end-header and %start-header, invoke translate_code
6780 before muscle_code_grow, and no longer set global booleans to remember
6781 whether these declarations have been seen.
6782 Parse new %after-header and %before-header.
6783 * src/reader.c (before_definitions, after_definitions): Remove.
6784 (prologue_augment): Accept a new bool argument to specify whether to
6785 augment the pre-prologue or post-prologue.
6786 * src/reader.h (before_definitions, after_definitions): Remove these
6787 extern's.
6788 (prologue_augment): Add new bool argument.
6789 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6790 (PERCENT_END_HEADER): ... this.
6791 (PERCENT_BEFORE_DEFINITIONS): Update to...
6792 (PERCENT_START_HEADER): ... this.
6793 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6794 * tests/actions.at (Printers and Destructors): Update names.
6795
31b2b07e
JD
67962006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6797
6798 Add comparison operators for C++ location classes. Discussed at
6799 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6800 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6801 declaration indicating whether filename_type has an operator==. If
6802 filename_type is `std::string', it defaults to `1', `0' otherwise.
6803 * data/location.cc: Iff b4_define_location_comparison is `1', add
6804 operator== and operator!= for class position and for class location.
6805
6806 Some minor fixes.
6807 * src/scan-action.l: Remove unused file.
6808 * src/symtab.c (symbol_printer_set): Use printer_location not
6809 destructor_location.
6810 * src/symtab.h (struct symbol): Replace incorrect source comment for
6811 printer members.
6812 * tests/input.at (Incompatible Aliases): Update output with correct
6813 printer location.
6814
9bc0dd67
JD
68152006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6816
6817 Don't put the pre-prologue in the header file. For the yacc.c code
6818 file and the glr.c header and code files, move the pre-prologue before
6819 the token definitions. Add new %before-definitions and
6820 %after-definitions to declare code that will go in both the header file
6821 and code file. Discussed at
6822 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6823 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6824 and
6825 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6826 * NEWS (2.3+): Describe these changes.
6827 * data/glr.c (b4_pre_prologue): Move from within to before...
6828 (b4_shared_declarations): ... this.
6829 Add new b4_before_definitions before b4_token_enums.
6830 Add new b4_after_definitions at the end.
6831 * data/glr.cc (b4_pre_prologue): Replace with...
6832 (b4_before_definitions): ... this in the header file.
6833 (b4_after_definitions): New near the end of the header file.
6834 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6835 code file right before including the header file.
6836 (b4_before_definitions): New in the previous position of
6837 b4_pre_prologue in the header file.
6838 (b4_after_definitions): New near the end of the header file.
6839 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6840 (b4_token_enums_defines): In the code file, move to right before
6841 YYSTYPE for consistency with the header file.
6842 (b4_before_definitions): New right before b4_token_enums_defines in
6843 both the header and code file.
6844 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6845 header and code file.
6846 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6847 of prologues for %union dependencies.
91661ebb
JD
6848 (Decl Summary): In %defines description, mention the effect of
6849 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
6850 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6851 than in the pre-prologue so that make check succeeds.
148d66d8 6852 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
6853 %after-definitions.
6854 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6855 %before-definitions.
6856 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6857 (declaration): Parse those declarations and append to
6858 b4_before_definitions and b4_after_definitions, respectively.
6859 * src/reader.c (before_definitions, after_definitions): New bools to
6860 track whether those declarations have been seen.
6861 (prologue_augment): Add to the post-prologue if %union,
6862 %before-definitions, or %after-definitions has been seen.
6863 * src/reader.h (before_definitions, after_definitions): New extern's.
6864 * src/scan-gram.l: Scan the new declarations.
6865 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6866 prologue block in a %before-definitions or a %after-definitions based
6867 on whether the %union is declared.
6868 * tests/regression.at (Early token definitions with --yacc, Early token
6869 definitions without --yacc): Move tests for token definitions into the
6870 post-prologue since token names are no longer defined in the
6871 pre-prologue.
6872
203b9274
AD
68732006-06-20 Akim Demaille <akim@epita.fr>
6874
6875 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6876 (symbol_get): Use it.
6877 * src/parse-gram.y: Use it.
6878
a7ee59cf
JD
68792006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6880
6881 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6882 build succeeds when configured with --enable-gcc-warnings.
6883
5a2baae7
PE
68842006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6885
33ad1a9c
PE
6886 * src/parse-gram.y (char_name): New function.
6887 (CHAR, STRING, string_content): For %printer, properly escape.
6888 (ID): Prefer fputs to fprintf.
6889 (id): Reindent to be consistent with other rules.
6890 Properly quote char.
6891
5a2baae7
PE
6892 The Translation Project changed its way of publishing translations
6893 to maintainers. I haven't received any responses to my request
6894 for supporting the old way, or for documenting the new way. I
6895 have modified 'bootstrap' to use screen scraping
6896 (in this case, HTML scraping). This is unreliable and inelegant,
6897 but I don't see any better way. Yuck.
6898 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6899 (get_translations): New function, which uses HTML scraping to
6900 deduce locations of latest translations.
6901 Use this function to grab both bison and bison-runtime .po files.
6902 Don't bother priming the pump for the runtime-po domain any more,
6903 as it's now translated better than bison is.
6904
58d7a1a1
AD
69052006-06-19 Akim Demaille <akim@epita.fr>
6906
6907 * src/scan-gram.l: No longer "parse" things after `%union' until
6908 `{'. Rather, return a single "%union" token.
6909 No longer make symbols: return strings, and leave the conversion
6910 to symbols to the parser.
6911 (SC_PRE_CODE, token_type): Remove.
6912 * src/parse-gram.y (%union): New field `character'.
6913 Sort tokens.
6914 (CHAR): New token.
6915 (ID, ID_COLON): Now that the scanner no longer makes them
6916 identifiers, adjust all uses to invoke symbol_get.
6917 (id_colon): New, wraps the conversion from string to symbol.
6918 (%union): Accept a possible union_name.
6919 (symbol): Now can be a char.
6920 * data/c.m4 (b4_union_name): Leave a default value.
6921 * data/glr.c, data/yacc.c: Use it.
6922
b931235e
JD
69232006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6924
6925 For associating token numbers with token names for "yacc.c", don't use
6926 #define statements unless `--yacc' is specified; always use enum
6927 yytokentype. Most important discussions start at:
6928 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6929 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6930 and
6931 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6932 * NEWS (2.3+): Mention.
6933 * data/c.m4 (b4_yacc_if): New.
6934 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6935 token #define's.
6936 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6937 on token name definitions.
6938 * src/getargs.c (usage): Capitalize `Yacc' in English.
6939 * src/output.c (prepare): Define b4_yacc_flag.
6940 * tests/regression.at (Early token definitions): Test that tokens names
6941 are defined before the pre-prologue not just before the post-prologue.
6942 Remove this test case and copy to...
6943 (Early token definitions with --yacc): ... this to test #define's.
6944 (Early token definitions without --yacc): ... and this to test enums.
6945
9e6e7ed2
PE
69462006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6947
6948 * NEWS: Reword the post-2.3 change to not be so optimistic about
6949 removing the old "look-ahead" spelling.
6950 Update previous look-ahead/lookahead change reports.
6951 * REFERENCES: look-ahead -> lookahead (since that's
6952 what he actually wrote).
6953 * doc/refcard.tex: look ahead -> lookahead,
6954 look-ahead -> lookahead
6955
742e4900
JD
69562006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6957
6958 For consistency, use `lookahead' instead of `look-ahead' or
6959 `look_ahead'. Discussed starting at
6960 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6961 and then at
6962 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6963 * NEWS: For the next release, note the change to `--report'.
6964 * TODO, doc/bison.1: Update English.
6965 * doc/bison.texinfo: Update English.
6966 (Understanding Your Parser, Bison Options): Document as
6967 `--report=lookahead' rather than `--report=look-ahead'.
6968 * src/conflicts.c: Update English in comments.
6969 (lookahead_set): Rename from look_ahead_set.
6970 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6971 (resolve_sr_conflict): Rename local look_ahead_tokens to
6972 lookahead_tokens, and update other uses.
6973 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6974 count_rr_conflicts, conflicts_free): Update uses.
6975 * src/getargs.c (report_args): Move "lookahead" before alternate
6976 spellings.
6977 (report_types): Update uses.
6978 (usage): For `--report' usage description, state `lookahead' spelling
6979 rather than `look-ahead'.
6980 * src/getargs.h (report.report_lookahead_tokens): Rename from
6981 report_look_ahead_tokens.
6982 * src/lalr.c: Update English in comments.
6983 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6984 (state_lookahead_tokens_count): Rename from
6985 state_look_ahead_tokens_count.
6986 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6987 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6988 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6989 Update other uses.
6990 Update English in output.
6991 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6992 * src/print.c: Update English in comments.
6993 (lookahead_set): Rename from look_ahead_set.
6994 (print_reduction): Rename argument lookahead_token from
6995 look_ahead_token.
6996 (print_core, state_default_rule, print_reductions, print_results):
6997 Update uses.
6998 * src/print_graph.c: Update English in comments.
6999 (print_core): Update uses.
7000 * src/state.c: Update English in comments.
7001 (reductions_new): Update uses.
7002 (state_rule_lookahead_tokens_print): Rename from
7003 state_rule_look_ahead_tokens_print, and update other uses.
7004 * src/state.h: Update English in comments.
7005 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
7006 (state_rule_lookahead_tokens_print): Rename from
7007 state_rule_look_ahead_tokens_print.
7008 * src/tables.c: Update English in comments.
7009 (conflict_row, action_row): Update uses.
7010 * tests/glr-regression.at
7011 (Incorrect lookahead during deterministic GLR,
7012 Incorrect lookahead during nondeterministic GLR): Rename
7013 print_look_ahead to print_lookahead.
7014 * tests/torture.at: Update English in comments.
7015 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
7016 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
7017 (Many lookahead tokens): Update uses.
7018 * data/glr.c: Update English in comments.
7019 * lalr1.cc: Likewise.
7020 * yacc.c: Likewise.
7021 * src/conflicts.h: Likewise.
7022 * src/lalr.h: Likewise.
7023 * src/main.c: Likewise.
7024 * src/output.c: Likewise.
7025 * src/parse-gram.c: Likewise.
7026 * src/tables.h: Likewise.
7027 * tests/calc.at: Likewise.
7028
3c40d0b5
JD
70292006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
7030
7031 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
7032
5d278082
PE
70332006-06-07 Paul Eggert <eggert@cs.ucla.edu>
7034
7035 * TODO: Add request from Nelson H. F. Beebe to be able to install
7036 Bison without installing the yacc script.
7037
9e668899
JD
70382006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7039
7040 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
7041 and yytext if they're already #define'd.
7042 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
7043 * src/scan-code-c.c: ... here.
7044 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
7045 <config.h>.
7046
0c8e079f
JD
70472006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7048
7049 Get Bison to build again when configured with --enable-gcc-warnings.
7050 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7051 missing #include's.
7052 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7053 loc argument as it shadows a global.
7054 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7055 invocation.
7056
7057 * src/.cvsignore: Add scan-code.c.
7058
2346344a
AD
70592006-06-07 Akim Demaille <akim@epita.fr>
7060
7061 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7062 to...
7063 * src/scan-code.l: here.
7064 * tests/input.at (Torturing the Scanner): Fix another location
7065 error.
7066
4862bdfd
AD
70672006-06-07 Akim Demaille <akim@epita.fr>
7068
7069 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7070
e9071366
AD
70712006-06-06 Akim Demaille <akim@epita.fr>
7072
7073 Extract the parsing of user actions from the grammar scanner.
7074 As a consequence, the relation between the grammar scanner and
7075 parser is much simpler. We can also split "composite tokens" back
7076 into simple tokens.
7077 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7078 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7079 rename as...
7080 * src/location.h, src/location.c (add_column_width)
7081 (location_compute): these.
7082 Fix the column count: the initial column is 0.
7083 (location_print): Be robust to ending column being 0.
7084 * src/location.h (boundary_set): New.
7085 * src/main.c: Adjust to scanner_free being renamed as
7086 gram_scanner_free.
7087 * src/output.c: Include scan-code.h.
7088 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7089 Use boundary_set.
7090 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7091 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7092 which is now, again, a separate token.
7093 Adjust all dependencies.
7094 Whereever actions with $ and @ are used, use translate_code.
7095 (action): Remove this nonterminal which is now useless.
7096 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7097 (grammar_current_rule_action_append): Use translate_code.
7098 (packgram): Bound check ruleno, itemno, and rule_length.
7099 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7100 (last_string, last_braced_code_loc, max_left_semantic_context)
7101 (scanner_initialize, scanner_free, scanner_last_string_free)
7102 (gram_out, gram_lineno, YY_DECL_): Move to...
7103 * src/scan-gram.h: this new file.
7104 (YY_DECL): Rename as...
7105 (GRAM_DECL): this.
7106 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7107 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7108 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7109 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7110 Move these declarations, and...
7111 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7112 these to...
7113 * src/flex-scanner.h: this new file.
7114 * src/scan-gram.l (rule_length, rule_length_overflow)
7115 (increment_rule_length): Remove.
7116 (last_braced_code_loc): Rename as...
7117 (gram_last_braced_code_loc): this.
7118 Adjust to the changes of the parser.
7119 Move all the handling of $ and @ into...
7120 * src/scan-code.l: here.
7121 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7122 (handle_action_dollar, handle_action_at): Move to...
7123 * src/scan-code.l: here.
7124 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7125 scan-code.h, scan-code-c.c, scan-gram.h.
7126 (EXTRA_bison_SOURCES): Add scan-code.l.
7127 (BUILT_SOURCES): Add scan-code.c.
7128 (yacc): Be robust to white spaces.
7129
7130 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7131 * tests/regression.at: Adjust the column numbers.
7132 * tests/regression.at: Adjust the error message.
7891a7c4 7133
184e42f0
JD
71342006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7135
7136 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7137 Use Akim's wording from
7138 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7139
7891a7c4
JD
71402006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7141
7142 Between Bison releases, manually append `+' to the previous Bison
7143 release number, and use that as a signal to automatically print the
7144 ChangeLog's CVS Id keyword from --version. Discussed starting at
7145 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7146 * ChangeLog: Add Id header.
7147 * configure.ac (AC_INIT): Append `+' to `2.3'.
7148 * src/.cvsignore: Add revision.c.
7149 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7150 (BUILT_SOURCES): Add revision.c.
7151 (revision.c): New target rule. This file defines a new global variable
7152 named revision. It initializes it with either the Id from ChangeLog
7153 or, if VERSION doesn't contain `+', with the empty string.
7154 * src/getargs.c (version): Print the value of revision.
7155 * src/revision.h: Extern revision.
7156
4ad3ed84
PE
71572006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7158
7159 * NEWS: Version 2.3.
7160 * configure.ac (AC_INIT): Likewise.
7161
02103984
PE
71622006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7163
7164 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7165 with no arguments, not as an object-like macro. This is for
7166 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7167 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7168 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7169 Document this.
7170
2c08afa5
JD
71712006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7172
7173 * src/getargs.c (usage): Back out yesterday's modification of the
7174 --help output so that we don't have to wait for translation before
7175 releasing 2.3.
7176
6077da58
PE
71772006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7178
7179 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7180 Problem reported by Akim Demaille.
7181
2a26b6c2
JD
71822006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7183
7184 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7185
aefef0d6
PE
71862006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7187
7188 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7189 generated source code. Problem reported by Frans Englich in
7190 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7191
fcd8e201
PE
71922006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7193
7194 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7195 shell, not within 'make', so that 'make' by an ordinary builder
7196 (using GNU make) does not worry about configuring gzip. This also
7197 works around a bug reported independently by Keith Thompson and by
7198 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7199 stderr rather than stdout, messing up the build logs.
7200
7b5cdcbd
JD
72012006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7202
7203 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7204 to make sure that YYID will never be unused. This fixes a 'make
7205 maintainer-check' failure caused by the recent changes to the 'Trivial
7206 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7207 not used.
7208 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7209
5ad0a449
JD
72102006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7211
7212 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7213 state before an empty RHS is always resolved here. Only the location
7214 of that state is guaranteed to be resolved, and that's enough. This
7215 fixes the remaining bug reported by Derek M. Jones in
7216 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7217 * tests/glr-regression.at (Uninitialized location when reporting
7218 ambiguity): Test the above case.
7219 Also, the embedded comments in this test case claim it checks the case
7220 of an empty RHS that has inherited the initial location. However, the
7221 corresponding LHS was already resolved, so yyresolveLocations didn't
7222 actually have reason to modify it. Fix this by forcing
7223 nondeterministic operation at the beginning of the parse.
7224
50cce58e
PE
72252006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7226
7227 * data/c.m4 (b4_yy_symbol_print_generate):
7228 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7229 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7230 of the bugs reported today by Derek M Jones in
7231 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7232 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7233 defined to be a type name without parens or brackets.
7234 (Location Type): Similarly for YYLTYPE.
7235 * tests/regression.at (Trivial grammars): Put in a test for this
7236 bug that will be caught by 'make maintainer-check' (though not,
7237 alas, by 'make check' unless your compiler is picky).
7238
ab8d9dc5
PE
72392006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7240
0d2c8934 7241 * NEWS: Version 2.2.
ab8d9dc5
PE
7242 * configure.ac (AC_INIT): Likewise.
7243
9138c575
JD
72442006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7245
7246 * data/glr.c (yyreportTree): Make room in yystates for the state
7247 preceding the RHS. This fixes the segmentation fault reported by Derek
7248 M. Jones in
7249 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7250 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7251 to the user. Reported for yyreportTree by Derek M. Jones later in the
7252 same thread.
7253 * THANKS: Add Derek M. Jones.
7254 Update my email address.
7255 Fix typo in Steve Murphy's name.
7256
276f48df
PE
72572006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7258
d6645148
PE
7259 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7260 checking against YYLAST that caused the parser to miss a potential
7261 alternative in its diagnostic.
7262 Problem reported by Maria Jose Moron Fernandez in
7263 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7264 * data/lalr1.cc (yysyntax_error_): Likewise.
7265 * data/yacc.c (yysyntax_error): Likewise.
7266 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7267 tokens, in case we run into an older C compiler.
7268 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7269 Use them to check for the off-by-one error fixed above.
7270
276f48df
PE
7271 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7272 YYSIZE_T, not size_t.
7273 * tests/regression.at (Trivial grammars): New test, to catch
7274 the error fixed by the above patch.
7275
cd8b5791
AD
72762006-05-14 Akim Demaille <akim@lrde.epita.fr>
7277
7278 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7279 scheme.
7280 Reported by Steve Murphy.
7281
34376418
AD
72822006-05-14 Akim Demaille <akim@lrde.epita.fr>
7283
7284 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7285 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7286
327afc7c
AD
72872006-05-14 Akim Demaille <akim@lrde.epita.fr>
7288
7289 Implement --trace=m4.
7290 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7291 * src/output.c (output_skeleton): When set, pass -dV to m4.
7292
7293 Factor the handling of flags in m4.
7294 * src/output.c (prepare): Rename the muscle names debug, defines,
7295 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7296 * data/c.m4: Adjust.
7297 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7298 Use b4_define_flag_if to define other b4_FLAG_if macros.
7299 (b4_location_if): As a consequence, rename as...
7300 (b4_locations_if): this, for consistency.
7301 Adjust all the skeletons.
7302
ba9ecd19
AD
73032006-05-14 Akim Demaille <akim@lrde.epita.fr>
7304
7305 * etc/bench.pm: Shorten bench names.
7306
4e83ea15
AD
73072006-05-14 Akim Demaille <akim@lrde.epita.fr>
7308
7309 * src/output.h, src/output.c (error_verbose): Move to...
7310 * src/getargs.h, src/getargs.c: here.
7311 Sort the flags.
7312 Adjust dependencies.
7313
6e93d810
PE
73142006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7315
7316 * data/c.m4 (b4_copyright): Put the special exception for Bison
7317 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
7318 uses changed. Suggested by Akim Demaille. Also, wrap the
7319 copyright notice, in case it is longer than 80 columns. Replace
7320 comma by newline after title.
6e93d810 7321
eaea13f5
PE
73222006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7323
7324 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7325 incompatibility, not a bug. Mention that it wasn't fixed as of
7326 flex 2.5.33.
7327
3cf084ec
AD
73282006-05-11 Akim Demaille <akim@lrde.epita.fr>
7329
7330 * examples/extexi: Enforce the precedence of concatenation over
7331 >>.
0a9f1c7d 7332 Reported by Tommy Nordgren.
3cf084ec 7333
32c96bd7
AD
73342006-05-11 Akim Demaille <akim@lrde.epita.fr>
7335
7336 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7337 with the member "token".
f94705b2 7338 Reported by Martin Nylin.
32c96bd7 7339
eaea13f5
PE
73402006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7341
7342 * data/glr.c: Switch to Bison 2.2 special-exception language in
7343 the copyright notice. Use more-regular format for titles and
7344 copyright notices.
7345 * data/glr.cc: Likewise.
7346 * data/location.cc: Likewise.
7347 * data/yacc.cc: Likewise.
7348 * doc/bison.texinfo (Conditions): Document this.
7349 * NEWS: likewise. Upgrade version to 2.2.
7350
6e2d1146
AD
73512006-04-27 Akim Demaille <akim@lrde.epita.fr>
7352
7353 * data/glr.cc: Remove dead code.
7354
47671055
PE
73552006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7356
7357 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7358 that variable and the line breaks the bootstrap. Problem reported
7359 by Juan M. Guerrero.
7360
ed2e6384
AD
73612006-04-24 Akim Demaille <akim@lrde.epita.fr>
7362
7363 * doc/bison.texinfo (Multiple start-symbols): New.
7364
3cedc2dc
AD
73652006-04-24 Akim Demaille <akim@lrde.epita.fr>
7366
7367 * etc/README, etc/bench.pl: New.
7368
b2ddc3f3
AD
73692006-04-03 Akim Demaille <akim@lrde.epita.fr>
7370
7371 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7372 rule.
7373 Reported by Mickael Labau.
7374 * tests/input.at (Torturing the Scanner): Test it.
7375
91e3ac9a
PE
73762006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7377
7378 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7379 Problem reported by Bob Rossi.
7380
73812006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7382
7383 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7384 and didn't really work.
7385 For the index, use @ifnotinfo, not @iftex.
7386 Minor cleanups of spacing and terminology.
7387
5cf61e93
AD
73882006-03-12 Akim Demaille <akim@lrde.epita.fr>
7389
7390 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7391 of AT_NAME_PREFIX when %name-prefix is not used.
7392
aa08666d
AD
73932006-03-12 Akim Demaille <akim@lrde.epita.fr>
7394
7395 Apply --prefix to C++ skeletons too: they change the namespace.
7396 The test suite already exercize these cases.
7397 * data/c++.m4 (b4_namespace): New.
7398 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7399 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7400 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7401 * doc/bison.texinfo: Document it.
7402 (Option Cross Key): Use @multitable in all formats. It looks
7403 nicer, even in TeX outputs.
7404 (Rules): Use the same code whatever the output type is.
7405 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7406 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7407 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 7408
45567173
AD
74092006-03-10 Akim Demaille <akim@lrde.epita.fr>
7410
7411 * TODO: Remove dead items.
7412
e9d8f881 74132006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
7414
7415 * doc/FAQ: Remove, merged into...
7416 * doc/bison.texinfo (FAQ): this.
7417 * doc/Makefile.am (EXTRA_DIST): Adjust.
7418
c095d689
AD
74192006-03-10 Akim Demaille <akim@lrde.epita.fr>
7420
7421 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7422 even if empty.
7423 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7424 * doc/bison.texinfo (Calc++ Scanner): Use it.
7425
6e0f8287
PE
74262006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7427
7428 Fix two nits reported by twlevo, plus one more that I discovered.
7429
7430 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7431 this is the usual Bison style.
7432 * src/location.h (location_print): Likewise.
7433
7434 * src/reader.h (token_name): Likewise.
7435
d6b771c3
PE
74362006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7437
7438 Fix some nits reported by twlevo.
7439 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7440 and "POSIX". Use more-modern syntax for URLs. Mention C++
7441 and ask for Java. Don't hardwire OS version numbers. Add
7442 copyright notice.
7443 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7444 * src/conflicts.c (solved_conflicts_obstack): Now static.
7445
1e137b71
JD
74462006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7447
7448 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7449 page. Say "you can use it" not "you may use it" as on the web page;
7450 we're describing capabilities not granting permission.
7451
73f2e47e
PE
74522006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7453
6d05403d
PE
7454 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7455 shadowing warnings. Use usual patter for iterating through RHS.
7456 * tests/glr-regression.at
7457 (Uninitialized location when reporting ambiguity):
7458 Modify yylex so that it uses its argument, rather than trying
7459 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7460 const char -> char const.
7461
73f2e47e
PE
7462 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7463 Don't use tabs inside commands; it messes up 'ps'.
7464 Problem reported by twlevo.
7465
8710fc41
JD
74662006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7467
7468 * tests/glr-regression.at (Uninitialized location when reporting
7469 ambiguity): New test case.
7470 * data/glr.c (yyresolveLocations): New function, which uses
7471 YYLLOC_DEFAULT.
7472 (yyresolveValue): Invoke yyresolveLocations before reporting an
7473 ambiguity.
7474 * doc/bison.texinfo (Default Action for Locations): Note
7475 YYLLOC_DEFAULT's usage for ambiguity locations.
7476 (GLR Semantic Actions): Cross-reference those notes.
7477
ae952af2
JD
74782006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7479
7480 * tests/glr-regression.at (Leaked semantic values when reporting
7481 ambiguity): Remove unnecessary union and type declarations.
7482 (Leaked lookahead after nondeterministic parse syntax error): New test
7483 case.
7484 * data/glr.c (yyparse): Check for zero stacks remaining before
7485 attempting to shift the lookahead so that you don't lose it.
7486
35ee866a
JD
74872006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7488
7489 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7490 * tests/glr-regression.at (Leaked semantic values when reporting
7491 ambiguity): New test case.
7492 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7493 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7494 now unnecessary yystackp parameter.
7495 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7496 destructors can be called.
7497
7498 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7499 in existing testcases.
7500
520181ab
JD
75012006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7502
7503 Don't leak semantic values for parent RHS when a user action cuts the
7504 parser, and clean up related code a bit.
7505 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
7506 cuts parse): Rename to...
7507 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
7508 for leaked parent RHS values.
7509 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7510 between an unresolved state (non-empty chain of semantic options) and
7511 an incomplete one (signaled by an empty chain).
ae952af2 7512 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
7513 successfully or unsuccessfully resolved yyGLRState to...
7514 (yyresolveValue): ... here so that yyresolveValue always leaves a
7515 yyGLRState with consistent data and thus is easier to understand.
7516 Remove the yyvalp and yylocp parameters since they are always just
7517 taken from the yys parameter. When reporting a discarded merged value
7518 in debugging output, note that it is incompletely merged. Document the
7519 interface.
7520 (yyresolveAction): If resolving any of the RHS states fails, destroy
7521 them all rather than leaking them. Thus, as long as user actions are
7522 written to clean up the RHS correctly, yyresolveAction always cleans up
7523 the RHS of a semantic option. Document the interface.
7524
18d9185c
PE
75252006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7526
7527 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7528 led to a segmentation fault in GNU Pascal. Problem reported
7529 by Waldek Hebisch.
7530
841a7737
JD
75312006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7532
7533 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7534 mid-rule action inside a nonterminal symbol in order to declare a
7535 destructor for its semantic value.
7536
fc3f467f
PE
75372006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7538
7539 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7540 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7541 __cplusplus && ! defined _STDLIB_H && !
7542 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7543 defined free))]: Include <stdlib.h> rather than rolling our own
7544 declarations of malloc and free, to avoid problems with
7545 incompatible declarations (using 'throw') C++'s stdlib.h. This
7546 should fix Debian bug 340012
7547 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7548 reported by Guillaume Melquiond.
7549
a3af26dd
PE
75502006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7551
4d7bc38c
PE
7552 * NEWS: Clarify symbols versus types in unused-value warnings.
7553
a3af26dd
PE
7554 * configure.ac (AC_INIT): Bump version number.
7555
4e26c69e
PE
75562006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7557
7558 * NEWS: Version 2.1a.
7559 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7560 since C99 requires this.
7561
498e897c
PE
75622006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7563
7564 * m4/c-working.m4: New file.
7565 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7566
57bb17ca
PE
75672006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7568
7569 * Makefile.maint: Merge from coreutils.
7570
0be105dc
PE
75712006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7572
7573 More portability fixes for problems summarized by Nelson H. F. Beebe.
7574
7575 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7576 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7577 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7578 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7579 messes up because C++ code is compiled in 32-bit mode but linked
7580 in 64-bit mode.
7581
6fc0c024
PE
75822006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7583
7584 More portability fixes for problems summarized by Nelson H. F. Beebe.
7585
7870f699
PE
7586 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7587 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7588
6fc0c024
PE
7589 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7590 nodist_PROGRAMS, since we don't need to actually compile the
7591 example if we're just doing a plain 'make'. This avoids bothering
7592 the installer unnecessarily about problems due to weird C++
7593 compilers.
7594
fe6c2fde
PE
75952006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7596
7597 More portability fixes for problems summarized by Nelson H. F. Beebe.
7598
7599 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7600 than #include "...", and compile with -I'.'. The old method was
7601 not portable, according to Posix and the C standard, and it does
7602 not work with Sun C 5.7, where previous #line directives affect
7603 the working directory used in later #include "..." directives.
7604
927b425b
JMG
76052006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7606
7607 Various DJGGP specific issues in /djgpp
7608
d9735e9e
PE
76092006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7610
7611 More portability fixes for problems summarized by Nelson H. F. Beebe.
7612
7613 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7614 '#include <map>' works and that you can apply ++ to iterators.
7615
5a6755af
PE
76162006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7617
67a0dc4f
PE
7618 Work around portability problems summarized by Nelson H. F. Beebe in
7619 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7620
8c86f0ef
PE
7621 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7622 that '#include <string>' works.
7623
de35dd59
PE
7624 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7625 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7626 "warning: sorry: semantics of inline function static data `const
7627 unsigned char translate_table[262]' are wrong (you'll wind up with
7628 multiple copies)".
7629
67a0dc4f
PE
7630 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7631 or, xor to not_, and_, or_, and xor_, respectively. This works
7632 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7633 random system header somewhere that includes the equivalent of
7634 <iso646.h>.
7635
5a6755af
PE
7636 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7637 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 7638 Suite Version 2.0.
5a6755af 7639
3f001415
JD
76402006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7641
7642 During deterministic GLR operation, user actions should be able to
7643 influence the parse by changing yychar. To make this easier to fix and
7644 to make glr.c easier to evolve in general, don't maintain yytoken in
7645 parallel with yychar; just compute yytoken when needed.
7646 * tests/glr-regression.at (Incorrect lookahead during deterministic
7647 GLR): Check that setting yychar in a user action has the intended
7648 effect.
7649 * data/glr.c (yyGLRStack): Remove yytokenp member.
7650 (yyclearin): Don't set *yytokenp.
7651 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7652 yychar rather than *yytokenp to determine the current lookahead.
7653 Compute yytoken locally when needed.
7654 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7655 point to.
7656
7657 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7658 after `--report' documentation.
7659
e2a8c0f5
PE
76602006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7661
7662 * src/parse-gram.y (grammar_declaration): Location of printer
7663 symbol is @1, not list->location. Bug reported by twlevo.
7664 * tests/input.at (Incompatible Aliases): Adjust to above change.
7665
6b702268
PE
76662006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7667
27622431
PE
7668 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7669 all the test at once. This makes the output easier to read in the
7670 normal case.
7671
6b702268
PE
7672 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7673 got from <http://bro-ids.org/download.html>. The bug is that
7674 when two actions appeared in succession, the second one was
7675 scanned before the first one was added to the grammar rule
7676 as a midrule action. Bison then output the incorrect warning
7677 "parse.y:905.17-906.36: warning: unused value: $3".
7678 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7679 associated with a value.
7680 (rhs): Don't invoke grammar_current_rule_action_append.
7681 (action): Invoke it here instead.
7682 * src/reader.c (grammar_midrule_action): Now extern.
7683 (grammar_current_rule_action_append): Don't invoke
7684 grammar_midrule_action; that is now the scanner's job.
7685 * src/reader.h (last_string, last_braced_code_loc):
7686 (grammar_midrule_action): New decls.
7687 * src/scan-gram.l (last_string): Now extern, sigh.
7688 (last_braced_code_loc): New extern variable.
7689 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7690 rule already has an action.
7691 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7692 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7693 Add some tests to check that the above changes fixed the bug.
7694
d40ba6c2
PE
76952006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7696
7697 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7698 All used changed. Check whether the symbol has a destructor,
7699 not whether it is typed.
7700 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7701 that the values are still reported as unused. All line numbers
7702 adjusted.
7703
401aace6
PE
77042006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7705
7706 Work around a bug in bro 0.8, which underparenthesizes its
7707 definition of YYLLOC_DEFAULT.
7708 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7709 their arguments.
7710 * data/lalr1.cc: Likewise.
7711 * data/yacc.cc: Likewise.
7712
06f01bc4
PE
77132006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7714
401aace6
PE
7715 Work around a bug in Pike 7.0, and give the Pike folks a
7716 better way to override the usual int widths.
7717 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7718 user can override the types.
7719 (short): #undef, to work around a bug in Pike 7.0.
7720 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7721 (union yyalloc.yyss): Use yytype_int16 rather than short.
7722 All uses changed.
7723 (yysigned_char): Remove.
7724 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7725 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7726 * tests/regression.at (Web2c Actions): Adjust to above changes.
7727
7728 * src/reader.c (check_and_convert_grammar): New function.
7729 (reader): Close the input file even if something went wrong during
7730 parsing. Minor file descriptor leak reported by twlevo.
7731
06f01bc4
PE
7732 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7733 to pacify gcc -Wswitch-default.
7734 * src/scan-gram.l (adjust_location): Use a default: break; case
7735 to pacify gcc -Wswitch-default.
7736 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7737 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7738 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7739 Move these decls to scan-skel.l, since they don't need to be
7740 visible elsewhere.
7741 * src/scan-skel.l: Accept the above decls.
7742 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7743 is used.
7744
02650b7f
PE
77452006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7746
7747 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7748 since we don't want to insist on a version number at the start
7749 of the changelog every time.
7750 * Makefile.maint: Sync from coreutils a bit better.
7751 (sc_trailing_blank): Renamed from sc_trailing_space.
7752 All uses changed.
7753 (sc_no_if_have_config_h, sc_require_config_h):
7754 (sc_prohibit_assert_without_use): New rules.
7755 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7756 (sc_dd_max_sym_length): Fix leading spaces in rule.
7757 (sc_system_h_headers): Prefix with @.
7758 (sc_useless_cpp_parens, m4-check): Output line numbers.
7759 (changelog-check): Allow version only in head.
7760 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7761 satisfy new Makefile.maint rule.
7762 * data/glr.c: Likewise.
7763 * data/glr.cc: Likewise.
7764 * data/lalr1.cc: Likewise.
7765 * data/yacc.c: Likewise.
7766 * lib/ebitsetv.c: Likewise.
7767 * lib/lbitset.c: Likewise.
7768 * lib/subpipe.c: Likewise.
7769 * lib/timevar.c: Likewise.
7770 * src/system.h: Likewise.
7771 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7772 * djgpp/Makefile.maint: Add copyright notice.
7773 * djgpp/README.in: Likewise.
7774 * djgpp/config.bat: Likewise.
7775 * djgpp/config.site: Likewise.
7776 * djgpp/config_h.sed: Likewise.
7777 * djgpp/djunpack.bat: Likewise.
7778 * djgpp/config.sed: Fix copyright notice to match standard format.
7779 * djgpp/subpipe.h: Likewise.
7780 * lib/bitsetv-print.c: Likewise.
7781 * lib/bitsetv.c: Likewise.
7782 * lib/subpipe.h: Likewise.
7783 * lib/timevar.c: Likewise.
7784 * lib/timevar.h: Likewise.
7785 * djgpp/subpipe.c: Use standard recipe for config.h.
7786 * lib/abitset.c: Likewise.
7787 * lib/bitset.c: Likewise.
7788 * lib/bitset_stats.c: Likewise.
7789 * lib/bitsetv-print.c: Likewise.
7790 * lib/bitsetv.c: Likewise.
7791 * lib/ebitsetv.c: Likewise.
7792 * lib/get-errno.c: Likewise.
7793 * lib/lbitset.c: Likewise.
7794 * lib/subpipe.c: Likewise.
7795 * lib/timevar.c: Likewise.
7796 * lib/vbitset.c: Likewise.
7797 * tests/local.at: Likewise.
7798 * src/scan-gram.l: Don't include verify.h, since system.h does
7799 that for us.
7800 * .x-sc_require_config_h: New file.
7801 * .x-sc_unmarked_diagnostics: New file.
7802
287c78f6
PE
78032006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7804
287c78f6
PE
7805 Be a bit more systematic about using 'abort'.
7806 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7807 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7808 Put 'default: abort ();' before some other case, to satisfy older
7809 pedantic compilers.
7810 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7811 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7812 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7813 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
7814 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7815 (get_decision_str, get_orientation_str, get_node_alignment_str):
7816 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7817 (get_linestyle_str, get_arrowstyle_str): Likewise.
7818 * src/conflicts.c (resolve_sr_conflict):
7819 Use a default case rather than one for the one remaining enum
7820 value, to catch invalid enum values as well.
7821 * src/lalr.c (set_goto_map, map_goto):
7822 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7823 * src/nullable.c (nullable_compute, token_definitions_output):
7824 Likewise.
7825 * src/reader.c (packgram, reader): Likewise.
7826 * src/state.c (transitions_to, state_new, state_reduction_find):
7827 Likewise.
7828 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7829 (symbol_pack): Likewise.
7830 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
7831 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7832 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
7833 * src/system.h: Don't include <assert.h>.
7834 (assert): New macro.
7835
7836 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7837 (Destructor Decl, Parser Function, Pure Calling):
7838 Describe rules for braces inside C code more carefully.
287c78f6 7839
c66dfadd
PE
78402006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7841
c21493b8
PE
7842 Fix some porting glitches found by Nelson H. F. Beebe.
7843 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7844 compilers that don't understand that abort () does not return.
7845 * src/state.c (transitions_to): Likewise.
7846 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7847 that '#include <cstdlib>' works.
7848 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7849 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7850 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7851 for the benefit of some pre-C99 compilers.
7852
b6e3facf
PE
7853 * bootstrap: Undo changes to gnulib files that autoreconf made.
7854
c66dfadd
PE
7855 Minor fixups to get 'make maintainer-check' to work.
7856 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7857 with the new verify.h implementation.
7858 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7859 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7860 * data/yacc.c (YYUSE): Likewise.
7861 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7862 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7863 * src/parse-gram.y (declaration): Don't pass a string constant
7864 to a function that expects char *, since GCC might complain
7865 about the constant value.
7866 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7867 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7868 before #defining them.
7869 * tests/glr-regression.at
7870 (Incorrectly initialized location for empty right-hand side in GLR):
7871 In yyerror, use the msg arg.
7872 (Corrupted semantic options if user action cuts parse):
7873 (Incorrect lookahead during deterministic GLR):
7874 (Incorrect lookahead during nondeterministic GLR):
7875 Don't name a local var 'index'; it shadows string.h's 'index'.
7876
ed94ef2a
AD
78772006-01-19 Akim Demaille <akim@epita.fr>
7878
7879 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7880 location, not just parts of it.
7881
e9ad4aec
PE
78822006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7883
d6ca7905
PE
7884 * NEWS: Document the fact that multiple %unions are now allowed.
7885 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
7886 * TODO: This feature is now implemented, so remove it from
7887 the wishlist.
d6ca7905 7888
ef1b70e0
PE
7889 * Makefile.maint: Merge with coreutils Makefile.maint.
7890 (CVS_LIST): Use build-aux version if available.
7891 (VERSION_REGEXP): New macro.
7892 (syntax-check-rules): Add sc_no_if_have_config_h,
7893 sc_prohibit_assert_without_use, sc_require_config_h,
7894 sc_useless_cpp_parens.
7895 (sc_obsolete_symbols): Check for O_NDELAY.
7896 (sc_dd_max_sym_length): Track coreutils.
7897 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7898 (sc_useless_cpp_parens): New rule.
7899 (news-date-check): Look for version or today's date.
7900 (changelog-check): Don't require version number near head.
7901 (copyright-check): Use current year instead of hardwiring 2005.
7902 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7903 (announcement): Add --gpg-key-ID.
7904
7905 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7906 with "file system".
7907
2073ce56 7908 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
7909 array. Problem reported by twlevo.
7910 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7911 * src/lalr.c (build_relations): Rely on new sentinel.
7912 * src/gram.c (gram_free): Adjust to new sentinel.
7913
b7691f15
JD
79142006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7915
7916 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7917 yylookaheadNeeds. All uses updated.
7918 (yysplitStack): Rename local yynewLookaheadStatuses to
7919 yynewLookaheadNeeds.
7920 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7921 GLR): In comments, change `lookahead status' to `lookahead need'.
7922
ddee1b06
PH
79232006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7924
7925 * data/glr.c (yysplitStack): A little stylistic rewrite.
7926
12f4614d
PH
79272006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7928
7929 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7930
32c29292
JD
79312006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7932
7933 * doc/bison.texinfo: Fix some typos.
7934 (GLR Semantic Actions): New subsection discussing special
7935 considerations because GLR semantic actions might be deferred.
7936 (Actions): Mention look-ahead usage of yylval.
7937 (Actions and Locations): Mention look-ahead usage of yylloc.
7938 (Special Features for Use in Actions): Add YYEOF entry and mention it
7939 in the yychar entry.
7940 In the yychar entry, remove mention of the local yychar case (pure
7941 parser) since this is irrelevant information when writing semantic
148d66d8 7942 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
7943 yychar is otherwise described as an external variable.
7944 In the yychar entry, don't call it the `current' look-ahead since it
7945 isn't when semantic actions are deferred.
7946 In the yychar and yyclearin entries, add note about deferred semantic
7947 actions.
7948 Add yylloc and yylval entries discussing look-ahead usage.
7949 (Look-Ahead Tokens): When discussing yychar, don't call it the
7950 `current' look-ahead, and do mention yylval and yylloc.
7951 (Error Recovery): Cross-reference `Action Features' when mentioning
7952 yyclearin.
148d66d8 7953 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
7954 look-ahead.
7955 In the yylloc and yylval entries, mention look-ahead usage.
7956
de366a2f 79572006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
7958
7959 * tests/glr-regression.at: Update copyright year to 2006.
7960
bf70fa87
JD
79612006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7962
7963 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7964 use during nondeterministic operation to track which stacks have
7965 actually needed the current lookahead.
7966 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7967 Allocate, deallocate, resize, and otherwise shuffle space for
7968 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7969 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7970 appropriately during nondeterministic operation.
7971 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7972 members to store the current lookahead to be used by the deferred
7973 user action.
7974 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7975 from which the RHS is taken. Set the lookahead members of the new
7976 yySemanticOption according to the lookahead status for stack yyk.
7977 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7978 yyaddDeferredAction.
7979 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7980 members of yySemanticOption before invoking yyuserAction, and then set
7981 them back to their current values afterward.
7982 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7983 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7984 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7985 titles for consistency.
7986 (Leaked merged semantic value if user action cuts parse): In order to
7987 suppress lint warnings, use arguments in merge function, and assign
7988 char value < 128 in main.
7989 (Incorrect lookahead during deterministic GLR): New test case.
7990 (Incorrect lookahead during nondeterministic GLR): New test case.
7991
05449a2c
JD
79922006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7993
de366a2f 7994 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
7995 !yyvaluep as signal that no semantic value is available to print.
7996 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7997 to print a semantic value.
7998
4158e0a1 79992006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 8000
4158e0a1
JD
8001 * tests/glr-regression.at: For consistency with my newer test cases,
8002 don't thank myself.
8003
d659304d
JD
80042006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
8005
8006 * data/glr.c (yyresolveValue): When merging semantic options, if at
8007 least one user action succeeds but a later one cuts the parse, then
8008 destroy the semantic value before returning rather than leaking it.
8009 (yyresolveStates): If a user action cuts the parse and thus
8010 yyresolveValue fails, ignore the (unset) semantic value rather than
8011 corrupting the yyGLRState, and empty the semantic options list since
8012 the user actions should have called all necessary destructors.
8013 Simplify code with YYCHK.
8014 * tests/glr-regression.at (Corrupted semantic options if user action
8015 cuts parse): New test case.
8016 (Undesirable destructors if user action cuts parse): New test case.
8017 Before applying any of this patch, this test case never actually failed
8018 for me... but only because the corrupted semantic options usually
8019 masked this bug.
8020 (Leaked merged semantic value if user action cuts parse): New test
8021 case.
8022
6ec2c0f2
AD
80232006-01-05 Akim Demaille <akim@epita.fr>
8024
8025 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
8026
1b9c21fb
PE
80272006-01-04 Paul Eggert <eggert@cs.ucla.edu>
8028
8029 * data/c.m4 (b4_c_modern): New macro, with a new provision for
8030 _MSC_VER. Problem reported by Cenzato Marco.
8031 (b4_c_function_def): Use it.
8032 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
8033 b4_c_modern.
8034 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
8035 than rolling our own.
8036
84866159
AD
80372006-01-04 Akim Demaille <akim@epita.fr>
8038
8039 Also warn about non-used mid-rule values.
8040 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
8041 member.
8042 (symbol_list_new): Adjust.
8043 * src/reader.c (symbol_typed_p): New.
8044 (grammar_rule_check): Use it.
8045 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
8046 Check its rule.
8047 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8048 Use it.
8049 * tests/actions.at (Exotic Dollars): Adjust.
8050
378f4bd8
AD
80512006-01-04 Akim Demaille <akim@epita.fr>
8052
8053 * src/reader.c (grammar_midrule_action): If $$ is set in a
8054 mid-rule, move the `used' bit to its lhs.
8055 * tests/input.at (Unused values): New.
8056 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8057
e2a21b6f
PE
80582006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8059
54662697
PE
8060 * doc/bison.texinfo (Bison Options): Say more accurately what
8061 --yacc does.
8062 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8063 about declarations in the grammar when in Yacc mode, as POSIX does
8064 not require a diagnostic when the grammar uses extensions.
8065
8066 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8067
073f9288
PE
8068 Warn about dubious constructions like "%token T T".
8069 Reported by twlevo.
8070 * src/symtab.h (struct symbol.declared): New member.
8071 * src/symtab.c (symbol_new): Initialize it to false.
8072 (symbol_class_set): New arg DECLARING, specifying whether
8073 this is a declaration that we want to warn about, if there
8074 is more than one of them. All uses changed.
8075
1221b78a
PE
8076 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8077 Allow multiple %union directives, whose contents concatenate.
8078 * src/parse-gram.y (grammar_declaration): Likewise.
8079 Use muscle_code_grow, so that we don't need stype_line any more.
8080 All uses changed.
8081
8082 * src/muscle_tab.c (muscle_grow): Fix comment.
8083
e2a21b6f
PE
8084 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8085 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8086 Update copyright year to 2006.
8087
8f7e3cf9
AD
80882006-01-03 Akim Demaille <akim@epita.fr>
8089
8090 Have glr.cc pass (some of) the calc.at tests.
8091 * data/glr.cc (b4_parse_param_orig): New.
8092 (b4_parse_param): Improve its definition, and bound it more
8093 clearly in the skeleton.
8094 (b4_epilogue): Append, instead of prepending, in order to keep
8095 #line consistency.
8096 Simplify the generation of auxiliary functions: locations and
8097 purity are mandated.
8098 (b4_global_tokens_and_yystype): Honor it.
8099 * data/location.cc (c++.m4): Don't include it.
8100 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8101 and AT_SKEL_CC_IF.
8102 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8103 AT_LALR1_CC_IF.
8104 Be sure to initialize the first position's filename.
8105 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8106 mandated anyway.
8107 (AT_CHECK_CALC_GLR_CC): New.
8108 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8109
3953ed88
AD
81102006-01-02 Akim Demaille <akim@epita.fr>
8111
8112 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8113 c.m4.
0a96ba81 8114 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
8115 * data/glr.cc: Do not include stack.hh.
8116
9ecafbbf
AD
81172006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8118
8119 * data/glr.c: Reformat whitespace with tabs.
8120 (b4_lpure_formals): Remove this unused m4 macro.
8121 * tests/cxx-type.at: Reformat whitespace with tabs.
8122 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8123 since it's a member. Rename type to isNterm for clarity.
8124
c4d497a0
AD
81252005-12-29 Akim <akim@sulaco.local>
8126
8127 Let glr.cc catch up with symbol_value_print.
8128 * data/glr.cc (b4_yysymprint_generate): Replace by...
8129 (b4_yy_symbol_print_generate): this.
8130 (yy_symbol_print, yy_symbol_value_print): Declare them.
8131
4517da37
PE
81322005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8133
8134 * src/location.h (boundary): Note that a line or column equal
8135 to INT_MAX indicates an overflow.
8136 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8137 (rule_length_overflow, increment_rule_length, add_column_width):
8138 New functions.
8139 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8140 (<SC_BRACED_CODE>"}"):
8141 Use increment_rule_length rather than incrementing it by hand.
8142 (adjust_location, handle_syncline): Diagnose overflow.
8143 (handle_action_dollar, handle_action_at):
8144 Fix bug with monstrosities like $-2147483648.
8145 Remove now-unnecessary checks.
8146 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8147 (convert_ucn_to_byte): Verify assumptions.
8148 (handle_syncline): New arg LOC. All callers changed.
8149 Don't store through a value derived from char const * pointer.
8150
8151 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8152 GCC warnings.
8153
e3233bf6
PE
81542005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8155
8156 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8157 Remove unnecessary forward static decls.
8158
8f3596a6
AD
81592005-12-27 Akim Demaille <akim@epita.fr>
8160
8161 * src/reader.c (grammar_current_rule_check): Also check that $$
8162 is used.
8163 Take the rule to check as argument, hence rename as...
8164 (grammar_rule_check): this.
8165 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8166 Rename as...
8167 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8168 (grammar_midrule_action, grammar_symbol_append): Now static.
8169 * tests/torture.at (input): Don't rely on the default action
8170 being always performed.
8171 * tests/calc.at: "Set" $$ even when the action is "cut" with
8172 YYERROR or other.
8173 * tests/actions.at (Exotic Dollars): Instead of using unused
8174 values, check that the warning is issued.
8175
721be13c
PE
81762005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8177
8178 * NEWS: Improve wording for unused-value warnings.
8179
a0af42fc
AD
81802005-12-22 Akim Demaille <akim@epita.fr>
8181
8182 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8183 (b4_yysymprint_generate): Rename as...
8184 (b4_yy_symbol_print_generate): this.
8185 Generate yy_symbol_print instead of yysymprint.
8186 Generate also yy_symbol_value_print, and use it.
8187
affac613
AD
81882005-12-22 Akim Demaille <akim@epita.fr>
8189
721be13c 8190 * NEWS: Warn about unused values.
affac613
AD
8191 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8192 a `used' member.
8193 (symbol_list_n_get, symbol_list_n_used_set): New.
8194 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8195 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8196 * src/reader.c (grammar_current_rule_check): Check that values are
8197 used.
8198 * src/symtab.c (symbol_print): Accept 0.
8199 * tests/existing.at: Remove the type information.
8200 Empty the actions.
8201 Remove useless actions (beware of mid-rule actions: perl -000
8202 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8203 * tests/actions.at (Exotic Dollars): Use unused values.
8204 * tests/calc.at: Likewise.
8205 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8206 Likewise.
8207
8208 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8209 rule_useful_p.
8210
9d9b8b70
PE
82112005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8212
8bb4c753
PE
8213 Undo 2005-12-01 tentative license wording change. The wording is
8214 still being reviewed by the lawyers, and we don't want to wait for
8215 them before publishing a test release. For now, revert to the
8216 previous wording.
8217 * NEWS: Undo 2005-12-01 change.
8218 * data/glr.c: Revert to previous license wording.
8219 * data/glr.cc: Likewise.
8220 * data/lalr1.cc: Likewise.
8221 * data/location.cc: Likewise.
8222 * data/yacc.c: Likewise.
8223
9d9b8b70
PE
8224 * NEWS: Reword %destructor vs YYABORT etc.
8225 * data/glr.c: Use American spacing, for consistency.
8226 * data/glr.cc: Likewise.
8227 * data/lalr1.cc: Likewise.
8228 * data/yacc.c: Likewise.
8229 * data/yacc.c: Reformat comments slightly.
8230 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8231 for consistency. Fix some spelling errors and reword recently-included
8232 text slightly.
8233 * tests/cxx-type.at: Cast results of malloc, for C++.
8234
2c3b392a
AD
82352005-12-21 Joel E. Denny <address@hidden>
8236
8237 * tests/cxx-type.at: Construct a tree, count the parents of shared
8238 nodes, and free each node once and only once. Previously, the memory
8239 for semantic values was leaked instead.
8240
d6cff4dc
AD
82412005-12-21 Joel E. Denny <address@hidden>
8242
8243 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8244 (yylval, yylloc): If pure, #define to yystackp->yyval and
8245 yystackp->yyloc similar to yychar and yynerrs.
8246 (yyparse): If pure, remove local yylval and yylloc. Add local
8247 yystackp to accommodate pure definitions of yylval and yylloc.
8248 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8249 yylvalp and yyllocp to &yylval and &yylloc.
8250 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8251 namespace. Previously, nerrs and char were missing, but lval and lloc
8252 weren't necessary.
8253 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8254 yylvalp and yyllocp parameters since, if pure, these are now always
8255 accessible through yystackp. If not pure, they are still accessible
8256 globally.
8257 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8258 `if (YYID (N))' to pacify lint.
8259
a85284cf
AD
82602005-12-21 Akim Demaille <akim@epita.fr>
8261
8262 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8263 destroy the RHS symbols of a rule.
8264 * data/yacc.c (yylen): Initialize to 0.
8265 Keep its value to the number of items to possibly shift.
8266 In particular, a regular successful parse that ends on YYFINAL by
8267 a (internal) YYACCEPT must not have yylen != 0.
8268 (yyerrorlab, yyreturn): Pop the RHS.
8269 Reorder a bit to emphasize the `shifting' bits of code.
8270 (YYPOPSTACK): Now accept a number of items to pop.
8271 * data/lalr1.cc: Likewise.
8272 * data/glr.c: Formatting changes.
8273 Use goto instead of fall through.
8274 * doc/bison.texinfo (Destructor Decl): Complete.
8275
d508c281
JMG
82762005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8277
8278 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8279 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8280 * djgpp/config.bat: Replace every occurence of the file name
8281 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8282 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8283 * djgpp/config.sed: Replace every occurence of the file name
8284 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8285 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8286 * djgpp/djunpack.bat: DJGPP specific file.
8287 * djgpp/fnchange.lst: DJGPP specific file.
8288 * djgpp/README.in: Add new information about how to unpack the bison
8289 source on MSDOS and other systems which have 8.3 file name restrictions
8290 using djunpack.bat and fnchange.lst.
8291
3e7a2cd9
PE
82922005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8293
8294 * bootstrap (build_cvs_prefix): Remove; unused.
8295 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8296 when getting gnulib.
8297
82982005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8299
8300 * data/glr.c: Reorder typedef declarations for structs to match order
8301 of struct declarations.
8302 Rename yystack everywhere to yystackp except in yyparse where it's not
8303 a pointer.
8304 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8305 consistency.
8306 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8307 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8308 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8309 lint.
8310
877519f8
PE
83112005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8312
0eca5a39
PE
8313 * tests/sets.at (Accept): Fix typos in regular expression used to
8314 sed out the final state number.
8315
2cec9080
PE
8316 Work around portability problem on Solaris 10: flex-generated
8317 files include <stdio.h> before <config.h>, which messes up
8318 because the latter defines __EXTENSIONS__. Address the problem
8319 by creating two new little files that include <config.h> first,
8320 then include the flex-generated files. Rewrite everyone else
8321 to include <config.h> first, as well.
8322 * lib/timevar.c: Always include "config.h".
8323 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8324 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8325 (EXTRA_bison_SOURCES): New macro.
8326 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8327 * src/system.h: Don't include config.h.
8328 * src/LR0.c: Include <config.h> first.
8329 * src/assoc.c: Likewise.
8330 * src/closure.c: Likewise.
8331 * src/complain.c: Likewise.
8332 * src/conflicts.c: Likewise.
8333 * src/derives.c: Likewise.
8334 * src/files.c: Likewise.
8335 * src/getargs.c: Likewise.
8336 * src/gram.c: Likewise.
8337 * src/lalr.c: Likewise.
8338 * src/location.c: Likewise.
8339 * src/main.c: Likewise.
8340 * src/muscle_tab.c: Likewise.
8341 * src/nullable.c: Likewise.
8342 * src/output.c: Likewise.
8343 * src/parse-gram.y: Likewise.
8344 * src/print.c: Likewise.
8345 * src/print_graph.c: Likewise.
8346 * src/reader.c: Likewise.
8347 * src/reduce.c: Likewise.
8348 * src/relation.c: Likewise.
8349 * src/state.c: Likewise.
8350 * src/symlist.c: Likewise.
8351 * src/symtab.c: Likewise.
8352 * src/tables.c: Likewise.
8353 * src/uniqstr.c: Likewise.
8354 * src/vcg.c: Likewise.
8355
877519f8
PE
8356 * src/parse-gram.y: Fix minor problems uncovered by lint.
8357 (current_lhs, current_lhs_location): Now static.
8358 (current_assoc): Remove unused variable.
8359
8360 Cleanups so that Bison-generated parsers have less lint.
8361 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8362 Prepend /*ARGSUSED*/, for lint's sake.
8363 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8364 definition if 'lint' is defined.
8365 (YYID): New macro (or function, if lint).
8366 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8367 * data/yacc.c: Likewise.
8368 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8369 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8370 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8371 is C++ only.
8372 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8373 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8374 Use YYID(0) rather than 0, for lint.
8375 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8376 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8377
f5228370
PE
83782005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8379
8380 * tests/glr-regression.at
8381 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8382 Close memory leak reported by twlevo.
8383
69ce078b
PE
83842005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8385
6ff99711
PE
8386 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8387 all stacks.
8388 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
8389 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8390 New test case.
8391 (Duplicated user destructor for lookahead): This test now is expected
8392 to succeed.
8393
af3412cd
PE
83942005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8395
32b5b719 8396 * NEWS: Document the following change.
af3412cd
PE
8397 * data/yacc.c: Say "parser skeleton" rather than "file", since
8398 it's no longer just a file.
8399 * data/glr.c: Grant a special exception for C GLR parsers, that
8400 reads like the already-existing exception for C LALR(1) parsers.
8401 * data/glr.cc: Likewise.
8402 * data/lalr1.cc: Likewise.
8403 * data/location.cc: Likewise.
8404 * data/yacc.c: Reword the "written by" statement to clarify that
8405 it was the parser skeleton, not the entire output file.
8406 * data/glr.c: Written by Paul Hilfinger.
8407 * data/glr.cc: Written by Akim Demaille.
8408 * data/lalr1.cc: Likewise.
8409
035aa4a0
PE
84102005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8411
d9963c85
PE
8412 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8413 Fix typos in previous change that broke 'make check'.
8414 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8415 supported in C.
8416 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8417 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8418 We can revert this once things settle down.
8419
035aa4a0
PE
8420 * src/conflicts.c (conflicts_print): Don't print file name twice
8421 when %expect fails because there were no conflicts.
8422 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8423 change.
8424 * tests/conflicts.at (%expect not enough, %expect too much):
8425 (%expect with reduce conflicts): Adjust to new behavior.
8426
84272005-11-18 Akim Demaille <akim@epita.fr>
8428
8429 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8430 errors.
8431 * NEWS: Document this.
8432 * doc/bison.texinfo (Expect Decl): Likewise.
8433
d1ff7a7c
AD
84342005-11-16 Akim Demaille <akim@epita.fr>
8435
8436 Generalize the display of semantic values and locations in traces.
8437 * data/glr.c (yy_reduce_print): Fix indices (again).
8438 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8439 literal integers.
8440 * data/lalr1.cc (yyreduce_print): Rename as...
8441 (yy_reduce_print): this.
8442 Display values and locations.
8443 * data/yacc.c (yy_reduce_print): Likewise.
8444 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8445 (yysymprint): Move higher to be visible from yy_reduce_print).
8446 (yyparse): Adjust.
8447 * tests/calc.at: Adjust the expected length of the traces.
8448
6de5398d
AD
84492005-11-14 Akim Demaille <akim@epita.fr>
8450
8451 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8452 from 1 to N, while values and location start at 0.
8453 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8454
a1373f55
AD
84552005-11-14 Akim Demaille <akim@epita.fr>
8456
8457 * data/glr.c (yy_reduce_print): Fix the $ number.
8458
613d8952
AD
84592005-11-14 Akim Demaille <akim@epita.fr>
8460
8461 "Use" parse parameters.
8462 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8463 * data/glr.c, data/glr.cc: Use them.
8464 * data/glr.c (YYUSE): Have a C++ definition that supports
8465 non-pointer types.
8466
b2741627
AD
84672005-11-14 Akim Demaille <akim@epita.fr>
8468
8469 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8470
5059b5c8
AD
84712005-11-14 Akim Demaille <akim@epita.fr>
8472
42249483
AD
8473 * data/glr.cc: New.
8474 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 8475
4626a15d
AD
84762005-11-12 Akim Demaille <akim@epita.fr>
8477
8478 Let position and location be PODs.
8479 * data/location.cc (position::initialize, location::initialize): New.
8480 (position::position, location::location): Define only if
8481 b4_location_constructors is defined.
8482 * data/lalr1.cc (b4_location_constructors): Define it for backward
8483 compatibility.
8484 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8485
84862005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
8487
8488 * data/lalr1.cc: Move the body of the ctor and dtor into the
8489 parser file (instead of the header).
8490 Wrap the implementations in a "namespace yy".
8491
84922005-11-12 Akim Demaille <akim@epita.fr>
8493
8494 Have glr.c include its header file when created.
8495 * data/glr.c (b4_shared_declarations): New.
8496 Output them verbatim in the parser if !%defines, otherwise
8497 output then in the header file, and include it instead.
8498
1989d947
AD
84992005-11-11 Akim Demaille <akim@epita.fr>
8500
8501 * data/glr.c: Comment changes.
8502
85032005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
8504
8505 When yydebug, report semantic and location values for reductions.
8506 * data/glr.c (yy_reduce_print): Report the semantic values and the
8507 locations.
8508 (YY_REDUCE_PRINT): Adjust.
8509 (yyglrReduce): Use them.
8510 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8511 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8512 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8513 traces.
8514
02998094
AD
85152005-11-10 Akim Demaille <akim@epita.fr>
8516
8517 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8518 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8519 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8520
5210672f
PE
85212005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8522
8523 * m4/cxx.m4, examples/Makefile.am: Don't build
8524 examples/calc++ if no C++ compiler is available. (trivial change)
8525
a8991a1d
AD
85262005-11-09 Akim Demaille <akim@epita.fr>
8527
8528 * src/scan-skel.l: Use a couple of asserts.
8529
36b5e963
AD
85302005-11-03 Akim Demaille <akim@epita.fr>
8531
8532 In some (weird) cases, the final state number is incorrect.
8533 Reported by Alexandre Duret-Lutz.
8534 * src/LR0.c (state_list_append): Remove the computation of
8535 final_state.
8536 (save_reductions): Do it here.
8537 (get_state): Alpha conversion.
8538 (generate_states): Use a for loop.
8539 * src/gram.h (item_number_is_rule_number)
8540 (item_number_is_symbol_number): New.
8541 * src/state.c: Use assert.
8542 * src/system.h: Include assert.h.
8543 * tests/sets.at (Accept): New.
8544
44e7ead1
PH
85452005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8546
8547 * data/glr.c (yyfill): Adjust comment.
36b5e963 8548 (yyresolveAction): Initialize default location properly
44e7ead1
PH
8549 for empty right-hand sides.
8550 (yydoAction): Ditto.
8551 Add comment explaining apparently dead code.
36b5e963
AD
8552 * tests/glr-regression.at
8553 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 8554 New test.
36b5e963 8555
e10a80ee
PE
85562005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8557
8558 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8559 gnulib when interrupted. This fixes some race conditions and
8560 works around some portability problems (one noted by Paul
8561 Hilfinger).
8562
067b32ee
AD
85632005-10-22 Akim <akim@epita.fr>
8564
8565 * Makefile.cfg: Adjust to config -> build-aux.
8566 Reported by twledo.
8567
4b367315
AD
85682005-10-21 Akim Demaille <akim@epita.fr>
8569
8570 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8571 the %parse-params.
8572 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8573 * data/yacc.c (b4_Pure_if): Rename as...
8574 (b4_yacc_pure_if): this.
8575 (YY_SYMBOL_PRINT, yyparse): Adjust.
8576 * doc/bison.texinfo: Formatting changes.
8577
24cc23d9
AD
85782005-10-21 Akim Demaille <akim@epita.fr>
8579
8580 Finish the transition config -> build-aux.
8581 * configure.ac, Makefile.am: Use build-aux.
8582 * config/prev-version, config/announce-gen, config/Makefile.am:
8583 Move to...
8584 * build-aux/prev-version, build-aux/announce-gen,
8585 * build-aux/Makefile.am: here.
8586
d4476375
AD
85872005-10-14 Akim Demaille <akim@epita.fr>
8588
8589 * examples/calc++/test: Use set -x only when VERBOSE.
8590
302c0aee
PE
85912005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8592
8593 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8594 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8595
7625ec2c
AD
85962005-10-13 Akim Demaille <akim@epita.fr>
8597
8598 * src/scan-skel.l: Output the base name parts of the parser and
8599 header file names.
302c0aee 8600 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
8601 additional checks.
8602 Use this to exercise C++ outputs in subdirs.
8603 Reported by Oleg Smolsky.
8604
ba0fe3c7
PE
86052005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8606
8607 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8608 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8609 Problem reported by John P. Hartmann.
8610 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8611 already defined it.
8612
9b8a5ce0
AD
86132005-10-12 Akim Demaille <akim@epita.fr>
8614
8615 * src/parse-gram.y (version_check): Exit 63 to please missing
8616 (stands for "version mismatch).
8617 * tests/input.at, doc/bison.texinfo: Adjust.
8618
4f6e011e
PE
86192005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8620
8621 Work around portability problems with Visual Age C compiler
8622 (xlc and xlC_r) reported by John P. Hartmann.
8623 * data/location.cc (initial_column, initial_line): Remove.
8624 All uses replaced by 0 and 1.
8625 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8626 that xlc complains about.
8627 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 8628 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 8629 as __STDC__.
4d7aa45e
PE
8630 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8631 __STDC_VERSION__. Use it everywhere instead of looking at
8632 __STDC__ and __cplusplus.
4f6e011e 8633
a1b3bf8c
AD
86342005-10-10 Akim Demaille <akim@epita.fr>
8635
8636 * examples/calc++/test: Be quiet unless VERBOSE.
8637
412e44aa
PE
86382005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8639
2a4647a3
PE
8640 * data/c.m4 (yydestruct, yysymprint):
8641 Use YYUSE instead of casting to void.
8642 * data/glr.c (YYUSE): New macro.
8643 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8644 Use it instead of rolling our own.
8645 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8646 (YYCHK1):
8647 Use /*CONSTCOND*/ to suppress lint warnings.
8648 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8649 (YY_STACK_PRINT): Use 'false' not '0'.
8650 (YYUSE): New macro.
8651 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8652 * data/yacc.c (YYUSE): New macro.
8653 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8654 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8655 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8656
8657
412e44aa
PE
8658 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8659 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8660
88c6637f
PE
86612005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8662
2f4f028d
PE
8663 Undo the parts of the unlocked-I/O change that substituted
8664 putc or puts for printf. This might hurt performance a bit,
8665 but some people prefer the printf style.
8666 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8667 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8668 All uses replaced by YYFPRINTF and YYDPRINTF.
8669 * data/yacc.c: Likewise.
8670 * lib/bitset.c (bitset_print): Likewise.
8671 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8672 putc and puts.
8673 * lib/lbitset.c (debug_lbitset): Likewise.
8674 * src/closure.c (print_firsts, print_fderives): Likewise.
8675 * src/gram.c (grammar_dump): Likewise.
8676 * src/lalr.c (look_ahead_tokens_print): Likewise.
8677 * src/output.c (escaped_output): Likewise.
8678 (user_actions_output): Break apart two printfs.
8679 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8680 * src/reduce.c (reduce_print): Likewise.
8681 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8682 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8683
88c6637f
PE
8684 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8685 Use assignments rather than casts-to-void to suppress
8686 unused-variable warnings. This pacifies 'lint'.
8687 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8688 unused-variable warnings.
8689
fb32e373
JMG
86902005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8691
8692 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8693
edb8f44f
PE
86942005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8695
fb9c0b33
PE
8696 Use unlocked I/O for a minor performance improvement on hosts like
8697 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8698 is to use the gnlib unlocked-io module, and to prefer putc and
8699 puts to printf when either will work (since the latter doesn't
8700 come in an unlocked flavor).
8701 * bootstrap (gnulib_modules): Add unlocked-io.
8702 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8703 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8704 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8705 and similarly for puts and putc and printf.
8706 * data/yacc.c: Likewise.
8707 * lib/bitset.c (bitset_print): Likewise.
8708 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8709 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8710 to printf.
8711 * lib/lbitset.c (debug_lbitset): Likewise.
8712 * src/closure.c (print_firsts, print_fderives): Likewise.
8713 * src/gram.c (grammar_dump): Likewise.
8714 * src/lalr.c (look_ahead_tokens_print): Likewise.
8715 * src/output.c (escaped_output): Likewise.
8716 (user_actions_output): Coalesce two printfs.
2f4f028d 8717 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
8718 * src/reduce.c (reduce_print): Likewise.
8719 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 8720 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 8721
edb8f44f
PE
8722 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8723 this confuses xgettext.
8724
b50d2359
AD
87252005-10-02 Akim Demaille <akim@epita.fr>
8726
8727 * bootstrap (gnulib_modules): Add strverscmp.
8728 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8729 * m4/.cvsignore: Add strverscmp.m4.
8730 * src/parse-gram.y (%require): New token, new rule.
8731 (version_check): New.
8732 * src/scan-gram.l (%require): Adjust.
8733 * tests/input.at (AT_REQUIRE): New.
8734 Use it.
8735 * doc/bison.texinfo (Require Decl): New.
8736 (Calc++ Parser): Use %require.
8737
21667f64
AD
87382005-10-02 Akim Demaille <akim@epita.fr>
8739
8740 * data/location.cc: New.
8741
2b81e969
AD
87422005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8743 Akim Demaille <akim@epita.fr>
8744
8745 Make sure -odir/foo.cc creates dir/location.hh etc.
8746 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8747 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8748 (spec_defines_file): Now const.
8749 (dir_prefix): New.
8750 (short_base_name): Remove.
8751 * src/files.c: Adjust.
8752 (dirname.h): Include.
8753 (base_name): Don't prototype it.
8754 (finput): Remove, duplicates gram_in.
8755 (full_base_name, short_base_name): Replace by...
8756 (all_but_ext, all_but_tab_ext): these.
8757 (compute_base_names): Rename as...
8758 (compute_file_name_parts): this.
8759 Update to compute the new variables, including dir_prefix.
8760 Adjust dependencies.
8761 * src/output.c (prepare): Output them.
8762 * src/reader.c: Adjust to use gram_in, not finput.
8763 * src/scan-skel.l (@dir_prefix@): New.
8764
ad6a9b97
JMG
87652005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8766
8767 * lib/subpipe.c: New function end_of_output_subpipe() added
8768 to allow support for non-posix systems. This is a no-op function
8769 for posix systems.
8770
8771 * lib/subpipe.h: New function end_of_output_subpipe() added
8772 to allow support for non-posix systems. This is a no-op function
8773 for posix systems.
8774
8775 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8776 handle the lack of pipe/fork functionality on non-posix systems.
8777
8778 * djgpp/Makefile.maint: DJGPP specific file.
8779
8780 * djgpp/README.in: DJGPP specific file.
8781
8782 * djgpp/config.bat: DJGPP specific configuration file.
8783
8784 * djgpp/config.sed: DJGPP specific configuration file.
8785
8786 * djgpp/config.site: DJGPP specific configuration file.
8787
8788 * djgpp/config_h.sed: DJGPP specific configuration file.
8789
8790 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8791
8792 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8793
fc695704
AD
87942005-10-02 Akim Demaille <akim@epita.fr>
8795
8796 * data/location.cc: New, extract from...
8797 * data/lalr1.cc: here.
8798 (location.hh): Include it after the user prologue, in case the
8799 filename type is defined by the user.
8800 Forward declation location and position before the pre-prologue.
8801 (yyresult_): Rename as...
8802 (yyresult): this, it's a local variable, not an attribute.
8803 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8804
88052005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
8806
8807 * examples/extexi: Restore the #line generation.
8808
fb9712a9
AD
88092005-09-30 Akim Demaille <akim@epita.fr>,
8810 Alexandre Duret-Lutz <adl@gnu.org>
8811
8812 Move the token type and YYSTYPE in the parser class.
8813 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8814 (parser::token): New, from the moved free definition of tokens.
8815 (parser::semantic_value): Now a full definition instead of an
8816 indirection to YYSTYPE.
8817 (b4_post_prologue): No longer included in the header file, but
8818 in the implementation file.
8819 * doc/bison.texi (C+ Language Interface): Update.
8820 * src/parse-gram.y: Support unary %define.
8821 * tests/actions.at: Define global_tokens_and_yystype for backward
8822 compatibility until we update the tests.
8823 * tests/calc.at: Idem.
8824 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8825 to simplify the code.
8826
55f0c7b1
PE
88272005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8828
8829 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8830 Ah, the good old days! Problem reported by Peter Klein.
8831 * bootstrap (gnulib_modules): Add strerror, strtoul.
8832 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8833 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8834
fb9712a9 88352005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
8836
8837 * data/c.m4 (b4_error_verbose_if): New.
8838 * data/lalr1.cc: Use it.
8839 (YYERROR_VERBOSE_IF): Remove.
8840 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8841 parser members, replaced by...
8842 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8843 local variables.
8844 (yysyntax_error_): Takes the state number as argument.
8845 (yyreduce_print_): Use the argument yyrule, not the former
8846 attribute yyn_.
8847
8a6f72f3
PE
88482005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8849
8850 * bootstrap (gnulib_modules): Add verify.
8851 * lib/.cvsignore: Add verify.h.
8852 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8853 * src/system.h (verify): Remove.
8854 Include verify.h instead.
8855 * src/tables.c (tables_generate): Use new API for 'verify'.
8856
0d50976f
PE
88572005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8858
ebc3737e
PE
8859 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8860 local variables whose names begin with 'yy'.
8861 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8862 Trivial changes from Joel E. Denny.
8863
0d50976f
PE
8864 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8865 it itself.
8866 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8867 don't use alloca any more.
8868
8869 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8870 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 8871 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
8872 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8873 to match yacc.c, to test more hosts.
8874
a05b79df
PE
88752005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8876
55289366
PE
8877 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8878 doesn't affect behavior.
8879 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8880 Solaris, AIX, MSC.
8881 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8882 This works a bit better with glibc, if user code has already included
8883 stdlib.h.
8884 * doc/bison.texinfo (Bison Parser): Document that users can't
8885 arbitrarily use malloc and free for other purposes. Document
8886 that <alloca.h> and <malloc.h> might be included.
8887 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8888 user must declare alloca.
8889
a05b79df
PE
8890 * HACKING (release): Forwarn the Translation Project about
8891 stable releses.
8892
3ab2ca22
AD
88932005-09-20 Akim Demaille <akim@epita.fr>
8894
8895 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8896
a9739e7c
PE
88972005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8898
a702593e
PE
8899 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8900 (YYSTACK_ALLOC_MAXIMUM): Use it.
8901 (yysyntax_error): New function.
8902 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8903 multiple syntax errors are reported, and alloca is being used.
8904 Instead, reallocate buffers twice as big each time, so that
8905 we waste at most half the allocated memory. Start with a small
8906 (128-byte) buffer that will suffice in most cases anyway.
8907 Use yysyntax_error to do most of the work.
8908
8909 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8910 yynerrs is the number of errors reported, not the number of
8911 errors encountered.
8912
a9739e7c
PE
8913 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8914 Mark it as expected to fail.
8915 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8916 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8917 Don't start user-code symbols with "yy", to avoid name space problems.
8918
f479c6c6
AD
89192005-09-19 Akim Demaille <akim@epita.fr>
8920
8921 Remove the traits, failed experiment.
8922 It never proved useful, and anyway because of the current
8923 definition, it was not possible to have several specialization of
8924 this traits, making it useless.
8925 * data/lalr1.cc (yy:traits): Remove.
8926 Inline its definitions in the parser class.
8927
e2586f82
AD
89282005-09-19 Akim Demaille <akim@epita.fr>
8929
8930 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8931 least Mac OSX with a /usr/local install of gettext.
8932
2e8cf949
AD
89332005-09-19 Akim Demaille <akim@epita.fr>
8934
8935 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8936 and yytoken for similarity with the other skeletons.
8937
c7fb0b90
AD
89382005-09-19 Akim Demaille <akim@epita.fr>
8939
4e26c69e 8940 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 8941
1bd0deda
PE
89422005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8943
8944 * NEWS: Version 2.1.
8945
8946 * NEWS: Remove notice of yytname change, since it was never in an
8947 official release.
8948 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8949 diagnostic.
8950 * src/output.c (prepare): Likewise.
8951 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8952 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8953 is not defined. This is an awful hack, but it's enough for now.
8954 All callers changed.
8955 * tests/glr-regression-at (make_value): Args are const pointers now,
8956 to avoid GCC warning.
8957 (Duplicated user destructor for lookahead): New test. Currently
8958 skipped. It fails on my host but I'm not sure it'll always fail.
8959
89602005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
8961
8962 * src/symtab.h (struct symbol): Declare the printer and destructor
8963 as const, to avoid accidental calls to free.
8964 (symbol_destructor_set, symbol_printer_set): Adjust.
8965 * src/symtab.c: Adjust.
8966
1bd0deda 89672005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
8968
8969 * data/c.m4 (b4_token_enums): New.
8970 (b4_token_defines): Rename as...
8971 (b4_token_enums_defines): this.
8972 (b4_token_defines): New, output only the #defines.
8973 * data/yacc.c, data/glr.c: Adjust.
8974 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8975 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8976 as default values.
8977
dbcdae2d
AD
89782005-09-16 Akim Demaille <akim@epita.fr>
8979
8980 * data/lalr1.cc (yylex_): Remove, inline its code.
8981 (yyreport_syntax_error_): Remove, replaced by...
8982 (yysyntax_error_): this which returns a string and leaves to the
8983 caller the call to the users' error function.
8984 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8985 Move from members of the parser object...
8986 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8987 to local variables of the parse function.
8988
70d8f291
AD
89892005-09-16 Akim Demaille <akim@epita.fr>
8990
8991 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8992 since it's in Bison's name space.
8993
b47dbebe
PE
89942005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8995
ae199bf1
PE
8996 * data/glr.c (yyresolveValue): Add default case to pacify
8997 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8998
b47dbebe
PE
8999 * NEWS: Document when yyparse started to return 2.
9000 * doc/bison.texinfo (Parser Function): Document when yyparse
9001 returns 2.
9002
9003 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
9004 (b4_filename_type): Renamed back from b4_file_name_type. All uses
9005 changed.
9006 (class position): file_name -> filename (reverting). All uses changed.
9007
90082005-09-14 Paul Eggert <eggert@cs.ucla.edu>
9009
9010 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
9011 do anything if $@ exists. This reverts part of the 2005-07-07
9012 patch.
9013
00292f66
PE
90142005-09-11 Paul Eggert <eggert@cs.ucla.edu>
9015
9016 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
9017 contains obsolete information and isn't worth distributing as a
9018 separate file anyway.
9019 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
9020 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
9021 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
9022 (yyparse): Abort if user code uses longjmp to throw an unexpected
9023 value.
9024
a420f962
PE
90252005-09-09 Paul Eggert <eggert@cs.ucla.edu>
9026
00292f66
PE
9027 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
9028 Suggested by twlevo@xs4all.nl.
9029
127287e9
PE
9030 * data/glr.c (YYCHK1): Do not assume YYE is in range.
9031 This avoids a diagnostic from gcc -Wswitch-enum.
9032 Problem reported by twlevo@xs4all.nl.
9033
a420f962
PE
9034 * doc/bison.texinfo: Don't use "filename", as per GNU coding
9035 standards. Use "file name" or "file" or "name", depending on
9036 the context.
9037 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
9038 not to hack/foo.tab.c.
9039 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
9040 * data/glr.c: b4_filename -> b4_file_name.
9041 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
9042 All uses changed.
9043 (class position): filename -> file_name. All uses changed.
9044 * data/yacc.c: b4_filename -> b4_file_name.
9045 * lib/bitset.h: filename -> file_name in local vars.
9046 * lib/bitset_stats.c: Likewise.
9047 * src/files.c: Likewise.
9048 * src/scan-skel.l ("@output ".*\n): Likewise.
9049 * src/files.c (file_name_split): Renamed from filename_split.
9050 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
9051
90522005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9053
9054 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9055 to accommodate latest gnulib.
9056
9057 * tests/glr-regression.at (Duplicate representation of merged trees):
9058 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9059
9060 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9061 needed.
9062
42a6501d
PE
90632005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9064
9065 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9066 All uses changed. Invoke user destructor after an error during a
9067 split parse (trivial change from Joel E. Denny).
9068
9069 * tests/glr-regression.at
9070 (User destructor after an error during a split parse): New test case.
9071 Problem reported by Joel E. Denny in:
9072 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9073
ef9a1faf
PE
90742005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9075
5b4aaf78
PE
9076 * README-cvs: Give URLs for recommended tools.
9077 Mention Gzip version problem, and bootstrapping issues.
9078 Remove troubleshooting section, as it's somewhat obsolete.
9079
b5240ba5
PE
9080 * bootstrap (no_cache): New var, to accommodate different wget
9081 variants. Use it instead of '-C off'. Problem reported by
9082 twlevo@xs4all.nl.
9083
ef9a1faf
PE
9084 * data/glr.c (yydestroyStackItem): New function.
9085 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9086 debugging information. Problem reported by Joel E. Denny.
9087
e6efa9da
AD
90882005-08-25 Akim Demaille <akim@epita.fr>
9089
9090 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9091
adc90f13
PE
90922005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9093
9094 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9095 Don't invoke destructor on unresolved entries.
9096 * tests/glr-regression.at
9097 (User destructor for unresolved GLR semantic value): New test case.
9098 Problem reported by Joel E. Denny in:
9099 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9100
f9315de5
PE
91012005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9102
15d29c1f
PE
9103 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9104 Add strnlen.c.
9105 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9106 lib-prefix.m4, po.m4.
9107
dd5f2af2
PE
9108 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9109 in yydestruct diagnostic, since it might not be an error.
9110 Problem reported by Joel Denny near end of
9111 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 9112 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
9113 * data/yacc.c (yyreturn): Likewise.
9114 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9115
9116 * src/files.c: Remove obsolete FIXME comment.
9117
9118 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9119 with the other templates, and to fix bogus run-on messages such
9120 as the one reported at the end of
9121 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9122 All callers changed to avoid the newline.
9123 (yyprocessOneStack): Output two lines rather than one, to accommodate
9124 the above change. This changes the debug output format slightly.
9125
f9315de5
PE
9126 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9127 reported by Joel E. Denny in
9128 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9129 (trivial change).
9130 * tests/glr-regression.at (Duplicate representation of merged trees):
9131 New test, from Joel E. Denny in:
9132 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9133 * THANKS: Add Joel E. Denny.
9134
9135 * configure.ac (AC_INIT): Bump to 2.0c.
9136
04098407
PE
91372005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9138
9139 * NEWS: Version 2.0b.
9140
ca5d2013
PE
9141 * Makefile.am (SUBDIRS): Put examples before tests, so that
9142 "make check" doesn't finish with "All 1 tests passed".
9143
3d54b576
PE
9144 * tests/regression.at (Token definitions): Don't rely on
9145 AT_PARSER_CHECK for data that contains backslashes. It currently
9146 uses 'echo', and 'echo' isn't portable if its argument contains
9147 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9148 that the byte '\0xff' is not printable in the C locale; it is,
9149 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9150 not printable, so use '\0x81' to test.
9151
d53ae497
PE
9152 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9153 version of GCC, since the macro is used with non-GCC compilers.
9154
fc01665e
PE
9155 Fix core dump reported by Pablo De Napoli in
9156 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9157 * tests/regression.at (Invalid inputs with {}): New test.
9158 * src/parse-gram.y (token_name): Translate type before using
9159 it as an index.
9160
04098407
PE
9161 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9162 the user's name space. All uses changed to __attribute__
9163 ((__unused__)).
9164 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9165 Add __attribute__ ((__noreturn__)).
9166
9167 * etc/clcommit: Remove. We weren't using it, and it failed
9168 "make maintainer-distcheck".
9169 * Makefile.maint: Merge from coreutils.
9170 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9171 (syntax-check-rules): Change list of rules as described below.
9172 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9173 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9174 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9175 (sc_trailing_space): New rules.
9176 (sc_xalloc_h_in_src): Remove.
9177 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9178 (sc_space_tab, sc_error_exit_success, sc_changelog):
9179 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9180 (makefile-check, po-check, author_mark_check):
9181 (makefile_path_separator_check, copyright-check):
9182 Use grep -n, to make it easier to find violations.
9183 Use CVS_LIST and CVS_LIST_EXCEPT.
9184 (header_regexp, h_re): Remove.
9185 (dd_c): New macro.
9186 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9187 (my-distcheck): Use more-modern GCC flags.
9188 (signatures, %.asc): Remove.
9189 (rel-files, announcement): Remove signatures.
9190 Restore old updating code, even though we don't use it, so
9191 that we're the same as coreutils.
9192 (alpha, beta, major): Depend on news-date-check.
9193 Make the upload commands.
9194
9195 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9196 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9197 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9198 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9199 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9200 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9201 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9202 * tests/sets.at: Likewise.
9203
9204 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9205 we comment out the Autoconf version number.
9206 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9207 it's error-prone and "make maintainer-distcheck" rejects it.
9208
9209 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9210 Indent calls to "error" to pacify "make maintainer-distcheck",
9211 when the calls are not intended to be translated.
9212 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9213
9214 * src/Makefile.am (DEFS): Use +=, to pacify
9215 "make maintainer-distcheck".
9216 (bison_SOURCES): Add scan-skel.h.
9217 (sc_tight_scope): New rule, from coreutils.
9218
9219 * src/files.c (src_extension, header_extension):
9220 Now static, not extern.
9221 * src/getargs.c (short_options): Likewise.
9222 * src/muscle_tab.c (muscle_table): Likewise.
9223 * src/parse-gram.y (current_class, current_type, current_prec):
9224 Likewise.
9225 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9226 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9227 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9228 void, to avoid warning when NLS is disabled.
9229 * src/output.c: Include scan-skel.h.
9230 (scan_skel): Remove decl, since scan-skel.h does this.
9231 (output_skeleton):
9232 Indent calls to "error" to pacify "make maintainer-distcheck".
9233 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9234 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9235 "make maintainer-distcheck".
9236 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9237 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9238 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9239 (skel_lex_destroy, scan_skel): Move these decls to...
9240 * src/scan-skel.h: New file.
9241 * src/uniqstr.c (uniqstr_assert):
9242 Indent calls to "error" to pacify "make maintainer-distcheck".
9243
9244 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9245 not @VAR@.
9246
9247 * tests/torture.at: Revamp to avoid misuse of atoi that
9248 "make maintainer-distcheck" complained about.
9249
9250 * examples/extexi (message): Don't print a message more than once,
9251 and omit line-number decoration that makes Emacs compile think
9252 that informative messages are worth worrying about.
9253
92542005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9255
9256 * configure.ac: Update version number.
9257
9258 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9259 accidentally.
9260 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9261 autogenerated by the maintainer.
9262 * examples/calc++/.cvsignore: Add *.yy.
9263
9264 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9265 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9266 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9267
9268 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9269
9270 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9271 from maintainer-distcheck about casting the argument of 'free'.
9272
9273 * NEWS: Mention recent yytname changes.
9274 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9275
9276 * bootstrap: For translations that have not yet been upgraded to
9277 the new runtime-po domain, prime the pump by extracting the
9278 relevant strings from the obsolete translations. This code can be
9279 removed once the bison-runtime domain has been translated by each
9280 team.
9281
9282 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9283 now that token names are already quoted.
9284
9285 Fix problem reported by Anthony Heading.
9286 * data/glr.c (YYTOKEN_TABLE): New macro.
9287 (yytname): Define if YYTOKEN_TABLE.
9288 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9289 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9290 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9291 * src/output.c (prepare_symbols): Output token_table_flag.
9292
0ffda363
PE
92932005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9294
9295 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9296 again if the first call fails.
9297
9298 * data/glr.c (yytnamerr): New function.
9299 (yyreportSyntaxError): Use it to dequote most string literals.
9300 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9301 with other skeletons. All uses changed.
9302 (yytnameerr_): New function.
9303 (yyreport_syntax_error): Use it to dequote most string literals.
9304 * data/yacc.c (yytnamerr): New function.
9305 (yyerrlab): Use it to decode most string literals.
9306 * doc/bison.texinfo (Decl Summary, Calling Convention):
9307 Clarify quoting convention of yytname.
9308 * src/output.c (prepare_symbols): Quote all names. This undoes
9309 the 2005-04-17 change, which is now accomplished (mostly) via
9310 changes in the parsers as described above.
9311 * tests/regression.at (Token definitions, Web2c Actions):
9312 Undo most 2005-04-17 change here, too.
9313
93142005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9315
9316 Fix more problems reported by twlevo@xs4all.nl.
9317 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9318 remove trailing spaces. This loses the exit status of ./types,
9319 and isn't needed since ./types shouldn't be emitting trailing
9320 spaces.
9321 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9322 as the stack isn't valid in that case.
9323
9324 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9325 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9326 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9327 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9328 is used.
9329 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9330 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9331 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9332 Likewise.
9333
9334 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9335 overly-picky compilers that reject 'char *foo = "bar";'.
9336
9337 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9338 to FILE * parameter, not to stderr. This fixes a typo introduced
9339 in the 2005-07-12 change.
9340
9341 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9342 warnings from GCC 4.
9343
9344 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9345 (yyglrShiftDefer, yysplitStack):
9346 Remove unused parameters b4_pure_formals. All uses changed.
9347 (yyglrShift): Remove unused parameters b4_user_formals.
9348 All uses changed.
9349 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9350
6100a9aa
PE
93512005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9352
258b75ca
PE
9353 Destructor cleanups and regularization among the three skeletons.
9354 * NEWS: Document the behavior changes.
9355 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9356 stack before failing, as the cleanup code will do it for us now.
9357 * data/lalr1.cc (yyerrlab): Likewise.
9358 * data/glr.c (yyparse): Pop everything off the stack before
9359 freeing it, so that destructors get called properly.
9360 * data/lalr1.cc (yyreturn): Likewise.
9361 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9362 This is more consistent.
9363 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9364 why destructors might be called. 1.875 -> 2.1.
9365 (Destructor Decl, Decl Summary, Table of Symbols):
9366 Some English-language cleanups for %destructor.
9367 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9368 Add output line for destructor of start symbol.
9369 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9370 because of that same extra output line.
9371
1a059451
PE
9372 * NEWS: Document minor wording changes in diagnostics of
9373 Bison-generated parsers.
9374 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9375 Remove unused formals. All uses changed.
9376 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9377 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9378 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9379 Rename yyoverflowab to yyexhaustedlab.
9380 When memory exhaustion occurs during syntax-error reporting,
9381 report it separately rather than in a single diagnostic; this
9382 eases translation.
9383 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9384 (Memory Exhausted): Renamed from Parser Stack Overflow.
9385 Revamp wording slightly to prefer "memory exhaustion".
9386 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9387
97460c78
PE
9388 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9389
30757c8c
PE
9390 Add i18n support to the GLR skeleton. Partially fix the C++
9391 skeleton; a C++ expert needs to finish this. Remove debugging
9392 msgids; there's little point to having them translated, since they
9393 can be understood only by someone who can read the
9394 (English-language) source code.
9395
9396 Generate runtime-po/bison-runtime.pot automatically, so that we
9397 don't have to worry about garbage getting in that file. We'll
9398 make sure after the next official release that old msgids don't
9399 get lost. See
9400 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9401
9402 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9403 Now auto-generated.
9404 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9405 Fix typos in explanations of the runtime file.
9406 * bootstrap: Change gettext keyword from YYI18N to YY_.
9407 Use standard Makefile.in.in in runtime-po, since we'll arrange
9408 for backward-compatible bison-runtime.po files in a different way.
9409 * data/glr.c (YY_): New macro, from yacc.c.
9410 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9411 Translate messages intended for users.
9412 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9413 the wording in the other skeletons. We don't know that the memory
9414 is virtual.
9415 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9416 Use same method that yacc.c uses.
9417 Don't translate debugging messages.
9418 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9419 it doesn't work (yet), and requires C++ expertise to fix.
9420 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9421 Move defn to a more logical place, to be consistent with other
9422 skeletons.
9423 Don't translate debugging messages.
9424 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9425 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9426 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9427 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9428
ac8c5689
PE
9429 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9430 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9431 void, not int.
9432 * tests/glr-regression.at (Badly Collapsed GLR States):
9433 Likewise.
9434 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9435 yylex should return 0 at EOF rather than aborting.
9436
6100a9aa
PE
9437 Improve tests for stack overflow in GLR parser.
9438 Problem reported by twlevo@xs4all.nl.
9439 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9440 All uses removed.
9441 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9442 can handle the problem.
9443 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9444 (yyparse): New local variable yyresult to record the result.
9445 Use result of setjmp to set it, rather than storing itinto
9446 struct.
9447 (yyDone): Remove label.
9448 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9449 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9450 if YYABORT is used).
9451 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9452 yyparse status; put status > 1 into diagnostic.
9453 Check that status==2 works.
9454 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9455 Use exit status 3 for failure to open (which shouldn't happen).
9456
15f40952
PE
94572005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9458
67fd79c4
PE
9459 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9460 1 on syntax error; just let yyparse do its thing.
9461 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9462 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9463 (Exploding the Stack Size with Alloca):
9464 (Exploding the Stack Size with Malloc):
9465 Expect exit status 2, not 1, since the parser is supposed to blow
9466 its stack. Problem reported by twlevo@xs4all.nl.
9467
15f40952
PE
9468 * data/glr.c (yyparse): Don't assume that the initial calls
9469 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9470 Print a stack-overflow message and fail instead.
9471 Initialize the line-number information before creating the stack,
9472 so that the stack-overflow message can report line zero safely.
9473
f32c66b5
PE
94742005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9475
a22ff96f 9476 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
9477 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9478 (yyuserMerge): Provide a default case if b4_mergers is empty.
9479 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9480 * tests/glr-regression.at
9481 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 9482 Add casts to pacify C++ compilers.
1beb0b24
PE
9483 * tests/glr-regression.at (Improper merging of GLR delayed action
9484 sets): Declare yylex before using it.
f32c66b5 9485 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
9486 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9487 test for valgrind; valgrind is independent of g++.
9488 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9489 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9490 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9491 Use a destructor, so that we can expand the stack. Change
9492 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 9493
d741bd1b
PE
94942005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9495
9496 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9497 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9498
0410a6e0
PE
94992005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9500
9501 * PACKAGING: New file, suggested by Bruno Haible and taken from
9502 similar wording in gettext's PACKAGING file.
9503 * NEWS: Mention PACKAGING.
9504 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9505
f7ab6a50
PE
95062005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9507
baf785db 9508 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
9509 * bootstrap: Get runtime translations into runtime-po.
9510 Create runtime-po files automatically, if possible.
9511 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9512 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9513 does not infringe on the user's name space.
9514 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9515 * doc/bison.texinfo (Internationalization): Revamp the English
9516 and Texinfo syntax a bit, to try to make it clearer.
9517 (Bison Options, Option Cross Key): Mention --print-localedir.
9518 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9519 YYENABLE_NLS. Quote a bit more.
9520 * runtime-po/.cvsignore: New file.
9521 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9522 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9523 * runtime-po/quot.sed: Likewise.
9524 * runtime-po/boldquot.sed: Likewise.
9525 * runtime-po/en@quot.header: Likewise.
9526 * runtime-po/en@boldquot.header: Likewise.
9527 * runtime-po/insert-header.sin: Likewise.
9528 * runtime-po/remove-potcdate.sin: Likewise.
9529 * runtime-po/Makevars: Likewise.
9530 * runtime-po/LINGUAS: Likewise.
9531 * runtime-po/de.po: Likewise; we will rely on the translation project
9532 to maintain this, so "bootstrap" should get it.
0410a6e0 9533 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
9534 its value.
9535 * src/main.c (main): Bind the bison-runtime domain, too.
9536
95372005-07-12 Bruno Haible <bruno@clisp.org>
9538
9539 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9540 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9541 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9542 * runtime-po: New directory.
9543 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9544 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9545 * runtime-po/Rules-quot: New file, copied from po/.
9546 * runtime-po/quot.sed: Likewise.
9547 * runtime-po/boldquot.sed: Likewise.
9548 * runtime-po/en@quot.header: Likewise.
9549 * runtime-po/en@boldquot.header: Likewise.
9550 * runtime-po/insert-header.sin: Likewise.
9551 * runtime-po/remove-potcdate.sin: Likewise.
9552 * runtime-po/Makevars: New file.
9553 * runtime-po/POTFILES.in: New file.
9554 * runtime-po/LINGUAS: New file.
9555 * runtime-po/bison-runtime.pot: New file.
9556 * runtime-po/de.po: New file.
9557 * m4/bison.m4: New file.
9558 * Makefile.am (SUBDIRS): Add runtime-po.
9559 (aclocaldir, aclocal_DATA): New variables.
9560 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9561 Define aclocaldir.
9562 * src/getargs.c (usage): Document --print-localedir option.
9563 (PRINT_LOCALEDIR_OPTION): New enum item.
9564 (long_options): Add --print-localedir option.
9565 (getargs): Handle --print-localedir option.
9566 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9567 (Internationalization): New section.
9568
22dda0f0
AD
95692005-07-12 Akim Demaille <akim@epita.fr>
9570
9571 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9572 for consistency with the rest of the code.
9573 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9574 Add separators.
9575
82b248ad
AD
95762005-07-12 Akim Demaille <akim@epita.fr>
9577
9578 * src/parse-gram.y: Use %printer instead of YYPRINT.
9579
fa0e9314
AD
95802005-07-12 Akim Demaille <akim@epita.fr>
9581
867a3e00
AD
9582 * src/symtab.h, src/symtab.c (symbol_print): New.
9583 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9584 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9585
95862005-07-12 Akim Demaille <akim@epita.fr>
9587
9588 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
9589 b4_at_dollar and b4_dollar_dollar.
9590
e054b190
PE
95912005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9592
9593 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9594 and Pennello's paper.
9595
34160ec4
PE
95962005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9597
407d4a75
PE
9598 * data/yacc.c (yyparse): Undo previous patch. Instead,
9599 set yylsp[0] and yyvsp[0] only if the initial action
9600 sets yylloc and yylval, respectively.
9601
34160ec4
PE
9602 * data/yacc.c (yyparse): In the initial action, set
9603 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9604 This avoids the use of undefined variables if the initial
9605 action does not set yylloc and/or yylval.
9606
c3d5a4a7
PE
96072005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9608
b34d96c1
PE
9609 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9610 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9611 Remove from CVS. These files are automatically generated.
9612 * examples/extexi: Clarify that this file is now part of Bison,
9613 not GNU M4, and that it works with any POSIX-compatible Awk.
9614 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9615 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9616 so that we also get calc++-parser.yy. Geneate it.
9617 Use $(AWK), not gawk, since any conforming Awk will do.
9618 Put comment before action, since older 'make' can't handle comment
9619 in action.
9620 $(BUILT_SOURCES): List all built sources, not just some of them.
9621 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9622 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9623 $($(calc_sources_generated)): Remove unnecessary test for existence
9624 of target. (This had a shell syntax error anyway; a stray "x".)
9625 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9626 calc++-parser.yy.
9627 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9628
c3d5a4a7
PE
9629 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9630 implied by the other modules.
9631
828c373b
AD
96322005-07-06 Akim Demaille <akim@epita.fr>
9633
9634 Bind examples/calc++ to the package.
9635 * examples/calc++/Makefile: Remove, replaced by...
9636 * examples/calc++/Makefile.am: ... this new file.
9637 * examples/calc++/test: Remove input.
9638 * examples/calc++/compile: Remove.
9639 * examples/Makefile.am: New.
9640 * configure.ac, Makefile.am: Adjust.
9641 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9642
63cb01d6
PE
96432005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9644
fd2df2ed
PE
9645 * data/glr.c (yyFail): Drastically simplify; since the format argument
9646 never had any % directives, we can simply pass it to yyerror.
9647 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9648 be modified later, as that is the usual style in glr.c.
9649 Problems reported by Paul Hilfinger.
9650
63cb01d6
PE
9651 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9652 and size overflow errors.
9653 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9654 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9655 (YYSIZEMAX): New macro.
9656 (yystpcpy): New function, taken from yacc.c.
9657 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9658 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9659 so that we don't have to maintain their signatures.
9660 (yyFail): Check for buffer overflow, by using vsnprintf rather
9661 than vsprintf. Allocate a bigger buffer if possible.
9662 Report an error if buffer allocation fails.
9663 (yyStackOverflow): New function.
9664 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9665 the initialization was successful. It might fail if storage was
9666 exhausted.
9667 (yyexpandGLRStack): Add more checks for storage allocation failure.
9668 Use yyStackOverflow to report failures.
9669 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9670 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9671 Don't assume stack number fits in int.
9672 (yysplitStack): Check for storage allocation failure.
9673 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9674 can print diagnostics on storage allocation failure. All callers
9675 changed.
9676 (yyresolveValue): Use yybool for boolean.
9677 (yyreportSyntaxError): Check for size-calculation overflow.
9678 This code is taken from yacc.c.
9679 (yyparse): Check for storage allocation errors when allocating
9680 the initial stack.
9681
1c59e0a1
AD
96822005-07-05 Akim Demaille <akim@epita.fr>
9683
9684 Extract calc++ from the documentation.
9685 * doc/bison.texinfo (Calc++): Add the extraction marks.
9686 * examples/extexi: New, from the aborted GNU Programming 2E.
9687 Separate the different paragraph of a file with empty lines.
9688 * examples/Makefile: Use it to extract the whole calc++ example.
9689
8a0adb01
AD
96902005-06-24 Akim Demaille <akim@epita.fr>
9691
9692 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9693 class typedefs.
9694
12545799
AD
96952005-06-22 Akim Demaille <akim@epita.fr>
9696
9697 * doc/bison.texinfo (C++ Language Interface): First stab.
9698 (C++ Parsers): Remove.
9699
99be0235
AD
97002005-06-22 Akim Demaille <akim@epita.fr>
9701
9702 * data/lalr1.cc (yylex_): Honor %lex-param.
9703
0ffd4fd1
AD
97042005-06-22 Akim Demaille <akim@epita.fr>
9705
9706 Start a set of simple examples.
9707 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9708 * examples/calc++/calc++-driver.hh,
9709 * examples/calc++/calc++-parser.yy,
9710 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9711 * examples/calc++/compile, examples/calc++/test: New.
9712
0925ebb4
PE
97132005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9714
9715 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9716 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9717 which stems from the 2005-05-27 patch.
9718
43d3b664
PH
97192005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9720
9721 * data/glr.c: Modify treatment of unused parameters to permit use
9722 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9723
3062864d
PE
97242005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9725
9726 Fix infringement on user name space reported by Janos Zoltan Szabo.
9727 * data/yacc.c (yyparse): strlen -> yystrlen.
9728
989b5b8e
AD
97292005-05-30 Akim Demaille <akim@epita.fr>
9730
9731 * data/lalr1.cc (_): New.
9732 Translate the various messages.
9733
bedf57f5
PE
97342005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9735
9736 Fix infringement on user name space reported by Bruno Haible.
9737 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9738 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9739 the user's name space.
9740 (alloca): Include <stdlib.h> to get it, if it's not built in.
9741 (YYMALLOC, YYFREE): Define only if needed.
9742 (malloc, free): Declare, but only if needed, as this infringes on
9743 the user name space.
9744
4d1801f1
PE
97452005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9746
9747 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9748 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9749 with %d format.
9750 * lib/ebitset.c (min, max): Undef before defining.
9751 * lib/vbitset.c (min, max): Likewise.
9752 * lib/subpipe.c (create_subpipe): Save local variables in case
9753 vfork clobbers them.
9754
97552005-05-24 Bruno Haible <bruno@clisp.org>
9756
9757 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9758 error message syntax used by gcc-4.0.
9759
b94a9e1e
PE
97602005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9761
85ac3861
PE
9762 * README: Mention m4 1.4.3. Remove obsolete advice about
9763 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9764
b94a9e1e
PE
9765 * bootstrap: Remove workaround for problem I encountered with
9766 gettext 0.14.1; it seems to be fixed now.
9767
51c30d21
PE
97682005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9769
009ce67d
PE
9770 * NEWS: Version 2.0a.
9771
f2a97c62
PE
9772 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9773 the previous change.
9774
c8775f93
PE
9775 Various maintainer cleanups.
9776 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9777 conftest*, for benefit of CVS commands run at the same time as
9778 "configure". Add build-aux, since "bootstrap" now creates it and
9779 its subfiles.
9780 * Makefile.cfg (move_if_change): Remove.
9781 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9782 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9783 (po_repo, do-po-update, po-update, wget_files, get-targets):
9784 (config.guess-url_prefix, config.sub-url_prefix):
9785 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9786 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9787 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9788 Remove.
9789 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9790 this is now the recommended name.
9791 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9792 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9793 ylwrap. These files now go into build-aux.
9794 * config/move-if-change: Remove.
9795 * config/prev-version.txt: Bump from 1.75 to 2.0.
9796
3ea5f0ec
PE
9797 * bootstrap: Add stdio-safer, unistd-safer modules.
9798 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9799 we don't need it).
9800 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9801 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9802 * lib/subpipe.c: Include "unistd-safer.h".
9803 (create_subpipe): Make sure all the newly-created
9804 file descriptors are > 2, so that diagnostics don't
9805 get sent down them (which might cause Bison to hang, in theory).
9806 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9807 * src/files.c (xfopen): Use fopen_safer, not fopen.
9808
51c30d21
PE
9809 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9810 yesterday's yacc.c fix.
9811
cea1469d
PE
98122005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9813
3ea5f0ec
PE
9814 * data/glr.c, data/lalr1.cc: Update copyright date.
9815
cea1469d
PE
9816 Fix a destructor bug reported by Wolfgang Spraul in
9817 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9818 * data/yacc.c (yyabortlab): Don't call destructor, and
9819 don't set yychar to EMPTY.
9820 (yyoverflowlab): Don't call destructor.
9821 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9822 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9823 since we no longer output the message "discarding lookahead token
9824 end of input ()".
9825
5e6f62f2
PH
98262005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9827
9828 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9829 fix a small glitch in debugging output.
9830 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9831 after YY_SYMBOL_PRINT where needed.
9832
9833 (struct yyGLRState): Add some comments.
9834 (struct yySemanticOption): Add some comments.
9835 (union yyGLRStackItem): Add comment.
9836
9837 (yymergeOptionSets): Correct this to properly perform the union,
9838 avoiding infinite reported by Michael Rosien.
9839 Update comment.
9840
9841 * tests/glr-regression.at: Add test for GLR merging error reported
9842 by M. Rosien.
cea1469d 9843
0fb669f9
PE
98442005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9845
9846 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9847 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9848 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9849 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9850 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9851 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9852 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9853 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9854 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9855 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9856 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9857 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9858 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9859 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9860 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9861 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9862 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9863 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9864 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9865 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9866 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9867 src/output.h, src/parse-gram.c, src/parse-gram.h,
9868 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9869 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9870 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9871 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9872 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9873 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9874 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9875 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9876 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9877 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9878 tests/reduce.at, tests/regression.at, tests/sets.at,
9879 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9880 Update FSF postal mail address.
9881
51f4735e
PE
98822005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9883
9884 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9885 Problem reported by Ralf Menzel.
9886
80ce3401
PE
98872005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9888
9889 * tests/actions.at: Test that stack overflow invokes destructors.
9890 From Marcus Holland-Moritz.
9891 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9892 from here....
9893 (yyreturn): to here. That way, destructors are called properly
9894 even if the stack overflows, or the user calls YYACCEPT or
9895 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9896 (yyoverflowlab): Destroy the lookahead.
9897
98982005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9899
9900 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9901
72f000b0
PE
99022005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9903
9904 * NEWS: Bison-generated C parsers no longer quote literal strings
9905 associated with tokens.
9906 * src/output.c (prepare_symbols): Don't escape strings,
9907 since users don't want to see C escapes.
9908 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9909 in diagnostics.
c19683bb 9910 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
9911 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9912
1094323f
PE
99132005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9914
9915 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9916 the data size is known to be too small and we can't increase it.
9917 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9918
ca407bdf
PE
99192005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9920
9921 * src/parse-gram.y: Include quotearg.h.
9922 (string_as_id): Quote $1 before using it as a key, since the
9923 lexer no longer quotes it for us.
9924 (string_content): Don't strip quotes, since lexer no longer
9925 quotes it for us.
9926 * src/scan-gram.l: Include quotearg.h.
9927 ("\""): Omit quote.
9928 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9929 a key, since the rest of the lexer doesn't quote it.
9930 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9931 * tests/regression.at (Token definitions): Check for backslashes
9932 in token strings.
9933
9934 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9935 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9936 (yyparse): Revamp code to generate long syntax error message, to
9937 make it easier to translate, and to avoid problems with arithmetic
9938 overflow. Change "virtual memory" to "memory" in diagnostic, since
9939 we don't know whether the memory is virtual.
9940
1ce59070
PE
99412005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9942
9943 * NEWS: Bison-generated C parsers now use the _ macro to
9944 translate strings.
9945 * data/yacc.c (_) [!defined _]: New macro.
9946 All English strings wrapped inside this macro.
9947 * doc/bison.texinfo (Bison Parser): Document _.
9948 * po/POTFILES.in: Include src/parse-gram.c, since it now
9949 includes translateable strings that parse-gram.y doesn't.
9950
a749a695
PE
99512005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9952
9953 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9954 reverting the 2004-10-11 change to this function.
9955 (symbol_check_alias_consistency): Don't call symbol_type_set
9956 if the type name is already correct.
9957 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9958
8fb1053b
PE
99592005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9960
9961 * tests/regression.at (Token definitions): Don't use a token named
9962 c, as that generates a "#define c ..." that runs afoul of buggy
9963 stdlib.h that uses the identifier c as a member of struct
9964 drand48_data. Problem reported by Horst Wente.
9965
ff498c4a
PE
99662005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9967
9968 * bootstrap: Change translation URL from
9969 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9970 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9971 redirection glitches. Problem reported by twlevo@xs4all.nl.
9972
65211d70
PE
99732005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9974
9975 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9976 after operands; POSIX says this isn't portable for the c99 command.
9977
9577fb1f
PE
99782005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9979
9980 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9981 immediately if a data overrun has occurred; this may help us track
9982 down what may be a spurious failure on MacOS.
9983
78b178f7
PE
99842005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9985
a2599d0f
PE
9986 Respond to problems reported by twlevo@xs4all.nl.
9987
9988 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9989
78b178f7
PE
9990 * src/vcg.h: Comment fix.
9991 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9992 (G_CMAX): Change to -1 instead of INT_MAX.
9993
9994 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 9995
7296e729
PE
99962005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9997
9998 * src/tables.c (state_number_to_vector_number): Put it inside an
9999 "#if 0", since it's not currently used. Problem reported by
10000 Roland McGrath.
10001
05ac60f3
PE
100022005-03-06 Paul Eggert <eggert@cs.ucla.edu>
10003
10004 * src/output.c (escaped_output): Renamed from
10005 escaped_file_name_output, since we now use it for symbol tags as
10006 well. All uses changed.
10007 (symbol_destructors_output, symbol_printers_output):
10008 Escape symbol tags too.
10009 Problem reported by Matyas Forstner in
10010 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
10011
10012 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
10013 not needed.
10014 * src/output.c (user_actions_output, token_definitions_output,
10015 symbol_destructors_output, symbol_printers_output): Likewise.
10016 * src/reader.c (prologue_augment): Likewise.
10017 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
10018
10019 * src/vcg.c (output_edge): Don't quote linestyle arg.
10020 Problem reported by twlevo@xs4all.nl.
10021
7eb453ac
PE
100222005-02-28 Paul Eggert <eggert@cs.ucla.edu>
10023
10024 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
10025 example, reported by Derek M Jones. Also, make the example even
10026 more outrageous, to better illustrate how bad the problem is.
10027
4c04c52a
PE
100282005-02-24 Paul Eggert <eggert@cs.ucla.edu>
10029
10030 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
10031 putsym. Typo reported by Sebastian Piping.
10032
a61e1620
PE
100332005-02-23 Paul Eggert <eggert@cs.ucla.edu>
10034
10035 * doc/bison.texinfo (Language and Grammar): some -> same
10036 (Epilogue): int he -> in the
10037 Typos reported by Sebastian Piping via Justin Pence.
10038
9ec93868
PE
100392005-02-07 Paul Eggert <eggert@cs.ucla.edu>
10040
10041 * tests/glr-regression.at (Improper handling of embedded actions
10042 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
10043 embedded actions and $-N in GLR parsers", work around an Autoconf bug
10044 with dollar signs in test names.
10045 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
10046 for a similar reason.
10047
73ce7e7e
PE
100482005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10049
10050 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10051 wants to redefine G_VIEW.
10052
2e72b98e
PE
100532005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10054
10055 * src/vcg.c (get_view_str): Remove case for normal_view.
10056 Problem reported by twlevo@xs4all.nl.
10057
e0d634e5
PE
100582005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10059
ccf830a4
PE
10060 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10061 Problem reported by twlevo@xs4all.nl.
10062
e0d634e5
PE
10063 * doc/bison.texinfo: Change @dircategory from "GNU programming
10064 tools" to "Software development". Requested by Richard Stallman
10065 via Karl Berry.
10066
7bbc8cb0
PE
100672005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10068
10069 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10070 Problem reported by twlevo@xs4all.nl.
10071
08b770bc
PE
100722005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10073
10074 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10075 keyword; it's not needed with modern compilers, and it doesn't
10076 affect correctness with older compilers. Suggested by
10077 twlevo@xs4all.nl.
10078
95f22ad2
PE
100792005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10080
10081 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10082 gcc -Wswitch-default.
10083 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10084 * data/yacc.c (yyparse): Likewise.
10085
d229d15c
PE
100862005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10087
10088 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10089 already. Let config.h define any nonstandard values.
10090
ecadd90f
PE
100912005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10092
10093 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10094 for the benefit of slower hosts. Problem reported by
10095 Nelson H. F. Beebe.
10096
213744b5
PE
100972005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10098
10099 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10100 being defined and not used.
10101 * data/lalr1.cc (yyparse): Likewise.
10102 Use "if (false)" rather than "if (0)".
10103
249d3236
PE
101042005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10105
10106 * TODO: Mention that we should allow NUL bytes in tokens.
10107
987cc1fb
PE
101082005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10109
10110 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10111 Problem reported by Hans Aberg.
10112
08fe02d9
PE
101132005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10114
10115 * src/getargs.c (version): Happy new year; update overall
10116 program copyright date from 2004 to 2005.
10117
10118 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10119 Problem reported by Hans Aberg.
10120 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10121 (Output file names.): Add a test for the case when standard output
10122 is closed.
10123
010c0266
PE
101242004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10125
10126 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10127 to fix an oversight in the Bison 2.0 manual.
10128
da12206a
PE
101292004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10130
10131 * NEWS: Version 2.0. Reformat the existing news items since
10132 1.875, so that related items are grouped together.
3a4734aa 10133 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
10134 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10135
c935d934
PE
10136 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10137 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10138 otherwise, we're not testing alloca. Unfortunately there's no
10139 simple way to consult HAVE_ALLOCA here.
10140
da12206a
PE
10141 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10142 for yymsg, too.
10143
10144 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10145 hand. This avoids a warning about comparing int to size_t when
10146 GCC warnings are enabled.
10147
0a2c5137
PE
101482004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10149
d7e14fc0
PE
10150 * NEWS: Bison-generated parsers no longer default to using the
10151 alloca function (when available) to extend the parser stack, due
10152 to widespread problems in unchecked stack-overflow detection.
10153 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10154 responsibility to set it to a positive value. This lets the user
10155 specify a value that is not a preprocessor constant.
10156 * data/yacc.c (YYMAXDEPTH): Likewise.
10157 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10158 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10159 to be a compile-time constant. However, explain the constraints on it.
10160 Also, explain the constraints on YYINITDEPTH.
10161 (Table of Symbols): Explain that alloca is no longer the default.
10162 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10163 to 1.
10164
0a2c5137
PE
10165 * doc/bison.texinfo (Location Default Action): Mention that n must
10166 be zero when k is zero. Suggested by Frank Heckenbach.
10167
e019c247
AD
101682004-12-22 Akim Demaille <akim@epita.fr>
10169
10170 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10171 (parser::state_type, parser::semantic_type, parser::location_type):
10172 Private, not public.
10173 (parser::parse): Return ints, not bool.
10174 Returning a bool introduces a problem: 0 corresponds to false, and
10175 it seems weird to return false on success. Returning true changes
10176 the conventions for yyparse.
10177 Alternatively we could return void and send an exception.
10178 There is no clear consensus (yet?).
10179 (state_stack, semantic_stack, location_stack): Rename as...
10180 (state_stack_type, semantic_stack_type, location_stack_type): these.
10181 Private, not public.
10182 * tests/c++.at: New.
10183 * tests/testsuite.at, tests/Makefile.am: Adjust.
10184
72731bb7
AD
101852004-12-21 Akim Demaille <akim@epita.fr>
10186
10187 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10188
9a0d8bec
AD
101892004-12-21 Akim Demaille <akim@epita.fr>
10190
10191 Don't impose std::string for filenames.
10192
10193 * data/lalr1.cc (b4_filename_type): New.
10194 (position::filename): Use it.
10195 (parser.hh): Move the inclusion of stack.hh and location.hh below
10196 the user code, so that needed headers for the filename type can be
10197 included first.
72731bb7
AD
10198 Forward declare them before the user code.
10199 * tests/Makefile.am (check-local, installcheck-local): Pass
10200 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 10201
99880de5
AD
102022004-12-20 Akim Demaille <akim@epita.fr>
10203
10204 Use more STL like names: my_class instead of MyClass.
10205
10206 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10207 (SemanticStack, SemanticType, StateStack, StateType)
10208 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10209 (Parser::value): Rename as...
10210 (location_stack, location_type, rhs_number_type, semantic_stack)
10211 (semantic_type, state_stack, state_type, token_number_type, stack)
10212 (slice, traits, parser::yylloc, parser::yylval): these.
10213
10214 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10215
9bec482e
PE
102162004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10217
10218 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10219 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10220
f6fbd3da
PE
102212004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10222
10223 Remove uses of 'short int' and 'unsigned short int'. This raises
10224 some arbitrary limits. It uses more memory but nowadays that's
10225 not much of an issue.
10226
10227 This change does not affect the generated parsers; that's a different
10228 task, as some users will want to conserve memory there.
10229
10230 Ideally we should use size_t to represent all object counts, and
10231 something like ptrdiff_t to represent signed differences of object
10232 counts; but that will require more code-cleanup than I have the
10233 time to do right now.
10234
10235 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10236 Use size_t, not int or short int, to count objects.
10237 * src/closure.c (nritemset, closure): Likewise.
10238 * src/closure.h (nritemset, closure): Likewise.
10239 * src/nullable.c (nullable_compute): Likewise.
10240 * src/print.c (print_core): Likewise.
10241 * src/print_graph.c (print_core): Likewise.
10242 * src/state.c (state_compare, state_hash): Likewise.
10243 * src/state.h (struct state): Likewise.
10244 * src/tables.c (default_goto, goto_actions): Likewise.
10245
10246 * src/gram.h (rule_number, rule): Use int, not short int.
10247 * src/output.c (prepare_rules): Likewise.
10248 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10249 errs, reductions): Likewise.
10250 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10251 Likewise.
10252 * src/tables.c (vector_number, tally, action_number,
10253 ACTION_NUMBER_MINIMUM): Likewise.
10254 * src/output.c (muscle_insert_short_int_table): Remove.
10255
efeed023
AD
102562004-12-17 Akim Demaille <akim@epita.fr>
10257
10258 * data/lalr1.cc: Extensive Doxygenation.
10259 (error_): Rename as...
10260 (error): this, since it is visible to the user.
10261 Adjust callers.
10262 (Parser::message): Now an automatic variable from...
10263 (Parser::yyreport_syntax_error_): here.
10264 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10265 Parser::error.
10266 * tests/input.at: Escape $.
10267
bc82c5a5
PE
102682004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10269
10270 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10271 Parenthesize rhs to avoid obscure problems with mistakes like
10272 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10273 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10274 b4_rhs_location): Likewise.
10275 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10276 b4_rhs_location): Likewise.
10277
fd19f271
AD
102782004-12-16 Akim Demaille <akim@epita.fr>
10279
10280 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10281 yacc.c: be sure to stay within yycheck_.
10282 * tests/actions.at: Re-enable C++ tests.
10283
10454ea4
AD
102842004-12-16 Akim Demaille <akim@epita.fr>
10285
10286 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10287 real.
10288
c5b95ccf
AD
102892004-12-16 Akim Demaille <akim@epita.fr>
10290
10291 Use #define to handle the %name-prefix.
10292
10293 * data/glr.c, data/yacc.c: Comment changes.
10294 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10295 so that one can refer to yylex in the parser file, and have it
10296 renamed, as is the case with other skeletons.
10297
617a8f12
AD
102982004-12-16 Akim Demaille <akim@epita.fr>
10299
10300 Move lalr1.cc internals into yy*.
10301
10302 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10303 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10304 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10305 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10306 (empty_, final_, terror_, errcode_, ntokens_)
10307 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10308 (looka_, ilooka_, error_range_, nerrs_):
10309 Rename as...
10310 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10311 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10312 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10313 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10314 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10315 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10316 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10317 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10318 these.
10319
1e547e6e
PE
103202004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10321
10322 Fix some problems reported by twlevo at xs4all.
10323 * src/symtab.c (symbol_new): Report an error if the input grammar
10324 contains too many symbols. This is better than calling abort() later.
10325 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10326 (struct node, struct graph):
10327 Rename member expand to stretch. All uses changed.
10328 (struct graph): Remove member layoutalgorithm. All uses removed.
10329 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10330 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10331 All uses changed.
10332 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10333
735d6bd4
AD
103342004-12-15 Akim Demaille <akim@epita.fr>
10335
10336 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10337 Add more Doxygen comments.
10338 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10339 (report_syntax_error_, translate_): Rename as...
10340 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10341 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10342
2e1f5829
AD
103432004-12-15 Akim Demaille <akim@epita.fr>
10344
10345 * data/lalr1.cc (lex_): Rename as...
10346 (yylex_): this.
10347 Move the trace here.
10348 Take the %name-prefix into account.
10349 Reported by Alexandre Duret-Lutz.
10350
a3cb6248
AD
103512004-12-15 Akim Demaille <akim@epita.fr>
10352
10353 Simplify the C++ parser constructor.
10354
10355 * data/lalr1.cc (debug_): Rename as...
10356 (yydebug_): so that the parser's internals are always in the yy*
10357 pseudo namespace.
10358 Adjust uses.
10359 (b4_parse_param_decl): Remove the leading comma as it is now only
10360 called as unique argument list.
10361 (Parser::Parser): Remove the constructor accepting a location and
10362 an initial debugging level.
10363 Remove from the other ctor the argument for the debugging level.
10364 (debug_level_type, debug_level, set_debug_level): New.
10365
10366 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10367 constructor calls.
10368
07fed891
AD
103692004-12-15 Akim Demaille <akim@epita.fr>
10370
10371 Remove b4_root related material: failure experiment
a3cb6248 10372 (which goal was to allow to derive from a class).
07fed891
AD
10373
10374 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10375 definitions and uses.
10376
e603eaa5
PE
103772004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10378
10379 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10380 not 2, since it's not portable to subtract 1 from the start of an
10381 array. The new item 0 is never set or used. All uses changed.
10382
10383 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10384 the default definition of YYLLOC_DEFAULT. Problem reported
10385 by Frank Heckenbach.
10386
fafb007d
PE
103872004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10388
10389 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10390 the normal case and one for the error case. Just use the
10391 first one uniformly. Problem reported by Frank Heckenbach.
10392 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10393 use exactly the same macro in both places.
10394 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10395 so that the normal-case YYRHSLOC works for the error case too.
10396 All uses changed.
10397 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10398 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10399 * doc/bison.texinfo (Location Default Action): Don't claim that
10400 we have an array of locations. Use the same macro for both glr
10401 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10402 the index is 0.
10403
48814dcd
PE
104042004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10405
a4e1a53b
PE
10406 * HACKING: Update email addresses to send announcements to.
10407
48814dcd
PE
10408 * configure.ac (AC_INIT): Bump version to 1.875f.
10409
337116ba
PE
104102004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10411
10412 * NEWS: Version 1.875e.
10413 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10414
10415 * src/scan-skel.l: Include "complain.h", for "fatal".
10416
10417 * src/relation.h (relation_print, relation_digraph):
10418 Relation sizes are of type relation_node, not size_t (this is
10419 merely a doc fix, since the two types are equivalent).
10420 (relation_transpose): Relation sizes are of type relation_node,
10421 not int.
10422 * src/relation.c: Likewise.
10423 (top, infinity): Now of type relation_node, not int.
10424 (traverse, relation_transpose): Use relation_node, not int.
10425
10426 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10427 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10428 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10429
10430 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 10431 specifying whether the test should be skipped. Use it tp
337116ba 10432 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 10433 fail on some hosts, and should be skipped.
337116ba 10434
da2a7671
PE
104352004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10436
10437 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10438 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10439 unless otherwise specified below.
10440
10441 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10442 to allocate kernel_base, kernel_items, kernel_size, since
10443 they needn't be initialized to 0.
10444 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10445 * src/closure.c (new_closure): Likewise, for itemset.
10446 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10447 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10448 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10449 (build_relations): Likewise for edge, states1, includes.
10450 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10451 * src/reader.c (packgram): Likewise, for ritem, rules.
10452 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10453 * src/relation.c (relation_digraph): Likewise for VERTICES.
10454 (relation_transpose): Likewise for new_R, end_R.
10455 * src/symtab.c (symbols_token_translations_init): Likewise for
10456 token_translations.
10457 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10458 (token_actions): Likewise for yydefact, actrow, conflrow,
10459 conflict_list.
10460 (save_column): Likewise for froms[symno], tos[symno].
10461 (goto_actions): Likewise for state_count.
10462 (pack_table): Likewise for base, pos, check.
10463 (tables_generate): Likewise for width.
10464
10465 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10466 for initial core. Just have a separate core, so we needn't worry
10467 about whether kernel_size and kernel_base are initialized.
10468
10469 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10470 kernel_size, kernel_items): Remove unnecessary initialization.
10471 * src/conflicts.c (conflicts): Likewise.
10472 * src/derives.c (derives): Likewise.
10473 * src/muscle_tablc (muscle_insert): Likewise.
10474 * src/relation.c (relation_digraph): Likewise.
10475 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10476 conflrow, conflict_table, conflict_list, table, check):
10477 Likewise.
10478
10479 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10480 This is because all callers pass unsigned int.
10481 * src/closure.h (new_closure): Likewise.
10482
10483 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10484 (build_relations): Initialize includes[i] in all cases.
10485 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10486 and rules[ruleno].precsym. Initialize members in order.
10487 * src/relation.c (relation_transpose): Always initialize new_R[i]
10488 and end_R[i].
10489 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10490
10491 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10492 conflict_list[0] was always 0, but now it isn't initialized.
10493
10494 * src/table.c (table_grow): When conflict_table grew, the grown
10495 area wasn't cleared. Fix this.
10496
10497 * lib/.cvsignore: Add strdup.c, strdup.h.
10498 * m4/.cvsignore: Add strdup.m4.
10499
00baeeac
PE
105002004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10501
10502 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10503 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10504 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10505 ngotos + 1 without checking for overflow.
10506 (build_relations): Use END_NODE, not -1, to denote end of edges.
10507 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10508 build_relations): Use goto_number, not int, for goto numbers.
10509 * src/tables.c (save_column, default_goto): Likewise.
10510
be3d9d42
AD
105112004-11-23 Akim Demaille <akim@epita.fr>
10512
10513 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10514 of #defining from yystype.
10515 Don't typedef yystype, C++ does not need it.
10516 This lets it possible to forward declare it as union.
10517
78e526d5
PE
105182004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10519
10520 * bootstrap (gnulib_modules): Add extensions.
10521 Problem reported by Jim Meyering.
10522
afbb696d
PE
105232004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10524
10525 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10526 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10527 src/system.h, src/tables.c: XFREE -> free, to accommodate
10528 recent change to gnulib xalloc.h.
78e526d5 10529 Problem reported by Jim Meyering.
afbb696d 10530
c1f8f16a
AD
105312004-11-17 Akim Demaille <akim@epita.fr>
10532
10533 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10534
db7e5eb5 105352004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
10536 Alexandre Duret-Lutz <adl@gnu.org>
10537
10538 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10539 changes.
10540 (YYCDEBUG): Adjust.
10541 Use it instead of cdebug_.
10542 (Parser::debug_stream, Parser::set_debug_stream): New.
10543 (Parser::symprint_): Define cdebug_ for temporary backward
10544 compatibility.
10545 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10546 debug_stream ().
10547
68e11668
AD
105482004-11-17 Akim Demaille <akim@epita.fr>
10549
10550 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10551 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10552 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10553 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10554
97cbc73e
PE
105552004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10556
10557 * data/glr.c (yyloc_default): Remove; not used.
10558 Problem reported by Frank Heckenbach.
10559
e342c3be
AD
105602004-10-25 Akim Demaille <akim@epita.fr>
10561
10562 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10563 Introduce another definition to address simple location arrays.
10564 (yyGLRStack): New member: yyerror_range.
10565 (yyrecoverSyntaxError, yyparse): Update it.
10566 (yyrecoverSyntaxError): Use it when shifting the error token to
10567 have an accurate range, equivalent to the one computed by both
10568 yacc.c and lalr1.cc.
10569 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10570 that column numbers start at column 0, as per GNU Coding
10571 Standards, the others tests, and the doc.
10572 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10573 Adjust to the above change (first column is 0).
10574 And adjust the location of the "<error>", now covering the whole
10575 line.
10576
93602feb 105772004-10-22 Akim Demaille <akim@epita.fr>
04098407 10578 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
10579
10580 Remove some arbitrary limits on goto numbers and relations.
10581 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10582 initial values, since they're never used.
10583 (set_goto_map): ngotos is now unsigned, so test for overflow
10584 by seeing whether it wraps around to zero.
10585 * src/lalr.h (goto_number): Now size_t, not short int.
10586 (GOTO_NUMBER_MAXIMUM): Remove.
10587 * src/relation.c (relation_print, traverse, relation_transpose):
10588 Check for END_NODE rather than looking at sign.
10589 * src/relation.h (END_NODE): New macro.
10590 (relation_node): Now size_t, not short int.
10591
dba08b04
PE
105922004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10593
10594 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10595 keyword, not an identifier. Problem reported by Baron Schwartz in
10596 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10597
df09ef2e
AD
105982004-10-11 Akim Demaille <akim@epita.fr>
10599
10600 * src/symtab.c (symbol_check_alias_consistency): Also check
10601 type names, destructors, and printers.
10602 Reported by Alexandre Duret-Lutz.
10603 Recode the handling of associativity and precedence in terms
10604 of symbol_precedence_set.
10605 Accept no redeclaration at all, not even equal to the previous
10606 value.
10607 (redeclaration): New.
10608 Use it to factor redeclaration complaints.
10609 (symbol_make_alias): Don't set the type of the alias, let
10610 symbol_check_alias_consistency do it as for other features.
10611 * src/symtab.h (symbol): Add new member prec_location, and
10612 type_location.
10613 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10614 * tests/input.at (Incompatible Aliases): New.
10615
146bc99d
PE
106162004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10617
10618 .cvsignore fixes to accommodate gnulib changes,
10619 and the practice of naming build directories "_build".
10620 * .cvsignore: Add "_*". Sort.
10621 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10622 * m4/.cvsignore: Add "*_gl.m4".
10623
e503aa60
AD
106242004-10-06 Akim Demaille <akim@epita.fr>
10625
10626 * src/parse-gram.y (add_param): Fix the truncation of trailing
10627 spaces.
10628
b4a20338
AD
106292004-10-05 Akim Demaille <akim@epita.fr>
10630
10631 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10632 whether the reducion was empty or not. This leaves room to
10633 improve the use of YYLLOC_DEFAULT in such a case.
10634 lalr1.cc is still experimental, so changing this is acceptable.
10635 And finally, there are probably not many users who changed the
10636 handling of locations in GLR, so changing is admissible too.
10637
10638 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10639 empty reduction, set @$ to an empty location ending the previously
10640 stacked symbol.
10641 Adjust uses to make sure the code is triggered on empty
10642 reductions.
10643 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10644 expected output: empty reductions have empty locations.
10645
f85a5e6f
AD
106462004-09-29 Akim Demaille <akim@epita.fr>
10647
10648 * data/lalr1.cc: Move towards a more standard C++ coding style
10649 for templates: Class < T > -> Class<T>.
10650
b203fc2c
AD
106512004-09-29 Akim Demaille <akim@epita.fr>
10652
10653 * data/lalr1.cc: Reinstall the former ctor, for sake of
10654 compatibility, but warn it will be removed.
10655 Move towards a more standard C++ coding style (i.e., type *var ->
10656 type* var).
10657
5b7e1e73
PE
106582004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10659
3fee967f
PE
10660 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10661 since it's less likely to work if NULs are involved in the future.
5b7e1e73 10662
0dcca5c2
AD
106632004-09-27 Akim Demaille <akim@epita.fr>
10664
10665 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10666
6dde1c82
AD
106672004-09-27 Akim Demaille <akim@epita.fr>
10668
10669 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 10670 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
10671 and argument names.
10672 (b4_cc_constructor_call): Likewise.
10673
b233d555
AD
106742004-09-24 Akim Demaille <akim@epita.fr>
10675
10676 * src/parse-gram.y (add_param): Strip the leading and trailing
10677 blanks from a formal argument declaration.
10678 (YY_LOCATION_PRINT): New.
10679
619404e3
AD
106802004-09-24 Akim Demaille <akim@epita.fr>
10681
10682 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10683 after the location.
10684
dd8d9022
AD
106852004-09-24 Akim Demaille <akim@epita.fr>
10686
10687 * doc/bison.texinfo (Table of Symbols): Sort.
10688
0092f063
AD
106892004-09-21 Akim Demaille <akim@epita.fr>
10690
10691 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10692 the useless parentheses.
10693 Suggested by Paul Eggert.
10694
451364ed
AD
106952004-09-20 Akim Demaille <akim@epita.fr>
10696
10697 Let the initial-action act on the look-ahead, and use it for the
10698 "initial push" (corresponding to an hypothetical beginning-of-file).
10699 And let lalr1.cc honor %initial-action.
10700
10701 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10702 example.
10703 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10704 (Parser::Parser): Remove the ctor that used to initialize it.
10705 (Parser::parse): Like in the other skeletons, issue the "starting
10706 parse" message before any action.
10707 Honor %initial-action.
10708 Initialize the stacks with the lookahead.
10709 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10710 look-ahead.
10711 Push them in the stacks.
10712 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10713
18d192f0
AD
107142004-09-20 Akim Demaille <akim@epita.fr>
10715
10716 * doc/bison.texinfo (Initial Action Decl): New.
10717
b8458aa5
AD
107182004-09-20 Akim Demaille <akim@epita.fr>
10719
10720 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10721 clearer criterion to define it.
10722 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10723 When reducing on an empty RHS, use the latest stacked location as
10724 location.
10725 yylloc is not always available.
10726 * data/glr.c: Likewise.
10727 Also, honor initial-actions.
10728
3fc16193
AD
107292004-09-20 Akim Demaille <akim@epita.fr>
10730
10731 * data/yacc.c (YY_LOCATION_PRINT): New.
10732 Define when we know YYLTYPE's structure, i.e., when the default
10733 YYLLOC_DEFAULT is used.
10734 * data/c.m4 (b4_yysymprint_generate): Use it.
10735 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10736 value of the result.
10737 (error_start_): Replace with...
10738 (error_range_): this location array.
10739 This allows to replace code relying on the implementation of
10740 locations by portable code.
10741 * data/yacc.c (yylerrsp): Replace with...
10742 (yyerror_range): this.
10743 Every time a token is popped, update yyerror_range[0], to have an
10744 accurate location for the error token.
10745 * data/glr.c (YY_LOCATION_PRINT): New.
10746 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10747 deference a pointer.
10748 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10749 report the location in %printers.
10750
10751 * src/scan-skel.l: Instead of abort, report error messages to ease
10752 understanding skeleton scanning failures.
10753
ecfe33e7
AD
107542004-09-16 Akim Demaille <akim@epita.fr>
10755
10756 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10757 (iterator, const_iterator): these, to be more in the C++ spirit.
10758 Also, return reverse iterators so that when displaying the stack
10759 we display its bottom first.
10760 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10761 from yacc.c.
10762 We should probably use vector here though.
10763
1576d44d
AD
107642004-09-16 Akim Demaille <akim@epita.fr>
10765
10766 Have more complete shift traces.
10767
10768 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10769 to report Shifts instead of ad hoc YYDPRINTF invocations,
10770 including for the error token.
10771 * data/lalr1.cc (symprint_): Output the location.
10772 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10773 output the location within the %printer.
10774 Activate GLR tests, at least to make sure they compile properly.
10775 They still don't pass though.
10776 * tests/calc.at: Adjust expect verbose output, since now "Entering
10777 state..." is on a different line than the "Shifting" message.
10778
9c66f418
AD
107792004-09-08 Akim Demaille <akim@epita.fr>
10780
10781 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10782 Bison directive from the Bison file to the invocation of this
10783 macro, so that these directives are passed to
10784 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10785 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10786 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10787 the extra Bison directives instead of the whole series.
10788 Change the grammar so that there are recoverable errors, and
10789 unrecoverable errors. Now we can have the parser give up before
10790 consuming the whole input. As a result we now can observe that
10791 the lookahead is freed when needed.
10792 Change the parser source to parse argv[1] instead of a hard coded
10793 string.
10794 Simplify yylex, and give a value and location to EOF.
10795 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10796 passed directives already coded in the file.
10797 Add some tests to check the location of "error".
10798 For some tests, the C++ parser is correct, and not yacc.c.
10799 For other tests, they provide different, but unsatisfying, values,
10800 so keep the C++ value so that at least one parser is "correct"
10801 according to the test suite.
10802 (Actions after errors): Remove, this is subsumed by the
10803 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10804
52d5733f
AD
108052004-09-06 Akim Demaille <akim@epita.fr>
10806
10807 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 10808 (Parser::pop): New.
52d5733f
AD
10809 Use it.
10810
a0e68930
AD
108112004-09-06 Akim Demaille <akim@epita.fr>
10812
10813 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10814 argument, an informative message.
10815 Call YY_SYMBOL_PRINT.
10816 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10817 * data/lalr1.cc (destruct_): Likewise.
10818 In addition, no longer depend on b4_yysymprint_generate and
10819 b4_yydestruct_generate to generate these functions, do it "by
10820 hand".
10821
e757bb10
AD
108222004-09-03 Akim Demaille <akim@epita.fr>
10823
10824 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10825 invoked, yydestruct the lookahead.
10826 * tests/calc.at (Calculator $1): Update the expected lengths of
10827 traces: there is an added line for the discarded lookahead.
10828 * doc/bison.texinfo (Destructor Decl): Some rewording.
10829 Define "discarded" symbols.
10830
0fe1f06d
AD
108312004-09-02 Akim Demaille <akim@epita.fr>
10832
10833 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10834
284acc8b
AD
108352004-09-02 Akim Demaille <akim@epita.fr>
10836
10837 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10838 (YYDSYMPRINTF): Rename as...
10839 (YY_SYMBOL_PRINT): this.
10840 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10841 two.
10842 Use it instead of direct symprint_ calls.
10843 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10844 one.
10845
a5eb1ed2
AD
108462004-09-02 Akim Demaille <akim@epita.fr>
10847
b7c72fe1
AD
10848 * data/lalr1.cc (b4_yysymprint_generate): New.
10849 (symprint_): New member function, defined when YYDEBUG.
10850 Use it consistently instead of token/nterm debugging output by
10851 hand.
a5eb1ed2
AD
10852 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10853 %printer calls to use cdebug_ when using lalr1.cc.
10854
417141dd
AD
108552004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10856
10857 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10858 with #ifdef YYDEBUG.
10859
2fa09258
AD
108602004-08-26 Akim Demaille <akim@epita.fr>
10861
10862 * doc/bison.texinfo (Implementing Loops): Rename as...
10863 (Implementing Gotos/Loops): this.
10864
9378b508
PE
108652004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10866
10867 Adjust to latest gnulib.
10868 * bootstrap (gnulib_modules): Add xalloc-die.
10869 Set LC_ALL=C so that file names sort consistently.
10870 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10871 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10872 uintmax_t.m4, ulonglong.m4.
10873 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10874 po.m4 since we are now using _gl.m4 instead.
10875
87a8ad5c
PE
108762004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10877
10878 * src/scan-action.l: Remove. Scanning of semantic actions is
10879 handled in scan-gram.l.
10880
dca81a78
PE
108812004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10882
10883 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10884
10885 * src/location.h (struct): The file member is a uniqstr.
10886 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10887
c9cbf7c5
PE
108882004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10889
10890 Fix bug with non-%union parsers that have printers or destructors,
10891 which led to a Bison core dump. Reported by Peter Fales in
10892 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 10893
c9cbf7c5
PE
10894 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10895 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10896 not to our own type.
10897 * src/output.c (symbol_destructors_output, symbol_printers_output):
10898 Don't assume %union.
10899 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10900 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10901 UNION-FLAG. All callers changed.
10902 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10903 Use type char, not unsigned int, when declaring an array of char;
10904 this lets us remove a cast.
10905 (Printers and Destructors): Add non-%union test cases.
10906
fa7e68c3
PE
109072004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10908
10909 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10910 GLR writeups. E.g., avoid frenchspacing and the future tense,
10911 change "lookahead" to "look-ahead", and change "wrt" to "with
10912 respect to".
2fa09258 10913
fa7e68c3
PE
109142004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10915
10916 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10917 New sections, split off from the GLR Parsers section. Put the new
10918 Simple GLR Parser near the start of the GLR section, for clarity.
10919 Rewrite connective text.
10920
99a9344e
PE
109212004-06-21 Frank Heckenbach <frank@g-n-u.de>
10922
10923 * doc/bison.texinfo (Simple GLR Parsers): New section.
10924
8dd162d3
PE
109252004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10926
10927 * NEWS, TODO, doc/bison.texinfo:
10928 Use "look-ahead" instead of "lookahead", to be consistent.
10929 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10930 while we're fixing "look-ahead".
10931 * src/conflicts.c (shift_set): Renamed from shiftset.
10932 (look_ahead_set): Renamed from lookaheadset.
10933 * src/print.c: Likewise.
10934 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10935 name for "lookahead".
10936 (report_types, usage): Likewise.
10937 * src/getargs.h (report_look_ahead_tokens): Renamed from
10938 report_lookaheads.
10939 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10940 compute_lookaheads.
10941 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10942 (look_ahead_tokens_print): Renamed from lookaheads_print.
10943 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10944 state_rule_lookaheads_print.
10945 * src/state.h: Likewise.
10946 (reductions.look_ahead_tokens): Renamed from lookaheads.
10947 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10948 AT_DATA_LOOKAHEADS_GRAMMAR.
10949
57a90331
PE
109502004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10951
10952 * README: Update location of patched M4 distribution.
10953
8ed3234a
PE
109542004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10955
10956 Don't assume the C++ compiler takes the same arguments as the C compiler
10957 (trivial change).
10958 * configure.ac (O0CXXFLAGS): New var.
10959 * tests/atlocal.in (CXXFLAGS): Use it.
10960
07971983
PE
109612004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10962
10963 Fix some "make check" problems with C++ reported by
10964 Albert Chin-A-Young for Tru64 C++ in this thread:
10965 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10966
10967 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10968 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10969 Output to a .cc file for C++, not to a .c file.
10970 * tests/calc.at (AT_CHECK_CALC): Likewise.
10971 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10972 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10973
29058652
PE
109742004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10975
10976 * tests/calc.at, tests/actions.at: Workaround for SGI
10977 C++ compiler. (trivial change)
10978
62cb8a99
PE
109792004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10980
fd418816
PE
10981 Spent a few hours checking out which prerequisite versions the
10982 current sources actually require. I went all the way back to
10983 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10984 a seemingly endless set of combinations of versions more recent
10985 than that. The bottom line is that the current sources require
10986 fairly recent versions of the build tools, and it'll be some work
10987 to change this.
10988 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10989 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10990 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10991 Add comments explaining why those particular versions are
10992 currently needed.
2fa09258 10993
62cb8a99
PE
10994 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10995 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 10996 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
10997
10998 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10999 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
11000
caa52c10
PE
110012004-05-26 Paul Eggert <eggert@cs.ucla.edu>
11002
11003 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
11004 0.11.5. Suggested by Bruno Haible.
11005 * bootstrap: Remove gettext version checking.
11006
11007 * doc/bison.texinfo (Decl Summary): Also mention that %union
11008 can depend on prerequisite types. Problem reported by Tim
11009 Van Holder.
11010
4bfd5e4e
PE
110112004-05-25 Paul Eggert <eggert@cs.ucla.edu>
11012
2cef3017
PE
11013 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
11014 * README-alpha: Don't tell people not to package this.
11015
b9c85d5c
PE
11016 * bootstrap: Don't assume $(...) works; use `...` instead.
11017 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
11018 gettext better.
11019
4bfd5e4e
PE
11020 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
11021 put into the -d output file, and mention what to do if YYSTYPE is
11022 defined as a macro.
11023
6a36ff94
PE
110242004-05-24 Paul Eggert <eggert@cs.ucla.edu>
11025
6712933e
PE
11026 Undo change made earlier today: it caused autopoint to not bring
11027 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
11028 autopoint's.
11029
11030 * bootstrap: Check that gettext version matches what's in
11031 configure.ac. Warn users to ignore robots.txt ERROR 404.
11032 * bootstrap: Undo today's earlier change (logged below).
11033 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 11034
6a36ff94
PE
11035 The gettext version checking is causing more trouble than it's
11036 curing; remove it. Problem reported by Paul Hilfinger.
11037
11038 * bootstrap: Issue a warning that one can expect a message
11039 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
11040 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
11041
209ea708
PE
110422004-05-23 Paul Eggert <eggert@cs.ucla.edu>
11043
11044 Ensure that the C++ compiler used for testing actually works on a
11045 simple test program; if not, skip the C++-related tests. Problem
11046 reported by Vin Shelton in:
161a71f3 11047 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
11048
11049 * m4/cxx.m4: New file.
11050 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11051 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11052 * tests/local.at (AT_COMPILE_CXX): Use it.
11053
41ca2549
PE
110542004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11055
383e69dc
PE
11056 * data/glr.c (yylloc): Output this macro even if locations are not
11057 being generated, as the GLR parser needs it even in that case.
11058 Problem reported by Troy A. Johnson
11059 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11060
41ca2549
PE
11061 * configure.ac (AC_INIT): Update to 1.875e.
11062
e476c87d
PE
110632004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11064
11065 * NEWS: Version 1.875d.
11066 * configure.ac (AC_INIT): Likewise.
11067 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11068
11069 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11070 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11071 lalr1.cc runs afoul of the first, and the last two are no longer
11072 supported by GCC 3.4.0.
11073 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11074 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11075
233a88ad
PE
110762004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11077
11078 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11079 unsigned int, for compatibility with latest gnulib hash module.
11080 * src/state.c (state_hash, state_hasher): Likewise.
11081 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11082 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 11083
12ffdd28
PE
110842004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11085
11086 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11087
11088 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11089 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11090 character and string literals.
11091 (unexpected_end): New function.
11092 (unexpected_eof): Use it.
11093 (unexpected_newline): New function.
11094 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11095 actions.
e476c87d 11096
12ffdd28
PE
11097 * NEWS: Document %expect-rr.
11098
11099 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11100 Fix typo by replacing $1 with $option.
11101 Remove more 'intl'-related files.
9668e2be 11102 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
11103
11104 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11105 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11106 strtoul.c.
11107 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11108 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11109 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11110 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11111 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11112 * src/.cvsignore: Add *.output.
11113
11114 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11115 gets copied to the output file.
e476c87d 11116
1f65350a
PE
111172004-04-28 Paul Eggert <eggert@twinsun.com>
11118
11119 Get files from the gnulib and po repositories, instead of relying
11120 on them being in our CVS. Upgrade to latest versions of gnulib
11121 and Automake.
11122
11123 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11124 * bootstrap: Bootstrap from gnulib and po repositories.
11125 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11126 * README-cvs: Document these changes. Remove version numbers from
11127 mentions of build tools, since they change so often. Mention Flex.
11128
11129 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11130 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
11131 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11132 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 11133 does this for us.
12ffdd28
PE
11134 (AC_ISC_POSIX): Remove; we no longer support this
11135 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
11136 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11137 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11138 Do not check for C89 headers, except for locale.h which is used
11139 by the Yacc library and must port to K&R hosts.
11140 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11141 Do not check for C89 functions, except for setlocale which is
11142 used by the Yacc library.
11143 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11144 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11145 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11146 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11147 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11148 AM_GNU_GETTEXT): Remove; now done by:
11149 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11150 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11151 for us.
11152
11153 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11154 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11155 Define to empty, as gnulib.mk will do the rest for us.
11156 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11157 for us.
11158 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11159 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11160
11161 * src/files.c: Include gnulib's xstrndup.h.
11162
11163 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11164 (REALLOC): Use xnrealloc, for likewise.
11165 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11166 (strnlen, memrchr): Remove decls; functions no longer used.
11167 Include <stpcpy.h>.
11168
11169 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11170 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11171 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11172 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11173 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11174 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11175 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11176 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11177 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11178 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11179 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11180 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11181 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11182 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11183 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11184 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11185 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11186 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11187 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11188 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11189 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11190 Remove, as these files are now generated automatically
11191 by bootstrap or automake.
11192
11193 * po/ChangeLog: Remove: all but one entry was a duplicate
11194 of this file, and I moved that 2000-11-02 entry here.
11195
11196 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11197 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11198 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11199 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11200 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11201 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11202 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11203 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11204 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11205 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11206 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11207 xstrndup.h.
11208 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11209 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11210 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11211 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11212 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11213 * src/.cvsignore: Remove *_.c.
11214
11215
11216 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11217 support it. (The latest stable gzip doesn't.)
11218
112192004-04-27 Paul Eggert <eggert@twinsun.com>
11220
11221 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11222 case, as stos_ is now used by destructors due to the 2004-02-09
11223 change.
11224
11225 Remove more K&R C support.
11226 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11227 * lib/subpipe.c (errno): Remove decl.
11228 Include <stdlib.h> unconditionally.
11229 (EXIT_FAILURE): Remove macro.
11230 * src/complain.c (vfprintf, strerror): Remove.
11231 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11232 unconditionally.
11233 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11234 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11235 (strchr, strspn, memchr): Remove decls.
11236 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11237 unconditionally. Do not declare perror.
11238 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11239 unconditionally.
11240
11241 * src/complain.c (_): Remove useless defn, as system.h defines this.
11242
11243 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11244 with latest obstack.h.
11245 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11246 to procedure types, as obstack.h now does that for us.
11247 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11248
11249 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11250 so that this include file can stand alone.
11251 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11252 does this now. Include subpipe.h first after config.h, to
11253 test whether it can stand alone.
11254
11255 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11256 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11257 unused declaration.
11258
11259 * tests/synclines.at (%union synch line): Put a dummy member in
11260 the union, because empty unions aren't allowed in C. Caught
11261 by GCC 3.4.0.
11262
4f16766c
PE
112632004-04-13 Jim Meyering <jim@meyering.net>
11264
11265 * src/conflicts.c (conflicts_print): Correct format string typo:
11266 use `%%' to produce literal `%'. (trivial change)
11267
779e7ceb
PE
112682004-03-30 Paul Eggert <eggert@twinsun.com>
11269
11270 * src/getargs.c (version): Update copyright year to 2004.
11271
11272 * data/c.m4 (b4_int_type): Use 'short int' rather than
11273 'short', and similarly for 'long', 'unsigned', etc.
11274 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11275 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11276 yy_yypstack, yydumpstack): Likewise.
11277 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11278 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11279 Likewise.
11280 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11281 yy_stack_print, yyparse): Likewise.
11282 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11283 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11284 * lib/bitset.c (bitset_print): Likewise.
11285 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11286 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11287 * lib/bitsetv.c (bitsetv_dump): Likewise.
11288 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11289 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11290 Likewise.
11291 * src/LR0.c (allocate_itemsets): Likewise.
11292 * src/gram.h (rule_number, rule): Likewise.
11293 * src/lalr.h (goto_number): Likewise.
11294 * src/nullable.c (nullable_compute): Likewise.
11295 * src/output.c (prepare_rules): Likewise.
11296 * src/relation.c (relation_print, relation_digraph): Likewise.
11297 * src/relation.h (relation_node): Likewise.
11298 * src/state.h (state_number, transitions, errs, reductions,
11299 struct state): Likewise.
11300 * src/symtab.h (symbol_number, struct symbol): Likewise.
11301 * src/tables.c (vector_number, tally, action_number,
11302 default_goto, goto_actions): Likewise.
11303 * tests/existing.at (GNU Cim Grammar): Likewise.
11304 * tests/regression.at (Web2c Actions): Likewise.
11305
11306 * src/output.c (muscle_insert_short_int_table): Renamed from
11307 muscle_insert_short_table. All uses changed.
11308
d6328241
PH
113092004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11310
11311 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11312 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11313 Add %expect-rr rule.
4f16766c 11314
d6328241
PH
11315 * src/scan-gram.l: Recognize %expect-rr.
11316
4f16766c 11317 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 11318 expected_conflicts.
4f16766c 11319 (expected_rr_conflicts): Declare.
d6328241
PH
11320
11321 * src/conflicts.c (expected_sr_conflicts): Rename from
11322 expected_conflicts.
11323 (expected_rr_conflicts): Define.
11324 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11325 for GLR parsers.
11326 Use expected_sr_conflicts in place of expected_conflicts.
11327 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 11328
d6328241 11329 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 11330
1452af69
PE
113312004-03-08 Paul Eggert <eggert@gnu.org>
11332
11333 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 11334 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
11335
11336 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11337 in lalr1.cc.
11338 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11339 * src/scan-gram.l (scan_integer): New function.
11340 ({int}): Use it.
11341 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11342 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11343 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11344 Say "long int", not "long", for uniformity with GNU style.
11345
006d217d
PE
113462004-02-25 Paul Eggert <eggert@twinsun.com>
11347
11348 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11349 compilers. This fixes a problem with Intel's C++ compiler being
11350 chatty, reported by Guido Trentalancia in
161a71f3 11351 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 11352
c2729758
ADL
113532004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11354
11355 Support %destructor and merge error locations in lalr1.cc.
11356
11357 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11358 (Parser::stos_): Define unconditionally.
11359 (Parser::destruct_): New method. Generate its body with
11360 b4_yydestruct_generate.
11361 (Parser::error_start_): New attribute.
11362 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11363 token which are discarded.
11364 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11365 error_start_ when erroneous token are discarded.
11366 (Parser::parse) <yyerrlab1>: Compute the location of the error
11367 token so that it covers all the discarded tokens.
11368 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11369 it can be called with `%skeleton "lalr1.cc"', and do that.
11370
dd0e0635
PE
113712004-02-02 Paul Eggert <eggert@twinsun.com>
11372
11373 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11374 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11375 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11376 There's no need to mention top_builddir since Automake does that
11377 for us.
11378 (INCLUDES): Remove, as Automake says it's obsolescent.
11379 Contents migrated into AM_CPPFLAGS as described above.
11380 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11381
113822004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11383
11384 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11385 (yyreportSyntaxError): Handle case where lookahead token is
11386 YYEMPTY.
11387
be16239b
PH
113882004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11389
11390 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11391 resulting parsers are compilable with C++.
11392
5fa90832
PE
113932003-12-23 Paul Eggert <eggert@twinsun.com>
11394
11395 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11396 * src/output.c (output_skeleton): Rename local var.
11397 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11398 Bison tokens, as this runs afoul of the 2003-10-07 change that
11399 disallowed NUL bytes in character constants or string literals.
11400
11401 * tests/local.at: Require Autoconf 2.59's Autotest.
11402 * tests/testsuite.at: Don't include local.at, since we now assume
11403 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11404 including it.
11405 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11406 multiple inclusion warnings.
dd0e0635 11407
b165c324
AD
114082003-12-02 Akim Demaille <akim@epita.fr>
11409
11410 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11411 conditions.
11412 From Bruno Haible.
11413
26e06a21
ADL
114142003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11415
11416 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11417
92ac3705
PE
114182003-10-07 Paul Eggert <eggert@twinsun.com>
11419
6a5ecb38
PE
11420 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11421 if testsuite doesn't exist.
11422
92ac3705
PE
11423 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11424 literals, unfortunately.
11425 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11426 Complain about NUL bytes in character constants or string literals.
11427
91d2c560
PE
114282003-10-05 Paul Eggert <eggert@twinsun.com>
11429
11430 * NEWS: Don't document %no-default-prec, as it's still
11431 too experimental.
11432 * doc/bison.texinfo: Document %no-default-prec only if
11433 the defaultprec flag is set. Normally it's not.
11434
0cc3da3a
PE
114352003-10-04 Paul Eggert <eggert@twinsun.com>
11436
11437 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11438 non-modifiable lvalue, instead of a modifiable one.
11439 * doc/bison.texinfo (Actions): Document that $$ can
11440 be assigned to. Do not claim that $$ and $N are
11441 array element references: user code should not rely on this.
11442
22fccf95
PE
114432003-10-01 Paul Eggert <eggert@twinsun.com>
11444
11445 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11446 (grammar_declaration): Use it.
11447 * src/scan-gram.l: New token %no-default-prec.
11448 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11449 * NEWS, doc/bison.texinfo: Document the above.
11450
fc8f2965
AD
114512003-10-01 Akim Demaille <akim@epita.fr>
11452
11453 VCG no longer supports long_straight_phase.
11454
11455 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11456 * src/print_graph.c (print_graph): Adjust.
11457
39a06c25
PE
114582003-09-30 Frank Heckenbach <frank@g-n-u.de>
11459 and Paul Eggert <eggert@twinsun.com>
11460
11461 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11462 Table of Symbols): Document %default-prec.
11463 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11464 (grammar_declaration): Set default_prec on %default-prec.
11465 * src/scan-gram.l (%default-prec): New token.
11466 * src/reader.h (default_prec): New flag.
11467 * src/reader.c: Likewise.
11468 (packgram): Handle it.
11469 * tests/conflicts.at (%default-prec without %prec,
11470 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 11471
39a06c25
PE
114722003-09-30 Paul Eggert <eggert@twinsun.com>
11473
11474 * tests/testsuite.at: Include local.at, not input.at, fixing
11475 a typo in the 2003-08-25 patch.
11476
62b6aef9
AD
114772003-08-27 Akim Demaille <akim@epita.fr>
11478
11479 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11480 GCC warnings.
11481
89e1cc61
AD
114822003-08-26 Akim Demaille <akim@epita.fr>
11483
11484 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11485 "<\#" to avoid magic from Gnus when posting parts of this script.
11486
a08460b0
AD
114872003-08-26 Akim Demaille <akim@epita.fr>
11488
11489 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11490 (Parser::parse): here.
11491 Adjust: nerrs and errstatus is now replaced by...
11492 (Parser::nerrs_, Parser::errstatus_): New.
11493
603f1cfd
AD
114942003-08-25 Akim Demaille <akim@epita.fr>
11495
11496 * config/announce-gen, Makefile.cfg: New.
11497 * Makefile.am: Adjust.
11498 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11499 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11500
cd3684cf
AD
115012003-08-25 Akim Demaille <akim@epita.fr>
11502
11503 When reducing initial empty rules, Bison parser read an initial
11504 location that is not defined. This results in garbage, and that
11505 affects Bison's own parser. Therefore we need (i) to extend Bison
11506 to support a means to initialize this location, and (ii) to use
11507 this CVS Bison to fix CVS Bison's parser.
11508
11509 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11510 with...
11511 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11512 * src/parse-gram.y: Adjust.
11513 (%initial-action): New.
11514 (%error-verbose): Since we require CVS Bison, there is no reason
11515 not to use it.
11516 * src/scan-gram.l: Adjust.
11517 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11518 * data/yacc.c (yyparse): Use b4_initial_action.
11519
4e03e201
AD
115202003-08-25 Akim Demaille <akim@epita.fr>
11521
11522 * doc/bison.texinfo: Don't promote stdout for error messages.
11523
8c182d05
AD
115242003-08-25 Akim Demaille <akim@epita.fr>
11525
11526 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11527 From Alexandre Duret-Lutz.
11528
6a60c4cf
PE
115292003-08-25 Akim Demaille <akim@epita.fr>
11530
11531 Version 1.875c.
11532
25f66e1a
AD
115332003-08-25 Akim Demaille <akim@epita.fr>
11534
11535 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11536 Use them.
11537
5348bfbe
AD
115382003-08-25 Akim Demaille <akim@epita.fr>
11539
11540 * data/lalr1.cc (Parser::reduce_print_): New.
11541 Use it.
11542
47301314
AD
115432003-08-25 Akim Demaille <akim@epita.fr>
11544
11545 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11546 error recovery loops. This patch is based on
161a71f3 11547 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
11548 Also, augment the similarity between lalr1.cc and yacc.c.
11549 Note: the locations of error recovery rules are not correct yet.
11550
11551 * data/lalr1.cc: Comment changes to augment the similarity between
11552 lalr1.cc and yacc.c.
11553 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11554 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11555 yyerrlab), when hitting EOF, pop the whole stack here instead of
11556 merely falling thru the default error handling mechanism.
11557 (yyerrorlab): New label, with the old contents of YYERROR,
11558 plus the following change: pop the stack of rhs corresponding
11559 to the production that invoked YYERROR. That is how Yacc
11560 behaves (required by POSIX).
11561 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11562 fail.
11563
1f7a61ff
AD
115642003-08-25 Akim Demaille <akim@epita.fr>
11565
11566 Tune local.at so that people can "autom4te -l autotest calc.at -o
11567 calc" for instance, to extract a sub test suite.
11568
11569 * tests/testsuite.at: Move the initialization, Autotest version
11570 requirement, and AT_TESTED invocation into...
11571 * tests/local.at: here.
11572 * tests/testsuite.at: Include it for compatibility with Autoconf
11573 2.57.
11574 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11575 be ignore.
11576
327b5b56
PE
115772003-08-04 Paul Eggert <eggert@twinsun.com>
11578
11579 Rework code slightly to avoid gcc -Wtraditional warnings.
11580 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11581 The returned value is now stored in *YY0. All callers changed.
11582 * src/output.c (merge_output): Adjust to the above change.
11583
0051e3ed
PE
115842003-07-26 Paul Eggert <eggert@twinsun.com>
11585
11586 * data/glr.c (YYASSERT): New macro.
11587 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11588 yyresolveStates, yyprocessOneStack):
11589 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11590 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 11591
137437c6
PE
115922003-07-25 Paul Eggert <eggert@twinsun.com>
11593
5b620e06
PE
11594 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11595 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 11596 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
11597 by Frank Heckenbach, though I have omitted the structure-initialization
11598 part of his glr-knr.diff patch since I recall that the Portable
11599 C Compiler didn't require that change.
11600
137437c6
PE
11601 Let the user specify how to allocate and free memory.
11602 Derived from a suggestion by Frank Heckenbach in
161a71f3 11603 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
11604 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11605 All uses of free, malloc, realloc changed to use these macros,
11606 and unnecessary casts removed.
11607 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11608
ddb85ca5
PE
116092003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11610
11611 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11612 use s.empty() rather than s == "" to test for empty string; see
161a71f3 11613 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
11614 (trivial change)
11615
39910e09
AD
116162003-06-25 Akim Demaille <akim@epita.fr>
11617
11618 * config/depcomp, config/install-sh: Update from masters.
11619
0ae99356
PE
116202003-06-20 Paul Eggert <eggert@twinsun.com>
11621
11622 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11623 and return properly parenthesized result.
11624 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11625 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11626 Remove unnecessary parentheses from uses.
11627 * doc/bison.texinfo (Location Default Action): Describe the
11628 conventions for parentheses.
11629
cd05d13c
PE
116302003-06-19 Paul Eggert <eggert@twinsun.com>
11631
81fd08ca
PE
11632 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11633 yyreportTree): Do not assume that size_t is the same width as int,
11634 when printing sizes. Print sizes using an unsigned format.
11635 Problem reported by Frank Heckenbach in
161a71f3 11636 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 11637
cd05d13c
PE
11638 Port to Forte Developer 7 C compiler.
11639 * data/glr.c (struct YYLTYPE): If locations are not being used,
11640 declare a single dummy member, as empty structs do not conform
11641 to the C standard.
11642 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11643 the Forte Developer 7 C compiler complains that end-of-loop
11644 code is not reached.
11645
4dcf140b
PE
116462003-06-17 Paul Eggert <eggert@twinsun.com>
11647
11648 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11649 avoid warnings from picky compilers about redefinition of PARAMS.
11650
8dd76bee
PE
116512003-06-17 Paul Eggert <eggert@twinsun.com>
11652
11653 Version 1.875b.
11654
11655 * NEWS: Document 1.875b.
11656
11657 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11658 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11659 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11660 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11661 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11662 per recent gettext manual's suggestion.
11663 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11664 Use prototypes, not old-style definitions.
11665 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11666 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11667 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11668 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11669 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11670 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11671 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11672 vbitset_or_and_cmp, vbitset_copy): Likewise.
11673
11674 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11675 Do not include <stdlib.h>.
11676 (PARAMS): Define unconditionally for C89.
11677 (ATTRIBUTE_NORETURN): Remove.
11678 (ATTRIBUTE_UNUSED): Define unconditionally.
11679
11680 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 11681 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
11682 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11683 * lib/vbitset.c, lib/vbitset.h: New files.
11684 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11685 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11686 from libbitset.
11687
11688 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11689 `How Can I Reset @code{yyparse}', since texinfo does not allow
11690 arbitrary @ in node names.
11691
11692 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11693 shouldn't be needed according to the gettext 0.12.1 documentation
11694 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 11695 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 11696 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 11697 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 11698
8dd76bee
PE
11699 * lib/.cvsignore: Add stdbool.h.
11700 * m4/.cvsignore: Add nls.m4, po.m4.
11701
11702 Upgrade to CVS gnulib.
11703 * stdbool_.h: File renamed from stdbool.h.in.
11704 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11705 AC_HEADER_STDBOOL.
11706 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11707 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11708 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11709 (MOSTLYCLEANFILES): New var.
11710 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11711 (stdbool.h): New rule.
11712 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11713 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11714 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11715 m4/quote.m4: Upgrade to today's gnulib.
11716
11717 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11718 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11719 the tests right now.
11720 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11721 yyerror are declared before use; C99 requires this.
11722
25005f6a
PH
117232003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11724
11725 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11726 first.
11727 (yyrecoverSyntaxError): Correct the logic for setting and testing
11728 yyerrState.
11729 Correct comment on handling EOF.
11730 Allow states with only a default reduction, rather than failing
8dd76bee 11731 (I can't quite reconstruct why these were not allowed before).
25005f6a 11732
137437c6 11733 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 11734 buffer overruns, corrupting state.
8dd76bee
PE
11735
11736 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
11737 definition.
11738 * src/reader.h (max_left_semantic_context): New variable declaration.
11739 * src/scan-gram.l (max_left_semantic_context): Define.
11740 (handle_action_dollar): Update max_left_semantic_context.
11741 * data/glr.c (YYMAXLEFT): New definition.
11742 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11743 (yyresolveAction): Ditto.
11744
11745 Fixes to problems with location handling in GLR parsers reported by
11746 Frank Heckenbach (2003/06/05).
11747
11748 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11749 (YYRHSLOC): Add parentheses, and define only if locations used.
11750 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11751 locations not used.
11752 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11753 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 11754
25005f6a
PH
11755 * tests/cxx-type.at: Exercise location information; update tests
11756 to differentiate output with and without locations.
8dd76bee 11757 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
11758 because default YYLTYPE not yet defined.
11759 Change semantic actions to compute strings, rather than printing
11760 them directly (to test proper passing of semantics values). Change
11761 output to prefix notation and update test data and expected results.
11762 (yylex): Track locations.
11763 (stmtMerge): Return value rather than printing, and include arguments
11764 in value.
8dd76bee 11765
711f40b7
PE
117662003-06-03 Paul Eggert <eggert@twinsun.com>
11767
11768 Avoid warnings generated by GCC 2.95.4 when Bison is
11769 configured with --enable-gcc-warnings.
11770 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11771 yy::]b4_parser_class_name[::translate_,
11772 yy::Stack::operator[] (unsigned),
11773 yy::Stack::operator[] (unsigned) const,
11774 yy::Slice::operator[] (unsigned),
11775 yy::Slice::operator[] (unsigned) const):
11776 Rename local vars to avoid warnings.
11777 * tests/glr-regression.at (Improper handling of embedded actions
11778 and $-N in GLR parsers): Remove unused local variable from yylex.
11779 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11780 (void) as arg when not pure, since we now assume C89 when building
11781 Bison. Pacify GCC by using parameter.
11782
ac695f7d
PE
117832003-06-02 Paul Eggert <eggert@twinsun.com>
11784
11785 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11786 yy::Location::lines, yy::Location::columns): Rename arguments
11787 to avoid shadowing; this removes a warning generated by GCC 3.3.
11788
26ec81e0
PE
117892003-06-01 Paul Eggert <eggert@twinsun.com>
11790
11791 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11792 to g++, as GCC 3.3 complains if you do it.
11793 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11794 everything that WARNING_CFLAGS has, except omit warnings
11795 not suitable for C++.
11796 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11797 * tests/atlocal.in (CXXFLAGS): New var.
11798 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11799
11800 Fix a GLR parser bug I reported in February; see
161a71f3 11801 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
11802 The problem was that GLR parsers did not conform to the C standard,
11803 because actions like { $1 = $2 + $3; } expanded to expressions
11804 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11805 to a local variable. The C standard says that expressions
11806 like (var = f ()) + (var = f ()) have undefined behavior.
11807 Another problem was that GCC sometimes issues warnings that
11808 yyfill and its parameters are unused.
11809
11810 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11811 as possibly unused.
11812 (yyfill): New function.
11813 (YYFILL): Use it.
11814 (yyuserAction): Change type of yynormal to bool, so that it matches
11815 the new yyfill signature. Mark it as possibly unused.
11816
11817
11818 Follow up on a bug I reported in February, where a Bison-generated
11819 parser can loop. Provide a test case and a fix for yacc.c. I
11820 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11821 The original bug report is in:
161a71f3 11822 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
11823
11824 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11825 macro's size was becoming unwieldy.
11826 (yyerrlab): Do not discard an empty lookahead symbol, as this
11827 might destroy garbage.
11828 (yyerrorlab): New label, with the old contents of YYERROR,
11829 plus the following change: pop the stack of rhs corresponding
11830 to the production that invoked YYERROR. That is how Yacc
11831 behaves, and POSIX requires this behavior.
11832 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11833 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11834 Define 'alarm' to do nothing if unistd.h is not available.
11835 Add a new rule "exp: '-' error;" to test the above change to
11836 data/yacc.c. Use 'alarm' to abort any test taking longer than
11837 10 seconds, as it's probably looping.
11838 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11839 Also, the new yacc.c generates two fewer diagnostics for an
11840 existing test.
11841
d0829076
PE
118422003-05-24 Paul Eggert <eggert@twinsun.com>
11843
c6ae27df
PE
11844 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11845 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11846 This fixes a problem reported by John Bowman when the Compaq/HP
11847 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11848 -ansi -Wall -gall).
11849 * data/yacc.c (union yyalloc): Likewise.
11850 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 11851
d0829076
PE
11852 Switch from 'int' to 'bool' where that makes sense.
11853
11854 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11855 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11856 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11857 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11858 Return or accept bool, not int. All callers changed.
11859 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11860 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11861 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11862 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11863 bitset_or_and_cmp_): Likewise.
11864 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11865 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11866 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11867 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11868 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11869 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11870 bitset_stats_or_and_cmp): Likewise.
11871 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11872 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11873 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11874 ebitset_xor_cmp): Likewise.
11875 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11876 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11877 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11878 lbitset_xor_cmp): Likewise.
11879 * lib/bbitset.h: Include <stdbool.h>.
11880 (struct bitset_vtable): The following members now return bool, not
11881 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11882 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11883 or_and_cmp).
11884 * src/conflicts.c (count_rr_conflicts): Likewise.
11885 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11886 All uses changed.
11887 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11888 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11889 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11890 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11891 graph_flag): Likewise.
11892 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11893 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11894 graph_flag): Likewise.
11895 * src/output.c (error_verbose): Likewise.
11896 * src/output.h (error_verbose): Likewise.
11897 * src/reader.c (start_flag, typed): Likewise.
11898 * src/reader.h (typed): Likewise.
11899 * src/getargs.c (LOCATIONS_OPTION): New constant.
11900 (long_options, getargs): Use it.
11901 * src/lalr.c (build_relations): Use bool, not int.
11902 * src/nullable.c (nullable_compute): Likewise.
11903 * src/print.c (print_reductions): Likewise.
11904 * src/tables.c (action_row, pack_vector): Likewise.
11905 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11906 * src/output.c (prepare): Use it.
11907 * src/output.c (token_definitions_output,
11908 symbol_destructors_output, symbol_destructors_output): Use string,
11909 not boolean integer, to keep track of whether to output separator.
11910 * src/print_graph.c (print_core): Likewise.
11911 * src/state.c (state_rule_lookaheads_print): Likewise.
11912
11913 * config/install-sh: Sync from automake 1.7.5.
11914
6b2584b7
PE
119152003-05-14 Paul Eggert <eggert@twinsun.com>
11916
11917 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11918 semicolon after a grammar declaration, in the interest of possible
11919 future changes to the Bison input language.
11920 Do not allow a stray semicolon at the start of the grammar.
11921 (rhses.1): Allow one or more semicolons after any rule, including
11922 just before "|" as required by POSIX.
11923 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11924 grammar.
11925
caf37a36
ADL
119262003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11927
11928 %parse-param support for lalr1.cc.
11929
11930 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11931 b4_cc_constructor_calls, b4_cc_constructor_call,
11932 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11933 definitions.
11934 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11935 parse-param arguments.
11936 (yy::b4_parser_class_name): Declare instance variables to
11937 hold parse-param arguments.
11938 * tests/calc.at: s/value/semantic_value/ because value clashes
11939 with a member of yy::b4_parser_class_name. Adjust C++ code
11940 to handle %parse-param. Enable %parse-param test in C++.
11941
3ab37077
PE
119422003-05-12 Paul Eggert <eggert@twinsun.com>
11943
11944 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11945 English a bit. Fix fclose typo. Change "const char" to "char
11946 const", and use ANSI C rather than K&R for "main". Suggest
11947 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11948 and suggest yy_switch_to_buffer.
11949
119502003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
11951
11952 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11953 C89. This avoids a diagnostic on compilers that define __STDC__
11954 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 11955 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 11956
e743727f
PE
119572003-05-03 Paul Eggert <eggert@twinsun.com>
11958
11959 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11960 Do not overrun array bounds.
11961 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 11962 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 11963
916708d5
AD
119642003-04-29 Akim Demaille <akim@epita.fr>
11965
11966 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11967 * src/getargs.c, src/getargs.h: here, as bool, not int.
11968 (nondeterministic_parser): New.
11969 * src/parse-gram.y, src/scan-gram.l: Support
11970 %nondeterministic-parser.
11971 * src/output.c (prepare): Use nondeterministic_parser instead
11972 of glr_parser where appropriate.
11973 * src/tables.c (conflict_row, action_row, save_row)
11974 (token_actions, token_actions, pack_vector): Ditto.
11975
a06ea4aa
AD
119762003-04-29 Akim Demaille <akim@epita.fr>
11977
11978 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11979
211074ca
AD
119802003-04-29 Akim Demaille <akim@epita.fr>
11981
11982 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11983 with %pure-parser and %locations to exercise the patch from Yakov
11984 Markovitch below.
11985
6175ffe3
PE
119862003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11987
11988 * data/yacc.c: (b4_lex_param): Corrected for the case where
11989 %lex-param is provided and %pure-parser isn't.
11990
b1e95857
PE
119912003-04-27 Paul Eggert <eggert@twinsun.com>
11992
11993 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 11994 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
11995 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11996 if it is not defined.
11997 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11998
acda9df6
PE
119992003-04-26 Paul Eggert <eggert@twinsun.com>
12000
3470c57b
PE
12001 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
12002 Declare to be of type suitable for the ninf value itself, not of
12003 type suitable for the corresponding table, since the latter might
12004 be unsigned but the ninf value might be negative. This fixes a
12005 bug reported by Alexandre Duret-Lutz in
161a71f3 12006 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 12007
acda9df6
PE
12008 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
12009 invokes it. We shouldn't invoke it twice because it will attempt
12010 to put error.o in the archive twice. This fixes a glitch reported
12011 by Martin Mokrejs in
161a71f3 12012 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 12013
b5250f26
PE
120142003-04-21 Paul Eggert <eggert@twinsun.com>
12015
12016 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
12017 to gnulib.
12018
089ac0f1
PE
120192003-04-21 Yakov Markovitch <Markovitch@iso.ru>
12020
12021 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
12022 Fix obvious typo that results in uncompilable GLR parsers
12023 when both %pure-parser and %locations are used. (trivial change)
12024
5ededac6
PE
120252003-04-17 Paul Eggert <eggert@twinsun.com>
12026
1b8f2fff
PE
12027 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
12028 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
12029 Do not insert the expected token via unput, as this runs afoul
12030 of a POSIX-compatibility bug in flex 2.5.31.
12031 All uses changed to BEGIN the parent state,
12032 since we no longer insert the expected token via unput.
12033 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
12034 that is no longer emitted after the above change.
12035
5ededac6
PE
12036 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
12037 the first one. This change is from Paul Hilfinger, and it fixes
12038 regression reported by Werner Lemberg in
161a71f3 12039 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
12040
12041 (resolve_sr_conflict): Don't invoke state_errs_set
12042 unless one or more tokens have been explicitly made errors.
12043 Otherwise, the above change causes Bison to abort.
12044
12045 * tests/existing.at (GNU pic Grammar): New test case, taken from
12046 Lemberg's email.
12047
b8be9132
AD
120482003-03-31 Akim Demaille <akim@epita.fr>
12049
12050 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12051
d423d460
AD
120522003-03-31 Akim Demaille <akim@epita.fr>
12053
12054 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12055 output.
12056
c7e441b4
AD
120572003-03-31 Akim Demaille <akim@epita.fr>
12058
12059 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12060 From Paul Hilfinger.
12061
231897ad
AD
120622003-03-29 Akim Demaille <akim@epita.fr>
12063
12064 * m4/error.m4: Do not put under dynamic conditions some code which
12065 expansion is under static control.
12066
5b066063
AD
120672003-03-29 Akim Demaille <akim@epita.fr>
12068
12069 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12070
22a74fec
AD
120712003-03-29 Akim Demaille <akim@epita.fr>
12072
12073 * doc/bison.texinfo (Strings are Destroyed): New.
12074
0eee27e7
PE
120752003-03-13 Paul Eggert <eggert@twinsun.com>
12076
12077 * .cvsignore: Add configure.lineno.
12078 * src/.cvsignore: Add yacc.
12079 * tests/.cvsignore: Add testsuite.log.
12080 * doc/fdl.texi: Sync with latest FSF version.
12081
f61aad93
PE
120822003-03-12 Paul Eggert <eggert@twinsun.com>
12083
537636c7
PE
12084 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12085 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12086 cursor, instead of leaving it undefined. This fixes a bug
12087 reported by Tim Van Holder in
161a71f3 12088 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
12089 * tests/input.at (Torturing the Scanner): Test the scanner on
12090 an empty input file, which was Tim Van Holder's test case.
12091
12092 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12093 <sys/resource.h> can be included, include sys/time.h and
12094 sys/times.h first, if available. This works around the SunOS
12095 4.1.4 porting bug reported by Bruce Becker in
161a71f3 12096 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
12097
12098 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12099 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12100 AC_HEADER_SYS_WAIT.
12101
f61aad93
PE
12102 Merge changes from gnulib. This was prompted because the CVS
12103 snapshot didn't build on Solaris 7 due to strnlen problems.
12104
12105 These changes need to be merged back into gnulib:
12106 * lib/hash.c: Include <stdbool.h> unconditionally.
12107 * m4/onceonly.m4 (m4_quote): New macro.
12108 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12109 Quote AC_FOREACH variable-expansions properly.
12110 The 2003-01-03 obstack.h change also needs merging.
12111 {end of changes requiring merging}
5b066063 12112
f61aad93
PE
12113 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12114 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12115 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12116 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12117 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12118 New files, imported from gnulib.
12119 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12120 above.
12121
12122 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12123 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12124 gnulib sources.
12125
12126 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12127 Add.
12128 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12129 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12130 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12131 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12132 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12133 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12134 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12135 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12136 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12137 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12138 (jm_PREREQ_ARGMATCH): Remove.
12139 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12140 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12141
12142 * src/system.h: Include <stdbool.h> unconditionally.
12143
12144 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12145 assuming at least C89 in the bitset code for some time now.
12146
d2ffe116
AD
121472003-03-03 Akim Demaille <akim@epita.fr>
12148
12149 * ro.po: New.
12150
052826fd
AD
121512003-03-02 Akim Demaille <akim@epita.fr>
12152
12153 * doc/bison.texinfo (Table of Symbols): Reactivate the
12154 documentation for %lex-param, and %parse-param.
12155
c4749565
AD
121562003-03-02 Akim Demaille <akim@epita.fr>
12157
12158 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12159 generate verbose error messages.
12160 Use the number of tokens as an upper bound in yytname, as it
12161 cannot be a non terminal.
12162
d5286af1
AD
121632003-03-02 Akim Demaille <akim@epita.fr>
12164
12165 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12166 message.
12167
22e304a6
AD
121682003-03-02 Akim Demaille <akim@epita.fr>
12169
22e304a6
AD
12170 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12171 Use them to exercise yycheck overrun.
12172 Based on Andrew Suffield's grammar.
12173
67a25fed
AD
121742003-03-02 Akim Demaille <akim@epita.fr>
12175
12176 Create tests/local.at for Bison generic testing macros.
12177
12178 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12179 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12180 This new file.
12181 * tests/calc.at (AT_CHECK_CALC): Adjust.
12182 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12183 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12184 * tests/local.at: here.
12185 (AT_COMPILE_CXX): Tags the tests using it as c++.
12186 Ignore the test if CXX is not functional.
12187
9c2b381f
PE
121882003-03-01 Paul Eggert <eggert@twinsun.com>
12189
12190 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12191 not loc->end, since loc->end might contain garbage and this leads
12192 to undefined behavior on some platforms.
12193 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12194 depend on *loc, so that the reader doesn't give the the false
12195 impression that *loc is initialized.
12196 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12197 does not survive the return.
12198
0433ba88
AD
121992003-03-01 Akim Demaille <akim@epita.fr>
12200
12201 * src/scan-gram.l (code_start): Always initialize it when entering
12202 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12203 yylex invocation. An alternative would be making it static, but
12204 then it starts with the second %%'s beginning, instead of its end.
12205
b305ea69
PE
122062003-02-28 Paul Eggert <eggert@twinsun.com>
12207
12208 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12209 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 12210 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 12211
c3d25e01
PE
122122003-02-26 Paul Eggert <eggert@twinsun.com>
12213
12214 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12215 Remove Sequent/Pyramid discussion (nobody uses them any more).
12216 Merge VMS and MS-DOS discussion; these ports may well be dead
12217 but let's keep mentioning them for now. Put <> around email
12218 addresses. Add copyright notice.
12219
c267ffbc
PE
122202003-02-24 Paul Eggert <eggert@twinsun.com>
12221
12222 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12223 to avoid collision with flex use of yylineno.
12224 Problem reported by Bruce Lilly in
161a71f3 12225 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
12226 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12227 * data/yacc.c (yy_reduce_print): Likewise.
12228
12229 * config/depcomp: Sync with Automake 1.7.3.
12230
f939fc12
AD
122312003-02-21 Akim Demaille <akim@epita.fr>
12232
12233 * data/lalr1.cc: Use temporary variables instead of casts to
12234 change integer types.
12235 Suggested by Paul Eggert.
12236
95923bd6
AD
122372003-02-21 Akim Demaille <akim@epita.fr>
12238
12239 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12240 to avoid confusions with lalr1.cc's notion of Position.
12241 Suggested by Paul Eggert.
12242
2cdc240e
AD
122432003-02-20 Akim Demaille <akim@epita.fr>
12244
12245 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12246 before initial_columns.
12247 (location.hh): Use consistent variable names when defining the
12248 operator<<.
12249 Use "last" so that we subtract from Positions, not from unsigned.
12250
5d003116
AD
122512003-02-20 Akim Demaille <akim@epita.fr>
12252
12253 * data/lalr1.cc (position.hh): New subfile, including the extended
12254 and Doxygen'ed documentation of class Position.
12255 (location.hh): Use it.
12256 Document a` la Doxygen.
ba1ecc07 12257 With the help of Benoit Perrot.
5d003116 12258
d02b25f9
AD
122592003-02-20 Akim Demaille <akim@epita.fr>
12260
12261 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12262 AT_YACC_IF.
12263 Redefine AT_YYERROR_SEES_LOC_IF using it.
12264 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12265 not defined.
12266 Don't use the location in yy::Parser::error_ and
12267 yy::Parser::print_ when not %locations.
12268 Activate more lalr1.cc tests.
12269
0d1c3a04
AD
122702003-02-19 Akim Demaille <akim@epita.fr>
12271
12272 * data/lalr1.cc: When displaying a line number, be sure to make it
12273 an int.
12274
60a777aa
AD
122752003-02-19 Akim Demaille <akim@epita.fr>
12276
12277 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12278 Remove, useless.
12279 (YYABORT, YYACCEPT, YYERROR): New.
12280 * tests/calc.at: Renable the lalr1.cc test.
12281
0b86fc41
AD
122822003-02-19 Akim Demaille <akim@epita.fr>
12283
12284 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12285 error recovery, mixing with/without pops and discarding of the
12286 lookahead.
12287 Exercise YYERROR.
12288 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12289
da99a5dc
PE
122902003-02-17 Paul Eggert <eggert@twinsun.com>
12291
12292 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12293 * tests/testsuite.at (AT_COMPILE): Use them.
12294 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 12295 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 12296
93b8c255
PE
122972003-02-12 Paul Eggert <eggert@twinsun.com>
12298
12299 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12300 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 12301 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
12302 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12303 Check for malloc failure, for consistency with yacc.c.
12304 (yytname_size): Remove, for consistency with yacc.c.
12305
12306 The bug still remains in data/lalr1.cc, as I didn't have time
12307 to fix it there.
12308
7548fed2
AD
123092003-02-06 Akim Demaille <akim@epita.fr>
12310
12311 * configure.ac (GXX): Rename as...
12312 (CXX): this, to keep the original Autoconf semantics.
12313 Require 2.57.
12314 * data/lalr1.cc: Fix b4_copyright invocations.
12315 If YYDEBUG is not defined, don't depend upon name_ being defined.
12316 (location.hh): Include string and iostream.
12317 (Position::filename): New member.
12318 (Position::Position ()): New.
12319 (operator<< (Position)): New.
12320 (operator- (Position, int)): New.
12321 (Location::first, Location::last): Rename as...
12322 (Location::begin, Location::end): these, to mock the conventional
12323 iterator names.
12324 (operator<< (Location)): New.
12325 * tests/atlocal.in (CXX): New.
12326 * tests/testsuite.at (AT_COMPILE_CXX): New.
12327 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12328 locations in a more synthetic way.
12329 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12330 lalr1.cc is used.
12331 Adjust the C locations to match those from Emacs: first column is
12332 column 0.
12333 Change all the expected results.
12334 Conform to the GCS: simplify the locations when applicable.
12335 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12336 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12337 these CPP macros with the m4 macros new defined by...
12338 (AT_CHECK_PUSHDEFS): this, i.e.:
12339 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 12340 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
12341 New macros.
12342 (AT_CHECK_POPDEFS): Undefine them.
12343 (AT_CHECK_CALC_LALR1_CC): New.
12344 Use it for the first lalr1.cc test.
12345
43a176ef
AD
123462003-02-04 Akim Demaille <akim@epita.fr>
12347
12348 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12349 Location as is defined.
12350
fc049e9c
AD
123512003-02-04 Akim Demaille <akim@epita.fr>
12352
12353 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12354 name_ being defined.
12355
a737b216
PE
123562003-02-03 Paul Eggert <eggert@twinsun.com>
12357
12358 * src/gram.h (start_symbol): Remove unused decl.
12359
12360 Use more-consistent naming conventions for local vars.
12361
12362 * src/derives.c (derives_compute): Change type of local var from
12363 int to rule_number.
12364 * src/gram.c (grammar_rules_partial_print): Likewise.
12365 * src/print.c (print_core): Likewise.
12366 * src/reduce.c (reduce_grammar_tables): Likewise.
12367
12368 * src/gram.c (grammar_dump): Change name of item_number *
12369 local var from r to rp.
12370 * src/nullable.c (nullable_compute): Likewise.
12371
12372 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12373
12374 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12375 for symbol or symbol_number var.
12376 * src/reader.c (grammar_start_symbol_set): Likewise.
12377 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12378 Likewise.
12379 * src/state.c (transitions_to): Likewise.
12380 * src/state.h: Likewise.
12381 * src/tables.c (symbol_number_to_vector_number): Likewise.
12382
12383 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12384 char * var.
12385
12386 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12387 var.
12388
12389 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12390 var.
12391
12392 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12393 Use str, not s, for char * var. Use ch, not c, for character var.
12394 Use size for size var.
12395
12396 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12397 char * var.
12398 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12399 uniqstr var.
12400 * src/uniqstr.h: Likewise.
12401
12402 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12403 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12404 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12405 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12406 param to have same name as that of enum, so that we don't use
12407 "s" to stand for a non-state.
12408
68e93ad5
AD
124092003-02-02 Akim Demaille <akim@epita.fr>
12410
12411 * src/scan-skel.l: Scan more than one inert character per yylex
12412 invocation.
12413
92898986
PE
124142003-02-01 Paul Eggert <eggert@twinsun.com>
12415
12416 Version 1.875a.
12417
1d9d5d71
PE
12418 * po/LINGUAS: Add ms.
12419
0435d061
AD
124202003-01-30 Akim Demaille <akim@epita.fr>
12421
12422 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12423
6029a57f
PH
124242003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12425
12426 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12427 of $1.
0435d061
AD
12428
12429 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 12430 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 12431 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 12432
6029a57f
PH
12433 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12434 (b4_rhs_location): Ditto.
0435d061 12435 (yyfill): New function to copy from stack tree into array
6029a57f 12436 incrementally.
0435d061
AD
12437 (yyuserAction): Modify to allow incremental move of semantic values
12438 to rhs array when in GLR mode.
12439 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
12440 as needed.
12441 Remove dummy use of yystack, as there is now a guaranteed use.
12442 (yydoAction): Modify to allow incremental move of semantic values
12443 to rhs array when in GLR mode.
12444 (yyresolveAction): Ditto.
12445 (yyglrShiftDefer): Update comment.
0435d061 12446 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
12447 (yyglrReduce): Ditto.
12448 (yydoAction): Ditto
0435d061 12449
6029a57f
PH
12450 * tests/glr-regr1.at: Rename to ...
12451 * tests/glr-regression.at: Add new regression test for the problems
12452 described above (adapted from S. Eken).
12453 Update copyright notice.
12454 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12455 * tests/Makefile.am: Ditto.
12456
6cee6297
PE
124572003-01-28 Paul Eggert <eggert@twinsun.com>
12458
12459 * data/lalr1.cc: Do not use @output_header_name@ unless
12460 b4_defines_flag is set. This fixes two bugs reported by
12461 Tim Van Holder in
161a71f3
PE
12462 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12463 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 12464
b2a836b5
PE
124652003-01-21 Paul Eggert <eggert@twinsun.com>
12466
12467 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12468 we don't need to worry about yyerrlab1 being reported as an
12469 "unused label" by non-GCC C compilers. The downside is that if
12470 locations are used then a couple of statements are duplicated each
12471 time YYERROR is invoked, but the upside is that the warnings
12472 should vanish.
12473 (yyerrlab1): Move code to YERROR.
12474 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12475 This reverts some of the 2002-12-27 change.
12476
4196b931
PE
124772003-01-17 Paul Eggert <eggert@twinsun.com>
12478
12479 * src/output.c (symbol_printers_output): Fix typo that led
12480 to core dump. Problem reported by Antonio Rus in
161a71f3 12481 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 12482
3ae831b4
AD
124832003-01-13 Akim Demaille <akim@epita.fr>,
12484 Quoc Peyrot <chojin@lrde.epita.fr>,
12485 Robert Anisko <anisko_r@lrde.epita.fr>
12486
12487 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12488 when the stacks contain one element, as the loop would otherwise
12489 free the last state, and then use the top state (the one we just
12490 popped). This means that the initial elements will not be freed
12491 explicitly, as is the case in yacc.c; it is not a problem, as
12492 these elements have fake values.
12493
e3aa65c5
PE
124942003-01-11 Paul Eggert <eggert@twinsun.com>
12495
12496 * NEWS: %expect-violations are now just warnings, reverting
12497 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12498 bootstrapping problem reported by Matthias Klose; see
161a71f3 12499 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
12500 * src/conflicts.c (conflicts_print): Likewise.
12501 * tests/conflicts.at (%expect not enough, %expect too much,
12502 %expect with reduce conflicts): Likewise.
12503 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12504 that the warning is enabled if the number of conflicts changes
12505 (not necessarily increases).
12506
12507 * src/getargs.c (version): Update copyright year.
12508
f0057011
AD
125092003-01-09 Akim Demaille <akim@epita.fr>
12510
12511 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12512
1ee6d2a0
PE
125132003-01-08 Paul Eggert <eggert@twinsun.com>
12514
12515 * Makefile.maint (WGETFLAGS):
12516 New macro, containing "-C off" to disable proxy caches.
12517 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12518 (rel-check): Use $(WGET) instead of wget.
12519
d4fd77c4
PE
125202003-01-06 Paul Eggert <eggert@twinsun.com>
12521
12522 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12523 the GLR paper of Scott, Johnstone and Hussain.
12524
464c6927
PE
125252003-01-04 Paul Eggert <eggert@twinsun.com>
12526
d600ee67
PE
12527 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12528 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12529 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12530 (EXTRA_LIBRARIES): New var, for liby.a.
12531 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12532 (EXTRA_SCRIPTS): New var, for yacc.
12533
464c6927
PE
12534 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12535 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12536 Problem reported by Nelson H. F. Beebe.
12537
125382003-01-03 Paul Eggert <eggert@twinsun.com>
12539
12540 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12541 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12542 when compiling Bison 1.875's `bitset bset = obstack_alloc
12543 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12544
12545 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12546 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12547 grow to a huge size with typical invocation.
d600ee67 12548
464c6927
PE
12549 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12550 Use the pattern recommended by Autoconf 2.57, except also protect
12551 against double-definition.
12552 * src/system.h: Likewise.
12553 Portability issues reported by Nelson H. F. Beebe.
d600ee67 12554
464c6927
PE
12555 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12556 All uses changed. Provide a definition in both C and C++.
12557 (yytrue, yyfalse): Define even if defined (__cplusplus).
12558
12559 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12560 Reported by Nelson H. F. Beebe.
d600ee67 12561
464c6927
PE
12562 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12563
0f42c7d5
PE
125642003-01-02 Paul Eggert <eggert@twinsun.com>
12565
12566 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12567 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12568 Bug reported by Nelson H. F. Beebe.
12569
dc546b0f
PE
125702003-01-01 Paul Eggert <eggert@twinsun.com>
12571
12572 * Version 1.875.
12573
2c09b6a7
PE
125742002-12-30 Paul Eggert <eggert@twinsun.com>
12575
12576 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12577 Moved here from...
12578 (<INITIAL>","): Here. This causes stray "," to be treated
12579 more uniformly.
12580
dc546b0f 12581 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
12582 last brace in braced code when not in Yacc mode, for compatibility
12583 with Bison 1.35. This resurrects the 2001-12-15 patch to
12584 src/reader.c.
12585
12586 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12587 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12588
535c0f63
PE
125892002-12-28 Paul Eggert <eggert@twinsun.com>
12590
12591 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12592 that of SYM's type. This fixes Debian bug 168069, reported by
12593 Thomas Olsson.
d600ee67 12594
963fcc17
PE
125952002-12-28 Paul Eggert <eggert@twinsun.com>
12596
12597 Version 1.75f.
12598
12599 Switch back to the Yacc style of conflict reports, undoing some
12600 of the 2002-07-30 change.
12601 * doc/bison.texinfo (Understanding): Use Yacc style for
12602 conflict reports. Also, use new way of locating rules.
12603 * src/conflicts.c (conflict_report):
12604 Renamed from conflict_report_yacc, removing the old
12605 'conflict_report'. Translate the entire conflict report at once,
12606 so that we don't assume that "," has the same interpretation in
12607 all languages.
12608 (conflicts_output): Use Yacc-style conflict report for each state,
12609 instead of our more-complicated style.
12610 (conflicts_print): Use Yacc-style conflict report, except print
12611 the input file name when not emulating Yacc.
12612 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12613 Conflicted Reduction, %expect not enough, %expect too much,
12614 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12615 * tests/existing.at (GNU Cim Grammar): Likewise.
12616 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12617
12618 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12619 fatal): Don't invoke fflush; it's not needed and it might even be
12620 harmful for stdout, as stdout might not be open.
12621 * src/reduce.c (reduce_print): Likewise.
12622
b1efe548
PE
126232002-12-27 Paul Eggert <eggert@twinsun.com>
12624
12625 Fix a bug where error locations were not being recorded correctly.
12626 This problem was originally reported by Paul Hilfinger in
161a71f3 12627 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
12628
12629 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12630 top of the location stack's error locations.
12631 (yyerrlab): Set it. When discarding a token, push its location
12632 onto yylerrsp so that we don't lose track of the error's end.
12633 (yyerrlab1): Now is only the target of YYERROR, so that we can
12634 properly record the location of the action that failed. For GCC
12635 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12636 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12637 (yyerrlab2): New label, which yyerrlab now falls through to.
12638 Compute the error's location by applying YYLLOC_DEFAULT to
12639 the locations of all the symbols that went into the error.
12640 * doc/bison.texinfo (Location Default Action): Mention that
12641 YYLLOC_DEFAULT is also invoked for syntax errors.
12642 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12643 Error locations include the locations of all the tokens that were
12644 discarded, not just the last token.
d600ee67 12645
983c5c2c
PE
126462002-12-26 Paul Eggert <eggert@twinsun.com>
12647
b1efe548
PE
12648 * src/files.c: Include quote.h.
12649 (compute_output_file_names): Warn if we detect conflicting
12650 outputs to the same file. This should catch the misunderstanding
12651 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12652
12653 * src/conflicts.c (conflicts_print): If the user specifies
12654 "%expect N", report an error if there are any reduce/reduce
12655 conflicts. This is what the manual says should happen.
12656 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12657 * tests/conflicts.at (%expect with reduce conflicts): New test.
12658
983c5c2c
PE
12659 Don't use m4_include on relative file names, as it doesn't work as
12660 desired if there happens to be a file with that name under ".".
d600ee67 12661
983c5c2c
PE
12662 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12663 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12664 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12665 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12666 * src/output.c (output_skeleton): Use full path names when
12667 specifying a file to include; don't rely on include path, as
12668 it's unreliable when the working file contains a file with
12669 that name.
d600ee67 12670
983c5c2c
PE
126712002-12-25 Paul Eggert <eggert@twinsun.com>
12672
12673 Remove obsolete references to bison.simple and bison.hairy.
12674 Problem mentioned by Aubin Mahe in
161a71f3 12675 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
12676 * data/glr.c: Comment fix.
12677 * doc/bison.1: Remove references. Also, mention "yacc".
12678
12679 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12680 with -g option.
12681
12682 * src/parse-gram.y (declaration): Use enum "report_states" rather
12683 than its numeric value 1.
12684
12685 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12686 opening a new one. This fixes Debian bug 165349, reported by
12687 Bruce Stephens.
12688
23f2d9dc
PE
126892002-12-24 Paul Eggert <eggert@twinsun.com>
12690
12691 Version 1.75e.
12692
12693 * Makefile.maint (cvs-update): Don't assume that the shell
12694 supports $(...), as Solaris sh doesn't.
12695
12696 * src/parse-gram.y (lloc_default): Remove test for empty
12697 nonterminals at the end, since it didn't change the result.
12698
126992002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
12700
12701 If the user does not define YYSTYPE as a macro, Bison now declares it
12702 using typedef instead of defining it as a macro. POSIX requires this.
12703 For consistency, YYLTYPE is also declared instead of defined.
12704
12705 %union directives can now have a tag before the `{', e.g., the
12706 directive `%union foo {...}' now generates the C code
12707 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12708 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12709 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12710 instead of `yyltype'.
12711
12712 `yystype' and `yyltype' are now obsolescent macros instead of being
12713 typedefs or tags; they are no longer documented and will be
12714 withdrawn in a future release.
12715
12716 * data/glr.c (b4_location_type): Remove.
12717 (YYSTYPE): Renamed from yystype.
12718 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12719 (struct YYLTYPE): Renamed from struct yyltype.
12720 (YYLTYPE): Renamed from yyltype.
12721 (yyltype, yystype): New (and obsolescent) macros,
12722 for backward compatibility.
12723 * data/yacc.c: Likewise.
12724
12725 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12726 does not specify a union tag. This is for compatibility with
12727 Solaris 9 yacc.
12728
12729 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12730 const *, since it is now modified by stripping surrounding { }.
12731 (current_braced_code): Remove.
12732 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12733 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12734 trailing " {...}". Now of type <chars>.
12735 (grammar_declaration): Adjust to bundled tokens.
12736 (code_content): Remove; stripping is now done by add_param.
12737 (print_token_value): Print contents of bundled tokens.
12738 (token_name): New function.
12739
12740 * src/reader.h (braced_code, current_braced_code): Remove.
12741 (token_name): New decl.
12742
12743 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12744 token_type, not braced_code code_kind. All uses changed.
12745 (SC_PRE_CODE): New state, for scanning after a keyword that
12746 has (or usually has) an immediately-following braced code.
12747 (token_type): New local var, to keep track of which token type
12748 to return when scanning braced code.
12749 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 12750 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
12751 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12752 instead of returning a token type immediately.
12753 (<INITIAL>"{"): Set token type.
12754 (<SC_BRACED_CODE>"}"): Use it.
12755 (handle_action_dollar, handle_action_at): Now returns bool
12756 indicating success. Fail if ! current_rule; this prevents a core dump.
12757 (handle_symbol_code_dollar, handle_symbol_code_at):
12758 Remove; merge body into caller.
12759 (handle_dollar, handle_at): Complain in invalid contexts.
12760
12761 * NEWS, doc/bison.texinfo: Document the above.
12762 * NEWS: Fix years and program names in copyright notice.
12763
879ca4f8
PE
127642002-12-17 Paul Eggert <eggert@twinsun.com>
12765
12766 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12767 Reporting, Table of Symbols): Omit mentions of %lex-param and
12768 %parse-param from the documentation for now.
12769
1c5fe69d
PE
127702002-12-15 Paul Eggert <eggert@twinsun.com>
12771
12772 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12773 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12774 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
12775 disagreed with the Bison documentation. Bug
12776 reported by Andrew Walrond.
d600ee67 12777
1c5fe69d
PE
12778 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12779 as the caller now does that.
12780 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12781 (YYEMPTY): Parenthesize right hand side, since others use it.
12782 (yyparse): Don't assume that our generated code is the only code
12783 that sets yychar.
12784
d1de5372
PE
127852002-12-13 Paul Eggert <eggert@twinsun.com>
12786
12787 Version 1.75d.
12788
12789 POSIX requires a "yacc" command.
12790 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12791 (MOSTLYCLEANFILES): Add yacc.
12792 (yacc): New rule.
1c5fe69d 12793 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
12794 as an alias for bison y.
12795
12796 * po/LINGUAS: Add da.
d600ee67 12797
d1de5372
PE
12798 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12799 problem with latest <getopt.h>.
12800 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12801
12802 * doc/fdl.texi: Upgrade to 1.2.
12803 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12804 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12805 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12806 gnulib.
12807 * config/install-sh: Sync with autotools.
12808
12809 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 12810 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
12811 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12812 locations are requested.
12813 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12814 locations are requested.
12815
d0f3fe23
PE
128162002-12-12 Paul Eggert <eggert@twinsun.com>
12817
12818 Remove unportable casts and storage allocation tricks.
12819 While we're at it, remove almost all casts, since they
12820 usually aren't needed and are a sign of trouble.
12821
12822 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12823
12824 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12825 the pointer DSET returned by malloc; this isn't portable.
12826 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12827 Similarly for DERIVES.
12828 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12829 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12830 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12831
12832 * src/derives.c (derives_compute): Do not bother invoking
12833 int_of_rule_number, since rule numbers are integers.
12834
12835 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12836 rather than XMALLOC (char, N).
12837
12838 * src/files.c (filename_split): Rewrite to avoid cast.
12839
12840 * src/gram.h (symbol_number_as_item_number,
12841 item_number_as_symbol_number, rule_number_as_item_number,
12842 item_number_as_rule_number):
12843 Now inline functions rather than macros, to avoid casts.
12844 * src/state.h (state_number_as_int): Likewise.
12845 * src/tables.c (state_number_to_vector_number,
12846 symbol_number_to_vector_number): Likewise.
12847
12848 * src/gram.h (int_of_rule_number): Remove; no longer used.
12849
12850 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12851 since the resulting storage is always stored into.
12852
12853 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12854 where it's needed.
12855
12856 * src/muscle_tab.c (muscle_m4_output):
12857 Now inline. Return bool, not int.
12858 * src/state.c (state_compare): Likewise.
12859 * src/symtab.c (symbol_check_defined,
12860 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12861 hash_compare_symbol, hash_symbol):
12862 Likewise.
12863 * src/uniqstr.c (uniqstr_print): Likewise.
12864 * src/muscle_tab.c (muscle_m4_output_processor):
12865 New function, to avoid casts.
12866 * src/state.c (state_comparator, stage_hasher): Likewise.
12867 * src/symtab.c (symbol_check_defined_processor,
12868 symbol_check_alias_consistency_processor, symbol_pack_processor,
12869 symbol_translation_processor, hash_symbol_comparator,
12870 hash_symbol_hasher): Likewise.
12871 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12872 * src/muscle_tab.c (muscles_m4_output):
12873 Use new functions instead of casting old functions unportably.
12874 * src/state.c (state_hash_new): Likewise.
12875 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12876 symbols_token_translations_init):
12877 Likewise.
12878 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12879
12880 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12881 var instead of casting to long, to avoid casts.
12882 (prepare_states): Use MALLOC rather than alloca, so that we don't
12883 have to worry about alloca.
12884 * src/state.c (state_hash_lookup): Likewise.
12885
12886 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12887 local var instead of casting to unsigned char, to avoid casts.
12888
12889 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12890 STATE_ALLOC): Remove.
12891 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12892 rather than calloc, and use offsetof to avoid allocating slightly
12893 too much storage.
12894 (state_new): Initialize all members.
12895
12896 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12897
12898 * src/symtab.c (symbol_free): Remove; unused.
12899 (symbol_get): Remove cast in lhs of assignment.
12900 (symbols_do): Now static. Accept generic arguments, not
12901 hashing-related ones.
12902
12903 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12904 (symbol_processor): Remove.
12905 (symbols_do): Remove decl; now static.
12906
12907 * src/system.h (alloca): Remove; decl no longer needed.
12908 (<stddef.h>): Include, for offsetof.
12909 (<inttypes.>, <stdint.h>): Include if available.
12910 (uintptr_t): New type, if system lacks it.
12911 (CALLOC, MALLOC, REALLOC): New macros.
12912 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12913 new macros.
12914
12915 * src/tables.c (table_size): Now int, to pacify GCC.
12916 (table_grow, table_ninf_remap): Use signed table size.
12917 (save_row): Don't bother initializing locals when not needed.
12918 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12919 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12920
12921 * src/vcg.h: Correct misspellings.
12922
12923 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12924
12925
12926 * src/getargs.c (getargs): Don't assume EOF == -1.
12927
26b4a969
PE
129282002-12-09 Paul Eggert <eggert@twinsun.com>
12929
12930 Change identifier spellings to avoid collisions with names
12931 that are reserved by POSIX.
12932
12933 Don't use names ending in _t, since POSIX reserves them.
12934 For consistency, remove _e and _s endings -- they're weren't
12935 needed to remove ambiguity. All uses changed.
12936 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12937 turn was just renamed from struniq_t.
12938 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12939 which in turn was just renamed from struniq_processor_t.
12940 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12941 in turn was renamed from hash_compare_struniq_t.
12942 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12943 (state_list): Renamed from state_list_t.
12944 * src/assoc.h (assoc): Renamed from assoc_t.
12945 * src/conflicts.c (enum conflict_resolution): Renamed from
12946 enum conflict_resolution_e.
12947 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12948 (rule_list): Renamed from rule_list_t.
12949 * src/getargs.h (enum trace): Renamed from enum trace_e.
12950 (enum report): Renamed from enum report_e.
12951 * src/gram.h (item_number): Renamed from item_number_t.
12952 (rule_number): Renamed from rule_number_t.
12953 (struct rule_s): Remove the "rule_s" part; not used.
12954 (rule): Renamed from rule_t.
12955 (rule_filter): Renamed from rule_filter_t.
12956 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12957 (goto_list): Renamed from goto_list_t.
12958 * src/lalr.h (goto_number): Renamed from goto_number_t.
12959 * src/location.h (location): Renamed from location_t.
12960 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12961 and moved here from:
12962 * src/muscle_tab.h (muscle_entry_t): here.
12963 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12964 (rule_list): Renamed from rule_list_t.
12965 * src/print_graph.c (static_graph): Renamed from graph.
12966 * src/reader.h (braced_code): Renamed from braced_code_t.
12967 Remove brace_code_e tag.
12968 * src/relation.h (relation_node): Renamed from relation_node_t.
12969 (relation_nodes): Renamed from relation_nodes_t.
12970 (relation): Renamed from relation_t.
12971 * src/state.h (state_number): Renamed from state_number_t.
12972 (struct state): Renamed from struct state_s.
12973 (state): Renamed from state_t.
12974 (transitions): Renamed from transitions_t. Unused (and
12975 misspelled) transtion_s tag removed.
12976 (errs): Renamed from errs_t. Unused errs_s tag removed.
12977 (reductions): Renamed from reductions_t. Unused tag
12978 reductions_s removed.
12979 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12980 (struct symbol_list): Renamed from struct symbol_list_s.
12981 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12982 (struct symbol): Renamed from struct symbol_s.
12983 (symbol): Renamed from symbol_t.
12984 * src/tables.c (vector_number): Renamed from vector_number_t.
12985 (action_number): Renamed from action_t.
12986 * src/tables.h (base_number): Renamed from base_t.
12987 * src/vcg.h (enum color): Renamed from enum color_e.
12988 (enum textmode): Renamed from enum textmode_e.
12989 (enum shape): Renamed from enum shape_e.
12990 (struct colorentry): Renamed from struct colorentry_s.
12991 (struct classname): Renamed from struct classname_s.
12992 (struct infoname): Renamed from struct infoname_s.
12993 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12994 (enum decision): Renamed from enum decision_e.
12995 (enum orientation): Renamed from enum orientation_e.
12996 (enum alignment): Renamed from enum alignment_e.
12997 (enum arrow_mode): Renamed from enum arrow_mode_e.
12998 (enum crossing_type): Renamed from enum crossing_type_e.
12999 (enum view): Renamed from enum view_e.
13000 (struct node): Renamed from struct node_s.
13001 (node): Renamed from node_t.
13002 (enum linestyle): Renamed from enum linestyle_e.
13003 (enum arrowstyle): Renamed from enum arrowstyle_e.
13004 (struct edge): Renamed from struct edge.
13005 (edge): Renamed from edge_t.
13006 (struct graph): Renamed from struct graph_s.
13007 (graph): Renamed from graph_t.
13008 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
13009 Rename value_t -> value.
13010 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
13011 value_t_as_yystype -> value_as_yystype.
13012
13013 Don't include <errno.h> in the mainstream code, since it
13014 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
13015 * lib/get-errno.c, lib/get-errno.h: New files.
13016 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
13017 get-errno.c.
13018 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
13019 * src/output.c (output_skeleton): Likewise.
13020 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
13021 instead of errno.
13022 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
13023 Likewise.
13024 (handle_action_dollar, handle_action_at): Likewise.
13025 * src/system.h: Do not include <errno.h>.
13026 (TAB_EXT): Renamed from EXT_TAB.
13027 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
13028
13029 Avoid str[a-z]*, since <string.h> reserves that name space.
13030 Change all instances of "struniq" in names to "uniqstr", and
13031 likewise for "STRUNIQ" and "UNIQSTR".
13032 * src/uniqstr.c: Renamed from src/struniq.c.
13033 * src/uniqstr.h: Renamed from src/struniq.h.
13034 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
13035 * src/files.c (strsuffix): Remove; unused.
13036 (concat2): Renamed from stringappend. Now static.
13037 * src/files.h (strsuffix, stringappend): Remove; unused.
13038 * src/parse-gram.y (<chars>): Renamed from <string>.
13039 (<uniqstr>): Renamed from <struniq>.
13040 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
13041 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
13042 (struct graph_s.expand): Renamed from struct graph_s.stretch.
13043 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
13044 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
13045 (N_EXPAND): Renamed from N_STRETCH.
13046
13047 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13048 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13049 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13050 Remove; unused.
13051 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13052 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13053 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13054 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13055 (BASE_MAXIMUM): Renamed from BASE_MAX.
13056 (BASE_MINIMUM): Renamed from BASE_MIN.
13057 (ACTION_MAX): Remove; unused.
13058 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13059 Unnecessary casts removed from above defines.
13060
13061
13062 Fix misspelling in names.
13063 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13064 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13065 G_NODE_ALIGNEMENT.
13066
13067
13068 * lib/timevar.c (timevar_report): Renamed from time_report,
13069 for consistency with other names.
13070 * lib/timevar.h (timevar_report): New decl.
13071 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13072
13073
13074 Sort include-file uses.
13075
13076 Reorder all include files under src to be in the order "system.h".
13077 then the ../lib include files in angle brackets (alphabetized),
13078 then the . include files in double-quotes (alphabetized). Fix
13079 dependency breakages encountered in this process, as follows:
13080 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13081 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13082 * src/state.h: Include "symtab.h".
13083
996b1c7e
PE
130842002-12-08 Paul Eggert <eggert@twinsun.com>
13085
13086 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13087 since this causes problems when __file__ contains character
13088 sequences like "@" that are treated specially by src/scan-skel.l.
13089 Instead, just use the file's basename. This fixes the bug
13090 reported by Martin Mokrejs in
161a71f3 13091 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 13092
e19c4e5d
PE
130932002-12-06 Paul Eggert <eggert@twinsun.com>
13094
13095 Add support for rules that do not have trailing semicolons, as
13096 POSIX requires. Improve the quality of locations in Bison
13097 diagnostics.
26b4a969 13098
e19c4e5d
PE
13099 * src/location.c: Include <quotearg.h>.
13100 (empty_location): Now const.
13101 (location_print): New function. Follow the recommendation of the
13102 GNU Coding Standards for locations that span file boundaries.
13103 * src/location.h: Do not include <quotearg.h>; no longer needed.
13104 (boundary): New type.
13105 (location_t): Use it. This allows locations to span file boundaries.
13106 All member uses changed: file -> start.file or end.file (as needed),
13107 first_line -> start.line, first_column -> start.column,
13108 last_line -> end.line, last_column -> end.column.
13109 (equal_boundaries): New function.
13110 (LOCATION_RESET, LOCATION_STEP): Remove.
13111 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13112 (empty_location): Now const.
13113 (location_print): New decl.
13114 * src/parse-gram.y (lloc_default): New function, which handles
13115 empty locations more accurately.
13116 (YYLLOC_DEFAULT): Use it.
13117 (%token COLON): Remove.
13118 (%token ID_COLON): New token.
26b4a969 13119 (rules): Use it.
e19c4e5d
PE
13120 (declarations, rules): Remove trailing semicolon.
13121 (declaration, rules_or_grammar_declaration):
13122 Allow empty (";") declaration.
13123 (symbol_def): Remove empty actions; no longer needed.
13124 (rules_or_grammar_declaration): Remove trailing semicolon.
13125 (semi_colon.opt): Remove.
13126 * src/reader.h: Include location.h.
13127 (scanner_cursor): New decl.
13128 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13129 rolling our own.
13130 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13131 of *loc.
13132 (STEP): Remove. No longer needed, now that adjust_location does
13133 the work. All uses removed.
13134 (scanner_cursor): New var.
13135 (adjust_location): Renamed from extend_location. It now sets
13136 *loc and adjusts the scanner cursor. All uses changed.
13137 Don't bother testing for CR.
13138 (handle_syncline): Remove location arg; now updates scanner cursor.
13139 All callers changed.
13140 (unexpected_end_of_file): Now accepts start boundary of token or
13141 comment, not location. All callers changed. Update scanner cursor,
13142 not the location.
13143 (SC_AFTER_IDENTIFIER): New state.
13144 (context_state): Renamed from c_context. All uses changed.
13145 (id_loc, code_start, token_start): New local vars.
13146 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13147 processing of Yacc white space and equivalents here.
13148 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13149 instead of returning ID immediately, since we need to search for
13150 a subsequent colon.
13151 (<INITIAL>"'", "\""): Save token_start.
13152 (<INITIAL>"%{", "{", "%%"): Save code_start.
13153 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13154 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13155 BEGIN context_state at end, not INITIAL.
13156 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13157 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13158 Return correct token start.
13159 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13160 the start of a character, string or multiline comment is found.
13161 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13162 Reduction): Adjust reported locations to match the more-precise
13163 results now expected.
13164 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13165 * tests/reduce.at (Useless Rules, Reduced Automaton,
13166 Underivable Rules): Likewise.
13167 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13168 or "|"' now that so many other tokens are allowed by the new grammar.
13169
13170 * src/complain.h (current_file): Remove duplicate decl;
13171 current_file is now owned by files.h.
13172 * src/complain.c, src/scan-gram.l: Include files.h.
13173
131742002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 13175
e19c4e5d
PE
13176 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13177 promotes to int; it might be unsigned int.
13178 * data/yacc.c (yy_reduce_print): Likewise.
13179
13180 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13181 be #defined in the prologue, not in the Bison declarations.
13182 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 13183
b64755e3
PE
131842002-12-02 Paul Eggert <eggert@twinsun.com>
13185
13186 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13187 * lib/strtoul.c: New file, from gnulib.
13188 This fixes a porting bug reported by Peter Klein in
161a71f3 13189 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 13190
6e746484
PE
131912002-11-30 Paul Eggert <eggert@twinsun.com>
13192
b64755e3
PE
13193 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13194 and put only a forward declaration in the prologue. This is for
13195 consistency with the other scanner helper functions.
13196
6ba55592
PE
13197 Type clashes now generate warnings, not errors, since it
13198 appears that POSIX may allow some grammars with type clashes.
13199 * src/reader.c (grammar_current_rule_check): Warn about
13200 type clashes instead of complaining.
13201 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13202
6e746484
PE
13203 Add Yacc library, since POSIX requires it.
13204 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13205 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13206 * lib/main.c, lib/yyerror.c: New files.
13207
13208 gram_error can be static; it need not be extern.
13209 * src/reader.h (gram_error): Remove decl.
13210 * src/parse-gram.y (gram_error): Now static. Add static decl.
13211 (print_token_value): Omit parameter names from forward decl,
13212 for consistency.
13213
88510f9c
PE
132142002-11-29 Paul Eggert <eggert@twinsun.com>
13215
6e746484
PE
13216 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13217 be declared before being used. E.g., one should typically
13218 declare them in the prologue. Use GNU coding style in examples.
13219 Put "const" consistently after the type it modifies. Mention
13220 that C99 supports "inline". Mention that yyerror traditionally
13221 returns "int".
13222
88510f9c
PE
13223 %parse-param and %lex-param now take just one argument, the
13224 declaration; the argument name is deduced from the declaration.
13225
13226 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13227 Reporting, Table of Symbols): Document this.
13228 * src/parse-gram.y (add_param): New function.
13229 (COMMA): Remove.
13230 (declaration): Implement new rule for %parse-param and %lex-param.
13231 * src/scan-gram.l: "," now elicits a warning, rather than being
13232 a token; this is more compatible with byacc.
13233 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13234
bb92250c
PE
132352002-11-27 Paul Eggert <eggert@twinsun.com>
13236
13237 Rename identifiers to avoid real and potential collisions.
13238
13239 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13240 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 13241 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
13242 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13243 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13244 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13245 All uses changed.
13246 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13247 The name "yycontrol" violates the name space rules, and this stuff
13248 wasn't being used anyway.
13249 (input): Remove action; this stuff wasn't being used.
13250 (gram_error): Rename local variable yylloc -> loc.
13251 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13252 (YY_DECL): Don't use "yy" at start of local variables.
13253 All uses changed, e.g., yylloc -> loc.
13254 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13255 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13256 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13257 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13258
13259 * src/parse-gram.y (gram_error): loc is now const *.
13260 * src/reader.h (gram_error): Likewise.
13261
3af4feb2
PE
132622002-11-24 Paul Eggert <eggert@twinsun.com>
13263
13264 Version 1.75c.
13265
13266 * tests/actions.at (Actions after errors): Use an output format
13267 more similar to that of the Printers and Destructors test.
13268 Test the position of the ';' token too.
13269 (Printers and Destructors): Likewise.
13270 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13271 unnecessarily alarming people when the test fails.
13272
13273 * data/yacc.c (yyerrlab1): Move this label down, so that the
13274 parser does not discard the lookahead token if the user code
13275 invokes YYERROR. This change is required for POSIX conformance.
13276
13277 * lib/error.c: Sync with gnulib.
13278
132792002-11-22 Paul Eggert <eggert@twinsun.com>
13280
13281 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13282 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13283 * lib/xmalloc.c: Likewise.
26b4a969 13284
58004308
PE
132852002-11-20 Paul Eggert <eggert@twinsun.com>
13286
13287 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13288
132892002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 13290
58004308
PE
13291 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13292 should use `if (! x) abort ();' rather than `assert (x);', and
13293 anyway it's one less thing to worry about configuring.
13294
13295 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13296 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13297 and replace all instances of assert with abort.
13298 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13299 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13300
13301 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13302 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13303 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13304 hash_find_entry, hash_rehash, hash_insert): Likewise.
13305 * src/conflicts.c (resolve_sr_conflict): Likewise.
13306 * src/lalr.c (set_goto_map, map_goto): Likewise.
13307 * src/nullable.c (nullable_compute): Likewise.
13308 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13309 * src/reader.c (packgram, reader): Likewise.
13310 * src/state.c (state_new, state_free, state_transitions_set,
13311 state_reduction_find): Likewise.
13312 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13313 symbol_pack): Likewise.
13314 * src/tables.c (conflict_row, pack_vector): Likewise.
13315 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13316 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13317 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13318 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13319
13320 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13321 (ARGMATCH_CONSTRAINT): New macro.
13322 (ARGMATCH_ASSERT): Use it.
13323
13324 * src/system.h (verify): New macro.
13325 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13326 rather than assert.
13327 * src/tables.c (tables_generate): Likewise.
13328
13329 * src/struniq.c (struniq_assert): Now returns void, and aborts
13330 if the assertion is false.
13331 (struniq_assert_p): Remove.
13332 * src/struniq.h: Likewise.
13333
76ae8198
PE
133342002-11-18 Paul Eggert <eggert@twinsun.com>
13335
13336 * data/glr.c (yygetLRActions): Replace `yyindex' with
13337 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13338 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 13339 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 13340
d3c4e709
AD
133412002-11-18 Akim Demaille <akim@epita.fr>
13342
13343 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13344 space.
13345 From Tim Van Holder.
13346
8d8a7238
PE
133472002-11-17 Paul Eggert <eggert@twinsun.com>
13348
13349 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13350 to "SyntaxError" for consistency with my 2002-11-15 change.
13351
13352 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13353 not define to {}, since this breaks the common use of `YYDPRINTF
13354 ((...));' if a single statement is desired (e.g. before `else').
13355 Work around GCC warnings by surrounding corresponding calls with
13356 {} if needed.
13357 (yyhasResolvedValue): Remove unused function.
13358 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13359 loop body.
13360 (yyreportSyntaxError): Renamed from yyreportParseError.
13361 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13362 All uses changed.
13363 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13364 extern when possible. Remove unused initializations.
13365
b0937b22
AD
133662002-11-16 Akim Demaille <akim@epita.fr>
13367
13368 Augment the similarity between GLR and LALR traces.
13369
13370 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13371 (YY_REDUCE_PRINT): New.
13372 (yyparse): Use them.
13373 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13374 YYDPRINT here.
13375 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13376 state reached after the reduction/recovery, since...
13377 (yyparse, yyprocessOneStack): Report the state we are entering in.
13378
c5e3e510
AD
133792002-11-16 Akim Demaille <akim@epita.fr>
13380
13381 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13382 Add support for --trace=skeleton.
13383 * src/scan-skel.l: %option debug.
13384 Scan strings of non-@ or \n instead of character by character.
13385 (scan_skel): Handle trace_skeleton.
13386 (QPUTS): New.
13387 (@output_parser_name@, @output_header_name@): ``Restore'' their
13388 support (used to be M4 macros).
13389 * data/yacc.c: Quote larger chunks, a la glr.c.
13390 * data/lalr1.cc: Likewise.
13391 The header guards are no longer available, so use some other
13392 string than `YYLSP_NEEDED'.
13393
4c6cc1db
AD
133942002-11-16 Akim Demaille <akim@epita.fr>
13395
13396 Make the ``Printers and Destructors'' test more verbose, taking
13397 `yacc.c''s behavior as (possibly wrong) reference.
13398
13399 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13400 instead of fprint on stdout.
13401 Set and report the last_line of the symbols.
13402 Consistently display values and locations.
13403
6d9e8019
PE
134042002-11-16 Paul Eggert <eggert@twinsun.com>
13405
13406 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13407
6e649e65
PE
134082002-11-15 Paul Eggert <eggert@twinsun.com>
13409
b25d88f6
PE
13410 * tests/actions.at (Actions after errors): New test case.
13411
6e649e65
PE
13412 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13413 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13414 tests/action.at, tests/calc.at, tests/conflicts.at,
13415 tests/cxx-type.at, tests/regression.at:
13416 "parse error" -> "syntax error" for POSIX compatibility.
13417 "parsing stack overflow..." -> "parser stack overflow" so
13418 that code matches Bison documentation.
13419
0f39aab9
AD
134202002-11-15 Akim Demaille <akim@epita.fr>
13421
13422 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13423 take two BRACED_CODE, not two string_content.
13424 Free the scanner's obstack when we are done.
13425 (code_content): New.
13426 * tests/calc.at: Adjust.
13427 * doc/bison.texinfo: Adjust.
13428 Also, make sure to include the `,' for these declarations.
13429
761c1926
AD
134302002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13431
13432 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13433 definition; avoids potential autoreconf problems.
13434
b0f98b10
AD
134352002-11-15 Akim Demaille <akim@epita.fr>
13436
13437 Always check the value returned by yyparse.
13438
13439 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13440 returned by yyparse.
13441 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13442 Adjust calls.
13443 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13444 returned by yyparse.
13445
970785f1
PH
134462002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13447
13448 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13449 on input.at test.
13450
8fcc7db1
PE
134512002-11-14 Paul Eggert <eggert@twinsun.com>
13452
7ec1b48e
PE
13453 * src/output.c (output_skeleton): Call xfopen instead of
13454 duplicating xfopen's body.
13455
cfff7583 13456 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 13457 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 13458
8fcc7db1
PE
13459 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13460 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13461 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13462 file twice in the grammar, as an extra check.
13463
13464 * tests/input.at (Torturing the Scanner): Surround the
13465 backslash-newline tests with "#if 0", to make it less likely that
13466 we'll run into compiler bugs. Bring back solitary \ inside
13467 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 13468 test backslash-newline in C character constant.
8fcc7db1 13469
4e8d992c
AD
134702002-11-14 Akim Demaille <akim@epita.fr>
13471
13472 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13473 status of the compiler.
f32b346d 13474 Calling `exit 1' is no longer needed.
4e8d992c
AD
13475 Reported by Nelson H. F. Beebe.
13476
9501dc6e
AD
134772002-11-14 Akim Demaille <akim@epita.fr>
13478
13479 * tests/atlocal.in (CPPFLAGS): We have config.h.
13480 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13481 New.
13482 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13483 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13484 * tests/regression.at, tests/torture.at: Use them for all the
13485 grammars that are to be compiled.
13486 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13487 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13488 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13489
18b519c0
AD
134902002-11-14 Akim Demaille <akim@epita.fr>
13491
13492 * doc/bison.texinfo: Various formatting changes (alignments in
13493 samples, additional @group/@end group, GCS in samples.
13494 Use @deffn instead of simple @table to define the directives,
13495 macros, variables etc.
13496
9a86cdb9
PE
134972002-11-13 Paul Eggert <eggert@twinsun.com>
13498
daa33def 13499 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 13500 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 13501
daa33def 13502 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 13503 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
13504 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13505 * tests/headers.at (export YYLTYPE): Likewise.
13506
13507 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 13508 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 13509
9a86cdb9
PE
13510 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13511 comments, since they're not portable. Use GNU coding style.
13512
9c1e26bd
AD
135132002-11-13 Akim Demaille <akim@epita.fr>
13514
13515 * data/yacc.c: Leave bigger chunks of quoted text.
13516 (YYDSYMPRINTF): New.
13517 Use it to report symbol activities.
13518 * data/glr.c (YYDSYMPRINTF): New.
13519 Use it.
13520
87f721cc
PE
135212002-11-12 Paul Eggert <eggert@twinsun.com>
13522
13523 Version 1.75b.
13524
13525 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13526 (yyglrReduce): Return yyok, not 0.
13527 This should avoid the enumerated-type warnings reported
464c6927 13528 by Nelson H. F. Beebe in
161a71f3 13529 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
13530
13531 * lib/bbitset.h (BITSET_INLINE): Remove.
13532 * lib/bitset.h [! BITSET_INLINE]: Remove.
13533 (bitset_set, bitset_reset, bitset_test): Rename local vars
13534 to avoid shadowing warnings by GCC.
13535
13536 * data/glr.c (inline): Remove #define. It's the user's
13537 responsibility to #define it away, just like 'const'.
464c6927 13538 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 13539 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 13540
87f721cc
PE
13541 * Makefile.maint (po-check): Scan .l and .y files instead of the
13542 .c and the .h files that they generate. This fixes the bug
13543 reported by Tim Van Holder in:
161a71f3 13544 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
13545 Look for N_ as well as for _. Try to avoid matching #define for
13546 N_ and _.
13547 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13548 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13549 * src/scan-gram.l: Revamp regular expressions so that " and '
13550 do not confuse xgettext.
13551
13552 * src/struniq.h (struniq_new): Do not declare the return type
13553 to be 'const'; this violates the C standard.
13554 * src/struniq.c (struniq_new): Likewise.
13555
be14ade5
AD
135562002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13557
13558 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13559 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13560 linker.
13561
05291fbc
AD
135622002-11-12 Akim Demaille <akim@epita.fr>
13563
13564 * Makefile.maint: Sync with Autoconf:
13565 (local_updates): New.
13566
1f5fd52e
AD
135672002-11-12 Akim Demaille <akim@epita.fr>
13568
13569 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13570
283f1e64
AD
135712002-11-12 Akim Demaille <akim@epita.fr>
13572
13573 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13574 locations.
13575
886b69d1
AD
135762002-11-12 Akim Demaille <akim@epita.fr>
13577
13578 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13579 not yyvalue.
13580
3df37415
AD
135812002-11-12 Akim Demaille <akim@epita.fr>
13582
13583 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13584 Use it to test the GLR parser.
13585
7bd6c77e
AD
135862002-11-12 Akim Demaille <akim@epita.fr>
13587
13588 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13589 defines it.
13590 * data/glr.c (yystos): New.
13591 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13592 (YYDSYMPRINT): New.
13593 (yyval): Don't define it, it is handled via M4.
13594 (yyrecoverParseError): Free verbosely the discarded symbols.
13595 * data/yacc.c (yysymprint): Remove, rather...
13596 (b4_yysymprint_generate): invoke.
13597 * data/c.m4 (b4_yysymprint_generate): New.
13598 Accept pointers as arguments, as opposed to the version from
13599 yacc.c.
13600 (b4_yydestruct_generate): Likewise.
13601 * tests/cations.at (Printers and Destructors): Use Bison directives
13602 instead of CPP macros.
13603 Don't rely on internal details.
13604
b0400cc6
AD
136052002-11-12 Akim Demaille <akim@epita.fr>
13606
13607 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13608 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13609 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13610 it against YYEMPTY and so forth), work on yytoken (i.e., set
13611 it to YYEMPTY etc.).
13612 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13613 (b4_symbol_actions): Remove.
13614 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13615 for 0, end-of-input.
13616
72f889cc
AD
136172002-11-12 Akim Demaille <akim@epita.fr>
13618
13619 * doc/bison.texinfo (Destructor Decl): New.
13620
b1ae9233
AD
136212002-11-12 Akim Demaille <akim@epita.fr>
13622
13623 * src/tables.c (tables_generate): Use free for pointers that
13624 cannot be NULL, not XFREE.
13625 (pack_vector): Use assert, not fatal, for bound violations.
13626 * src/state.c (state_new): Likewise.
13627 * src/reader.c (reader): Likewise.
13628 * src/lalr.c (set_goto_map): Likewise.
72f889cc 13629 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
13630 the file name.
13631
7ec2d4cd
AD
136322002-11-12 Akim Demaille <akim@epita.fr>
13633
13634 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13635 Restore.
13636 * src/scan-gram.l (last_string): Is global to the file, not to
13637 yylex.
13638 * src/parse-gram.y (input): Don't append the epilogue here,
13639 (epilogue.opt): do it here, and free the scanner's obstack.
13640 * src/reader.c (epilogue_set): Rename as...
13641 (epilogue_augment): this.
13642 * data/c.m4 (b4_epilogue): Defaults to empty.
13643
573a6cd3
AD
136442002-11-12 Akim Demaille <akim@epita.fr>
13645
13646 * src/getargs.c (long_options): Remove duplicates.
13647 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13648 Remove.
13649 * doc/bison.rnh: Remove.
13650 * doc/bison.texinfo (VMS Invocation): Remove.
13651
95612cfa
AD
136522002-11-12 Akim Demaille <akim@epita.fr>
13653
13654 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13655 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13656
13657 Use struniq for symbols.
13658
13659 * src/symtab.h (symbol_t): The tag member is a struniq.
13660 (symbol_type_set): Adjust.
13661 * src/symtab.c (symbol_new): Takes a struniq.
13662 (symbol_free): Don't free the tag member.
13663 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13664 (hash_compare_symbol, hash_symbol): these.
13665 Use the fact that tags as struniqs.
13666 (symbol_get): Use struniq_new.
13667 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13668 Returns a strniq.
13669 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13670 and type members are struniqs.
13671 * src/reader.c (get_merge_function)
13672 (grammar_current_rule_merge_set): Adjust.
13673 (TYPE, current_type): Are struniq.
13674
13675 Use struniq for file names.
13676
13677 * src/files.h, src/files.c (infile): Split into...
13678 (grammar_file, current_file): these.
13679 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13680 * src/reduce.c (reduce_print): Likewise.
13681 * src/getargs.c (getargs): Likewise.
13682 * src/complain.h, src/complain.c: Likewise.
13683 * src/main.c (main): Call struniqs_new early enough to use it for
13684 file names.
13685 Don't free the input file name.
13686
3e6656f9
AD
136872002-11-12 Akim Demaille <akim@epita.fr>
13688
13689 * src/symtab.c (symbol_free): Remove dead deactivated code:
13690 type_name are properly removed.
13691 Don't use XFREE to free items that cannot be NULL.
13692 * src/struniq.h, src/struniq.c: New.
13693 * src/main.c (main): Initialize/free struniqs.
13694 * src/parse-gram.y (%union): Add astruniq member.
13695 (yyprint): Adjust.
13696 * src/scan-gram.l (<{tag}>): Return a struniq.
13697 Free the obstack bit that used to store it.
13698 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13699
7672019c
PE
137002002-11-11 Paul Eggert <eggert@twinsun.com>
13701
13702 Revamp to fix many (but not all) of the C- and M4-related quoting
13703 problems. Among other things, this fixes the Bison bug reported
13704 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 13705 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
13706
13707 Use new @ escapes consistently. Represent brackets with @{ and @}
13708 rather than @<:@ and @:>@, since this works a bit better with dumb
13709 editors like vi. Represent @ with @@, since @ is now consistently
13710 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13711 __ofile__, to avoid unexpected expansions. Similarly, use @output
13712 rather than #output.
13713
13714 * data/c.m4 (b4_copyright): Omit file name from comment, since
13715 the file name could contain "*/".
13716 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13717 be quoted. All uses changed.
13718
13719 * data/glr.c: Use new @ escapes consistently.
13720 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13721 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13722 Remove, since they couldn't handle arbitrary characters in file
13723 names.
13724 * data/lalr1.cc: Likewise.
13725 * data/yacc.c: Likewise.
13726
13727 * src/files.c (output_infix): Remove; all uses removed.
13728 * src/files.h: Likewise.
13729
13730 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13731 mishandled funny characters in file names, and anyway it isn't
13732 needed any more.
13733 * data/yacc.c: Likewise.
13734 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13735
13736 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13737 * data/yacc.c: Likewise.
13738
13739 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13740 strings now.
13741 (muscle_init): Quote filename as a C string.
13742 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13743 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13744 * src/output.c (escaped_file_name_output): New function.
13745 (prepare_symbols): Quote tokens for M4.
13746 (prepare): Don't insert output_infix, output_prefix,
13747 output_parser_name, output_header_name; this is now down by scan-skel.
13748 Insert skeleton as a C string.
13749
13750 * src/output.c (user_actions_output, symbol_destructors_output,
13751 symbol_printers_output): Quote filenames for C and M4.
13752 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13753
13754 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13755 escapes other than \\ and \'; this simplifies the code.
13756 (<SC_STRING>): Likewise, for \\ and \".
13757 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13758 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13759 Use new escapes @{ and @} for [ and ].
13760
13761 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13762 them with auto vars.
13763 Switch to new escape scheme, where @ is the escape character uniformly.
13764 Abort if a stray escape character is found. Avoid unbounded input
13765 buffer when parsing non-escaped text.
13766
13767 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13768 __oline__, #output, $@, and @{ do not have unintended meanings.
13769
acea4f3b
PE
137702002-11-09 Paul Eggert <eggert@twinsun.com>
13771
13772 Fix the test failure due to GCC warnings described in
161a71f3 13773 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
13774 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13775 evaluate to 0 if it's impossible for NINF to be in the respective
13776 table.
13777 (yygetLRActions, yyrecoverParseError): Use them.
13778
13779 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13780 counted in the token inserted at end of file. Now takes
13781 location_t *, not location_t, so that the location can be
13782 adjusted. All uses changed.
13783
13784 * tests/regression.at (Invalid inputs): Adjust wording in
13785 diagnostic to match the new behavior.
13786
13787 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13788 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13789 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13790 abort ();'. This reduces the runtime of the "Many lookaheads"
13791 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13792 GCC 3.2.
13793
20ef1ad5
PE
137942002-11-07 Paul Eggert <eggert@twinsun.com>
13795
13796 * src/parse-gram.y (CHARACTER): Remove unused token.
13797 All uses removed.
13798
13799 * src/scan-gram.l: Remove stack option. We no longer use the
13800 stack, since the stack was never deeper than 1; instead, use the
13801 new auto var c_context to record the stacked value.
13802
13803 Remove nounput option. At an unexpected end of file, we now unput
13804 the minimal input necessary to end cleanly; this simplifies the
13805 code.
13806
13807 Avoid unbounded token sizes where this is easy.
13808
13809 (unexpected_end_of_file): New function.
13810 Use it to systematize the error message on unexpected EOF.
13811 (last-string): Now auto, not static.
13812 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13813 (scanner_last_string_free): Remove; not used.
13814 (percent_percent_count): Move decl to just before use.
13815 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13816 not the (never otherwised-used) CHARACTER.
13817
93724f13
AD
138182002-11-07 Akim Demaille <akim@epita.fr>
13819
13820 Let yyerror always receive the msg as last argument, so that
13821 yyerror can be variadic.
13822
13823 * data/yacc.c (b4_yyerror_args): New.
13824 Use it when calling yyerror.
13825 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13826 Use it when calling yyerror.
13827 * doc/bison.texinfo (Error Reporting): Adjust.
13828 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13829 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13830
6e40b4eb
AD
138312002-11-06 Akim Demaille <akim@epita.fr>
13832
13833 #line should have quoted strings.
13834 Ideally, this should be done by m4_quotearg.
13835
13836 * src/scan-skel.l: Include quotearg.h.
13837 Quote __ofile__.
13838 * src/output.c (symbol_printers_output)
13839 (symbol_destructors_output): Quote the file name.
13840
2dfbfc12
AD
138412002-11-06 Akim Demaille <akim@epita.fr>
13842
13843 * tests/regression.at (Invalid inputs): Adjust to the recent
13844 messages.
13845
437c2d80
AD
138462002-11-06 Akim Demaille <akim@epita.fr>
13847
13848 Restore --no-lines.
13849 Reported by Jim Kent.
13850
13851 * data/c.m4 (b4_syncline): New.
13852 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13853 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13854 * src/output.c (user_actions_output): Likewise.
13855 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 13856 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 13857
900c5db5
AD
138582002-11-06 Akim Demaille <akim@epita.fr>
13859
13860 * src/main.c (main): Free `infile'.
13861 * src/scan-gram.l (handle_syncline): New.
13862 Recognize `#line'.
13863 * src/output.c (user_actions_output, symbol_destructors_output)
13864 (symbol_printers_output): Use the location's file name, not
13865 infile.
13866 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13867
e183b123 138682002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 13869
e183b123 13870 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 13871 either has GLR conflict entries.
e183b123 13872
193eb6b7
PE
138732002-11-05 Paul Eggert <eggert@twinsun.com>
13874
e183b123
PE
13875 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13876 "integer out of range" rather than "invalid value".
13877 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13878 accordingly.
13879
193eb6b7
PE
13880 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13881 Also, remove one static variable in the scanner.
13882
13883 * src/scan-gram.l (braces_level): Now auto, not static.
13884 Initialize to zero if the compiler is being picky.
13885 (INITIAL): Clear braces_level instead of incrementing it.
13886 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13887 as POSIX 1003.1-2001 requires.
13888 * src/system.h (IF_LINT): New macro, taken from coreutils.
13889 * configure.ac: Define "lint" if --enable-gcc-warnings.
13890
29c01725
AD
138912002-11-05 Akim Demaille <akim@epita.fr>
13892
13893 * src/scan-gram.l: When it starts with `%', complain about the
13894 whole directive, not just that `invalid character: %'.
13895
8aeac3ca
AD
138962002-11-04 Akim Demaille <akim@epita.fr>
13897
13898 * Makefile.maint: Update from Autoconf.
13899 (update, cvs-update, po-update, do-po-update): New.
13900
793a58bb
AD
139012002-11-04 Akim Demaille <akim@epita.fr>
13902
13903 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13904 and yyerror.
13905 Have yyerror `use' its arguments.
13906 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13907 returns true when location & yacc & pure & parse-param.
13908 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13909
c4d720cd
AD
139102002-11-04 Akim Demaille <akim@epita.fr>
13911
13912 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13913 clashes.
13914 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13915 font-lock-mode.
13916 Use complain_at.
13917 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13918 slot 0.
13919
613a0dc5
PE
139202002-11-03 Paul Eggert <eggert@twinsun.com>
13921
13922 * src/reader.c (get_merge_function, grammar_current_rule_check):
13923 Use consistent diagnostics for reporting type name clashes.
13924 Quote the types with <>, for consistency with Yacc.
13925 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13926
2a8d363a
AD
139272002-11-03 Akim Demaille <akim@epita.fr>
13928
13929 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13930 New.
13931 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13932 (b4_parse_param): Remove.
13933 Use b4_identification.
13934 Propagate b4_pure_args where needed to pass them to yyerror.
13935 * data/glr.m4 (b4_parse_param): Remove.
13936 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13937 (b4_lpure_formals): New.
13938 Use b4_identification.
13939 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13940 b4_user_formals and b4_user_args.
13941 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13942 (yyreportAmbiguity): When using a pure parser, also need
13943 the location, and the parse-params.
13944 Adjust callers.
13945 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13946 When using a pure parser, also need the parse-params.
13947 Adjust callers.
13948 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13949 (%pure-parser + %parse-param) LALR and GLR parsers.
13950 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13951 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13952 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13953 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13954 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13955 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13956 * doc/bison.texinfo: Untabify the whole file.
13957 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13958 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13959 (Error Reporting): Adjust to these new directives.
13960 Document %error-verbose, deprecate YYERROR_VERBOSE.
13961
9e32add8
AD
139622002-11-03 Akim Demaille <akim@epita.fr>
13963
13964 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13965 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13966 command line options.
13967 * tests/cxx-type.at: Formatting changes.
13968
b02d90a5
PE
139692002-11-03 Paul Eggert <eggert@twinsun.com>
13970
13971 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13972 to count columns correctly, and to check for invalid inputs.
9e32add8 13973
b02d90a5
PE
13974 Use mbsnwidth to count columns correctly. Account for tabs, too.
13975 Include mbswidth.h.
13976 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13977 (extend_location): New function.
13978 (YY_LINES): Remove.
13979
13980 Handle CRLF in C code rather than in Lex code.
13981 (YY_INPUT): New macro.
13982 (no_cr_read): New function.
13983
13984 Scan UCNs, even though we don't fully handle them yet.
13985 (convert_ucn_to_byte): New function.
13986
13987 Handle backslash-newline correctly in C code.
13988 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13989 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13990 all uses changed.
13991 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13992 Use {splice} wherever C allows backslash-newline.
13993 YY_STEP after space, newline, vertical-tab.
13994 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 13995
b02d90a5
PE
13996 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13997
13998 ({int}, handle_action_dollar, handle_action_at): Check for integer
13999 overflow.
9e32add8 14000
b02d90a5
PE
14001 (YY_STEP): Omit trailing semicolon, so that it's more like C.
14002
14003 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
14004 as well as \000. Check for UCHAR_MAX, not 255.
14005 Allow \x with an arbitrary positive number of digits, as in C.
14006 Check for overflow here.
14007 Allow \? and UCNs, for compatibility with C.
14008
14009 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
14010 with quote slot used by complain_at.
14011
14012 * tests/input.at: Add tests for backslash-newline, m4 quotes
14013 in symbols, long literals, and funny escapes in strings.
14014
14015 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
14016 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
14017 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
14018 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
14019 * m4/mbswidth.m4: New file, from GNU coreutils.
14020
14021 * doc/bison.texinfo (Grammar Outline): Document // comments.
14022 (Symbols): Document that trigraphs have no special meaning in Bison,
14023 nor is backslash-newline allowed.
14024 (Actions): Document that trigraphs have no special meaning.
14025
14026 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
14027 no longer used.
14028
140292002-11-02 Paul Eggert <eggert@twinsun.com>
14030
14031 * src/reader.c: Don't include quote.h; not needed.
14032 (get_merge_function): Reword warning to be consistent with
14033 type clash diagnostic in grammar_current_rule_check.
14034
14035 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
14036 bug in trigraph handling.
14037
14038 * src/output.c (prepare_symbols): When printing token names,
14039 escape "[" as "@<:@" and likewise for "]".
14040
14041 * src/system.h (errno): Remove declaration, as we are now
14042 assuming C89 or better, and C89 guarantees errno.
14043
762b212b
PE
140442002-10-30 Paul Eggert <eggert@twinsun.com>
14045
14046 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14047 Check for close failures.
14048 * src/files.h (xfclose): Return void, not int, since it always
14049 returned zero.
14050 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14051 indicates one.
14052 * src/output.c (output_skeleton): Use xfclose rather than fclose
14053 and ferror. xfclose now checks ferror.
14054
14055 * data/glr.c (YYLEFTMOST_STATE): Remove.
14056 (yyreportTree): Use a stack-based leftmost state. This avoids
14057 our continuing battles with bogus warnings about initializers.
14058
56100c60
AD
140592002-10-30 Akim Demaille <akim@epita.fr>
14060
14061 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14062 #if.
14063
51b4a04c
PH
140642002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14065
14066 * tests/glr-regr1.at: New test for reported regressions.
14067 * tests/testsuite.at: Add glr-regr1.at test.
14068 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 14069
bf1ebda2
PE
140702002-10-24 Paul Eggert <eggert@twinsun.com>
14071
5c16c6b1
PE
14072 Version 1.75a.
14073
bf1ebda2
PE
14074 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14075 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14076 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14077 Don't assume strdup exists; POSIX says its an XSI extension.
14078 Check for buffer overflow on input.
14079
b526ee61
AD
140802002-10-24 Akim Demaille <akim@epita.fr>
14081
14082 * src/output.c (output_skeleton): Don't disable M4sugar comments
14083 too soon: it results in comments being expanded.
14084 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14085 first output.
14086
f1886bb2
AD
140872002-10-24 Akim Demaille <akim@epita.fr>
14088
14089 * data/yacc.c (m4_int_type): New.
14090 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14091 char' as only yacc.c wants K&R portability.
14092 * data/glr.c (yysigned_char): Remove.
14093 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14094 Reported by Quoc Peyrot.
14095
c5576256
PE
140962002-10-23 Paul Eggert <eggert@twinsun.com>
14097
14098 * src/main.c (main): With --trace=time, report times even if a
14099 non-fatal error occurs. Formerly, the times were reported in some
14100 such cases but not in others.
14101 * src/reader.c (reader): Just return if a complaint has been issued,
14102 instead of exiting, so that 'main' can report times.
14103
27b0ffea
AD
141042002-10-22 Akim Demaille <akim@epita.fr>
14105
14106 * src/system.h: Include sys/types.
14107 Reported by Bert Deknuydt.
14108
223a7883
PE
141092002-10-23 Paul Eggert <eggert@twinsun.com>
14110
14111 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14112 Suggested by Art Haas.
14113
141142002-10-22 Paul Eggert <eggert@twinsun.com>
14115
14116 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14117 decl; not needed any more.
14118 * src/main.c (main): Use return to exit, undoing yesterday's change.
14119 The last OS that we could find where this wouldn't work is
14120 SunOS 3.5, and that's too old to worry about now.
14121
14122 * data/glr.c (struct yyltype): Define members even when not
14123 doing locations. This is more consistent with yacc.c, and it
14124 works around the following bug reports:
161a71f3
PE
14125 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14126 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 14127
223a7883
PE
14128 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14129 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14130 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14131
8b76775a
AD
141322002-10-22 Akim Demaille <akim@epita.fr>
14133
14134 * data/README: New.
14135
6db10d14
PE
141362002-10-21 Paul Eggert <eggert@twinsun.com>
14137
14138 Be consistent about 'bool'; the old code used an enum in one
14139 module and an int in another, and this violates the C standard.
14140 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14141 * configure.ac (AC_HEADER_STDBOOL): Add.
14142 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14143 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14144 * src/symtab.c (hash_compare_symbol_t): Likewise.
14145 * src/system.h (bool, false, true): Use a definition consistent
14146 with ../lib/hash.c. All uses changed.
14147
14148 * src/complain.c (warning_issued): Renamed from warn_message_count,
14149 so that we needn't worry about integer overflow (!).
14150 Now of type bool. All uses changed.
14151 (complaint_issued): Renamed from complain_message_count; likewise.
14152
14153 * src/main.c (main): Use exit to exit with failure.
27b0ffea 14154
6db10d14
PE
14155 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14156 rather than 1 and 0.
14157 * src/main.c (main): Likewise.
14158 * src/getargs.c (getargs): Likewise.
14159 * src/reader.c (reader): Likewise.
14160
14161 * src/getarg.c (getargs): Remove duplicate code for
14162 "Try `bison --help'".
14163
14164 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14165 What was that "2" for?
14166
14167 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14168 * src/getargs.c (usage): Likewise.
14169
14170 * src/getargs.c (getargs): When there are too few operands, report
14171 the last one. When there are too many, report the first extra
14172 one. This is how diffutils does it.
14173
92a060fd
PE
141742002-10-20 Paul Eggert <eggert@twinsun.com>
14175
14176 Remove K&R vestiges.
14177 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14178 * src/complain.c (VA_START): Remove. Assume prototypes.
14179 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14180 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14181 fatal): Assume prototypes.
14182 * src/complain.h: Assume prototypes.
14183 * src/system.h (PARAMS): Remove.
14184 Include <limits.h> unconditionally, since it's guaranteeed even
14185 for a freestanding C89 compiler.
14186 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14187 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 14188
e7cb57c0
AD
141892002-10-20 Akim Demaille <akim@epita.fr>
14190
14191 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14192 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14193 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14194 (yyresolveStates, yyresolveAction, yyresolveStack)
14195 (yyprocessOneStack): Use them.
14196 (yy_reduce_print): New.
14197 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14198
0245f82d
AD
141992002-10-20 Akim Demaille <akim@epita.fr>
14200
14201 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14202 arguments and output `void'.
14203 (b4_c_function): Rename as...
14204 (b4_c_function_def): this.
14205 (b4_c_function_decl, b4_c_ansi_function_def)
14206 (b4_c_ansi_function_decl): New.
14207 Change the interpretation of the arguments: before `int, foo', now
14208 `int foo, foo'.
14209 * data/yacc.c (yyparse): Prototype and define thanks to these.
14210 Adjust b4_c_function_def uses.
14211 * data/glr.c (yyparse): Likewise, but ANSI only.
14212
39912f52
AD
142132002-10-20 Akim Demaille <akim@epita.fr>
14214
14215 * src/output.c (prepare): Move the definition of `tokens_number',
14216 `nterms_number', `undef_token_number', `user_token_number_max'
14217 to...
14218 (prepare_tokens): Here.
14219 (prepare_tokens): Rename as...
14220 (prepare_symbols): this.
14221 (prepare): Move the definition of `rules_number' to...
14222 (prepare_rules): here.
14223 (prepare): Move the definition of `last', `final_state_number',
14224 `states_number' to...
14225 (prepare_states): here.
14226 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14227
20c1e2ad
AD
142282002-10-20 Akim Demaille <akim@epita.fr>
14229
14230 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14231
21964f43
AD
142322002-10-20 Akim Demaille <akim@epita.fr>
14233
14234 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14235 * data/c.m4: here.
14236
66d30cd4
AD
142372002-10-20 Akim Demaille <akim@epita.fr>
14238
14239 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14240 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14241 `pair'.
14242 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14243 `name' to...
14244 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14245 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14246 These.
14247
95f2c9fe
PE
142482002-10-19 Paul Eggert <eggert@twinsun.com>
14249
14250 Do not create a temporary file, as that involves security and
14251 cleanup headaches. Instead, use a pair of pipes.
14252 Derived from a suggestion by Florian Krohm.
14253 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14254 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14255 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14256 (BISON_PREREQ_SUBPIPE): Add.
14257 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14258 Add subpipe.h, subpipe.c.
14259 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14260 * po/POTFILES.in: Add lib/subpipe.c.
14261 * src/output.c: Include "subpipe.h".
14262 (m4_invoke): Remove decl.
14263 (scan_skel): New decl.
14264 (output_skeleton): Use pipe rather than temporary file for m4 input.
14265 Check that m4sugar.m4 is readable, to avoid deadlock.
14266 Check for pipe I/O error.
14267 * src/scan-skel.l (readpipe): Remove decl.
14268 (scan_skel): New function, to be used in place of m4_invoke.
14269 Read from stream rather than file.
66d30cd4 14270
95f2c9fe
PE
14271 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14272 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14273 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14274 this generates a more-accurate value anyway.
14275
14276 * lib/timevar.c (timervar_accumulate): Rename locals to
14277 avoid confusion with similarly-named more-global.
14278 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14279
14280 * src/output.c (prepare): Use xstrdup to convert char const *
14281 to char *, to avoid GCC warning.
14282
c19988b7
AD
142832002-10-19 Akim Demaille <akim@epita.fr>
14284
14285 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14286 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14287 Use them to have `calc.y' ready for %pure-parser.
14288 * data/yacc.c (YYLEX): Pass a yylex return type to
14289 b4_c_function_call.
14290
ae7453f2
AD
142912002-10-19 Akim Demaille <akim@epita.fr>
14292
14293 Prototype support of %lex-param and %parse-param.
14294
14295 * src/parse-gram.y: Add the definition of the %lex-param and
14296 %parse-param tokens, plus their rules.
14297 Drop the `_' version of %glr-parser.
14298 Add the "," token.
14299 * src/scan-gram.l (INITIAL): Scan them.
14300 * src/muscle_tab.c: Comment changes.
14301 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14302 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14303 (muscle_entry_s): The `value' member is no longer const.
14304 Adjust all dependencies.
14305 * src/muscle_tab.c (muscle_init): Adjust: use
14306 MUSCLE_INSERT_STRING.
14307 Initialize the obstack earlier.
14308 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14309 (muscle_pair_list_grow): New.
14310 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14311 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14312 * tests/calc.at: Use %locations, not --locations.
14313 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14314
0e575721
AD
143152002-10-19 Akim Demaille <akim@epita.fr>
14316
14317 * src/getargs.c (usage): Take status as argument and exit
14318 accordingly.
14319 Report the traditional `Try ... --help' message when status != 0.
14320 (usage, version): Don't take a FILE * as arg, it is pointless.
14321 (getargs): When there is an incorrect number of arguments, make it
14322 an error, and report it GNUlically thanks to `usage ()'.
14323
724ce7f5
PE
143242002-10-18 Paul Eggert <eggert@twinsun.com>
14325
3a781eb2
PE
14326 * data/glr.c (yyreportParseError): Don't assume that sprintf
14327 yields the length of the printed string, as this is not true
14328 on SunOS 4.1.4. Reported by Peter Klein.
14329
724ce7f5
PE
14330 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14331 * tests/conflicts.at (%nonassoc and eof): Likewise.
14332 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14333
473d0a75
AD
143342002-10-17 Akim Demaille <akim@epita.fr>
14335
14336 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14337 * src/getargs.c (trace_types, trace_args): Adjust.
14338 * src/reader.c (grammar_current_rule_prec_set)
14339 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14340 Standardize error messages.
14341 And s/@prec/%prec/!
14342 (reader): Use trace_flag to enable scanner/parser debugging,
14343 instead of an adhoc scheme.
14344 * src/scan-gram.l: Remove trailing debugging code.
14345
e76d2469
PE
143462002-10-16 Paul Eggert <eggert@twinsun.com>
14347
93e2236a
PE
14348 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14349 MUSCLE_TAB_H.
14350
e76d2469
PE
14351 * NEWS: Officially drop support for building Bison with K&R C,
14352 since it didn't work anyway and it's not worth worrying about.
14353 * Makefile.maint (wget_files): Remove ansi2knr.c.
14354 (ansi2knr.c-url_prefix): Remove.
14355 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14356 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14357 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14358
5bd1c419
PE
143592002-10-15 Paul Eggert <eggert@twinsun.com>
14360
14361 Stop using the "enum_" trick for K&R-style function definitions;
14362 it confused me, and I was the author! Instead, assume that people
14363 who want to use K&R C compilers (when using these modules in GCC,
14364 perhaps?) will run ansi2knr.
14365
14366 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14367 All uses of "enum_" changed to "enum ".
14368 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14369 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 14370
5bd1c419
PE
14371 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14372 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14373 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14374 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14375 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14376 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14377 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14378 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14379 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14380 Use function prototypes; this removes the need for declaring
14381 static functions simply to provide their prototypes.
14382 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14383 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14384 bitset_count_, bitset_create, bitset_dump, bitset_first,
14385 bitset_free, bitset_init, bitset_last, bitset_next,
14386 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14387 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14388 bitset_print, bitset_release_memory, bitset_toggle_,
14389 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14390 debug_bitset): Likewise.
14391 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14392 * lib/bitset_stats.c (bitset_log_histogram_print,
14393 bitset_percent_histogram_print, bitset_stats_and,
14394 bitset_stats_and_cmp, bitset_stats_and_or,
14395 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14396 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14397 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14398 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14399 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14400 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14401 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14402 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14403 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14404 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14405 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14406 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14407 bitset_stats_zero): Likewise.
14408 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14409 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14410 bitsetv_dump, debug_bitsetv): Likewise.
14411 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14412 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14413 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14414 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14415 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14416 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14417 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14418 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14419 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14420 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14421 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14422 Likewise.
14423 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14424 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14425 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14426 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14427 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14428 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14429 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14430 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14431 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14432 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14433 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 14434
ae26e1f0
AD
144352002-10-14 Akim Demaille <akim@epita.fr>
14436
14437 Version 1.75.
14438
d43baf71
AD
144392002-10-14 Akim Demaille <akim@epita.fr>
14440
14441 * tests/Makefile.am (maintainer-check-posix): New.
14442
7ebc83e3
AD
144432002-10-14 Akim Demaille <akim@epita.fr>
14444
14445 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14446 member.
14447
05846dae
AD
144482002-10-14 Akim Demaille <akim@epita.fr>
14449
14450 * src/tables.c (table_ninf_remap): base -> tab.
14451 Reported by Matt Rosing.
14452
1318e37d
PE
144532002-10-14 Paul Eggert <eggert@twinsun.com>
14454
447fbb17
PE
14455 * tests/action.at, tests/calc.at, tests/conflicts.at,
14456 tests/cxx-type.at, tests/headers.at, tests/input.at,
14457 tests/regression.at, tests/synclines.at, tests/torture.at:
14458 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14459 so that the tests still work even if POSIXLY_CORRECT is set.
14460 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 14461
1318e37d
PE
14462 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14463 for portability to K&R hosts. Fix typo: signed char is guaranteed
14464 only to 127, not to 128.
14465 * data/glr.c (yysigned_char): New type.
14466 * data/yacc.c (yysigned_char): Likewise.
14467 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14468
cc0f0794
PE
144692002-10-13 Paul Eggert <eggert@twinsun.com>
14470
5038f418
PE
14471 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14472 true due to limited range of data type" warning from GCC.
14473
cc0f0794
PE
14474 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14475 by wrapping enum yytokentype's definition inside #ifndef
14476 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14477
6fed0802
AD
144782002-10-13 Akim Demaille <akim@epita.fr>
14479
14480 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14481 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14482
32f0598d
AD
144832002-10-13 Akim Demaille <akim@epita.fr>
14484
14485 * Makefile.maint: Update from Autoconf 2.54.
14486 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14487
7ea9a33f
AD
144882002-10-13 Akim Demaille <akim@epita.fr>
14489
14490 * src/print.c (print_state): Separate the list of solved conflicts
14491 from the other items.
14492 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14493
ea99527d
AD
144942002-10-13 Akim Demaille <akim@epita.fr>
14495
14496 Let nondeterministic skeletons be usable with deterministic
14497 tables.
14498
14499 With the patch, GAWK compiled by GCC without -O2 passes its test
14500 suite using a GLR parser driven by LALR tables. It fails with -O2
14501 because `struct stat' gives two different answers on my machine:
14502 88 (definition of an auto var) and later 96 (memset on this var).
14503 Hence the stack is badly corrumpted. The headers inclusion is to
14504 blame: if I move the awk.h inclusion before GLR's system header
14505 inclusion, the two struct stat have the same size.
14506
14507 * src/tables.c (pack_table): Always create conflict_table.
14508 (token_actions): Always create conflict_list.
14509 * data/glr.c (YYFLAG): Remove, unused.
14510
f377f69f
AD
145112002-10-13 Akim Demaille <akim@epita.fr>
14512
14513 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14514 (O0FLAGS): New.
14515 (VALGRIND, GXX): New.
14516 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14517 * tests/bison.in: Run $PREBISON a pre-command.
14518 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14519 (maintainer-check-g++): New.
14520 * Makefile.am (maintainer-check): New.
14521
2a1fe6ed
AD
145222002-10-13 Akim Demaille <akim@epita.fr>
14523
14524 * data/glr.c: Formatting changes.
14525 Tweak some trace messages to match yacc.c's.
14526
f50adbbd
AD
145272002-10-13 Akim Demaille <akim@epita.fr>
14528
14529 GLR parsers sometimes raise parse errors instead of performing the
14530 default reduction.
14531 Reported by Charles-Henry de Boysson.
14532
14533 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 14534 check the length of the traces when %glr.
f50adbbd
AD
14535 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14536 GLR's traces.
14537 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14538 Test GLR parsers.
14539 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14540 (yyltype): Remove the yy prefix from the member names.
14541 (yytable): Complete its comment.
14542 (yygetLRActions): Map error action number from YYTABLE from
14543 YYTABLE_NINF to 0.
14544 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14545 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14546 not satisfying as we could compare an YYACTION computed from
14547 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14548 only value for error actions.
14549 (yyreportParseError): In verbose parse error messages, don't issue
14550 `error' in the list of expected tokens.
14551 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14552 next action to perform to match glr.c's decoding.
14553 (yytable): Complete its comment.
14554
bcbad5b9
PE
145552002-10-13 Paul Eggert <eggert@twinsun.com>
14556
14557 Fix problem reported by Henrik Grubbstroem in
161a71f3 14558 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
14559 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14560 because the Bison parser reads the second action before reducing
14561 the first one.
14562 * src/scan-gram.l (rule_length): New static var.
14563 Use it to keep track of the rule length in the scanner, since
14564 we can't expect the parser to be in lock-step sync with the scanner.
14565 (handle_action_dollar, handle_action_at): Use this var.
14566 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 14567
14904b89
PE
145682002-10-12 Paul Eggert <eggert@twinsun.com>
14569
1fe611e5
PE
14570 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14571 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14572 Include <sys/time.h> when checking for clock_t and struct tms.
14573 Use same include order as source.
14574 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 14575 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 14576
1fe611e5
PE
14577 * lib/timevar.c: Update copyright date and clarify comments.
14578 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 14579
1fe611e5
PE
14580 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14581 GCC version as of today, then merge Bison's changes.
14582 Change "GCC" to "Bison" in copyright notice. timevar.def's
14583 author is Akim, so change that too.
14584
98194095
PE
14585 * src/reader.c (grammar_current_rule_check):
14586 Don't worry about the default action if $$ is untyped.
14587 Prevents bogus warnings reported by Jim Gifford in
161a71f3 14588 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 14589
14904b89
PE
14590 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14591 * data/glr.c, data/lalr1.cc, data/yacc.c:
14592 Output token definitions before the first part of user declarations.
14593 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 14594 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 14595
ff6dca18
PE
145962002-10-11 Paul Eggert <eggert@twinsun.com>
14597
14598 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14599 (yyparse): here. This undoes some of the 2002-07-25 change.
14600 Compatibility problem reported by Ralf S. Engelschall with
14601 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14602
eb714592
AD
146032002-10-11 Akim Demaille <akim@epita.fr>
14604
14605 * tests/regression.at Characters Escapes): New.
14606 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14607 characters.
14608 Reported by Jan Nieuwenhuizen.
14609
b7195100
AD
146102002-10-11 Akim Demaille <akim@epita.fr>
14611
14612 * po/id.po: New.
14613
f28a0f2d
PE
146142002-10-10 Paul Eggert <eggert@twinsun.com>
14615
14616 Portability fixes for bitsets; this also avoids several GCC
14617 warnings.
14618
14619 * lib/abitset.c: Include <stddef.h>, for offsetof.
14620 * lib/lbitset.c: Likewise.
14621
14622 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14623 properly for vectors of objects. Do not assume that adding a
14624 header size to a multiple of a word size yields a value that is
14625 properly aligned for the whole union.
14626 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14627
14628 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14629 unique names for structures.
14630 * lib/ebitset.c (ebitset_bytes): Likewise.
14631 * lib/lbitset.c (lbitset_bytes): Likewise.
14632
14633 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14634 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14635 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14636 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14637 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14638 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14639 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14640 to improve the type-checking that GCC can do.
14641 * lib/bitset.c (bitset_op4_cmp): Likewise.
14642 * lib/bitset_stats.c (bitset_stats_count,
14643 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14644 bitset_stats_copy, bitset_stats_disjoint_p,
14645 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14646 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14647 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14648 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14649 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14650 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14651 bitset_stats_or_and_cmp): Likewise.
14652 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14653 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14654 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14655 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14656
14657 * lib/abitset.h: Include bitset.h, not bbitset.h.
14658 * lib/ebitset.h: Likewise.
14659 * lib/lbitset.h: Likewise.
14660
14661 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14662 All instances of parameters of type enum bitset_opts are now of
14663 type enum_bitset_opts, to conform to the C Standard, and similarly
14664 for enum_bitset_type.
14665 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14666 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14667
14668 Do not use "struct bitset_struct" to mean different things in
14669 different modules. Not only is this confusing, it violates
14670 the C Standard, which requires that structure types in different
14671 modules must be compatible if one is to be passed to the other.
14672 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14673 All instances of "struct bitset_struct *" replaced with "bitset".
14674 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14675 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14676 struct lbitset_struct, struct bitset_stats_struct): New types.
14677 All uses of struct bitset_struct changed to union bitset_union,
14678 etc.
ba0fe3c7 14679 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
14680 struct bitset_struct): Remove.
14681 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14682 struct bitset_struct): Remove.
14683 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14684 bitset_struct): Remove.
14685 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14686 Likewise.
14687
14688 Do not call a function of type T using a call that assumes the
14689 function is of a different type U. Standard C requires that a
14690 function must be called with a type that is compatible with its
14691 definition.
14692 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14693 New decls.
14694 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14695 New functions.
14696 * lib/ebitset.c (PFV): Remove.
14697 * lib/lbitset.c (PFV): Likewise.
14698 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14699 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14700 decls.
14701 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14702 (ebitset_vtable): Use them.
14703 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14704 lbitset_xor): New functions.
14705 (lbitset_vtable): Use them.
14706
14707 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14708 Declare.
14709
14710 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14711 GCC warning.
14712 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14713 Use offsetof, for simplicity.
14714
6fbe4984
PE
147152002-10-06 Paul Eggert <eggert@twinsun.com>
14716
14717 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14718 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 14719 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
14720 which was inadvertently undone by the 2002-09-30 patch.
14721 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14722 the same width as int.
14723
420f93c8
PE
147242002-10-04 Paul Eggert <eggert@twinsun.com>
14725
14726 Version 1.50.
14727
14728 * configure.ac (AC_INIT), NEWS: Increment version number.
14729
14730 * doc/bison.texinfo: Minor spelling, grammar, and white space
14731 fixes.
14732 (Symbols): Mention that any negative value returned from yylex
14733 signifies end-of-input. Warn about negative chars. Mention
14734 the portable Standard C character set.
14735
14736 The GNU coding standard says CFLAGS and YFLAGS are reserved
14737 for the installer to set.
14738 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14739 * src/Makefile.am (AM_CFLAGS): Likewise.
14740 (AM_YFLAGS): Renamed from YFLAGS.
14741
14742 Fix some MAX and MIN problems.
14743 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14744 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14745 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14746 * src/reader.c (reader): Use it.
14747
14748 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14749 POSIX 1003.1-2001 has removed fgrep.
14750
147512002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14752
14753 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14754 interpreted as signed.
14755 * lib/ebitset.c (ebitset_list): Fix bug.
14756
ff68026d
PE
147572002-10-01 Paul Eggert <eggert@twinsun.com>
14758
14759 More fixes for 64-bit hosts and large bitsets.
14760
14761 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14762 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14763 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14764 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14765 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14766 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14767 bitset_count_): Likewise.
14768 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14769 bitset_first, bitset_last): Likewise.
14770 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14771 bitset_stats_list_reverse, bitset_stats_size,
14772 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14773 Likewise.
14774 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14775 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14776 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14777 bitsetv_reflexive_transitive_closure): Likewise.
14778 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14779 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14780 Likewise.
14781 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14782 Likewise.
420f93c8 14783
ff68026d
PE
14784 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14785 Use size_t, not unsigned int, to count bytes.
14786 * lib/abitset.h (abitset_bytes): Likewise.
14787 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14788 Likewise.
14789 * lib/bitset.h (bitset_bytes): Likewise.
14790 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14791 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14792 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14793 * lib/ebitset.c (ebitset_bytes): Likewise.
14794 * lib/ebitset.h (ebitset_bytes): Likewise.
14795 * lib/lbitset.c (lbitset_bytes): Likewise.
14796 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 14797
ff68026d
PE
14798 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14799 abitset_subset_p, abitset_disjoint_p, abitset_and,
14800 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14801 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14802 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14803 abitset_or_and, abitset_or_and_cmp):
14804 Use bitset_windex instead of unsigned int.
14805 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14806 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14807 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14808 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14809 Likewise.
14810 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 14811
ff68026d
PE
14812 * lib/bitset.c (bitset_print):
14813 Use proper printf formats for widths of integer types.
14814 * lib/bitset_stats.c (bitset_percent_histogram_print,
14815 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14816 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14817 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14818 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 14819
ff68026d
PE
14820 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14821 BITSET_SIZE_MAX): New macros.
14822 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14823 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14824 to BITSET_WINDEX_MAX.
14825
14826 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14827 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14828 since we now return the bitset_bindex type (not int).
14829
14830 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14831 when computing sizes.
14832 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14833
14834 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14835 and avoid cast to unsigned.
14836
6aa452a6
AD
148372002-09-30 Akim Demaille <akim@epita.fr>
14838
14839 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14840 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14841 Updates from Michael Hayes.
14842
927f7817
AD
148432002-09-30 Art Haas <ahaas@neosoft.com>
14844
14845 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14846 invocations.
14847 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14848 defined.
14849
9738f41e
AD
148502002-09-27 Akim Demaille <akim@epita.fr>
14851
14852 Version 1.49c.
14853
a5c75d7f
AD
148542002-09-27 Akim Demaille <akim@epita.fr>
14855
14856 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14857 (Because of AC_LIBSOURCE).
14858
8280e179
AD
148592002-09-27 Akim Demaille <akim@epita.fr>
14860
14861 Playing with Autoscan.
14862
14863 * configure.ac: Remove the old LIBOBJ tweaks.
14864 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14865 * lib/strrchr.c: New.
14866 * lib/strtol.c: New, from the Coreutils 4.5.1.
14867
ae64af35
AD
148682002-09-27 Akim Demaille <akim@epita.fr>
14869
14870 Playing with Autoscan.
14871
14872 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14873 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14874 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14875 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14876 Coreutils 4.5.1.
14877
d1a1114f
AD
148782002-09-24 Akim Demaille <akim@epita.fr>
14879
14880 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14881 (Frequently Asked Questions, Parser Stack Overflow): New.
14882
b906441c
AD
148832002-09-13 Akim Demaille <akim@epita.fr>
14884
14885 Playing with autoscan.
14886
14887 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14888 * src/files.c (skeleton_find): Remove, unused.
14889 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14890 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14891
bd701811
AD
148922002-09-13 Akim Demaille <akim@epita.fr>
14893
14894 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14895 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14896
e0a13e7b
AD
148972002-09-13 Akim Demaille <akim@epita.fr>
14898
14899 * configure.ac: Require 2.54.
14900 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14901 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14902 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14903 Remove, provided by Autoconf macros.
14904
c97011bf
AD
149052002-09-12 Akim Demaille <akim@epita.fr>
14906
14907 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14908
d862b1be
AD
149092002-09-12 Akim Demaille <akim@epita.fr>
14910
14911 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14912 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14913 Reported by Martin Mokrejs.
14914
3d38c03a
AD
149152002-09-10 Akim Demaille <akim@epita.fr>
14916
14917 * src/parse-gram.y: Associate a human readable string to each
14918 token type.
14919 * tests/regression.at (Invalid inputs): Adjust.
14920
b6347355
AD
149212002-09-10 Gary V. Vaughan <gary@gnu.org>
14922
14923 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14924 with an Autoconf-2.5x style configure.ac.
14925
09ba4ab2
PE
149262002-09-06 Paul Eggert <eggert@twinsun.com>
14927
14928 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14929 exception applies only to yacc.c. This is a modification of a
14930 patch originally suggested by Akim Demaille.
14931
21846f69
AD
149322002-09-06 Akim Demaille <akim@epita.fr>
14933
09ba4ab2
PE
14934 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14935 here to...
14936 * data/yacc.c: here.
14937
21846f69
AD
14938 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14939 LocationType.
14940 (b4_ltype): Default to yy::Location from location.hh.
14941
c0ad8bf3
AD
149422002-09-04 Jim Meyering <jim@meyering.net>
14943
14944 * data/yacc.c: Guard the declaration of yytoknum also with
14945 `#ifdef YYPRINT', so it is declared only when used.
14946
3a93251e
AD
149472002-09-04 Akim Demaille <akim@epita.fr>
14948
14949 * configure.in: Rename as...
14950 * configure.ac: this.
14951 Bump to 1.49c.
14952
427c0dda
AD
149532002-09-04 Akim Demaille <akim@epita.fr>
14954
14955 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14956 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14957 translate maintainer only messages.
14958
6a254321
PE
149592002-08-12 Paul Eggert <eggert@twinsun.com>
14960
645e30d1
PE
14961 Version 1.49b.
14962
6a254321
PE
14963 * Makefile.am (SUBDIRS): Remove intl.
14964 (DISTCLEANFILES): Remove.
14965 * NEWS: Mention that GNU M4 is now required. Clarify what is
14966 meant by "larger grammars". Mention the pt_BR translation.
14967 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14968 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14969 Bump version from 0.11.2 to 0.11.5.
14970 (BISON_PREREQ_STAGE): Remove.
14971 (AM_GNU_GETTEXT): Use external gettext.
14972 (AC_OUTPUT): Remove intl/Makefile.
14973
14974 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14975
14976 * data/glr.c: Include string.h, for strlen.
14977 (yyreportParseError): Use size_t for yysize.
14978 (yy_yypstack): No longer nested inside yypstates, as nested
14979 functions are not portable. Do not assume size_t is the
14980 same width as int.
14981 (yypstates): Do not assume that ptrdiff_t is the same width
14982 as int, and similarly for yyposn and YYINDEX.
14983
14984 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14985
14986 * lib/Makefile.am (INCLUDES): Do not include from the intl
14987 directory, which has been removed.
14988 * src/Makefile.am (INCLUDES): Likewise.
14989
14990 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14991 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14992 New vars.
14993
14994 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14995 * tests/Makefile.am (EXTRA_DIST): Likewise.
14996
14997 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14998 Do not assume that bitset_windex is the same width as unsigned.
14999
15000 * lib/abitset.c (abitset_unused_clear): Do not assume that
15001 bitset_word is the same width as int.
15002 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
15003 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
15004 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
15005 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
15006 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
15007
15008 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
15009 portability to one's complement hosts!).
15010 * lib/ebitset.c (ebitset_op1): Likewise.
15011 * lib/lbitset.c (lbitset_op1): Likewise.
15012
15013 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
15014 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
15015 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
15016 Sync with fileutils.
15017 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
15018 lib/gettext.h: Sync with diffutils.
15019
15020 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
15021 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
15022
15023 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
15024 PROTOTYPES to check for prototypes, and "defined __STDC__" to
15025 check for void *.
15026
15027 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
15028 size_t; the old version tried to do this but casted improperly.
15029 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
15030 (bitset_test): Now returns int, not unsigned long.
15031
15032 * lib/bitset_stats.c: Include "gettext.h".
15033 (_): New macro.
15034 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
15035 name locals "index", as it generates unnecessary warnings on some
15036 hosts that have an "index" function.
15037
15038 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
15039 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
15040 they need translation.
15041 * src/LR0.c (state_list_append, new_itemsets, get_state,
15042 append_states, generate_states): Likewise.
15043 * src/assoc.c (assoc_to_string): Likewise.
15044 * src/closure.c (print_closure, set_firsts, closure): Likewise.
15045 * src/gram.c (grammar_dump): Likewise.
15046 * src/injections.c (injections_compute): Likewise.
15047 * src/lalr.c (lookaheads_print): Likewise.
15048 * src/relation.c (relation_transpose): Likewise.
15049 * src/scan-gram.l: Likewise.
15050 * src/tables.c (table_grow, pack_vector): Likewise.
15051
15052 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15053 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15054 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15055 * m4/mbstate_t.m4: Sync with fileutils.
15056 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15057
15058 * po/LINGUAS: Add pt_BR.
15059 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15060 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15061 lib/timevar.c.
15062 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15063 manual recommends.
15064 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15065
15066 * src/complain.c (strerror_r): Remove decl; not needed.
15067 (strerror): Use same pattern as ../lib/error.c.
15068
15069 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15070
15071 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15072
15073 * src/main.c (main): Cast result of bindtextdomain and textdomain
15074 to void, to avoid a GCC warning when --disable-nls is in effect.
15075
15076 * src/scan-gram.l: Use strings rather than escapes when possible,
15077 to minimize the number of warnings from xgettext.
15078 (handle_action_dollar, handle_action_at): Don't use isdigit,
15079 as it mishandles negative chars and it may not work as expected
15080 outside the C locale.
15081
15082 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15083 this is a GCC extension and is not portable to other compilers.
15084
15085 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15086 Do not include <ctype.h>; no longer needed.
15087 Do not include <malloc.h>; no longer needed (and generates
15088 warnings on OpenBSD 3.0).
15089
15090 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15091 it's not portable.
15092
15093 * tests/regression.at: Do not use 'cc -c input.c -o input';
15094 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15095
15096 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15097 exit status as failure, not just exit status 1. Sun C exits
15098 with status 2 sometimes.
15099
15100 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15101 Use it for the two large tests.
15102
c8f002c7
AD
151032002-08-02 Akim Demaille <akim@epita.fr>
15104
15105 * src/conflicts.c (conflicts_output): Don't output rules never
15106 reduced here, since anyway that computation doesn't work.
15107 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15108 (rule_useless_p, rule_never_reduced_p): New.
15109 (grammar_rules_partial_print): Use a filter instead of a range.
15110 Display the title only if needed.
15111 (grammar_rules_print): Adjust.
15112 (grammar_rules_never_reduced_report): New.
15113 * src/tables.c (action_row): Move the computation of rules never
15114 reduced to...
15115 (token_actions): here.
15116 * src/main.c (main): Make the parser before making the report, so
15117 that rules never reduced are computed.
15118 Call grammar_rules_never_reduced_report.
15119 * src/print.c (print_results): Report rules never reduced.
15120 * tests/conflicts.at, tests/reduce.at: Adjust.
15121
cd08e51e
AD
151222002-08-01 Akim Demaille <akim@epita.fr>
15123
15124 Instead of attaching lookaheads and duplicating the rules being
15125 reduced by a state, attach the lookaheads to the reductions.
15126
15127 * src/state.h (state_t): Remove the `lookaheads',
15128 `lookaheads_rule' member.
15129 (reductions_t): Add a `lookaheads' member.
15130 Use a regular array for the `rules'.
15131 * src/state.c (reductions_new): Initialize the lookaheads member
15132 to 0.
15133 (state_rule_lookaheads_print): Adjust.
15134 * src/state.h, src/state.c (state_reductions_find): New.
15135 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15136 (count_rr_conflicts): Adjust.
15137 * src/lalr.c (LArule): Remove.
15138 (add_lookback_edge): Adjust.
15139 (state_lookaheads_count): New.
15140 (states_lookaheads_initialize): Merge into...
15141 (initialize_LA): this.
15142 (lalr_free): Adjust.
15143 * src/main.c (main): Don't free nullable and derives too early: it
15144 is used by --verbose.
15145 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15146
bb0027a9
AD
151472002-08-01 Akim Demaille <akim@epita.fr>
15148
15149 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15150 `rule_number_t**'.
15151 (set_derives, free_derives): Rename as...
15152 (derives_compute, derives_free): this.
15153 Adjust all dependencies.
15154 * src/nullable.c (set_nullable, free_nullable): Rename as...
15155 (nullable_compute, nullable_free): these.
15156 (rule_list_t): Store rule_t *, not rule_number_t.
15157 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15158 pointers, instead of their numbers.
15159 * src/main.c (main): Call nullable_free, and derives_free earlier,
15160 as they were lo longer used.
15161
3325ddc4
AD
151622002-08-01 Akim Demaille <akim@epita.fr>
15163
15164 * lib/timevar.c (get_time): Include children time.
15165 * src/lalr.h (LA, LArule): Don't export them: used with the
15166 state_t.
15167 * src/lalr.c (LA, LArule): Static.
15168 * src/lalr.h, src/lalr.c (lalr_free): New.
15169 * src/main.c (main): Call it.
15170 * src/tables.c (pack_vector): Check whether loc is >= to the
15171 table_size, not >.
15172 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15173 (tables_generate): do it, since that's also it which allocates
15174 them.
15175 Don't free LA and LArule, main does.
15176
c6f1a33c
AD
151772002-07-31 Akim Demaille <akim@epita.fr>
15178
15179 Separate parser tables computation and output.
15180
15181 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15182 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15183 (yydefgoto, yydefact, high): Move to...
15184 * src/tables.h, src/tables.c: here.
15185 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15186 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15187 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15188 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15189 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15190 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15191 (action_row, save_row, token_actions, save_column, default_goto)
15192 (goto_actions, sort_actions, matching_state, pack_vector)
15193 (table_ninf_remap, pack_table, prepare_actions): Move to...
15194 * src/tables.c: here.
15195 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15196 * src/output.c (token_actions, output_base, output_conflicts)
15197 (output_check): Merge into...
15198 (prepare_actions): this.
15199 (actions_output): Rename as...
15200 (user_actions_output): this.
15201 * src/main.c (main): Call tables_generate and tables_free.
15202
1509d42f
AD
152032002-07-31 Akim Demaille <akim@epita.fr>
15204
15205 Steal GCC's --time-report support.
15206
15207 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15208 stolen/adjusted from GCC.
15209 * m4/stage.m4: Remove time related checks.
15210 * m4/timevar.m4: New.
15211 * configure.in: Adjust.
15212 * src/system.h: Adjust to using timevar.h.
15213 * src/getargs.h, src/getargs.c: Support trace_time for
15214 --trace=time.
15215 * src/main.c (stage): Remove.
15216 (main): Replace `stage' invocations with timevar calls.
15217 * src/output.c: Insert pertinent timevar calls.
15218
273a74fa
AD
152192002-07-31 Akim Demaille <akim@epita.fr>
15220
15221 Let --trace have arguments.
15222
15223 * src/getargs.h (enum trace_e): New.
15224 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15225 (long_options, short_options): --trace/-T takes an optional
15226 argument.
15227 Change all the uses of trace_flag to reflect the new flags.
15228 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15229
15230 Strengthen `stage' portability.
15231
15232 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15233 * configure.in: Use it.
15234 Don't check for malloc.h and sys/times.h.
15235 * src/system.h: Include them when appropriate.
15236 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15237 times and struct tms are available.
15238
217598da
AD
152392002-07-30 Akim Demaille <akim@epita.fr>
15240
15241 In verbose parse error message, don't report `error' as an
15242 expected token.
15243 * tests/actions.at (Printers and Destructors): Adjust.
15244 * tests/calc.at (Calculator $1): Adjust.
15245 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15246 error message, do not report the parser accepts the error token in
15247 that state.
15248
52489d44
AD
152492002-07-30 Akim Demaille <akim@epita.fr>
15250
15251 Normalize conflict related messages.
15252
15253 * src/complain.h, src/complain.c (warn, complain): New.
15254 * src/conflicts.c (conflicts_print): Use them.
15255 (conflict_report_yacc): New, extracted from...
15256 (conflicts_print): here.
15257 * tests/conflicts.at, tests/existing.at: Adjust.
15258
e8832397
AD
152592002-07-30 Akim Demaille <akim@epita.fr>
15260
15261 Report rules which are never reduced by the parser: those hidden
15262 by conflicts.
15263
15264 * src/LR0.c (save_reductions): Don't make the final state too
15265 different: save its reduction (accept) instead of having a state
15266 without any action (no shift or goto, no reduce).
15267 Note: the final state is now a ``regular'' state, i.e., the
15268 parsers now contain `reduce 0' as default reduction.
15269 Nevertheless, since they decide to `accept' when yystate =
15270 final_state, they still will not reduce rule 0.
15271 * src/print.c (print_actions, print_reduction): Adjust.
15272 * src/output.c (action_row): Track reduced rules.
15273 (token_actions): Report rules never reduced.
15274 * tests/conflicts.at, tests/regression.at: Adjust.
15275
caf23d24
AD
152762002-07-30 Akim Demaille <akim@epita.fr>
15277
15278 `stage' was accidently included in a previous patch.
15279 Initiate its autoconfiscation.
15280
15281 * configure.in: Look for malloc.h and sys/times.h.
15282 * src/main.c (stage): Adjust.
15283 Report only when trace_flag.
15284
640748ee
AD
152852002-07-29 Akim Demaille <akim@epita.fr>
15286
15287 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15288 state_number_t.
15289 (errs_t): symbol_t*, not symbol_number_t.
15290 (reductions_t): rule_t*, not rule_number_t.
15291 (FOR_EACH_SHIFT): New.
15292 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15293 * src/print.c, src/print_graph.c: Adjust.
15294
88bce5a2
AD
152952002-07-29 Akim Demaille <akim@epita.fr>
15296
15297 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15298
15299 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15300 (endtoken, accept): these.
15301 * src/reader.c (reader): Set endtoken's default tag to "$end".
15302 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15303 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15304 Adjust.
15305
1bfb97db
AD
153062002-07-29 Akim Demaille <akim@epita.fr>
15307
15308 * src/reduce.c (reduce_grammar): When the language is empty,
15309 complain about the start symbol, not the axiom.
15310 Use its location.
15311 * tests/reduce.at (Empty Language): New.
15312
fc5734fe
AD
153132002-07-26 Akim Demaille <akim@epita.fr>
15314
15315 * src/reader.h, src/reader.c (gram_error): ... can't get
15316 yycontrol without making too strong assumptions on the parser
15317 itself.
15318 * src/output.c (prepare_tokens): Use the real 0th value of
15319 token_translations instead of `0'.
15320 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15321 visible here.
15322 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15323 for the time being: %locations ought to provide it to yyerror.
15324
3650b4b8
AD
153252002-07-25 Akim Demaille <akim@epita.fr>
15326
15327 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15328 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15329 * tests/regression.at (Web2c Actions): Adjust.
15330
4b3d3a8e
AD
153312002-07-25 Akim Demaille <akim@epita.fr>
15332
15333 Stop storing rules from 1 to nrules + 1.
15334
15335 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15336 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15337 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15338 Iterate from 0 to nrules.
15339 Use rule_number_as_item_number and item_number_as_rule_number.
15340 Adjust to `derive' now containing possibly 0.
15341 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15342 Handle the `- 1' part in rule numbers from/to item numbers.
15343 * src/conflicts.c (log_resolution): Fix the message which reversed
15344 shift and reduce.
15345 * src/output.c (action_row): Initialize default_rule to -1.
15346 (token_actions): Adjust.
15347 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15348 expected output.
15349 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15350
4a2a22f4
AD
153512002-07-25 Akim Demaille <akim@epita.fr>
15352
15353 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15354 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15355 (b4_c_knr_arg_decl): New.
15356 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15357 yyreport_parse_error.
15358
b8df3223
AD
153592002-07-25 Akim Demaille <akim@epita.fr>
15360
15361 * data/yacc.c (yyreport_parse_error): New, extracted from...
15362 (yyparse): here.
15363 (yydestruct, yysymprint): Move above yyparse.
15364 Be K&R compliant.
15365
a762e609
AD
153662002-07-25 Akim Demaille <akim@epita.fr>
15367
15368 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15369 replace...
15370 (b4_sint_type, b4_uint_type): these.
15371 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15372 * tests/regression.at (Web2c Actions): Adjust.
15373
12b0043a
AD
153742002-07-25 Akim Demaille <akim@epita.fr>
15375
15376 * src/gram.h (TIEM_NUMBER_MAX): New.
15377 (item_number_of_rule_number, rule_number_of_item_number): Rename
15378 as...
15379 (rule_number_as_item_number, item_number_as_rule_number): these.
15380 Adjust dependencies.
15381 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15382 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15383 (symbol_number_to_vector_number): New.
15384 (order): Of vector_number_t* type.
15385 (base_t, BASE_MAX, BASE_MIN): New.
15386 (froms, tos, width, pos, check): Of base_t type.
15387 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15388 (actrow): Of action_number_t type.
15389 (conflrow): Of unsigned int type.
15390 (table_ninf, base_ninf): New.
15391 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15392 (muscle_insert_int_table, muscle_insert_base_table)
15393 (muscle_insert_rule_number_table): New.
15394 (prepare_tokens): Output `toknum' as int_table.
15395 (action_row): Returns a rule_number_t.
15396 Use ACTION_MIN, not SHRT_MIN.
15397 (token_actions): yydefact is rule_number_t*.
15398 (table_ninf_remap): New.
15399 (pack_table): Use it for `base' and `table'.
15400 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15401 replaced with...
15402 (YYPACT_NINF, YYTABLE_NINF): these.
15403 (yypact, yytable): Compute their types instead of hard-coded
15404 `short'.
15405 * tests/regression.at (Web2c Actions): Adjust.
15406
5dde258a
AD
154072002-07-19 Akim Demaille <akim@epita.fr>
15408
15409 * src/scan-gram.l (id): Can start with an underscore.
15410
a945ec39
AD
154112002-07-16 Akim Demaille <akim@epita.fr>
15412
15413 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15414 Adjust all former `associativity' dependencies.
15415 * src/symtab.c (symbol_new): Default associativity is `undef', not
15416 `right'.
15417 (symbol_check_alias_consistence): Adjust.
15418
fae437e8
AD
154192002-07-09 Akim Demaille <akim@epita.fr>
15420
15421 * doc/bison.texinfo: Properly set the ``header'' part.
15422 Use @dircategory ``GNU programming tools'' as per Texinfo's
15423 documentation.
15424 Use @copying.
15425
1a715ef2
AD
154262002-07-09 Akim Demaille <akim@epita.fr>
15427
15428 * lib/quotearg.h: Protect against multiple inclusions.
15429 * src/location.h (location_t): Add a `file' member.
15430 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15431 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15432 `error_one_per_line' support.
15433
a5d50994
AD
154342002-07-09 Akim Demaille <akim@epita.fr>
15435
15436 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15437 * src/reader.c (lineno): Remove.
15438 Adjust all dependencies.
15439 (get_merge_function): Take a location and use complain_at.
15440 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15441 * tests/regression.at (Invalid inputs, Mixing %token styles):
15442 Adjust.
15443
b275314e
AD
154442002-07-09 Akim Demaille <akim@epita.fr>
15445
15446 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15447 recovery rule, and forbid extensions when --yacc.
15448 (gram_error): Use complain_at.
15449 * src/reader.c (reader): Exit if there were parse errors.
15450
865b9df1
AD
154512002-07-09 Akim Demaille <akim@epita.fr>
15452
15453 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15454 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15455 Reported by R Blake <blakers@mac.com>.
15456
c76e14da
AD
154572002-07-09 Akim Demaille <akim@epita.fr>
15458
15459 * data/yacc.c: Output the copyright notive in the header.
15460
7db2ed2d
AD
154612002-07-03 Akim Demaille <akim@epita.fr>
15462
15463 * src/output.c (froms, tos): Are state_number_t.
15464 (save_column): sp, sp1, and sp2 are state_number_t.
15465 (prepare): Rename `final' as `final_state_number', `nnts' as
15466 `nterms_number', `nrules' as `rules_number', `nstates' as
15467 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15468 unused.
15469 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15470 * data/lalr1.cc (nsym_): Remove, unused.
15471
e68e0410
AD
154722002-07-03 Akim Demaille <akim@epita.fr>
15473
15474 * src/lalr.h, src/lalr.c (goto_number_t): New.
15475 * src/lalr.c (goto_list_t): New.
15476 Propagate them.
15477 * src/nullable.c (rule_list_t): New.
15478 Propagate.
15479 * src/types.h: Remove.
15480
e1a4f3a4
AD
154812002-07-03 Akim Demaille <akim@epita.fr>
15482
15483 * src/closure.c (print_fderives): Use rule_rhs_print.
15484 * src/derives.c (print_derives): Use rule_rhs_print.
15485 (rule_list_t): New, replaces `shorts'.
15486 (set_derives): Add comments.
15487 * tests/sets.at (Nullable, Firsts): Adjust.
15488
536545f3
AD
154892002-07-03 Akim Demaille <akim@epita.fr>
15490
15491 * src/output.c (prepare_actions): Free `tally' and `width'.
15492 (prepare_actions): Allocate and free `order'.
15493 * src/symtab.c (symbols_free): Free `symbols'.
15494 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15495 * src/output.c (m4_invoke): Move to...
15496 * src/scan-skel.l: here.
15497 (<<EOF>>): Close yyout, and free its name.
15498
8b752b00
AD
154992002-07-03 Akim Demaille <akim@epita.fr>
15500
15501 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15502
15503 * src/LR0.c (new_state): Merge into...
15504 (state_list_append): this.
15505 (new_states): Merge into...
15506 (generate_states): here.
15507 (set_states): Don't ensure a proper `errs' state member here, do it...
15508 * src/conflicts.c (conflicts_solve): here.
15509 * src/state.h, src/state.c: Comment changes.
15510 (state_t): Rename member `shifts' as `transitions'.
15511 Adjust all dependencies.
15512 (errs_new): For consistency, also take the values as argument.
15513 (errs_dup): Remove.
15514 (state_errs_set): New.
15515 (state_reductions_set, state_transitions_set): Assert that no
15516 previous value was assigned.
15517 (state_free): New.
15518 (states_free): Use it.
15519 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15520 temporary storage: use `errs' and `nerrs' as elsewhere.
15521 (set_conflicts): Allocate and free this `errs'.
15522
613f5e1a
AD
155232002-07-02 Akim Demaille <akim@epita.fr>
15524
15525 * lib/libiberty.h: New.
15526 * lib: Update the bitset implementation from upstream.
15527 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15528 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15529 * src/main.c: Adjust bitset stats calls.
15530
26e0cadc
PE
155312002-07-01 Paul Eggert <eggert@twinsun.com>
15532
15533 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15534 char, so that negative chars don't collide with $.
15535
1154cced
AD
155362002-06-30 Akim Demaille <akim@epita.fr>
15537
15538 Have the GLR tests be `warning' checked, and fix the warnings.
15539
15540 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15541 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15542 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15543 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15544 (yyaddDeferredAction): static.
15545 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15546 (yyreportParseError): yyprefix is const.
15547 yytokenp is used only when verbose.
15548 (yy__GNUC__): Replace with __GNUC__.
15549 (yypdumpstack): yyi is size_t.
15550 (yypreference): Un-yy local variables and arguments, to avoid
15551 clashes with `yyr1'. Anyway, we are not in the user name space.
15552 (yytname_size): be an int, as is compared with ints.
15553 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15554 Use them.
15555 * tests/cxx-gram.at: Use quotation to protect $1.
15556 Use AT_COMPILE to enable warnings hunts.
15557 Prototype yylex and yyerror.
15558 `Use' argc.
15559 Include `string.h', not `strings.h'.
15560 Produce and prototype stmtMerge only when used.
15561 yylex takes a location.
15562
97650f4e
AD
155632002-06-30 Akim Demaille <akim@epita.fr>
15564
15565 We spend a lot of time in quotearg, in particular when --verbose.
15566
15567 * src/symtab.c (symbol_get): Store a quoted version of the key.
15568 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15569 Adjust all callers.
15570
d2576365
AD
155712002-06-30 Akim Demaille <akim@epita.fr>
15572
15573 * src/state.h (reductions_t): Rename member `nreds' as num.
15574 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15575 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15576
ccaf65bc
AD
155772002-06-30 Akim Demaille <akim@epita.fr>
15578
15579 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15580 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15581 (shifts_to): Rename as...
15582 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15583 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15584 (TRANSITION_IS_DISABLED, transitions_to): these.
15585
87675353
AD
155862002-06-30 Akim Demaille <akim@epita.fr>
15587
15588 * src/print.c (print_shifts, print_gotos): Merge into...
15589 (print_transitions): this.
15590 (print_transitions, print_errs, print_reductions): Align the
15591 lookaheads columns.
15592 (print_core, print_transitions, print_errs, print_state,
15593 print_grammar): Output empty lines separator before, not after.
15594 (state_default_rule_compute): Rename as...
15595 (state_default_rule): this.
15596 * tests/conflicts.at (Defaulted Conflicted Reduction),
15597 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15598 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15599
ce4ccb4b
AD
156002002-06-30 Akim Demaille <akim@epita.fr>
15601
15602 Display items as we display rules.
15603
15604 * src/gram.h, src/gram.c (rule_lhs_print): New.
15605 * src/gram.c (grammar_rules_partial_print): Use it.
15606 * src/print.c (print_core): Likewise.
15607 * tests/conflicts.at (Defaulted Conflicted Reduction),
15608 (Unresolved SR Conflicts): Adjust.
15609 (Unresolved SR Conflicts): Adjust and rename as...
15610 (Resolved SR Conflicts): this, as was meant.
15611 * tests/regression.at (Web2c Report): Adjust.
15612
bc933ef1
AD
156132002-06-30 Akim Demaille <akim@epita.fr>
15614
15615 * src/print.c (state_default_rule_compute): New, extracted from...
15616 (print_reductions): here.
15617 Pessimize, but clarify the code.
15618 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15619
53d4308d
AD
156202002-06-30 Akim Demaille <akim@epita.fr>
15621
15622 * src/output.c (action_row): Let default_rule be always a rule
15623 number.
15624
574fb2d5
AD
156252002-06-30 Akim Demaille <akim@epita.fr>
15626
15627 * src/closure.c (print_firsts, print_fderives, closure):
15628 Use BITSET_EXECUTE.
15629 * src/lalr.c (lookaheads_print): Likewise.
15630 * src/state.c (state_rule_lookaheads_print): Likewise.
15631 * src/print_graph.c (print_core): Likewise.
15632 * src/print.c (print_reductions): Likewise.
15633 * src/output.c (action_row): Likewise.
15634 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15635
05811fd7
AD
156362002-06-30 Akim Demaille <akim@epita.fr>
15637
15638 * src/print_graph.c: Use report_flag.
15639
0e4d5753
AD
156402002-06-30 Akim Demaille <akim@epita.fr>
15641
15642 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15643 to...
15644 * src/relation.h, src/relation.c (traverse, relation_digraph)
15645 (relation_print, relation_transpose): New.
15646
24c7d800
AD
156472002-06-30 Akim Demaille <akim@epita.fr>
15648
15649 * src/state.h, src/state.c (shifts_to): New.
15650 * src/lalr.c (build_relations): Use it.
15651
9222837b
AD
156522002-06-30 Akim Demaille <akim@epita.fr>
15653
15654 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15655 (item_number_of_rule_number, rule_number_of_item_number): New.
15656 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15657 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15658 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15659 Propagate their use.
15660 Much remains to be done, in particular wrt `shorts' from types.h.
15661
260008e5
AD
156622002-06-30 Akim Demaille <akim@epita.fr>
15663
15664 * src/symtab.c (symbol_new): Initialize the `printer' member.
15665
8a731ca8
AD
156662002-06-30 Akim Demaille <akim@epita.fr>
15667
15668 * src/LR0.c (save_reductions): Remove, replaced by...
15669 * src/state.h, src/state.c (state_reductions_set): New.
15670 (reductions, errs): Rename as...
15671 (reductions_t, errs_t): these.
15672 Adjust all dependencies.
15673
32e1e0a4
AD
156742002-06-30 Akim Demaille <akim@epita.fr>
15675
15676 * src/LR0.c (state_list_t, state_list_append): New.
15677 (first_state, last_state): Now symbol_list_t.
15678 (this_state): Remove.
15679 (new_itemsets, append_states, save_reductions): Take a state_t as
15680 argument.
15681 (set_states, generate_states): Adjust.
15682 (save_shifts): Remove, replaced by...
15683 * src/state.h, src/state.c (state_shifts_set): New.
15684 (shifts): Rename as...
15685 (shifts_t): this.
15686 Adjust all dependencies.
15687 * src/state.h (state_t): Remove the `next' member.
15688
e5fb6710
AD
156892002-06-30 Akim Demaille <akim@epita.fr>
15690
15691 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15692 escaped in slot 0.
15693
c7ca99d4
AD
156942002-06-30 Akim Demaille <akim@epita.fr>
15695
15696 Use hash.h for the state hash table.
15697
15698 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15699 (allocate_storage): Use state_hash_new.
15700 (free_storage): Use state_hash_free.
15701 (new_state, get_state): Adjust.
15702 * src/lalr.h, src/lalr.c (states): Move to...
15703 * src/states.h (state_t): Remove the `link' member, no longer
15704 used.
15705 * src/states.h, src/states.c: here.
15706 (state_hash_new, state_hash_free, state_hash_lookup)
15707 (state_hash_insert, states_free): New.
15708 * src/states.c (state_table, state_compare, state_hash): New.
15709 * src/output.c (output_actions): Do not free states now, since we
15710 still need to know the final_state number in `prepare', called
15711 afterwards. Do it...
15712 * src/main.c (main): here: call states_free after `output'.
15713
df0e7316
AD
157142002-06-30 Akim Demaille <akim@epita.fr>
15715
15716 * src/state.h, src/state.c (state_new): New, extracted from...
15717 * src/LR0.c (new_state): here.
15718 * src/state.h (STATE_ALLOC): Move to...
15719 * src/state.c: here.
15720 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15721 * src/state.h, src/state.c: here.
15722
39f41916
AD
157232002-06-30 Akim Demaille <akim@epita.fr>
15724
15725 * src/reader.c (gensym): Rename as...
15726 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15727 (getsym): Rename as...
15728 (symbol_get): this.
15729
d57650a5
AD
157302002-06-30 Akim Demaille <akim@epita.fr>
15731
15732 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15733 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15734 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15735 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15736
5a08f1ce
AD
157372002-06-30 Akim Demaille <akim@epita.fr>
15738
15739 Make the test suite pass with warnings checked.
15740
15741 * tests/actions.at (Printers and Destructors): Improve.
15742 Avoid unsigned vs. signed issues.
15743 * tests/calc.at: Don't exercise the scanner here, do it...
15744 * tests/input.at (Torturing the Scanner): here.
15745
720623af
PH
157462002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15747
88e7e941 15748 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
15749 reorganize first lines parallel to yacc.c.
15750
fb8135fa
AD
157512002-06-28 Akim Demaille <akim@epita.fr>
15752
15753 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15754 (b4_token_enum, b4_token_defines): New, factored from...
15755 * data/lalr1.cc, data/yacc.c, glr.c: here.
15756
41442480
AD
157572002-06-28 Akim Demaille <akim@epita.fr>
15758
15759 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15760 unused variables.
15761 * src/output.c (merger_output): static.
15762
e0e5bf84
AD
157632002-06-28 Akim Demaille <akim@epita.fr>
15764
ba0fe3c7 15765 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
15766 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15767 pacify GCC.
15768 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 15769
676385e2
PH
157702002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15771
15772 Accumulated changelog for new GLR parsing features.
15773
6a254321 15774 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
15775 conflicts_total_count.
15776 * src/conflicts.h: Ditto.
15777 * src/output.c (token_actions): Use the new name.
15778 (output_conflicts): Change conflp => conflict_list_heads, and
15779 confl => conflict_list for better readability.
15780 * data/glr.c: Use the new names.
15781 * NEWS: Add self to GLR announcement.
e0e5bf84 15782
676385e2
PH
15783 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15784
15785 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15786 Akim Demaille.
15787
15788 * data/bison.glr: Change name to glr.c
15789 * data/glr.c: Renamed from bison.glr.
15790 * data/Makefile.am: Add glr.c
e0e5bf84
AD
15791
15792 * src/getargs.c:
15793
676385e2 15794 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 15795 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 15796
676385e2
PH
15797 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15798
15799 * data/bison.glr: Be sure to restore the
15800 current #line when returning to the skeleton contents after having
15801 exposed the input file's #line.
15802
15803 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15804
15805 * data/bison.glr: Bring up to date with changes to bison.simple.
15806
15807 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15808
15809 * data/bison.glr: Correct definitions that use b4_prefix.
15810 Various reformatting.
15811 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15812 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15813 yytokenp argument; now part of stack.
15814 (yychar): Define to behave as documented.
15815 (yyclearin): Ditto.
e0e5bf84 15816
676385e2
PH
15817 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15818
15819 * src/reader.h: Add declaration for free_merger_functions.
15820
15821 * src/reader.c (merge_functions): New variable.
15822 (get_merge_function): New function.
15823 (free_merger_functions): New function.
15824 (readgram): Check for %prec that is not followed by a symbol.
15825 Handle %dprec and %merge declarations.
15826 (packgram): Initialize dprec and merger fields in rules array.
15827
15828 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15829 conflict_list_cnt, conflict_list_free): New variables.
15830 (table_grow): Also grow conflict_table.
e0e5bf84 15831 (prepare_rules): Output dprec and merger tables.
676385e2 15832 (conflict_row): New function.
e0e5bf84 15833 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
15834 default reduction in conflicted states for GLR parser so that there
15835 are spaces for the conflict lists.
15836 (save_row): Also save conflict information.
15837 (token_actions): Allocate conflict list.
15838 (merger_output): New function.
15839 (pack_vector): Pack conflict table, too.
15840 (output_conflicts): New function to output yyconflp and yyconfl.
15841 (output_check): Allocate conflict_tos.
15842 (output_actions): Output conflict tables, also.
15843 (output_skeleton): Output b4_mergers definition.
15844 (prepare): Output b4_max_rhs_length definition.
15845 Use 'bison.glr' as default skeleton for GLR parsers.
15846
15847 * src/gram.c (glr_parser): New flag.
15848 (grammar_free): Call free_merger_functions.
15849
15850 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15851 all pairs of conflicting reductions, rather than just all tokens
15852 causing conflicts. Needed to size conflict tables.
e0e5bf84 15853 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
15854 interface.
15855 (conflicts_print): Ditto.
15856 (count_total_conflicts): New function.
15857
15858 * src/reader.h (merger_list): New type.
15859 (merge_functions): New variable.
15860
15861 * src/lex.h (tok_dprec, tok_merge): New token types.
15862
15863 * src/gram.h (rule_s): Add dprec and merger fields.
15864 (glr_parser): New flag.
15865
15866 * src/conflicts.h (count_total_conflicts): New function.
15867
15868 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15869
15870 * doc/bison.texinfo (Generalized LR Parsing): New section.
15871 (GLR Parsers): New section.
15872 (Language and Grammar): Mention GLR parsing.
15873 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15874 Correct typo ("tge" -> "the").
15875
15876 * data/bison.glr: New skeleton for GLR parsing.
15877
15878 * tests/cxx-gram.at: New tests for GLR parsing.
15879
15880 * tests/testsuite.at: Include cxx-gram.at.
15881
15882 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 15883
676385e2
PH
15884 * src/parse-gram.y:
15885
15886 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15887
15888 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 15889
b5480d74 158902002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
15891
15892 * src/options.h, src/options.c: Remove.
15893 * src/getargs.c (short_options, long_options): New.
15894
60491a94
AD
158952002-06-27 Akim Demaille <akim@epita.fr>
15896
15897 * data/bison.simple, data/bison.c++: Rename as...
15898 * data/yacc.c, data/lalr1.cc: these.
15899 * doc/bison.texinfo (Environment Variables): Remove.
15900
9be0c25b
AD
159012002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15902
15903 * src/getargs.c (report_argmatch): Initialize strtok().
15904
1ae72863
AD
159052002-06-20 Akim Demaille <akim@epita.fr>
15906
15907 * data/bison.simple (b4_symbol_actions): New, replaces...
15908 (b4_symbol_destructor, b4_symbol_printer): these.
15909 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15910 user token numbers.
15911
87542d29
AD
159122002-06-20 Akim Demaille <akim@epita.fr>
15913
15914 * data/bison.simple (yydestructor): Rename as...
15915 (yydestruct): this.
15916
1a31ed21
AD
159172002-06-20 Akim Demaille <akim@epita.fr>
15918
15919 * src/symtab.h, src/symtab.c (symbol_type_set)
15920 (symbol_destructor_set, symbol_precedence_set): The location is
15921 the last argument.
15922 Adjust all callers.
15923
e776192e
AD
159242002-06-20 Akim Demaille <akim@epita.fr>
15925
15926 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15927 internals.
15928 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15929 Takes a location.
15930 * src/symtab.h, src/symtab.c (symbol_class_set)
15931 (symbol_user_token_number_set): Likewise.
15932 Adjust all callers.
15933 Promote complain_at.
15934 * tests/input.at (Type Clashes): Adjust.
15935
5c1180b3
AD
159362002-06-20 Akim Demaille <akim@epita.fr>
15937
15938 * data/bison.simple (YYLEX): Fix the declaration when
15939 %pure-parser.
15940
e3170060
AD
159412002-06-20 Akim Demaille <akim@epita.fr>
15942
15943 * data/bison.simple (yysymprint): Don't print the token number,
15944 just its name.
15945 * tests/actions.at (Destructors): Rename as...
15946 (Printers and Destructors): this.
15947 Also exercise %printer.
15948
253862fd
AD
159492002-06-20 Akim Demaille <akim@epita.fr>
15950
15951 * data/bison.simple (YYDSYMPRINT): New.
15952 Use it to remove many of the #if YYDEBUG/if (yydebug).
15953
366eea36
AD
159542002-06-20 Akim Demaille <akim@epita.fr>
15955
15956 * src/symtab.h, src/symtab.c (symbol_t): printer and
15957 printer_location are new members.
15958 (symbol_printer_set): New.
15959 * src/parse-gram.y (PERCENT_PRINTER): New token.
15960 Handle its associated rule.
15961 * src/scan-gram.l: Adjust.
15962 (handle_destructor_at, handle_destructor_dollar): Rename as...
15963 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15964 * src/output.c (symbol_printers_output): New.
15965 (output_skeleton): Call it.
15966 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15967 since there are already many grammar files with a user `yyprint'.
15968 Replace the calls to YYPRINT to calls to yysymprint.
15969 * tests/calc.at: Adjust.
15970 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15971 taking advantage of parser very internal details (stack size!).
15972
4f25ebb0
AD
159732002-06-20 Akim Demaille <akim@epita.fr>
15974
15975 * src/scan-gram.l: Complete the scanner with the missing patterns
15976 to pacify Flex.
15977 Use `quote' and `symbol_tag_get' where appropriate.
15978
93b68a0e
AD
159792002-06-19 Akim Demaille <akim@epita.fr>
15980
15981 * tests/actions.at (Destructors): Augment to test locations.
15982 * data/bison.simple (yydestructor): Pass it the current location
15983 if locations are enabled.
15984 Prototype only when __STDC__ or C++.
15985 Change the argument names to move into the yy name space: there is
15986 user code here.
15987
58612f1d
AD
159882002-06-19 Akim Demaille <akim@epita.fr>
15989
74310291
AD
15990 * data/bison.simple (b4_pure_if): New.
15991 Use it instead of #ifdef YYPURE.
15992
159932002-06-19 Akim Demaille <akim@epita.fr>
15994
15995 * data/bison.simple (b4_location_if): New.
58612f1d
AD
15996 Use it instead of #ifdef YYLSP_NEEDED.
15997
f25bfb75
AD
159982002-06-19 Akim Demaille <akim@epita.fr>
15999
16000 Prepare @$ in %destructor, but currently don't bind it in the
16001 skeleton, as %location use is not cleaned up yet.
16002
16003 * src/scan-gram.l (handle_dollar, handle_destructor_at)
16004 (handle_action_at): New.
16005 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
16006 a braced_code_t and a location as additional arguments.
16007 (handle_destructor_dollar): Instead of requiring `b4_eval', just
16008 unquote one when outputting `b4_dollar_dollar'.
16009 Adjust callers.
16010 * data/bison.simple (b4_eval): Remove.
16011 (b4_symbol_destructor): Adjust.
16012 * tests/input.at (Invalid @n): Adjust.
16013
c732d2c6
AD
160142002-06-19 Zack Weinberg <zack@codesourcery.com>
16015
16016 * doc/bison.texinfo: Document ability to have multiple
16017 prologue sections.
16018
8c165d89
AD
160192002-06-18 Akim Demaille <akim@epita.fr>
16020
16021 * src/files.c (compute_base_names): When computing the output file
16022 names from the input file name, strip the directory part.
16023
ca98bf57
AD
160242002-06-18 Akim Demaille <akim@epita.fr>
16025
16026 * data/bison.simple.new: Comment changes.
16027 Reported by Andreas Schwab.
16028
0bfb02ff
AD
160292002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
16030
16031 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
16032 there are no `label `yyoverflowlab' defined but not used' warnings
16033 when yyoverflow is defined.
16034
24c0aad7
AD
160352002-06-18 Akim Demaille <akim@epita.fr>
16036
16037 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
16038 new member.
16039 (symbol_destructor_set): Adjust.
16040 * src/output.c (symbol_destructors_output): Output the destructor
16041 locations.
16042 Output the symbol name.
16043 * data/bison.simple (b4_symbol_destructor): Adjust.
16044
5719c109
AD
160452002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
16046 and Akim Demaille <akim@epita.fr>
16047
16048 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16049 what's left on the stack when the error recovery hits EOF.
16050 * tests/actions.at (Destructors): Complete to exercise this case.
16051
9280d3ef
AD
160522002-06-17 Akim Demaille <akim@epita.fr>
16053
16054 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16055 arguments is really empty, not only equal to `[]'.
16056 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16057 member.
16058 (symbol_destructor_set): New.
16059 * src/output.c (symbol_destructors_output): New.
16060 * src/reader.h (brace_code_t, current_braced_code): New.
16061 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16062 (handle_dollar): Rename as...
16063 (handle_action_dollar): this.
16064 (handle_destructor_dollar): New.
16065 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16066 (grammar_declaration): Use it.
16067 * data/bison.simple (yystos): Is always defined.
16068 (yydestructor): New.
16069 * tests/actions.at (Destructors): New.
16070 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16071
dafdc66f
AD
160722002-06-17 Akim Demaille <akim@epita.fr>
16073
16074 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16075 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16076 rule_length only when needed.
16077 * src/output.c (actions_output, token_definitions_output): Output
16078 the full M4 block.
16079 * src/symtab.c: Don't access directly to the symbol tag, use
16080 symbol_tag_get.
16081 * src/parse-gram.y: Use symbol_list_free.
16082
56c47203
AD
160832002-06-17 Akim Demaille <akim@epita.fr>
16084
16085 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16086 (symbol_list_prepend, get_type_name): Move to...
16087 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16088 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16089 Adjust all callers.
16090 (symbol_list_free): New.
16091 * src/scan-gram.l (handle_dollar): Takes a location.
16092 * tests/input.at (Invalid $n): Adjust.
16093
1e0bab92
AD
160942002-06-17 Akim Demaille <akim@epita.fr>
16095
16096 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16097 (symbol_list_prepend): New.
16098 * src/parse-gram.y (%union): `list' is a new member.
16099 (symbols.1): New, replaces...
16100 (terms_to_prec.1, nterms_to_type.1): these.
16101 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16102 Take a location as additional argument.
16103 Adjust all callers.
16104
04e60654
AD
161052002-06-15 Akim Demaille <akim@epita.fr>
16106
16107 * src/parse-gram.y: Move %token in the declaration section so that
16108 we don't depend upon CVS Bison.
16109
10e5b8bd
AD
161102002-06-15 Akim Demaille <akim@epita.fr>
16111
16112 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16113 * src/print.c (print_core): Use it.
16114
9801d40c
AD
161152002-06-15 Akim Demaille <akim@epita.fr>
16116
16117 * src/conflicts.c (log_resolution): Accept the rule involved in
16118 the sr conflicts instead of the lookahead number that points to
16119 that rule.
16120 (flush_reduce): Accept the current lookahead vector as argument,
16121 instead of the index in LA.
16122 (resolve_sr_conflict): Accept the current number of lookahead
16123 bitset to consider for the STATE, instead of the index in LA.
16124 (set_conflicts): Adjust.
16125 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16126
c0263492
AD
161272002-06-15 Akim Demaille <akim@epita.fr>
16128
16129 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16130 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16131 Adjust all dependencies.
16132 * src/lalr.c (initialize_lookaheads): Split into...
16133 (states_lookaheads_count, states_lookaheads_initialize): these.
16134 (lalr): Adjust.
16135
9757c359
AD
161362002-06-15 Akim Demaille <akim@epita.fr>
16137
16138 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16139 out of...
16140 (grammar_rules_print): here.
16141 * src/reduce.c (reduce_output): Use it.
16142 * tests/reduce.at (Useless Rules, Reduced Automaton)
16143 (Underivable Rules): Adjust.
16144
6b98e4b5
AD
161452002-06-15 Akim Demaille <akim@epita.fr>
16146
16147 Copy BYacc's nice way to report the grammar.
16148
16149 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16150 New.
16151 Don't print the rules' location, it is confusing and useless.
16152 (rule_print): Use grammar_rhs_print.
16153 * src/print.c (print_grammar): Use grammar_rules_print.
16154
6b98e4b5
AD
161552002-06-15 Akim Demaille <akim@epita.fr>
16156
16157 Complete and rationalize `useless thing' warnings.
16158
16159 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16160 (symbol_tag_print): New.
16161 Use them everywhere in place of accessing directly the tag member.
16162 * src/gram.h, src/gram.c (rule_print): New.
16163 Use it where a rule used to be printed `by hand'.
16164 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16165 (reduce_grammar_tables): Report the useless rules.
16166 (reduce_print): Useless things are a warning, not an error.
16167 Report it as such.
16168 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16169 (Reduced Automaton, Underivable Rules): Adjust.
16170 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16171 * tests/conflicts.at (Unresolved SR Conflicts)
16172 (Solved SR Conflicts): Adjust.
16173
ee000ba4
AD
161742002-06-15 Akim Demaille <akim@epita.fr>
16175
16176 Let symbols have a location.
16177
16178 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16179 (getsym): Adjust.
16180 Adjust all callers.
16181 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16182 Use location_t, not int.
16183 * src/symtab.c (symbol_check_defined): Take advantage of the
16184 location.
16185 * tests/regression.at (Invalid inputs): Adjust.
16186
8efe435c
AD
161872002-06-15 Akim Demaille <akim@epita.fr>
16188
16189 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16190 (input): Don't try to initialize yylloc here, do it in the
16191 scanner.
16192 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16193 * src/gram.h (rule_t): Change line and action_line into location
16194 and action_location, of location_t type.
16195 Adjust all dependencies.
16196 * src/location.h, src/location.c (empty_location): New.
16197 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16198 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16199 (grammar_current_rule_symbol_append)
16200 (grammar_current_rule_action_append): Expect a location as argument.
16201 * src/reader.c (grammar_midrule_action): Adjust to attach an
16202 action's location as dummy symbol location.
16203 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16204 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16205 the line numbers.
16206
1921f1d7
AD
162072002-06-14 Akim Demaille <akim@epita.fr>
16208
16209 Grammar declarations may be found in the grammar section.
16210
16211 * src/parse-gram.y (rules_or_grammar_declaration): New.
16212 (declarations): Each declaration may end with a semicolon, not
16213 just...
16214 (grammar_declaration): `"%union"'.
16215 (grammar): Branch to rules_or_grammar_declaration.
16216
4515534c
AD
162172002-06-14 Akim Demaille <akim@epita.fr>
16218
16219 * src/main.c (main): Invoke scanner_free.
16220
f958596b
AD
162212002-06-14 Akim Demaille <akim@epita.fr>
16222
16223 * src/output.c (m4_invoke): Extracted from...
16224 (output_skeleton): here.
16225 Free tempfile.
16226
2c569025
AD
162272002-06-14 Akim Demaille <akim@epita.fr>
16228
16229 * src/parse-gram.y (directives, directive, gram)
16230 (grammar_directives, precedence_directives, precedence_directive):
16231 Rename as...
16232 (declarations, declaration, grammar, grammar_declaration)
16233 (precedence_declaration, precedence_declarator): these.
16234 (symbol_declaration): New.
16235
592e8d4d
AD
162362002-06-14 Akim Demaille <akim@epita.fr>
16237
16238 * src/files.c (action_obstack): Remove, unused.
16239 (output_obstack): Remove it, and all its dependencies, as it is no
16240 longer needed.
16241 * src/reader.c (epilogue_set): Build the epilogue in the
16242 muscle_obstack.
16243 * src/output.h, src/output.c (muscle_obstack): Move to...
16244 * src/muscle_tab.h, src/muscle_tab.h: here.
16245 (muscle_init): Initialize muscle_obstack.
16246 (muscle_free): New.
16247 * src/main.c (main): Call it.
16248
0c15323d
AD
162492002-06-14 Akim Demaille <akim@epita.fr>
16250
16251 * src/location.h: New, extracted from...
16252 * src/reader.h: here.
16253 * src/Makefile.am (noinst_HEADERS): Merge into
16254 (bison_SOURCES): this.
16255 Add location.h.
16256 * src/parse-gram.y: Use location_t instead of Bison's.
16257 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16258 Use location_t instead of ints.
16259
e96c9728
AD
162602002-06-14 Akim Demaille <akim@epita.fr>
16261
16262 * data/bison.simple, data/bison.c++: Be sure to restore the
16263 current #line when returning to the skeleton contents after having
16264 exposed the input file's #line.
16265
75d1fe16
AD
162662002-06-12 Akim Demaille <akim@epita.fr>
16267
16268 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16269 eager.
16270 * tests/actions.at (Exotic Dollars): New.
16271
6c35d22c
AD
162722002-06-12 Akim Demaille <akim@epita.fr>
16273
16274 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16275 ['"/] too eagerly.
16276 * tests/input.at (Torturing the Scanner): New.
16277
1d6412ad
AD
162782002-06-11 Akim Demaille <akim@epita.fr>
16279
16280 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16281 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16282 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16283 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16284 * src/reader.c (reader): Use it.
16285
4cdb01db
AD
162862002-06-11 Akim Demaille <akim@epita.fr>
16287
16288 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16289 Adjust all callers.
16290 (scanner_last_string_free): New.
16291
44995b2e
AD
162922002-06-11 Akim Demaille <akim@epita.fr>
16293
16294 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16295 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16296 (last_string, YY_OBS_FREE): New.
16297 Use them when returning an ID.
16298
e9955c83
AD
162992002-06-11 Akim Demaille <akim@epita.fr>
16300
16301 Have Bison grammars parsed by a Bison grammar.
16302
16303 * src/reader.c, src/reader.h (prologue_augment): New.
16304 * src/reader.c (copy_definition): Remove.
16305
16306 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16307 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16308 (grammar_current_rule_prec_set, grammar_current_rule_check)
16309 (grammar_current_rule_symbol_append)
16310 (grammar_current_rule_action_append): Export.
16311 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16312 (symbol_list_action_append): Remove.
16313 Hook the routines from reader.
16314 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16315 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16316
16317 * src/reader.c (read_declarations): Remove, unused.
16318
16319 * src/parse-gram.y: Handle the epilogue.
16320 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16321 (grammar_start_symbol_set): this.
16322 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16323 * src/reader.c (readgram): Remove, unused.
16324 (reader): Adjust to insert eoftoken and axiom where appropriate.
16325
16326 * src/reader.c (copy_dollar): Replace with...
16327 * src/scan-gram.h (handle_dollar): this.
16328 * src/parse-gram.y: Remove `%thong'.
16329
16330 * src/reader.c (copy_at): Replace with...
16331 * src/scan-gram.h (handle_at): this.
16332
16333 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16334 New.
16335
16336 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16337 time being.
16338
16339 * src/reader.h, src/reader.c (grammar_rule_end): New.
16340
16341 * src/parse.y (current_type, current_class): New.
16342 Implement `%nterm', `%token' support.
16343 Merge `%term' into `%token'.
16344 (string_as_id): New.
16345 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16346 type name.
16347
16348 * src/parse-gram.y: Be sure to handle properly the beginning of
16349 rules.
16350
16351 * src/parse-gram.y: Handle %type.
16352 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16353
16354 * src/parse-gram.y: More directives support.
16355 * src/options.c: No longer handle source directives.
16356
16357 * src/parse-gram.y: Fix %output.
16358
16359 * src/parse-gram.y: Handle %union.
16360 Use the prologue locations.
16361 * src/reader.c (parse_union_decl): Remove.
16362
16363 * src/reader.h, src/reader.c (epilogue_set): New.
16364 * src/parse-gram.y: Use it.
16365
16366 * data/bison.simple, data/bison.c++: b4_stype is now either not
16367 defined, then default to int, or to the contents of %union,
16368 without `union' itself.
16369 Adjust.
16370 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16371
16372 * src/output.c (actions_output): Don't output braces, as they are
16373 already handled by the scanner.
16374
16375 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16376 characters to themselves.
16377
16378 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16379 that the epilogue has a proper #line.
16380
16381 * src/parse-gram.y: Handle precedence/associativity.
16382
16383 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16384 a terminal.
16385 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16386 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16387 at all to define terminals that cannot be emitted.
16388
16389 * src/scan-gram.l: Escape M4 characters.
16390
16391 * src/scan-gram.l: Working properly with escapes in user
16392 strings/characters.
16393
16394 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16395 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16396 grammar.
16397 Use more modest sizes, as for the time being the parser does not
16398 release memory, and therefore the process swallows a huge amount
16399 of memory.
16400
16401 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16402 stricter %token grammar.
16403
16404 * src/symtab.h (associativity): Add `undef_assoc'.
16405 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16406 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16407
16408 * tests/regression.at (Invalid %directive): Remove, as it is now
16409 meaningless.
16410 (Invalid inputs): Adjust to the new error messages.
16411 (Token definitions): The new grammar doesn't allow too many
16412 eccentricities.
16413
16414 * src/lex.h, src/lex.c: Remove.
16415 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16416 (copy_character, copy_string2, copy_string, copy_identifier)
16417 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16418 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16419 (parse_action): Remove.
16420 * po/POTFILES.in: Adjust.
16421
2e047461
AD
164222002-06-11 Akim Demaille <akim@epita.fr>
16423
cd05d13c 16424 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
16425 rule's action member: return the action as a string.
16426 Don't require `rule_length' as an argument: compute it.
16427 (grammar_current_rule_symbol_append)
16428 (grammar_current_rule_action_append): New, eved out from
16429 (readgram): here.
16430 Remove `action_flag', `rulelength', unused now.
16431
9af3fbce
AD
164322002-06-11 Akim Demaille <akim@epita.fr>
16433
16434 * src/reader.c (grammar_current_rule_prec_set).
16435 (grammar_current_rule_check): New, eved out from...
16436 (readgram): here.
16437 Remove `xaction', `first_rhs': useless.
16438 * tests/input.at (Type clashes): New.
16439 * tests/existing.at (GNU Cim Grammar): Adjust.
16440
1485e106
AD
164412002-06-11 Akim Demaille <akim@epita.fr>
16442
16443 * src/reader.c (grammar_midrule_action): New, Eved out from
16444 (readgram): here.
16445
da4160c3
AD
164462002-06-11 Akim Demaille <akim@epita.fr>
16447
16448 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16449 New.
16450 (readgram): Use them as replacement of inlined code, crule and
16451 crule1.
16452
f6d0f937
AD
164532002-06-11 Akim Demaille <akim@epita.fr>
16454
16455 * src/reader.c (grammar_end, grammar_symbol_append): New.
16456 (readgram): Use them.
16457 Make the use of `p' as local as possible.
16458
69078d4b
AD
164592002-06-10 Akim Demaille <akim@epita.fr>
16460
16461 GCJ's parser requires the tokens to be defined before the prologue.
16462
16463 * data/bison.simple: Output the token definition before the user's
16464 prologue.
16465 * tests/regression.at (Braces parsing, Duplicate string)
16466 (Mixing %token styles): Check the output from bison.
16467 (Early token definitions): New.
16468
5e424082
AD
164692002-06-10 Akim Demaille <akim@epita.fr>
16470
16471 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16472 assigning twice the same user number to a token, so that we can
16473 use it in...
16474 * src/lex.c (lex): here.
16475 Also use `symbol_class_set' instead of hand written code.
16476 * src/reader.c (parse_assoc_decl): Likewise.
16477
44536b35
AD
164782002-06-10 Akim Demaille <akim@epita.fr>
16479
16480 * src/symtab.c, src/symtab.c (symbol_class_set)
16481 (symbol_user_token_number_set): New.
16482 * src/reader.c (parse_token_decl): Use them.
16483 Use a switch instead of ifs.
16484 Use a single argument.
16485
8b9f2372
AD
164862002-06-10 Akim Demaille <akim@epita.fr>
16487
16488 Remove `%thong' support as it is undocumented, unused, duplicates
16489 `%token's job, and creates useless e-mail traffic with people who
16490 want to know what it is, why it is undocumented, unused, and
16491 duplicates `%token's job.
16492
16493 * src/reader.c (parse_thong_decl): Remove.
16494 * src/options.c (option_table): Remove "thong".
16495 * src/lex.h (tok_thong): Remove.
16496
3ae2b51f
AD
164972002-06-10 Akim Demaille <akim@epita.fr>
16498
16499 * src/symtab.c, src/symtab.c (symbol_type_set)
16500 (symbol_precedence_set): New.
16501 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16502 (value_components_used): Remove, unused.
16503
2f1afb73
AD
165042002-06-09 Akim Demaille <akim@epita.fr>
16505
16506 Move symbols handling code out of the reader.
16507
16508 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16509 (axiom): Move to...
16510 * src/symtab.h, src/symtab.c: here.
16511
16512 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16513 * src/reader.c (startval): Rename as...
16514 * src/symtab.h, src/symtab.c (startsymbol): this.
16515 * src/reader.c: Adjust.
16516
16517 * src/reader.c (symbol_check_defined, symbol_make_alias)
16518 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16519 (token_translations_init)
16520 Move to...
16521 * src/symtab.c: here.
16522 * src/reader.c (packsymbols): Move to...
16523 * src/symtab.h, src/symtab.c (symbols_pack): here.
16524 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16525 argument.
16526
e9bca3ad
AD
165272002-06-03 Akim Demaille <akim@epita.fr>
16528
16529 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16530 then statements.
16531
86eff183
AD
165322002-06-03 Akim Demaille <akim@epita.fr>
16533
16534 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16535 structs with non literals.
16536 * src/scan-skel.l: never-interactive.
16537 * src/conflicts.c (enum conflict_resolution_e): No trailing
16538 comma.
16539 * src/getargs.c (usage): Split long literal strings.
16540 Reported by Hans Aberg.
16541
717be197
AD
165422002-05-28 Akim Demaille <akim@epita.fr>
16543
16544 * data/bison.c++: Use C++ ostreams.
16545 (cdebug_): New member.
16546
670ddffd
AD
165472002-05-28 Akim Demaille <akim@epita.fr>
16548
16549 * src/output.c (output_skeleton): Be sure to allocate enough room
16550 for `/' _and_ for `\0' in full_skeleton.
16551
769b430f
AD
165522002-05-28 Akim Demaille <akim@epita.fr>
16553
16554 * data/bison.c++: Catch up with bison.simple:
16555 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16556 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16557 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16558 and popping traces.
16559
7067cb36
PH
165602002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16561
16562 * src/output.c (output_skeleton): Put an explicit path in front of
16563 the skeleton file name, rather than relying on the -I directory,
16564 to partially alleviate effects of having a skeleton file lying around
16565 in the current directory.
769b430f 16566
4a713ec2
PH
165672002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16568
769b430f 16569 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
16570 obstack_printf should be obstack_fgrow1.
16571
b408954b
AD
165722002-05-26 Akim Demaille <akim@epita.fr>
16573
16574 * src/state.h (state_t): `solved_conflicts' is a new member.
16575 * src/LR0.c (new_state): Set it to 0.
16576 * src/conflicts.h, src/conflicts.c (print_conflicts)
16577 (free_conflicts, solve_conflicts): Rename as...
16578 (conflicts_print, conflicts_free, conflicts_solve): these.
16579 Adjust callers.
16580 * src/conflicts.c (enum conflict_resolution_e)
16581 (solved_conflicts_obstack): New, used by...
16582 (log_resolution): this.
16583 Adjust to attach the conflict resolution to each state.
16584 Complete the description with the precedence/associativity
16585 information.
16586 (resolve_sr_conflict): Adjust.
16587 * src/print.c (print_state): Output its solved_conflicts.
16588 * tests/conflicts.at (Unresolved SR Conflicts)
16589 (Solved SR Conflicts): Exercise --report=all.
16590
a49aecd5
AD
165912002-05-26 Akim Demaille <akim@epita.fr>
16592
16593 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16594 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16595 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16596 (token_number_t, item_number_as_token_number)
16597 (token_number_as_item_number, muscle_insert_token_number_table):
16598 Rename as...
16599 (symbol_number_t, item_number_as_symbol_number)
16600 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16601 these, since it is more appropriate.
16602
5504898e
AD
166032002-05-26 Akim Demaille <akim@epita.fr>
16604
16605 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16606 `Error:' lines.
16607 * data/bison.simple (yystos) [YYDEBUG]: New.
16608 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16609 error recovery.
16610 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16611
ec3bc396
AD
166122002-05-25 Akim Demaille <akim@epita.fr>
16613
16614 * doc/bison.texinfo (Debugging): Split into...
16615 (Tracing): this new section, its former contents, and...
16616 (Understanding): this new section.
16617 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16618 by...
16619 (report_flag): this.
16620 Adjust all dependencies.
16621 (report_args, report_types, report_argmatch): New.
16622 (usage, getargs): Report/support -r, --report.
16623 * src/options.h
16624 (struct option_table_struct): Rename as..,
16625 (struct option_table_s): this.
16626 Rename the `set_flag' member to `flag' to match with getopt_long's
16627 struct.
16628 * src/options.c (option_table): Split verbose into an entry for
16629 %verbose, and another for --verbose.
16630 Support --report/-r, so remove -r from the obsolete --raw.
16631 * src/print.c: Attach full item sets and lookaheads reports to
16632 report_flag instead of trace_flag.
16633 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16634
78df8250
PE
166352002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16636 and Paul Eggert <eggert@twinsun.com>
769b430f 16637
78df8250
PE
16638 * data/bison.simple (yyparse): Correct error handling to conform to
16639 POSIX and yacc. Specifically, after syntax error is discovered,
16640 do not reduce further before shifting the error token.
16641 Clean up the code a bit by removing the labels yyerrdefault,
16642 yyerrhandle, yyerrpop.
16643 * NEWS: Document the above.
16644
c0c9ea05
PH
166452002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16646
16647 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16648 type; it isn't always big enough, since it doesn't necessarily
16649 include non-terminals.
769b430f 16650 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
16651 the latter can be removed.
16652 (yy_token_number_type): Remove, only one use.
16653 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16654 don't use TokenNumberType as element type.
769b430f 16655
c0c9ea05
PH
16656 * tests/regression.at: Modify expected output to agree with change
16657 to yyr1 and yytranslate.
769b430f 16658
6390a83f
FK
166592002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16660
16661 * src/reader.c (parse_action): Use copy_character instead of
16662 obstack_1grow.
16663
db7c8e9a
AD
166642002-05-13 Akim Demaille <akim@epita.fr>
16665
16666 * tests/regression.at (Token definitions): Prototype yylex and
16667 yyerror.
16668
fcc61800
PH
166692002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16670
158c687b 16671 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
16672 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16673 32-bit arithmetic.
16674 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16675
5683e9b2
AD
166762002-05-07 Akim Demaille <akim@epita.fr>
16677
16678 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16679 avoid GCC warnings.
16680
0c2d3f4c
AD
166812002-05-07 Akim Demaille <akim@epita.fr>
16682
16683 Kill GCC warnings.
16684
16685 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16686 over the RHS of each rule.
16687 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16688 * src/state.h (state_t): Member `nitems' is unsigned short.
16689 * src/LR0.c (get_state): Adjust.
16690 * src/reader.c (packgram): Likewise.
16691 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16692 `Type'.
16693 (muscle_insert_int_table): Remove, unused.
16694 (prepare_rules): Remove `max'.
16695
1565b720
AD
166962002-05-06 Akim Demaille <akim@epita.fr>
16697
16698 * src/closure.c (print_firsts): Display of the symbol tags.
16699 (bitmatrix_print): Move to...
16700 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16701 here.
16702 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16703
cfaee611
AD
167042002-05-06 Akim Demaille <akim@epita.fr>
16705
16706 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16707 hash_do_for_each.
16708
458be8e0
AD
167092002-05-06 Akim Demaille <akim@epita.fr>
16710
16711 * src/LR0.c (new_state, get_state): Instead of using the global
16712 `kernel_size' and `kernel_base', have two new arguments:
16713 `core_size' and `core'.
16714 Adjust callers.
16715
a900a624
AD
167162002-05-06 Akim Demaille <akim@epita.fr>
16717
16718 * src/reader.c (packgram): No longer end `ritem' with a 0
16719 sentinel: it is not used.
16720
d4e7d3a1
AD
167212002-05-05 Akim Demaille <akim@epita.fr>
16722
16723 New experimental feature: display the lookaheads in the report and
16724 graph.
16725
16726 * src/print (print_core): When --trace-flag, display the rules
16727 lookaheads.
16728 * src/print_graph.c (print_core): Likewise.
16729 Swap the arguments.
16730 Adjust caller.
16731
39ceb25b
AD
167322002-05-05 Akim Demaille <akim@epita.fr>
16733
16734 * tests/torture.at (Many lookaheads): New test.
16735
5372019f
AD
167362002-05-05 Akim Demaille <akim@epita.fr>
16737
16738 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16739 (GENERATE_MUSCLE_INSERT_TABLE): this.
16740 (output_int_table, output_unsigned_int_table, output_short_table)
16741 (output_token_number_table, output_item_number_table): Replace with...
16742 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16743 (muscle_insert_short_table, muscle_insert_token_number_table)
16744 (muscle_insert_item_number_table): these.
16745 Adjust all callers.
16746 (prepare_tokens): Don't free `translations', since...
16747 * src/reader.h, src/reader.c (grammar_free): do it.
16748 Move to...
16749 * src/gram.h, src/gram.c (grammar_free): here.
16750 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16751 b4_translate_max.
16752
5df5f6d5
AD
167532002-05-05 Akim Demaille <akim@epita.fr>
16754
16755 * src/output.c (output_unsigned_int_table): New.
16756 (prepare_rules): `i' is unsigned.
16757 `prhs', `rline', `r2' are unsigned int.
16758 Rename muscle `rhs_number_max' as `rhs_max'.
16759 Output muscles `prhs_max', `rline_max', and `r2_max'.
16760 Free rline and r1.
16761 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16762 to compute types instead of constant types.
16763 * tests/regression.at (Web2c Actions): Adjust.
16764
b87f8b21
AD
167652002-05-04 Akim Demaille <akim@epita.fr>
16766
16767 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16768 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16769 Adjust dependencies.
16770 * src/output.c (token_definitions_output): Be sure not to output a
16771 `#define 'a'' when fed with `%token 'a' "a"'.
16772 * tests/regression.at (Token definitions): New.
16773
8bb936e4
PE
167742002-05-03 Paul Eggert <eggert@twinsun.com>
16775
16776 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16777 for K&R C.
16778
167792002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16780
16781 * Makefile.am (SUBDIRS): Remove intl.
16782 (EXTRA_DIST): Add config/config.rpath.
16783
53c71a12
AD
167842002-05-03 Akim Demaille <akim@epita.fr>
16785
16786 * data/bison.simple (m4_if): Don't output empty enums.
16787 And actually, output valid enum definitions :(.
16788
289dd0cf
AD
167892002-05-03 Akim Demaille <akim@epita.fr>
16790
16791 * configure.bat: Remove, completely obsolete.
16792 * Makefile.am (EXTRA_DIST): Adjust.
16793 Don't distribute config.rpath...
16794 * config/Makefile.am (EXTRA_DIST): Do it.
16795
db85e524
AD
167962002-05-03 Akim Demaille <akim@epita.fr>
16797
16798 * configure.in (GETTEXT_VERSION): New.
16799 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16800
83ccf991
AD
168012002-05-03 Akim Demaille <akim@epita.fr>
16802
16803 * data/bison.simple (b4_token_enum): New.
16804 (b4_token_defines): Use it to output tokens both as #define and
16805 enums.
16806 Suggested by Paul Eggert.
16807 * src/output.c (token_definitions_output): Don't output spurious
16808 white spaces.
16809
1f418995
AD
168102002-05-03 Akim Demaille <akim@epita.fr>
16811
16812 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16813
45119f04
RA
168142002-05-02 Robert Anisko <robert@lrde.epita.fr>
16815
16816 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16817 Update the stack class, give a try to deque as the default container.
16818
b2d52318
AD
168192002-05-02 Akim Demaille <akim@epita.fr>
16820
16821 * data/bison.simple (yyparse): Do not implement @$ = @1.
16822 (YYLLOC_DEFAULT): Adjust to do it.
16823 * doc/bison.texinfo (Location Default Action): Fix.
16824
3a8b4109
AD
168252002-05-02 Akim Demaille <akim@epita.fr>
16826
16827 * src/reader.c (parse_braces): Merge into...
16828 (parse_action): this.
16829
84614e13
AD
168302002-05-02 Akim Demaille <akim@epita.fr>
16831
16832 * configure.in (ALL_LINGUAS): Remove.
16833 * po/LINGUAS, hr.po: New.
16834
fdbcd8e2
AD
168352002-05-02 Akim Demaille <akim@epita.fr>
16836
16837 Remove the so called hairy (semantic) parsers.
16838
16839 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16840 * src/gram.h, src/gram.c (semantic_parser): Remove.
16841 (rule_t): Remove the guard and guard_line members.
16842 * src/lex.h (token_t): remove tok_guard.
16843 * src/options.c (option_table): Remove %guard and %semantic_parser
16844 support.
16845 * src/output.c, src/output.h (guards_output): Remove.
16846 (prepare): Adjust.
16847 (token_definitions_output): Don't output the `T'
16848 tokens (???).
16849 (output_skeleton): Don't output the guards.
16850 * src/files.c, src/files.c (attrsfile): Remove.
16851 * src/reader.c (symbol_list): Remove the guard and guard_line
16852 members.
16853 Adjust dependencies.
16854 (parse_guard): Remove.
16855 * data/bison.hairy: Remove.
16856 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16857 BISON_HAIRY.
16858
82b6cb3f
AD
168592002-05-02 Akim Demaille <akim@epita.fr>
16860
16861 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16862 (parse_guard): Rename the formal argument `stack_offset' as
16863 `rule_length', which is more readable.
16864 Adjust callers.
16865 (copy_at, copy_dollar): Instead of outputting the hard coded
16866 values of $$, $n and so forth, output invocation to b4_lhs_value,
16867 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
16868 Note: this patch partially drops `semantic-parser' support: it
16869 always does `rule_length - n', where semantic parsers ought to
16870 always use `-n'.
82b6cb3f
AD
16871 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16872 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16873
6cbfbcc5
AD
168742002-05-02 Akim Demaille <akim@epita.fr>
16875
16876 * configure.in (AC_INIT): Bump to 1.49b.
16877 (AM_INIT_AUTOMAKE): Short invocation.
16878
b8548114
AD
168792002-05-02 Akim Demaille <akim@epita.fr>
16880
16881 Version 1.49a.
16882
c20cd1fa
AD
168832002-05-01 Akim Demaille <akim@epita.fr>
16884
16885 * src/skeleton.h: Remove.
16886
8a9566d4
AD
168872002-05-01 Akim Demaille <akim@epita.fr>
16888
16889 * src/skeleton.h: Fix the #endif.
16890 Reported by Magnus Fromreide.
16891
8c6d399a
PE
168922002-04-26 Paul Eggert <eggert@twinsun.com>
16893
16894 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16895 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 16896 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 16897
2b7ed18a
RA
168982002-04-25 Robert Anisko <robert@lrde.epita.fr>
16899
16900 * src/scan-skel.l: Postprocess quadrigraphs.
16901
16902 * src/reader.c (copy_character): New function, used to output
16903 single characters while replacing `[' and `]' with quadrigraphs, to
16904 avoid troubles with M4 quotes.
16905 (copy_comment): Output characters with copy_character.
16906 (read_additionnal_code): Likewise.
16907 (copy_string2): Likewise.
16908 (copy_definition): Likewise.
16909
16910 * tests/calc.at: Exercise M4 quoting.
16911
34a89c50
AD
169122002-04-25 Akim Demaille <akim@epita.fr>
16913
16914 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16915 between `!' and the command.
16916 Reported by Paul Eggert.
16917
0dd1580a
RA
169182002-04-24 Robert Anisko <robert@lrde.epita.fr>
16919
16920 * tests/calc.at: Exercise prologue splitting.
16921
16922 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16923 `b4_post_prologue' instead of `b4_prologue'.
16924
16925 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16926 muscles.
16927 (output): Free pre_prologue_obstack and post_prologue_obstack.
16928 * src/files.h, src/files.c (attrs_obstack): Remove.
16929 (pre_prologue_obstack, post_prologue_obstack): New.
16930 * src/reader.c (copy_definition): Add a parameter to specify the
16931 obstack to fill, instead of using attrs_obstack unconditionally.
16932 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16933 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16934
83c1796f
PE
169352002-04-23 Paul Eggert <eggert@twinsun.com>
16936
16937 * data/bison.simple: Remove unnecessary commentary and white
16938 space differences from 1_29-branch.
16939 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16940
16941 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16942 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16943 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16944 constructors or destructors.
16945
16946 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16947
1207eeac
AD
169482002-04-23 Akim Demaille <akim@epita.fr>
16949
16950 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16951 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16952 location with columns.
16953 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16954 All reported by Paul Eggert.
16955
78ab8f67
AD
169562002-04-22 Akim Demaille <akim@epita.fr>
16957
16958 * src/reduce.c (dump_grammar): Move to...
16959 * src/gram.h, src/gram.c (grammar_dump): here.
16960 Be sure to separate long item numbers.
16961 Don't read the members of a rule's prec if its nil.
16962
133c20e2
AD
169632002-04-22 Akim Demaille <akim@epita.fr>
16964
16965 * src/output.c (table_size, table_grow): New.
16966 (MAXTABLE): Remove, replace uses with table_size.
16967 (pack_vector): Instead of dying when the table is too big, grow it.
16968
9515e8a7
AD
169692002-04-22 Akim Demaille <akim@epita.fr>
16970
16971 * data/bison.simple (yyr1): Its type is that of a token number.
16972 * data/bison.c++ (r1_): Likewise.
16973 * tests/regression.at (Web2c Actions): Adjust.
16974
23c5a174
AD
169752002-04-22 Akim Demaille <akim@epita.fr>
16976
16977 * src/reader.c (token_translations_init): 256 is now the default
16978 value for the error token, i.e., it will be assigned another
16979 number if the user assigned 256 to one of her tokens.
16980 (reader): Don't force 256 to error.
16981 * doc/bison.texinfo (Symbols): Adjust.
16982 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16983 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16984 etc. instead of 10, 20, 30 (which was used to `jump' over error
16985 (256) and undefined (2)).
16986
5fbb0954
AD
169872002-04-22 Akim Demaille <akim@epita.fr>
16988
16989 Propagate more token_number_t.
16990
16991 * src/gram.h (token_number_as_item_number)
16992 (item_number_as_token_number): New.
16993 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16994 Use it to create output_item_number_table and
16995 output_token_number_table.
16996 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16997 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16998 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16999 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
17000
4f940944
AD
170012002-04-22 Akim Demaille <akim@epita.fr>
17002
17003 * src/output.h, src/output.c (get_lines_number): Remove.
17004
3ded9a63
AD
170052002-04-19 Akim Demaille <akim@epita.fr>
17006
17007 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
17008 as Lex/Flex'.
17009 (Debugging): More details about enabling the debugging features.
17010 (Table of Symbols): Describe $$, $n, @$, and @n.
17011 Suggested by Tim Josling.
17012
e0c471a9
AD
170132002-04-19 Akim Demaille <akim@epita.fr>
17014
17015 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
17016
fecc10cd
AD
170172002-04-10 Akim Demaille <akim@epita.fr>
17018
17019 * src/system.h: Rely on HAVE_LIMITS_H.
17020 Suggested by Paul Eggert.
17021
51dec47b
AD
170222002-04-09 Akim Demaille <akim@epita.fr>
17023
17024 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
17025 full stderr, and strip it according to the bison options, instead
17026 of composing the error message from different bits.
17027 This makes it easier to check for several error messages.
17028 Adjust all the invocations.
17029 Add an invocation exercising the error token.
17030 Add an invocation demonstrating a stupid error message.
17031 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
17032 Adjust the tests.
17033 Error message are for stderr, not stdout.
17034
007a50a4
AD
170352002-04-09 Akim Demaille <akim@epita.fr>
17036
17037 * src/gram.h, src/gram.c (error_token_number): Remove, use
17038 errtoken->number.
17039 * src/reader.c (reader): Don't specify the user token number (2)
17040 for $undefined, as it uselessly prevents using it.
17041 * src/gram.h (token_number_t): Move to...
17042 * src/symtab.h: here.
17043 (state_t.number): Is a token_number_t.
17044 * src/print.c, src/reader.c: Use undeftoken->number instead of
17045 hard coded 2.
17046 (Even though this 2 is not the same as above: the number of the
17047 undeftoken remains being 2, it is its user token number which
17048 might not be 2).
17049 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17050 `user_token_number_max'.
17051 Output `undef_token_number'.
17052 * data/bison.simple, data/bison.c++: Use them.
17053 Be sure to map invalid yylex return values to
17054 `undef_token_number'. This saves us from gratuitous SEGV.
17055
17056 * tests/conflicts.at (Solved SR Conflicts)
17057 (Unresolved SR Conflicts): Adjust.
17058 * tests/regression.at (Web2c Actions): Adjust.
17059
06446ccf
AD
170602002-04-08 Akim Demaille <akim@epita.fr>
17061
17062 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17063 Adding #line.
17064 Remove the duplicate `typedefs'.
17065 (RhsNumberType): Fix the declaration and various other typos.
17066 Use __ofile__.
17067 * data/bison.simple: Use __ofile__.
17068 * src/scan-skel.l: Handle __ofile__.
17069
62a3e4f0
AD
170702002-04-08 Akim Demaille <akim@epita.fr>
17071
17072 * src/gram.h (item_number_t): New, the type of item numbers in
17073 RITEM. Note that it must be able to code symbol numbers as
17074 positive number, and the negation of rule numbers as negative
17075 numbers.
17076 Adjust all dependencies (pretty many).
17077 * src/reduce.c (rule): Remove this `short *' pointer: use
17078 item_number_t.
17079 * src/system.h (MINSHORT, MAXSHORT): Remove.
17080 Include `limits.h'.
17081 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17082 (shortcpy): Remove.
17083 (MAXTABLE): Move to...
17084 * src/output.c (MAXTABLE): here.
17085 (prepare_rules): Use output_int_table to output rhs.
17086 * data/bison.simple, data/bison.c++: Adjust.
17087 * tests/torture.at (Big triangle): Move the limit from 254 to
17088 500.
17089 * tests/regression.at (Web2c Actions): Ajust.
17090
17091 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17092 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17093 passes, but produces negative #line number, once fixed, GCC is
17094 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17095 C), it passes.
17096 * src/state.h (state_h): Code input lines on ints, not shorts.
17097
bb88b0fc
AD
170982002-04-08 Akim Demaille <akim@epita.fr>
17099
17100 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17101 and then the grammar.
17102
9a636f47
AD
171032002-04-08 Akim Demaille <akim@epita.fr>
17104
17105 * src/system.h: No longer using strndup.
17106
680e8701
AD
171072002-04-07 Akim Demaille <akim@epita.fr>
17108
17109 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17110 * src/output.c (output_table_data): Return the longest number.
17111 (prepare_tokens): Output `token_number_max').
17112 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17113 New.
17114 Use them to define yy_token_number_type/TokenNumberType.
17115 Use this type for yytranslate.
17116 * tests/torture.at (Big triangle): Push the limit from 124 to
17117 253.
17118 * tests/regression.at (Web2c Actions): Adjust.
17119
817e9f41
AD
171202002-04-07 Akim Demaille <akim@epita.fr>
17121
17122 * tests/torture.at (Big triangle): New.
17123 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17124 * tests/existing.at: here.
17125
5123689b
AD
171262002-04-07 Akim Demaille <akim@epita.fr>
17127
17128 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17129 nritems.
17130 Adjust dependencies.
17131
f3849179
AD
171322002-04-07 Akim Demaille <akim@epita.fr>
17133
17134 * src/reader.c: Normalize increments to prefix form.
17135
bd02036a
AD
171362002-04-07 Akim Demaille <akim@epita.fr>
17137
17138 * src/reader.c, symtab.c: Remove debugging code.
17139
db8837cb
AD
171402002-04-07 Akim Demaille <akim@epita.fr>
17141
17142 Rename all the `bucket's as `symbol_t'.
17143
17144 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17145 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17146 * src/symtab.c, src/symtab.h (bucket): Rename as...
17147 (symbol_t): this.
17148 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17149 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17150 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17151 (buckets_new, buckets_free, buckets_do): Rename as...
17152 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17153 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17154 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17155 (symbols_new, symbols_free, symbols_do): these.
17156
72a23c97
AD
171572002-04-07 Akim Demaille <akim@epita.fr>
17158
17159 Use lib/hash for the symbol table.
17160
17161 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17162 EOF.
17163 * src/lex.c (lex): Set the `number' member of new terminals.
17164 * src/reader.c (bucket_check_defined, bucket_make_alias)
17165 (bucket_check_alias_consistence, bucket_translation): New.
17166 (reader, grammar_free, readgram, token_translations_init)
17167 (packsymbols): Adjust.
17168 (reader): Number the predefined tokens.
17169 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17170 for predefined tokens.
17171 * src/symtab.h (bucket): Remove all the hash table related
17172 members.
17173 * src/symtab.c (symtab): Replace by...
17174 (bucket_table): this.
17175 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17176 (buckets_new, buckets_do): New.
17177
280a38c3
AD
171782002-04-07 Akim Demaille <akim@epita.fr>
17179
17180 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17181 (start_symbol, max_user_token_number, semantic_parser)
17182 (error_token_number): Initialize.
17183 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17184 Initialize.
17185 (reader): Don't.
17186 (errtoken, eoftoken, undeftoken, axiom): Extern.
17187
03b31c0c
AD
171882002-04-07 Akim Demaille <akim@epita.fr>
17189
17190 * src/gram.h (rule_s): prec and precsym are now pointers
17191 to the bucket giving the priority/associativity.
17192 Member `associativity' removed: useless.
17193 * src/reduce.c, src/conflicts.c: Adjust.
17194
8b3df748
AD
171952002-04-07 Akim Demaille <akim@epita.fr>
17196
17197 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17198 Properly escape the symbols' TAG when outputting them.
17199
e601aa1d
AD
172002002-04-07 Akim Demaille <akim@epita.fr>
17201
17202 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17203
b0299a2e
AD
172042002-04-07 Akim Demaille <akim@epita.fr>
17205
17206 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17207 (LArule): this, which is an array to rule_t*.
17208 * src/print.c, src/conflicts.c: Adjust.
17209
d7e1f00c
AD
172102002-04-07 Akim Demaille <akim@epita.fr>
17211
17212 * src/gram.h (rule_t): Rename `number' as `user_number'.
17213 `number' is a new member.
17214 Adjust dependencies.
17215 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17216
cc9305dd
AD
172172002-04-07 Akim Demaille <akim@epita.fr>
17218
17219 As a result of the previous patch, it is no longer needed
17220 to reorder ritem itself.
17221
17222 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17223
b0940840
AD
172242002-04-07 Akim Demaille <akim@epita.fr>
17225
17226 Be sure never to walk through RITEMS, but use only data related to
17227 the rules themselves. RITEMS should be banished.
17228
17229 * src/output.c (output_token_translations): Rename as...
17230 (prepare_tokens): this.
17231 In addition to `translate', prepare the muscles `tname' and
17232 `toknum', which were handled by...
17233 (output_rule_data): this.
17234 Remove, and move the remainder of its outputs into...
17235 (prepare_rules): this new routines, which also merges content from
17236 (output_gram): this.
17237 (prepare_rules): Be sure never to walk through RITEMS.
17238 (output_stos): Rename as...
17239 (prepare_stos): this.
17240 (output): Always invoke prepare_states, after all, just don't use it
17241 in the output if you don't need it.
17242
643a5994
AD
172432002-04-07 Akim Demaille <akim@epita.fr>
17244
17245 * src/LR0.c (new_state): Display `nstates' as the name of the
17246 newly created state.
17247 Adjust to initialize first_state and last_state if needed.
17248 Be sure to distinguish the initial from the final state.
17249 (new_states): Create the itemset of the initial state, and use
17250 new_state.
17251 * src/closure.c (closure): Now that the initial state has its
17252 items properly set, there is no need for a special case when
17253 creating `ruleset'.
17254
17255 As a result, now the rule 0, reducing to $axiom, is visible in the
17256 outputs. Adjust the test suite.
17257
17258 * tests/conflicts.at (Solved SR Conflicts)
17259 (Unresolved SR Conflicts): Adjust.
17260 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17261 * tests/conflicts.at (S/R in initial): New.
17262
b4c4ccc2
AD
172632002-04-07 Akim Demaille <akim@epita.fr>
17264
17265 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17266 the RHS of the rules.
17267 * src/output.c (output_gram): Likewise.
17268
bba97eb2
AD
172692002-04-07 Akim Demaille <akim@epita.fr>
17270
17271 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17272 bucket.
17273 Adjust all dependencies.
17274 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17275 `number' of the buckets too.
17276 * src/gram.h: Include `symtab.h'.
17277 (associativity): Move to...
17278 * src/symtab.h: here.
17279 No longer include `gram.h'.
17280
c3b407f4
AD
172812002-04-07 Akim Demaille <akim@epita.fr>
17282
17283 * src/gram.h, src/gram.c (rules_rhs_length): New.
17284 (ritem_longest_rhs): Use it.
17285 * src/gram.h (rule_t): `number' is a new member.
17286 * src/reader.c (packgram): Set it.
17287 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17288 the end of `rules', and count them out of `nrules'.
17289 (reduce_output, dump_grammar): Adjust.
17290 * src/print.c (print_grammar): It is no longer needed to check for
17291 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17292 * tests/reduce.at (Reduced Automaton): New test.
17293
11652ab3
AD
172942002-04-07 Akim Demaille <akim@epita.fr>
17295
17296 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17297 lacking `+ 1' to nrules, Bison reported as useless a token if it
17298 was used solely to set the precedence of the last rule...
17299
26b23c1a
AD
173002002-04-07 Akim Demaille <akim@epita.fr>
17301
17302 * data/bison.c++, data/bison.simple: Don't output the current file
17303 name in #line, to avoid useless diffs between two identical
17304 outputs under different names.
17305
18bcecb0
AD
173062002-04-07 Akim Demaille <akim@epita.fr>
17307
17308 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17309 Normalize loops to using `< nrules + 1', not `<= nrules'.
17310
fa770c86
AD
173112002-04-07 Akim Demaille <akim@epita.fr>
17312
17313 * TODO: Update.
17314
d9b739c3
AD
173152002-04-07 Akim Demaille <akim@epita.fr>
17316
17317 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17318 bucket.value as bucket.number.
17319
99013900
AD
173202002-04-07 Akim Demaille <akim@epita.fr>
17321
17322 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17323 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17324 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17325 RHS, instead of being an index in RITEMS.
17326
e966383b
PE
173272002-04-04 Paul Eggert <eggert@twinsun.com>
17328
17329 * doc/bison.texinfo: Update copyright date.
17330 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17331 (Symbols): Warn about running Bison in one character set,
17332 but compiling and/or running in an incompatible one.
17333 Warn about character code 256, too.
17334
173352002-04-03 Paul Eggert <eggert@twinsun.com>
17336
17337 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17338 YYERROR_VERBOSE is nonzero, not whether it is defined.
17339
17340 Merge changes from bison-1_29-branch.
c307773e 17341
8d6c48b9
PE
173422002-03-20 Paul Eggert <eggert@twinsun.com>
17343
17344 Merge fixes from Debian bison_1.34-1.diff.
17345
17346 * configure.in (AC_PREREQ): 2.53.
17347
e53c6322
AD
173482002-03-20 Akim Demaille <akim@epita.fr>
17349
17350 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17351
9ffbeca7
PE
173522002-03-19 Paul Eggert <eggert@twinsun.com>
17353
21db0b2a
PE
17354 * src/bison.simple (YYCOPY): New macro.
17355 (YYSTACK_RELOCATE): Use it.
17356 Remove Type arg; no longer needed. All callers changed.
17357 (yymemcpy): Remove; no longer needed.
17358
9ffbeca7
PE
17359 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17360 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17361
642cb8f8
AD
173622002-03-19 Akim Demaille <akim@epita.fr>
17363
17364 Test and fix the #line outputs.
17365
17366 * tests/atlocal.at (GCC): New.
17367 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 17368 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
17369 (Action synch line, Epilogue synch line): New tests.
17370 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17371 * data/bison.simple, data/bison.c++: Use it.
17372
3c31a486
AD
173732002-03-19 Akim Demaille <akim@epita.fr>
17374
17375 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17376 (Solved SR Conflicts, %expect not enough, %expect right)
17377 (%expect too much): Move to...
17378 * tests/conflicts.at: this new file.
17379
0d8bed56
AD
173802002-03-19 Akim Demaille <akim@epita.fr>
17381
17382 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17383 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17384 that we can move to enums for instance.
17385 * src/output.c (token_definitions_output): Output a list of
17386 `token-name, token-number' instead of the #define.
17387 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17388
9208d17f
AD
173892002-03-14 Akim Demaille <akim@epita.fr>
17390
17391 Use Gettext 0.11.1.
17392
af27eacb
RA
173932002-03-09 Robert Anisko <robert@lrde.epita.fr>
17394
17395 * data/bison.c++: Make the user able to add members to the generated
17396 parser by subclassing.
17397
9101a310
RA
173982002-03-05 Robert Anisko <robert@lrde.epita.fr>
17399
17400 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17401 a character.
17402 Reported by Nicolas Tisserand and Nicolas Burrus.
17403
fff9bf0b
RA
174042002-03-04 Robert Anisko <robert@lrde.epita.fr>
17405
17406 * src/reader.c: Warn about lacking semi-colons, do not complain.
17407
64dba31e
RA
174082002-03-04 Robert Anisko <robert@lrde.epita.fr>
17409
17410 * data/bison.c++: Remove a debug line.
17411
374f5a14
RA
174122002-03-04 Robert Anisko <robert@lrde.epita.fr>
17413
17414 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17415 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17416 provide a default implementation.
17417
bfcf1f3a
AD
174182002-03-04 Akim Demaille <akim@epita.fr>
17419
17420 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17421 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17422 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17423 * tests/semantic.at (Parsing Guards): Similarly.
17424 * src/reader.at (readgram): Complain if the last rule is not ended
17425 with a semi-colon.
17426
65ccf9fc
AD
174272002-03-04 Akim Demaille <akim@epita.fr>
17428
17429 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17430 * src/closure.c: here.
17431 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17432 RTC.
17433 * src/warshall.h, src/warshall.c: Remove.
17434 * tests/sets.at (Broken Closure): Adjust.
17435
d0039cbc
AD
174362002-03-04 Akim Demaille <akim@epita.fr>
17437
17438 * src/output.c (output_skeleton): tempdir is const.
17439 bytes_read is unused.
17440
345cea78
AD
174412002-03-04 Akim Demaille <akim@epita.fr>
17442
17443 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17444 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17445 Update.
17446 From Michael Hayes.
17447
564801f7
AD
174482002-03-04 Akim Demaille <akim@epita.fr>
17449
17450 * src/closure.c (closure): `r' is unused.
17451
e5352bc7
AD
174522002-03-04 Akim Demaille <akim@epita.fr>
17453
17454 * tests/sets.at (Broken Closure): Add the ending `;'.
17455 * src/reader.at (readgram): Complain if a rule is not ended with a
17456 semi-colon.
17457
914feea9
AD
174582002-03-04 Akim Demaille <akim@epita.fr>
17459
17460 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17461 (count_sr_conflicts): Use bitset_count.
17462 * src/reduce.c (inaccessable_symbols): Ditto.
17463 (bits_size): Remove.
17464 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17465
f0250de6
AD
174662002-03-04 Akim Demaille <akim@epita.fr>
17467
17468 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17469 * src/reduce.c: Remove the `bitset_zero's following the
17470 `bitset_create's, as now it is performed by the latter.
17471
ef017502
AD
174722002-03-04 Akim Demaille <akim@epita.fr>
17473
17474 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17475 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17476 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17477 latest sources from Michael.
17478
76514394
AD
174792002-03-04 Akim Demaille <akim@epita.fr>
17480
17481 * src/output.c (output): Don't free the grammar.
17482 * src/reader.c (grammar_free): New.
17483 * src/main.c (main): Call it and don't free symtab here.
17484
55024580
AD
174852002-03-04 Akim Demaille <akim@epita.fr>
17486
17487 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17488 before returning.
17489 Reported by Benoit Perrot.
17490
f9abaa2c
AD
174912002-03-04 Akim Demaille <akim@epita.fr>
17492
17493 Use bitset operations when possible, not loops over bits.
17494
17495 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17496 bitset_or.
17497 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17498 * src/reduce.c (useless_nonterminals): Formatting changes.
17499 * src/warshall.c (TC): Use bitset_or.
17500
0e721e75
AD
175012002-03-04 Akim Demaille <akim@epita.fr>
17502
17503 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17504 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17505 Ditto.
17506
0fb1ffb1
AD
175072002-03-04 Akim Demaille <akim@epita.fr>
17508
17509 * src/lalr.c (F): Now a bitset*.
17510 Adjust all dependencies.
17511
b86796bf
AD
175122002-03-04 Akim Demaille <akim@epita.fr>
17513
17514 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17515 Adjust all dependencies.
17516
602bbf31
AD
175172002-03-04 Akim Demaille <akim@epita.fr>
17518
17519 * src/L0.c, src/LR0.h (nstates): Be size_t.
17520 Adjust comparisons (signed vs unsigned).
17521 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17522 bitset*.
17523 Adjust all dependencies.
17524
d8a0245c
AD
175252002-03-04 Akim Demaille <akim@epita.fr>
17526
17527 * src/closure.c (firsts): Now, also a bitset.
17528 Adjust all dependencies.
17529 (varsetsize): Remove, now unused.
17530 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17531
34ba9743
AD
175322002-03-04 Akim Demaille <akim@epita.fr>
17533
17534 * src/print.c: Convert to use bitset.h, not hand coded iterations
17535 over ints.
17536
ed86e78c
AD
175372002-03-04 Akim Demaille <akim@epita.fr>
17538
17539 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17540
dfdb1797
AD
175412002-03-04 Akim Demaille <akim@epita.fr>
17542
17543 * src/closure.c (ruleset): Be a bitset.
17544 (rulesetsize): Remove.
17545
7086e707
AD
175462002-03-04 Akim Demaille <akim@epita.fr>
17547
17548 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17549 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17550 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17551 * src/closure.c (fderives): Be an array of bitsets.
17552
98254360
RA
175532002-02-28 Robert Anisko <robert@lrde.epita.fr>
17554
17555 * data/bison.c++: Merge the two generated headers. Insert a copyright
17556 notice in each output file.
17557
a75c057f
AD
175582002-02-28 Akim Demaille <akim@epita.fr>
17559
17560 * data/bison.c++: Copy the prologue of bison.simple to fetch
17561 useful M4 definitions, such as b4_header_guard.
17562
06b00abc
AD
175632002-02-25 Akim Demaille <akim@epita.fr>
17564
17565 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
17566 translator friendly scheme for the bgr
17567 copyright notice.
06b00abc 17568
70e7d534
AD
175692002-02-25 Akim Demaille <akim@epita.fr>
17570
17571 * src/output.c (header_output): Remove, now handled completely via
17572 M4.
17573
abe017f6
AD
175742002-02-25 Akim Demaille <akim@epita.fr>
17575
17576 * m4/m4.m4: New, from CVS Autoconf.
17577 * configure.in: Invoke it.
17578 * src/output.c (output_skeleton): Use its result instead of the
17579 hard coded name.
17580
381fb12e
AD
175812002-02-25 Akim Demaille <akim@epita.fr>
17582
17583 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17584 Fileutils 4.1.5.
17585 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17586 * src/output.c (output_skeleton): Use mkstemp to create a real
17587 temporary file.
17588 Move the filling of `skeleton' and its muscle to...
17589 (prepare): here.
17590 (output): Move the definition of the prologue muscle to...
17591 (prepare): here.
17592 * src/system.h (DEFAULT_TMPDIR): New.
17593
6f38107f
PE
175942002-02-14 Paul Eggert <eggert@twinsun.com>
17595
17596 Remove the support for C++ namespace cleanliness; it was
17597 causing more problems than it was curing, since it didn't work
17598 properly on some nonstandard C++ compilers. This can wait
17599 for a proper C++ parser.
17600
17601 * NEWS: Document this.
17602 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17603 of C++, as it's treated like C now.
17604 * src/bison.simple (YYSTD): Remove.
17605 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17606 Treat C++ just like Standard C instead of trying to support
17607 namespace cleanliness.
17608
80cce3da
AD
176092002-02-14 Akim Demaille <akim@epita.fr>
17610
17611 * tests/regression.at (else): Adjust to Andreas' change.
17612
842e8679
AD
176132002-02-14 Akim Demaille <akim@epita.fr>
17614
17615 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17616
4bda3f10
AD
176172002-02-13 Andreas Schwab <schwab@suse.de>
17618
17619 * src/output.c (output_rule_data): Don't output NULL, it might
17620 not be defined yet.
17621
4162fa07 176222002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 17623
4162fa07
RA
17624 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17625 (Copyright notice): Update.
b418ecd8 17626
bd16a5dc
AD
176272002-02-11 Akim Demaille <akim@epita.fr>
17628
17629 * tests/regression.at (%nonassoc and eof): Don't include
17630 nonportable headers.
17631
8d69a1a3
RA
176322002-02-08 Robert Anisko <robert@lrde.epita.fr>
17633
17634 * data/bison.c++: Correct error recovery. Make the user able to
17635 initialize the starting location.
17636
9b2d0677
AD
176372002-02-07 Akim Demaille <akim@epita.fr>
17638
17639 * tests/input.at: New.
17640
69e2658b
RA
176412002-02-07 Robert Anisko <robert@lrde.epita.fr>
17642
17643 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 17644 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
17645 directives around tables only needed for debugging.
17646
4aacc3a7
RA
176472002-02-07 Robert Anisko <robert@lrde.epita.fr>
17648
17649 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17650 C++ parsers.
17651 (yy::b4_name::parse): Use print_.
17652
762a801e
RA
176532002-02-07 Robert Anisko <robert@lrde.epita.fr>
17654
17655 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17656
4bb2bc3f
RA
176572002-02-07 Robert Anisko <robert@lrde.epita.fr>
17658
17659 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17660 C++ parsers.
17661 (yy::b4_name::parse): Build verbose error messages, and use error_.
17662
6b45a3ca
RA
176632002-02-06 Robert Anisko <robert@lrde.epita.fr>
17664
17665 * data/bison.c++: Fix m4 quoting in comments.
17666
50997c6e
RA
176672002-02-06 Robert Anisko <robert@lrde.epita.fr>
17668
17669 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17670 not expanded by m4.
17671
3f3eed27
AD
176722002-02-05 Akim Demaille <akim@epita.fr>
17673
17674 * data/bison.c++: Adjust to the M4 back end.
17675 More is certainly needed.
17676
be2a1a68
AD
176772002-02-05 Akim Demaille <akim@epita.fr>
17678
17679 Give a try to M4 as a back end.
17680
17681 * lib/readpipe.c: New, from wdiff.
17682 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17683 BISON_HAIRY.
17684 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17685 specific values. Now it is m4 that performs the lookup.
17686 * src/parse-skel.y: Remove.
17687 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17688 * src/output.c (actions_output, guards_output)
17689 (token_definitions_output): No longer keeps track of the output
17690 line number, hence remove the second argument.
17691 (guards_output): Check against the guard member of a rule, not the
17692 action member.
17693 Adjust callers.
17694 (output_skeleton): Don't look for the skeleton location, let m4 do
17695 that.
17696 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17697 file will be used.
17698 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17699 (prepare): Given that for the time being changesyntax is not
17700 usable in M4, rename the muscles using `-' to `_'.
17701 Define `defines_flag', `output_parser_name' and `output_header_name'.
17702 * src/output.h (actions_output, guards_output)
17703 (token_definitions_output): Adjust prototypes.
17704 * src/scan-skel.l: Instead of scanning the skeletons, it now
17705 processes the output of m4: `__oline__' and `#output'.
17706 * data/bison.simple: Adjust to be used by M4(sugar).
17707 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17708 to date.
17709 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17710 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17711 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17712 shamelessly stolen from CVS Autoconf.
17713
beda758b
AD
177142002-02-05 Akim Demaille <akim@epita.fr>
17715
17716 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17717 * configure.in: Check for the declarations of free and malloc.
17718 * src/muscle_tab.c: Adjust.
17719
5ece6d43
AD
177202002-02-05 Akim Demaille <akim@epita.fr>
17721
17722 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17723 which have no values.
17724
5bb18f9a
AD
177252002-02-05 Akim Demaille <akim@epita.fr>
17726
17727 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17728 * data/: here.
17729
894dd62e
PE
177302002-01-29 Paul Eggert <eggert@twinsun.com>
17731
17732 * src/bison.simple (YYSIZE_T): Do not define merely because
17733 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17734 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17735
82841af7
AD
177362002-01-27 Akim Demaille <akim@epita.fr>
17737
17738 Fix `%nonassoc and eof'.
17739
17740 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17741 which were not properly copied! Replace
17742 memcpy (res->errs, src->errs, src->nerrs);
17743 with
17744 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17745 !!!
17746 * tests/regression.at (%nonassoc and eof): Adjust to newest
17747 Autotest: `.' is not in the PATH.
17748
318b76e9
AD
177492002-01-27 Akim Demaille <akim@epita.fr>
17750
17751 * tests/sets.at (AT_EXTRACT_SETS): New.
17752 (Nullable): Use it.
17753 (Firsts): New.
17754
30d2f3d5
AD
177552002-01-26 Akim Demaille <akim@epita.fr>
17756
17757 * tests/actions.at, tests/calc.at, tests/headers.at,
17758 * tests/torture.at: Adjust to the newest Autotest which no longer
17759 forces `.' in the PATH.
17760
30f8c395
AD
177612002-01-25 Akim Demaille <akim@epita.fr>
17762
17763 * tests/regression.at (%nonassoc and eof): New.
17764 Suggested by Robert Anisko.
17765
29ae55f1
AD
177662002-01-24 Akim Demaille <akim@epita.fr>
17767
17768 Bison dumps core when trying to complain about broken input files.
17769 Reported by Cris van Pelt.
17770
17771 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17772 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17773 into...
17774 (Invalid inputs): Strengthen: exercise parse_percent_token.
17775
2b548aa6
RA
177762002-01-24 Robert Anisko <robert.anisko@epita.fr>
17777
17778 * src/Makefile.am: Add bison.c++.
17779 * src/bison.c++: New skeleton.
17780
bb0146c2
AD
177812002-01-21 Paolo Bonzini <bonzini@gnu.org>
17782
17783 * po/it.po: New.
17784
bec30531
AD
177852002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17786
17787 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17788
fc6edc45
MA
177892002-01-20 Marc Autret <marc@gnu.org>
17790
17791 * src/files.c (compute_output_file_names): Fix
17792
5e5d5415
MA
177932002-01-20 Marc Autret <marc@gnu.org>
17794
17795 * tests/output.at: New test.
17796 * src/files.c (compute_base_names): Don't map extensions when
17797 the YACC flag is set, use defaults.
17798 Reported by Evgeny Stambulchik.
17799
44ea3fbd
MA
178002002-01-20 Marc Autret <marc@gnu.org>
17801
ba0fe3c7
PE
17802 * src/system.h: Need to define __attribute__ away for non-GCC
17803 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
17804 Suggested by Albert Chin-A-Young.
17805
338963d1
TVH
178062002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17807
17808 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17809 canonical definition.
17810 * src/system.h: Use the canonical definition for PARAMS (avoids
17811 a conflict with the macro from lib/hash.h).
17812
c57b2479
AD
178132002-01-11 Akim Demaille <akim@epita.fr>
17814
17815 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 17816 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 17817
b85810ae
AD
178182002-01-09 Akim Demaille <akim@epita.fr>
17819
17820 * src/files.c, src/files.h (output_infix): New.
17821 (tab_extension): Remove.
17822 (compute_base_names): Compute the former, drop the latter.
17823 * src/output.c (prepare): Insert the muscles `output-infix', and
17824 `output-suffix'.
17825 * src/parse-skel.y (string, string.1): New.
17826 (section.header): Use it.
17827 (section.yacc): Remove.
17828 (prefix): Remove too.
17829 * src/scan-skel.l: Adjust.
17830 * src/bison.simple, src/bison.hairy: Adjust.
17831
cae60122
AD
178322002-01-09 Akim Demaille <akim@epita.fr>
17833
17834 * configure.in (WERROR_CFLAGS): Compute it.
17835 * src/Makefile.am (CFLAGS): Pass it.
17836 * tests/atlocal.in (CFLAGS): Idem.
17837 * src/files.c: Fix a few warnings.
17838 (get_extension_index): Remove, unused.
17839
ae404801
AD
178402002-01-08 Akim Demaille <akim@epita.fr>
17841
17842 * src/getargs.c (AS_FILE_NAME): New.
17843 (getargs): Use it to convert DOSish file names.
17844 * src/files.c (base_name): Rename as full_base_name to avoid
17845 clashes with `base_name ()'.
17846 (filename_split): New.
17847 (compute_base_names): N-th rewrite, using filename_split.
17848
22312b71
AD
178492002-01-08 Akim Demaille <akim@epita.fr>
17850
17851 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17852 New, stolen from the Fileutils 4.1.
17853 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17854 * configure.in: Check for the presence of memrchr, and of its
17855 prototype.
17856
a67cef01
TVH
178572002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17858
17859 * lib/hash.h (__P): Added definition for this macro.
17860 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17861 BUILT_SOURCES, to ensure they are generated first.
17862 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17863 %error-verbose to allow bootstrapping with bison 1.30x.
17864
2b25d624
AD
178652002-01-06 Akim Demaille <akim@epita.fr>
17866
17867 * src/reader.c (parse_braces): Don't fetch the next char, the
17868 convention is to fetch on entry.
17869 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17870 'switch' without a following semicolon.
17871 * tests/regression.at (braces parsing): New.
17872
3460813b
AD
178732002-01-06 Akim Demaille <akim@epita.fr>
17874
17875 Bison is dead wrong in its RR conflict reports.
17876
17877 * tests/torture.at (GNU Cim Grammar): New.
17878 * src/conflicts.c (count_rr_conflicts): Fix.
17879
73784c64
AD
178802002-01-06 Akim Demaille <akim@epita.fr>
17881
17882 Creating package.m4 from configure.ac causes too many problems.
17883
17884 * tests/Makefile.am (package.m4): Create it by hand,
17885 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17886
25d81090
AD
178872002-01-06 Akim Demaille <akim@epita.fr>
17888
17889 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17890 skeleton.h.
17891
a9b8959e
PE
178922002-01-04 Paul Eggert <eggert@twinsun.com>
17893
17894 * doc/bison.texinfo (Debugging):
17895 Remove YYSTDERR; it's no longer defined or used.
17896 Also, s/cstdio.h/cstdio/.
17897
25d81090
AD
178982002-01-03 Akim Demaille <akim@epita.fr>
17899
17900 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17901
1109455c
AD
179022002-01-03 Akim Demaille <akim@epita.fr>
17903
17904 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17905 tracing code to --trace, wait for a better --trace option, with
17906 args.
17907
7ea5e977
AD
179082002-01-03 Akim Demaille <akim@epita.fr>
17909
17910 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17911 The ISO C++ standard is extremely clear about it: stderr is
17912 considered a macro, not a regular symbol (see table 94 `Header
17913 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17914 Therefore std:: does not apply to it. It still does with fprintf.
17915 Also, s/cstdio.h/cstdio/.
17916
fab5b110
AD
179172002-01-03 Akim Demaille <akim@epita.fr>
17918
17919 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17920 for non system headers.
17921
aed7fd9b
AD
179222002-01-02 Akim Demaille <akim@epita.fr>
17923
17924 Equip the skeleton chain with location tracking, runtime trace,
17925 pure parser and scanner.
17926
17927 * src/parse-skel.y: Request a pure parser, locations, and prefix
17928 renaming.
17929 (%union): Having several members with the same type does not help
17930 type mismatches, simplify.
17931 (YYPRINT, yyprint): New.
17932 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17933 (skel_error): this.
17934 Handle locations.
17935 * src/scan-skel.l: Adjust to these changes.
17936 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17937 (LOCATION_PRINT, skel_control_t): New.
17938
24fad99e
AD
179392001-12-30 Akim Demaille <akim@epita.fr>
17940
17941 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17942 replace `gb' with BLANKS.
17943 * src/scan-skel.l: Adjust.
17944
a4b36db4
AD
179452001-12-30 Akim Demaille <akim@epita.fr>
17946
17947 * src/system.h: We don't need nor want bcopy.
17948 Throw away MS-DOS crap: we don't need getpid.
17949 * configure.in: We don't need strndup. It was even causing
17950 problems: because Flex includes the headers *before* us,
17951 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17952 not visible.
17953 * lib/xstrndup.c: New.
17954 * src/scan-skel.l: Use it.
17955 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17956 * src/parse-skel.y: Use %directives instead of #defines.
17957
1239777d
AD
179582001-12-30 Akim Demaille <akim@epita.fr>
17959
17960 * src/skeleton.h: New.
17961 * src/output.c (output_parser, output_master_parser): Remove, dead
17962 code.
17963 * src/output.h (get_lines_number, actions_output, guards_output)
17964 (token_definitions_output): Prototype them.
17965 * src/parse-skel.y: Add the license notice.
17966 Include output.h and skeleton.h.
17967 (process_skeleton): Returns void, and takes a single parameter.
17968 * src/scan-skel.l: Add the license notice.
17969 Include skeleton.h.
17970 Don't use %option yylineno: it seems that then Flex imagines
17971 REJECT has been used, and therefore it won't reallocate its
17972 buffers (which makes no other sense to me than a bug). It results
17973 in warnings for `unused: yy_flex_realloc'.
17974
9b3add5b
RA
179752001-12-30 Robert Anisko <robert.anisko@epita.fr>
17976
17977 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17978 (MUSCLE_INSERT_PREFIX): ...to there.
17979 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17980 (MUSCLE_INSERT_PREFIX): Move from here...
17981
17982 * src/bison.hairy: Add a section directive. Put braces around muscle
17983 names. This parser skeleton is still broken, but Bison should not
17984 choke on a bad muscle 'syntax'.
17985 * src/bison.simple: Add a section directive. Put braces around muscle
17986 names.
17987
17988 * src/files.h (strsuffix, stringappend): Add declarations.
17989 (tab_extension): Add declaration.
17990 (short_base_name): Add declaration.
17991
17992 * src/files.c (strsuffix, stringappend): No longer static. These
17993 functions are used in the skeleton parser.
17994 (tab_extension): New.
17995 (compute_base_names): Use the computations done in this function
fab5b110 17996 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
17997 names.
17998 (short_base_name): No longer static.
17999
18000 * src/output.c (output_skeleton): New.
18001 (output): Disable call to output_master_parser, and give a try to
18002 a new skeleton handling system.
18003 (guards_output, actions_output): No longer static.
18004 (token_definitions_output, get_lines_number): No longer static.
18005
18006 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
18007
fab5b110 18008 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
18009 parse-skel.y.
18010
18011 * src/parse-skel.y: New file.
18012 * src/scan-skel.l: New file.
18013
b5b61c61
AD
180142001-12-29 Akim Demaille <akim@epita.fr>
18015
18016 %name-prefix is broken.
18017
18018 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
18019 Adjust all dependencies.
18020 * tests/headers.at (export YYLTYPE): Strengthen this test: use
18021 %name-prefix.
18022
18023 Renaming yylval but not yylloc is not consistent. Now we do.
18024
18025 * src/bison.simple: Prefix yylloc if used.
18026 * doc/bison.texinfo (Decl Summary): Document that.
18027
8c9a50be
AD
180282001-12-29 Akim Demaille <akim@epita.fr>
18029
18030 * doc/bison.texinfo: Promote `%long-directive' over
18031 `%long_directive'.
18032 Remove all references to fixed-output-files, yacc is enough.
18033
d99361e6
AD
180342001-12-29 Akim Demaille <akim@epita.fr>
18035
18036 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
18037 user prologue. These are defaults.
18038 * tests/actions.at (Mid-rule actions): Make sure the user can
18039 define YYDEBUG and YYERROR_VERBOSE.
18040
b9cecb91
AD
180412001-12-29 Akim Demaille <akim@epita.fr>
18042
18043 * src/output.c (header_output): Don't forget to export YYLTYPE and
18044 yylloc.
18045 * tests/headers.at (export YYLTYPE): New, make sure it does.
18046 * tests/regression.at (%union and --defines, Invalid CPP headers):
18047 Move to...
18048 * tests/headers.at: here.
18049
aea13e97
AD
180502001-12-29 Akim Demaille <akim@epita.fr>
18051
18052 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18053
931394cb
AD
180542001-12-29 Akim Demaille <akim@epita.fr>
18055
18056 * tests/actions.at (Mid-rule actions): Output on a single line
18057 instead of several.
18058
704a47c4
AD
180592001-12-29 Akim Demaille <akim@epita.fr>
18060
18061 * doc/bison.texinfo: Formatting changes.
18062
091e20bb
AD
180632001-12-29 Akim Demaille <akim@epita.fr>
18064
18065 Don't store the token defs in a muscle, just be ready to output it
18066 on command. Now possible via `symbols'. Fixes a memory leak.
18067
18068 * src/output.c (token_definitions_output): New.
18069 (output_parser, header_output): Use it.
18070 * src/reader.c (symbols_save): Remove.
18071
cce71710
AD
180722001-12-29 Akim Demaille <akim@epita.fr>
18073
18074 * src/bison.simple: Do not provide a default for YYSTYPE and
18075 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18076 default.
18077
82c035a8
AD
180782001-12-29 Akim Demaille <akim@epita.fr>
18079
18080 Mid-rule actions are simply... ignored!
18081
18082 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18083 the empty-rule associated to the dummy symbol, not to the host
18084 rule.
18085 * tests/actions.at (Mid-rule actions): New.
18086
8419d367
AD
180872001-12-29 Akim Demaille <akim@epita.fr>
18088
18089 Memory leak.
18090
18091 * src/reader.c (reader): Free grammar.
18092
375d5806
AD
180932001-12-29 Akim Demaille <akim@epita.fr>
18094
18095 Memory leak.
18096
18097 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18098 since it allocates it for each state, although only one is needed.
18099 (allocate_storage): Do it here.
18100
f51cb8ff
AD
181012001-12-29 Akim Demaille <akim@epita.fr>
18102
18103 * src/options.h, src/options.c (create_long_option_table): Rename
18104 as...
18105 (long_option_table_new): this, with a clearer prototype.
18106 (percent_table): Remove, unused,
18107 * src/getargs.c (getargs): Adjust.
18108
29e88316
AD
181092001-12-29 Akim Demaille <akim@epita.fr>
18110
18111 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18112 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18113 as states.
18114
b9f71f19
AD
181152001-12-29 Akim Demaille <akim@epita.fr>
18116
18117 * src/lalr.c (build_relations): Rename `states' as `states1'.
18118 Sorry, I don't understand exactly what it is, no better name...
18119
1a2b5d37
AD
181202001-12-29 Akim Demaille <akim@epita.fr>
18121
18122 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18123 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18124 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18125 as rules.
18126
1cca533e
AD
181272001-12-29 Akim Demaille <akim@epita.fr>
18128
18129 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18130 ago.
18131
c03ae966
AD
181322001-12-29 Akim Demaille <akim@epita.fr>
18133
18134 * src/reader.c, src/reader.h (user_toknums): Remove.
18135 Adjust all users to use symbols[i]->user_token_number.
18136
5a670b1e
AD
181372001-12-29 Akim Demaille <akim@epita.fr>
18138
18139 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18140 Adjust all users to use symbols[i]->prec or ->assoc.
18141
ad949da9
AD
181422001-12-29 Akim Demaille <akim@epita.fr>
18143
18144 * src/reader.c, src/reader.h (tags): Remove.
18145 Adjust all users to use symbols[i]->tag.
18146
0e78e603
AD
181472001-12-29 Akim Demaille <akim@epita.fr>
18148
18149 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18150 and rule_table.
18151 * src/reader.c (packsymbols): Fill this table.
18152 Drop sprec.
18153 * src/conflicts.c (resolve_sr_conflict): Adjust.
18154 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18155 single table.
18156 Use symbols[i]->tag instead of tags[i].
18157
213e640e
AD
181582001-12-29 Akim Demaille <akim@epita.fr>
18159
18160 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18161 In addition, put a comment in there, to replace...
18162 * tests/regression.at (%union and C comments): Remove.
18163
e7b8bef1
AD
181642001-12-29 Akim Demaille <akim@epita.fr>
18165
18166 * tests/regression.at (Web2c Actions): Blindly move the actual
18167 output as expected output. The contents *seem* right to me, but I
18168 can't pretend reading perfectly parser tables... Nonetheless, all
18169 the other tests pass correctly, the table look OK, even though the
18170 presence of `$axiom' is to be noted: AFAICS it is useless (but
18171 harmless).
18172
b68e7744
AD
181732001-12-29 Akim Demaille <akim@epita.fr>
18174
18175 * src/reader.c (readgram): Don't add the rule 0 if there were no
18176 rules read. In other words, add it _after_ having performed
18177 grammar sanity checks.
18178 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18179
78d5bae9
AD
181802001-12-29 Akim Demaille <akim@epita.fr>
18181
18182 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18183 visible, and some states have now a different number.
18184
ff442794
AD
181852001-12-29 Akim Demaille <akim@epita.fr>
18186
18187 * src/reader.c (readgram): Bind the initial rule's lineno to that
18188 of the first rule.
18189 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18190 (Solved SR Conflicts): Adjust rule 0's line number.
18191
610ab194
AD
181922001-12-29 Akim Demaille <akim@epita.fr>
18193
18194 Fix the `GAWK Grammar' failure.
18195
18196 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18197 the reductions of the first state which was mistakenly confused
18198 with the final state because precisely final_state was initialized
18199 to 0.
18200 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18201 now noticed by Bison.
18202 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18203 have a reduction on $default.
18204
29d29c8f
AD
182052001-12-29 Akim Demaille <akim@epita.fr>
18206
18207 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18208 rule line numbers.
18209 * src/closure.c (print_closure): Likewise.
18210 * src/derives.c (print_derives): Likewise.
18211 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18212 now.
18213
7c6b64d0
AD
182142001-12-29 Akim Demaille <akim@epita.fr>
18215
18216 * src/lalr.c (lookaheads_print): New.
18217 (lalr): Call it when --trace-flag.
18218 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18219 are dumped.
18220
3d4daee3
AD
182212001-12-29 Akim Demaille <akim@epita.fr>
18222
18223 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18224 when walking through ritem, even via rule->rhs.
18225 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18226 (useful_production, useless_nonterminals): Likewise.
18227 (reduce_grammar_tables): Likewise, plus update nritems.
18228 * src/nullable.c (set_nullable): Likewise.
18229 * src/lalr.c (build_relations): Likewise.
18230 * tests/sets.at (Nullable): Adjust.
18231 Fortunately, now, the $axiom is no longer nullable.
18232
9e7f6bbd
AD
182332001-12-29 Akim Demaille <akim@epita.fr>
18234
18235 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18236 the 0-sentinel.
18237 * src/gram.c (ritem_longest_rhs): Likewise.
18238 * src/reduce.c (nonterminals_reduce): Likewise.
18239 * src/print_graph.c (print_graph): Likewise.
18240 * src/output.c (output_rule_data): Likewise.
18241 * src/nullable.c (set_nullable): Likewise.
18242
255ef638
AD
182432001-12-29 Akim Demaille <akim@epita.fr>
18244
18245 * src/output.c: Comment changes.
18246
0d8a7363
AD
182472001-12-27 Paul Eggert <eggert@twinsun.com>
18248
18249 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18250 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18251 Sparc, as they were causing more porting problems than the
18252 (minor) performance improvement was worth.
18253
18254 Also, catch up with 1.31's YYSTD.
18255
3db472b9
AD
182562001-12-27 Akim Demaille <akim@epita.fr>
18257
18258 * src/output.c (output_gram): Rely on nritems, not the
18259 0-sentinel. See below.
18260 Use -1 as separator, not 0.
18261 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18262 Rely on -1 as separator in yyrhs, instead of 0.
18263 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18264 twice `Now at end of input', therefore there are two lines less to
18265 expect.
18266
b365aa05
AD
182672001-12-27 Akim Demaille <akim@epita.fr>
18268
18269 * tests/regression.at (Unresolved SR Conflicts):
18270 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18271 below.
18272
30171f79
AD
182732001-12-27 Akim Demaille <akim@epita.fr>
18274
18275 * src/LR0.c (new_state): Recognize the final state by the fact it
18276 is reached by eoftoken.
18277 (insert_start_shifting_state, insert_eof_shifting_state)
18278 (insert_accepting_state, augment_automaton): Remove, since now
18279 these states are automatically computed from the initial state.
18280 (generate_states): Adjust.
18281 * src/print.c: When reporting a rule number to the user, substract
18282 1, so that the axiom rule is rule 0, and the first user rule is 1.
18283 * src/reduce.c: Likewise.
18284 * src/print_graph.c (print_core): For the time being, just as for
18285 the report, depend upon --trace-flags to dump the full set of
18286 items.
18287 * src/reader.c (readgram): Once the grammar read, insert the rule
18288 0: `$axiom: START-SYMBOL $'.
18289 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18290 number of the states has changed (the final state is no longer
18291 necessarily the last), catch up.
18292
75142d45
AD
182932001-12-27 Akim Demaille <akim@epita.fr>
18294
18295 Try to make the use of the eoftoken valid. Given that its value
18296 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18297 is used instead of > 0 where appropriate, (ii), depend upon nritems
18298 instead of the 0-sentinel.
18299
18300 * src/gram.h, src/gram.c (nritems): New.
18301 Expected to be duplication of nitems, but for the time being...
18302 * src/reader.c (packgram): Assert nritems and nitems are equal.
18303 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18304 * src/closure.c (print_closure, print_fderives): Likewise.
18305 * src/gram.c (ritem_print): Likewise.
18306 * src/print.c (print_core, print_grammar): Likewise.
18307 * src/print_graph.c: Likewise.
18308
b7c49edf
AD
183092001-12-27 Akim Demaille <akim@epita.fr>
18310
18311 * src/main.c (main): If there are complains after grammar
18312 reductions, then output the report anyway if requested, then die.
18313 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18314 * src/reader.c (eoftoken): New.
18315 (parse_token_decl): If the token being defined has value `0', it
18316 is the eoftoken.
18317 (packsymbols): No longer hack `tags' to insert `$' by hand.
18318 Be sure to preserve the value of the eoftoken.
18319 (reader): Make sure eoftoken is defined.
18320 Initialize nsyms to 0: now eoftoken is created just like the others.
18321 * src/print.c (print_grammar): Don't special case the eof token.
18322 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18323 lie anyway, albeit pleasant.
18324 * tests/calc.at: Exercise error messages with eoftoken.
18325 Change the grammar so that empty input is invalid.
18326 Adjust expectations.
18327 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18328
ec2da99f
AD
183292001-12-27 Akim Demaille <akim@epita.fr>
18330
18331 * configure.in: Check the protos of strchr ans strspn.
18332 Replace strchr if needed.
18333 * src/system.h: Provide the protos of strchr, strspn and memchr if
18334 missing.
18335 * lib/strchr.c: New.
18336 * src/reader.c (symbols_save): Use strchr.
18337
8adfa272
AD
183382001-12-27 Akim Demaille <akim@epita.fr>
18339
18340 * src/print.c, src/print_graph.c (escape): New.
18341 Use it to quote the TAGS outputs.
18342 * src/print_graph.c (print_state): Now errors are in red, and
18343 reductions in green.
18344 Prefer high to wide: output the state number on a line of its own.
18345
80dac38c
AD
183462001-12-27 Akim Demaille <akim@epita.fr>
18347
18348 * src/state.h, src/state.c (reductions_new): New.
18349 * src/LR0.c (set_state_table): Let all the states have a
18350 `reductions', even if reduced to 0.
18351 (save_reductions): Adjust.
18352 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18353 * src/print.c (print_reductions, print_actions): Adjust.
18354 * src/output.c (action_row): Adjust.
18355
2cec70b9
AD
183562001-12-27 Akim Demaille <akim@epita.fr>
18357
18358 * src/state.h, src/state.c (errs_new, errs_dup): New.
18359 * src/LR0.c (set_state_table): Let all the states have an errs,
18360 even if reduced to 0.
18361 * src/print.c (print_errs, print_reductions): Adjust.
18362 * src/output.c (output_actions, action_row): Adjust.
18363 * src/conflicts.c (resolve_sr_conflict): Adjust.
18364
13ca549a
AD
183652001-12-27 Akim Demaille <akim@epita.fr>
18366
18367 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18368
5092aba5
AD
183692001-12-27 Akim Demaille <akim@epita.fr>
18370
18371 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18372 * src/print.c: here.
18373 (lookaheadset, shiftset): New, used as additional storage by
18374 print_reductions.
18375 (print_results): Adjust.
18376 (print_shifts, print_gotos, print_errs): New, extracted from...
18377 (print_actions): here.
18378 * src/print_graph.c (print_actions): Remove dead code.
18379
11e2beca
AD
183802001-12-27 Akim Demaille <akim@epita.fr>
18381
18382 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18383 `$n' and `@n'.
18384
dac3c910
AD
183852001-12-27 Akim Demaille <akim@epita.fr>
18386
18387 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18388 (build_relations): Adjust.
18389
d0b0fefa
AD
183902001-12-27 Akim Demaille <akim@epita.fr>
18391
18392 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18393 duplication.
18394
adc8c848
AD
183952001-12-27 Akim Demaille <akim@epita.fr>
18396
18397 * src/reader.c (packgram): Catch nitems overflows.
18398
14d293ac
AD
183992001-12-27 Akim Demaille <akim@epita.fr>
18400
18401 * src/files.c, src/files.h (guard_obstack): Remove.
18402 * src/output.c (output): Adjust.
18403 * src/reader.c (parse_braces): New, factoring...
18404 (copy_action, copy_guard): these two which are renamed as...
18405 (parse_action, parse_guard): these.
18406 As a voluntary consequence, using braces around guards is now
18407 mandatory.
18408
f499b062
AD
184092001-12-27 Akim Demaille <akim@epita.fr>
18410
18411 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18412 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18413 members.
18414 (symbol_list_new): Adjust.
18415 (copy_action): action_line is the first line, not the last.
18416 (copy_guard): Just as for actions, store the `action' only, not
18417 the switch/case/break flesh.
18418 Don't parse the user action that might follow the guard, let...
18419 (readgram): do it, i.e., now, there can be an action after a
18420 guard.
18421 In other words the guard is just explicitly optional.
18422 (packgram): Adjust.
18423 * src/output.c (guards_output): New.
18424 (output_parser): Call it when needed.
18425 (output): Also free the guard and attrs obstacks.
18426 * src/files.c, src/files.h (obstack_save): Remove.
18427 (output_files): Remove.
18428 As a result, if one needs the former `.act' file, using an
18429 appropriate skeleton which requires actions and guards is now
18430 required.
18431 * src/main.c (main): Adjust.
18432 * tests/semantic.at: New.
18433 * tests/regression.at: Use `input.y' as input file name.
18434 Avoid 8+3 problems by requiring input.c when the test needs the
18435 parser.
18436
d945f5cd
AD
184372001-12-27 Akim Demaille <akim@epita.fr>
18438
18439 * src/reader.c (symbol_list_new): Be sure to initialize all the
18440 fields.
18441
d200e455
AD
184422001-12-27 Akim Demaille <akim@epita.fr>
18443
18444 All the hacks using a final pseudo state are now useless.
18445
18446 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18447 * src/lalr.c (nLA): New.
18448 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18449 instead of lookaheadsp from the pseudo state (nstate + 1).
18450
f9507c28
AD
184512001-12-27 Akim Demaille <akim@epita.fr>
18452
18453 * src/output.c (action_row, token_actions): Use a state_t instead
18454 of a integer, and nlookaheads instead of the following state's
18455 lookaheadsp.
18456
065fbd27
AD
184572001-12-27 Akim Demaille <akim@epita.fr>
18458
18459 * src/conflicts.c (log_resolution, flush_shift)
18460 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18461 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18462 (conflicts_print, print_reductions): Use a state_t instead of an
18463 integer when referring to a state.
18464 As much as possible, depend upon nlookaheads, instead of the
18465 `lookaheadsp' member of the following state (since lookaheads of
18466 successive states are successive, the difference between state n + 1
18467 and n served as the number of lookaheads for state n).
18468 * src/lalr.c (add_lookback_edge): Likewise.
18469 * src/print.c (print_core, print_actions, print_state)
18470 (print_results): Likewise.
18471 * src/print_graph.c (print_core, print_actions, print_state)
18472 (print_graph): Likewise.
18473 * src/conflicts.h: Adjust.
18474
1b177bd7
AD
184752001-12-27 Akim Demaille <akim@epita.fr>
18476
18477 * src/bison.hairy: Formatting/comment changes.
18478 ANSIfy.
18479 Remove `register' indications.
18480 Add plenty of `static'.
18481
7742ddeb
AD
184822001-12-27 Akim Demaille <akim@epita.fr>
18483
18484 * src/output.c (prepare): Drop the muscle `ntbase' which
18485 duplicates ntokens.
18486 * src/bison.simple: Formatting/comment changes.
18487 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18488 is an undocumented synonym.
18489
1fa14068
AD
184902001-12-22 Akim Demaille <akim@epita.fr>
18491
18492 * src/output.c (output_table_data): Change the prototype to use
18493 `int' for array ranges: some invocations do pass an int, not a
18494 short.
18495 Reported by Wayne Green.
18496
b9752825
AD
184972001-12-22 Akim Demaille <akim@epita.fr>
18498
18499 Some actions of web2c.y are improperly triggered.
18500 Reported by Mike Castle.
18501
18502 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18503 * tests/regression.at (Web2c): Rename as...
18504 (Web2c Report): this.
18505 (Web2c Actions): New.
18506
776209d6
AD
185072001-12-22 Akim Demaille <akim@epita.fr>
18508
18509 Reductions in web2c.y are improperly reported.
18510 Reported by Mike Castle.
18511
18512 * src/conflicts.c (print_reductions): Fix.
18513 * tests/regression.at (Web2c): New.
18514
275fc3ad
AD
185152001-12-18 Akim Demaille <akim@epita.fr>
18516
18517 Some host fail on `assert (!"foo")', which expands to
18518 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18519 Reported by Nelson Beebee.
18520
18521 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18522 `#define it_succeeded 0' and `assert (it_succeeded)'.
18523
897668ee
MA
185242001-12-17 Marc Autret <autret_m@epita.fr>
18525
18526 * src/bison.simple: Don't hard code the skeleton line and filename.
18527 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18528 New line counter 'skeleton_line' (skeleton-line muscle).
18529
ab3399e0
PE
185302001-12-17 Paul Eggert <eggert@twinsun.com>
18531
18532 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18533 YYDEBUG must be defined to a nonzero value.
18534
18535 * src/bison.simple (yytname): Do not assume that the user defines
18536 YYDEBUG to a properly parenthesized expression.
18537
3877f72b
AD
185382001-12-17 Akim Demaille <akim@epita.fr>
18539
18540 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18541 nlookaheads is a new member.
18542 Adjust all users.
18543 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18544 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18545 state.
776209d6 18546
331dbc1b
AD
185472001-12-17 Akim Demaille <akim@epita.fr>
18548
18549 * src/files.h, src/files.c (open_files, close_files): Remove.
18550 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18551 let...
18552 * src/reader.c (reader): Do it.
776209d6 18553
be750e4c
AD
185542001-12-17 Akim Demaille <akim@epita.fr>
18555
18556 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 18557
709ae8c6
AD
185582001-12-17 Akim Demaille <akim@epita.fr>
18559
18560 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18561 (flush_reduce): New.
18562 (resolve_sr_conflict): Adjust.
776209d6 18563
f87685c3
AD
185642001-12-17 Akim Demaille <akim@epita.fr>
18565
18566 * src/output.c (output_obstack): Be static and rename as...
18567 (format_obstack): this, to avoid any confusion with files.c's
18568 output_obstack.
18569 * src/reader.h (muscle_obstack): Move to...
18570 * src/output.h: here, since it's defined in output.c.
18571
837491d8
AD
185722001-12-17 Akim Demaille <akim@epita.fr>
18573
18574 * src/output.c (action_row, save_column, default_goto)
18575 (sort_actions, matching_state, pack_vector): Better variable
18576 locality.
18577
796d61fb
AD
185782001-12-17 Akim Demaille <akim@epita.fr>
18579
18580 * src/output.c: Various formatting changes.
776209d6 18581
64d15509
AD
185822001-12-17 Akim Demaille <akim@epita.fr>
18583
18584 * src/files.c (output_files): Free the output_obstack.
18585 * src/main.c (main): Call print and print_graph conditionally.
18586 * src/print.c (print): Work unconditionally.
18587 * src/print_graph.c (print_graph): Work unconditionally.
18588 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18589
fbc8ecb7
MA
185902001-12-16 Marc Autret <autret_m@epita.fr>
18591
18592 * src/output.c (actions_output): Fix. When we use %no-lines,
18593 there is one less line per action.
18594
f0440388
MA
185952001-12-16 Marc Autret <autret_m@epita.fr>
18596
18597 * src/bison.simple: Remove a useless #line directive.
18598 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18599 * src/output.c (get_lines_number): New.
776209d6 18600 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
18601 output muscles.
18602 Fix line numbering.
18603 (actions_output): Computes the number of lines taken by actions.
18604 (output_master_parser): Insert new skeleton which is the name of
18605 the output parser file name.
18606
a79986b8
MA
186072001-12-15 Marc Autret <autret_m@epita.fr>
18608
18609 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18610
4ec8e00f
MA
186112001-12-15 Marc Autret <autret_m@epita.fr>
18612
18613 * src/output.c (output_gram): Keep track of the hairy one.
18614
1a4648ff
AD
186152001-12-15 Akim Demaille <akim@epita.fr>
18616
18617 Make `make distcheck' work.
18618
18619 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18620 system.h which uses libgettext.h.
18621
9c2c67e6
AD
186222001-12-15 Akim Demaille <akim@epita.fr>
18623
18624 * src/nullable.c (set_nullable): Useless rules must be skipped,
18625 otherwise, since we range over their symbols, we might look at a
18626 nonterminal which no longer ``exists'', i.e., it is not counted in
18627 `nvars', hence we overflow our arrays.
18628
93ede233
AD
186292001-12-15 Akim Demaille <akim@epita.fr>
18630
18631 The header can also be produced directly, without any obstack!
18632 Yahoo!
18633
18634 * src/files.c, src/files.h (defines_obstack): Remove.
18635 (compute_header_macro): Global.
18636 (defines_obstack_save): Remove.
18637 * src/reader.c (parse_union_decl): No longer output to
18638 defines_obstack: its content can be found in the `stype' muscle
18639 anyway.
18640 (output_token_translations): Merge into...
18641 (symbols_output): this.
18642 Rename as...
18643 (symbols_save): this.
18644 (reader): Adjust.
18645 * src/output.c (header_output): New.
18646 (output): Call it.
18647
2666f928
AD
186482001-12-15 Akim Demaille <akim@epita.fr>
18649
18650 * src/reader.c (parse_union_decl): Instead of handling two obstack
18651 simultaneously, use one to define the `stype' muscle, and use the
18652 value of the latter to fill defines_obstack.
18653 (copy_comment): Remove.
18654 (copy_comment2): Work for a single obstack.
18655 Rename as...
18656 (copy_comment): this.
18657
428046f8
AD
186582001-12-15 Akim Demaille <akim@epita.fr>
18659
18660 * src/lex.c, src/lex.h (xgetc): No longer static.
18661 * src/reader.c (parse_union_decl): Revamp.
18662
ea52d706
AD
186632001-12-15 Akim Demaille <akim@epita.fr>
18664
18665 Still making progress in separating Bison into (i) input, (ii)
18666 process, (iii) output: now we can directly output the parser file
18667 without using table_obstack at all.
18668
18669 * src/files.c, src/files.h (table_obstack): Bye bye.
18670 (parser_file_name): New.
18671 * src/files.c (compute_output_file_names): Compute it.
18672 * src/output.c (actions_output, output_parser)
18673 (output_master_parser): To a file instead of an obstack.
18674
3f96f4dc
AD
186752001-12-15 Akim Demaille <akim@epita.fr>
18676
18677 Attach actions to rules, instead of pre-outputting them to
18678 actions_obstack.
18679
18680 * src/gram.h (rule_t): action and action_line are new members.
18681 * src/reader.c (symbol_list): Likewise.
18682 (copy_action): Save the actions within the rule.
18683 (packgram): Save them in rule_table.
18684 * src/output.c (actions_output): New.
18685 (output_parser): Use it on `%%actions'.
18686 (output_rule_data): Don't free rule_table.
18687 (output): Do it.
18688 (prepare): Don't save the `action' muscle.
18689 * src/bison.simple: s/%%action/%%actions/.
18690
51576fb3
AD
186912001-12-15 Akim Demaille <akim@epita.fr>
18692
18693 * src/reader.c (copy_action): When --yacc, don't append a `;'
18694 to the user action: let it fail if lacking.
dee049eb 18695 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 18696
2648a72d
AD
186972001-12-14 Akim Demaille <akim@epita.fr>
18698
18699 * src/lex.c (literalchar): Simply return the char you decoded, non
18700 longer mess around with obstacks and int pointers.
18701 Adjust all callers.
18702
92790e5b
AD
187032001-12-14 Akim Demaille <akim@epita.fr>
18704
18705 * src/lex.c (literalchar): Don't escape the special characters,
18706 just decode them, and keep them as char (before, eol was output as
18707 the 2 char string `\n' etc.).
18708 * src/output.c (output_rule_data): Use quotearg to output the
18709 token strings.
18710
927c1557
PE
187112001-12-13 Paul Eggert <eggert@twinsun.com>
18712
18713 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18714 Do not infringe on the global user namespace when using C++.
18715 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18716 All uses of `fprintf' and `stderr' changed.
18717
18718 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18719
ed8e1f68
AD
187202001-12-13 Akim Demaille <akim@epita.fr>
18721
18722 The computation of nullable is broken: it doesn't handle empty
18723 RHS's properly.
18724
18725 * tests/torture.at (GNU AWK Grammar): New.
18726 * tests/sets.at (Nullable): New.
18727 * src/nullable.c (set_nullable): Instead of blindly looping over
18728 `ritems', loop over the rules, and then over their rhs's.
18729
18730 Work around Autotest bugs.
18731
18732 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18733 frame, because Autotest understand lines starting with a `+' as
18734 traces from the shell. Then, they are not processed properly.
18735 Admittedly an Autotest bug, but we don't have time to wait for
18736 Autotest to catch up.
18737 * tests/regression.at (Broken Closure): Adjust to the new table
18738 frames.
18739 Move to...
18740 * tests/sets.at: here.
18741
cb581495
AD
187422001-12-13 Akim Demaille <akim@epita.fr>
18743
18744 * src/closure.c (closure): Use nrules instead of playing tricks
18745 with BITS_PER_WORD.
18746
2e729273
AD
187472001-12-13 Akim Demaille <akim@epita.fr>
18748
18749 * src/print.c (print_actions): Output the handling of `$' as the
18750 traces do: shifting the token EOF. Before EOF was treated as a
18751 nonterminal.
18752 * tests/regression.at: Adjust some tests.
18753 * src/print_graph.c (print_core): Complete the set of items via
18754 closure. The next-to-final and final states are still unsatisfying,
18755 but that's to be addressed elsewhere.
18756 No longer output the rule numbers, but do output the state number.
18757 A single loop for the shifts + gotos is enough, but picked a
18758 distinct color for each.
18759 (print_graph): Initialize and finalize closure.
18760
107f7dfb
AD
187612001-12-13 Akim Demaille <akim@epita.fr>
18762
18763 * src/reader.c (readgram): Remove dead code, an strip useless
18764 braces.
18765 (get_type): Remove, unused.
18766
9b53a24f
AD
187672001-12-12 Akim Demaille <akim@epita.fr>
18768
18769 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18770 on that of lib/error.c.
18771
dbfb6dcd
AD
187722001-12-12 Akim Demaille <akim@epita.fr>
18773
18774 Some hosts don't like `/' in includes.
18775
18776 * src/system.h: Include libgettext.h without qualifying the path.
18777 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18778 $(top_srcdir).
18779
c25fb648
MA
187802001-12-11 Marc Autret <autret_m@epita.fr>
18781
18782 * src/output.c (output_parser): Remove useless muscle.
18783
710ddc4f
MA
187842001-12-11 Marc Autret <autret_m@epita.fr>
18785
18786 * src/bison.simple: Remove #line just before %%epilogue. It
18787 is now handled in ...
18788 * src/reader.c (read_additionnal_code): Add the output of a
18789 #line for the epilogue.
18790
e83d80b8
MA
187912001-12-10 Marc Autret <autret_m@epita.fr>
18792
927c1557 18793 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
18794 replace precedent remove.
18795 * src/bison.simple: Remove #line before %%prologue because
18796 %%input-line is wrong at this time.
18797
971d5158
MA
187982001-12-10 Marc Autret <autret_m@epita.fr>
18799
18800 * src/reader.c (symbols_output): Clean up.
927c1557 18801 * src/output.c (output_gram, output): Clean up.
971d5158 18802
5edafffd
AD
188032001-12-10 Akim Demaille <akim@epita.fr>
18804
18805 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18806 * src/LR0.c (set_state_table): here.
18807 * src/lalr.c (lalr): Call it.
18808
0279f8e9
AD
188092001-12-10 Akim Demaille <akim@epita.fr>
18810
18811 * src/state.h (shifts): Remove the `number' member: shifts are
18812 attached to state, hence no longer need to be labelled with a
18813 state number.
18814
190c4f5f
AD
188152001-12-10 Akim Demaille <akim@epita.fr>
18816
18817 Now that states have a complete set of members, the linked list of
18818 shifts is useless: just fill directly the state's shifts member.
18819
18820 * src/state.h (shifts): Remove the `next' member.
18821 * src/LR0.c (first_state, last_state): Remove.
18822 Adjust the callers.
18823 (augment_automaton): Don't look for the shifts that must be added
18824 a shift on EOF: it is those of the state we looked for! But now,
18825 since shifts are attached, it is no longer needed to looking
18826 merely by its id: its number.
18827
2a73b93d
AD
188282001-12-10 Akim Demaille <akim@epita.fr>
18829
18830 * src/LR0.c (augment_automaton): Better variable locality.
18831 Remove an impossible branch: if there is a state corresponding to
18832 the start symbol being shifted, then there is shift for the start
18833 symbol from the initial state.
18834
74392f6a
AD
188352001-12-10 Akim Demaille <akim@epita.fr>
18836
18837 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18838 only when appropriate: when insert_start_shifting_state' is not
18839 invoked.
18840 * tests/regression.at (Rule Line Numbers): Adjust.
18841
37c82725
AD
188422001-12-10 Akim Demaille <akim@epita.fr>
18843
18844 * src/LR0.c (augment_automaton): Now that all states have shifts,
18845 merge the two cases addition shifts to the initial state.
18846
6a164e0c
AD
188472001-12-10 Akim Demaille <akim@epita.fr>
18848
18849 * src/lalr.c (set_state_table): Move to...
18850 * src/LR0.c: here.
18851 * src/lalr.c (lalr): Don't call it...
18852 * src/LR0.c (generate_states): do it.
18853 * src/LR0.h (first_state): Remove, only the table is used.
18854
7215de24
AD
188552001-12-10 Akim Demaille <akim@epita.fr>
18856
18857 * src/LR0.h (first_shift, first_reduction): Remove.
18858 * src/lalr.c: Don't use first_shift: find shifts through the
18859 states.
18860
80e25d4d
AD
188612001-12-10 Akim Demaille <akim@epita.fr>
18862
18863 * src/LR0.c: Attach shifts to states as soon as they are
18864 computed.
18865 * src/lalr.c (set_state_table): Instead of assigning shifts to
18866 state, just assert that the mapping was properly done.
18867
0ab3728b
AD
188682001-12-10 Akim Demaille <akim@epita.fr>
18869
18870 * src/LR0.c (insert_start_shift): Rename as...
18871 (insert_start_shifting_state): this.
18872 (insert_eof_shifting_state, insert_accepting_state): New.
18873 (augment_automaton): Adjust.
18874 Better locality of the variables.
18875 When looking if the start_symbol is shifted from the initial
18876 state, using `while (... symbol != start_symbol ...)' sounds
18877 better than `while (... symbol < start_symbol ...)': If fail
18878 to see how the order between symbols could be relevant!
18879
78af9bbc
AD
188802001-12-10 Akim Demaille <akim@epita.fr>
18881
18882 * src/getargs.h: Don't declare `spec_name_prefix' and
18883 `spec_file_prefix', declared by src/files.h.
18884 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18885 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18886 * src/output.c (prepare): Adjust.
18887 * src/reader.c (symbols_output): Likewise.
18888 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18889
bdef2a41
AD
188902001-12-10 Akim Demaille <akim@epita.fr>
18891
18892 * src/muscle_tab.c (muscle_init): NULL is a better default than
18893 `"0"'.
18894
3735969c
AD
188952001-12-10 Akim Demaille <akim@epita.fr>
18896
18897 * src/reader.c (reader): Calling symbols_output once is enough.
18898
49701457
AD
188992001-12-10 Akim Demaille <akim@epita.fr>
18900
18901 Now that states have a complete set of members, the linked list of
18902 reductions is useless: just fill directly the state's reductions
18903 member.
18904
18905 * src/state.h (struct reductions): Remove member `number' and
18906 `next'.
18907 * src/LR0.c (first_reduction, last_reduction): Remove.
18908 (save_reductions): Don't link the new reductions, store them in
18909 this_state.
18910 * src/lalr.c (set_state_table): No need to attach reductions to
18911 states, it's already done.
18912 * src/output.c (output_actions): No longer free the shifts, then
18913 the reductions, then the states: free all the states and their
18914 members.
18915
0edad749
AD
189162001-12-10 Akim Demaille <akim@epita.fr>
18917
18918 * src/options.c (OPTN, DRTV, BOTH): New.
18919 (option_table): Use them.
18920
0edad749
AD
18921 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18922 the job of system.h.
18923 * src/options.c: Don't include stdio.h and xalloc.h for the same
18924 reasons.
18925
5449dd0f
AD
189262001-12-10 Akim Demaille <akim@epita.fr>
18927
18928 * src/output.c (output, prepare): Make sure the values of the
18929 muscles `action' and `prologue' are 0-terminated.
18930
a870c567
AD
189312001-12-10 Akim Demaille <akim@epita.fr>
18932
18933 Clean up GCC warnings.
18934
18935 * src/reader.c (copy_action): `buf' is not used.
18936 (parse_skel_decl): Be static.
18937 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18938 * src/options.h (create_long_option_table): Have a real prototype.
18939 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18940 (hash_delete_at): Return const void *.
18941 Adjust casts to preserve the const.
18942
80df8768
AD
189432001-12-10 Akim Demaille <akim@epita.fr>
18944
18945 * configure.in: Require 2.52g.
18946 M4 is not needed, but AUTOM4TE is.
18947 * m4/m4.m4: Remove.
18948 * tests/Makefile.am: Adjust.
18949
f693ad14
AD
189502001-12-10 Akim Demaille <akim@epita.fr>
18951
18952 One structure for states is enough, even though theoretically
18953 there are LR(0) states and LALR(1) states.
18954
18955 * src/lalr.h (state_t): Remove.
18956 (state_table): Be state_t **, not state_t *.
18957 * src/state.h (core, CORE_ALLOC): Rename as...
18958 (state_t, STATE_ALLOC): this.
18959 Add the LALR(1) members: shifts, reductions, errs.
18960 * src/LR0.c (state_table): Rename as...
18961 (state_hash): this, to avoid name clashes with the global
18962 `state_table'.
18963 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18964 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18965
74ffbcb6
AD
189662001-12-10 Akim Demaille <akim@epita.fr>
18967
18968 Bison dumps core on bash.y.
18969 Reported by Pascal Bart.
18970
18971 * src/warshall.c (bitmatrix_print): New.
18972 (TC): Use it.
ba0fe3c7 18973 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
18974 j must be the outer loop.
18975 * tests/regression.at (Broken Closure): New.
18976
07708e19
AD
189772001-12-05 Akim Demaille <akim@epita.fr>
18978
18979 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18980 its argument.
ba1ecc07 18981 Reported by Peter Hamorsky.
07708e19 18982
92b16366
AD
189832001-12-05 Akim Demaille <akim@epita.fr>
18984
18985 * src/conflicts.c (err_table): Remove.
18986 (resolve_sr_conflict): Adjust.
18987 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18988 Rename as...
18989 (state_t.reductions, state_t.shifts): this.
18990
076ab033
AD
189912001-12-05 Akim Demaille <akim@epita.fr>
18992
18993 * src/reduce.c (reduce_grammar_tables): No longer disable the
18994 removal of useless rules via CPP but via `if (0)', so that the
18995 compiler still check the code is valid.
18996 For instance, it should have noticed `rline' no longer exists: use
18997 the `line' member of rule_t.
18998 * src/gram.c (dummy, rline): Remove, unused.
18999
3843c413
AD
190002001-12-05 Akim Demaille <akim@epita.fr>
19001
19002 * src/output.c (pack_vector): Use assert, not berror.
19003 * src/main.c (berror): Remove, unused.
19004
43168960
AD
190052001-12-05 Akim Demaille <akim@epita.fr>
19006
19007 New experimental feature: if --verbose --trace output all the
19008 items of a state, not only its kernel.
19009
19010 * src/print.c (print_core): If `trace_flag', then invoke closure
19011 before outputting the items of the state (print_core is no longer
19012 a correct name them).
19013 (print_results): Invoke new_closure/free_closure if needed.
19014
b2872512
AD
190152001-12-05 Akim Demaille <akim@epita.fr>
19016
19017 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
19018 * src/closure.c, src/closure.h (itemsetsize): Rename as...
19019 (nitemset): for consistency with the rest of the project.
19020
23cbcc6c
AD
190212001-12-05 Akim Demaille <akim@epita.fr>
19022
19023 * src/closure.c (print_closure): Improve.
19024 (closure): Use it for printing input and output.
19025
03ec521c
AD
190262001-12-05 Akim Demaille <akim@epita.fr>
19027
19028 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
19029 indexed by nonterminals.
19030
3a7456dd
AD
190312001-12-05 Akim Demaille <akim@epita.fr>
19032
19033 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
19034 what it was!).
19035 * src/warshall.h: Remove accidental duplication of the content.
19036
1cbcf2e7
AD
190372001-12-05 Akim Demaille <akim@epita.fr>
19038
19039 * src/closure.c (set_fderives): De-obfuscate.
19040
84182270
AD
190412001-12-05 Akim Demaille <akim@epita.fr>
19042
19043 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
19044
3f6f053c
AD
190452001-12-05 Akim Demaille <akim@epita.fr>
19046
19047 * src/closure.c (set_firsts): De-obfuscate.
19048
7a5350ba
AD
190492001-12-05 Akim Demaille <akim@epita.fr>
19050
19051 * src/output.c (action_row): De-obfuscate
19052 using the good o' techniques: arrays not pointers, variable
19053 locality, BITISSET, RESETBIT etc.
19054
d954473d
AD
190552001-12-05 Akim Demaille <akim@epita.fr>
19056
19057 Pessimize the code to simplify it: from now on, all the states
19058 have a valid SHIFTS, which NSHIFTS is possibly 0.
19059
19060 * src/LR0.c (shifts_new): Be global and move to..
19061 * src/state.c, src/state.h: here.
19062 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19063 * src/print_graph: Adjust.
19064
9839bbe5
AD
190652001-12-05 Akim Demaille <akim@epita.fr>
19066
19067 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19068 * src/conflicts.c: Use it.
19069 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19070 incorrectly ``simplified''.
19071
9f136c07
AD
190722001-12-05 Akim Demaille <akim@epita.fr>
19073
19074 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19075 using the good o' techniques: arrays not pointers, variable
19076 locality, BITISSET, RESETBIT etc.
19077
b608206e
AD
190782001-12-05 Akim Demaille <akim@epita.fr>
19079
19080 * src/state.h (SHIFT_SYMBOL): New.
19081 * src/conflicts.c: Use it to deobfuscate.
19082
52afa962
AD
190832001-12-05 Akim Demaille <akim@epita.fr>
19084
19085 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19086 (print_reductions): De-obfuscate using the good o' techniques:
19087 arrays not pointers, variable locality, BITISSET.
19088
e74dc321
AD
190892001-12-05 Akim Demaille <akim@epita.fr>
19090
19091 * src/conflicts.c (print_reductions): Arrays, not pointers.
19092 Use BITISSET.
19093
768fca83
AD
190942001-12-05 Akim Demaille <akim@epita.fr>
19095
19096 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19097
a17e599f
AD
190982001-12-05 Akim Demaille <akim@epita.fr>
19099
19100 * src/conflicts.c (print_reductions): Improve variable locality.
19101
a04bc341
AD
191022001-12-05 Akim Demaille <akim@epita.fr>
19103
19104 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19105
c8ea038e
AD
191062001-12-05 Akim Demaille <akim@epita.fr>
19107
19108 * src/conflicts.c (print_reductions): Improve variable locality.
19109
aa2aab3c
AD
191102001-12-05 Akim Demaille <akim@epita.fr>
19111
19112 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19113 * src/lalr.c: Use them.
19114
b178c8cc
AD
191152001-12-05 Akim Demaille <akim@epita.fr>
19116
19117 * src/LR0.c (augment_automaton): Formatting changes.
19118 Better variable locality.
19119
f67d13aa
AD
191202001-12-05 Akim Demaille <akim@epita.fr>
19121
19122 * src/lalr.c (matrix_print): New.
19123 (transpose): Use it.
19124 Use arrays instead of pointers.
19125
c2713865
AD
191262001-12-05 Akim Demaille <akim@epita.fr>
19127
19128 * src/lalr.c (maxrhs): Move to...
19129 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19130 * src/lalr.c (build_relations): Adjust.
19131
9887c18a
AD
191322001-12-05 Akim Demaille <akim@epita.fr>
19133
19134 * src/lalr.c (transpose): Free the memory allocated to the
19135 argument, as it is replaced by the results by the unique caller.
19136 (build_relations): Merely invoke transpose: it handles the memory
19137 deallocation.
19138 Improve variable locality.
19139 Avoid variables used as mere abbreviations.
19140 (compute_lookaheads): Use arrays instead of pointers.
19141
4d4f699c
AD
191422001-12-05 Akim Demaille <akim@epita.fr>
19143
19144 * src/lalr.c (initialize_F): Improve variable locality.
19145 Avoid variables used as mere abbreviations.
19146
80a69750
AD
191472001-12-05 Akim Demaille <akim@epita.fr>
19148
19149 * src/derives.c (print_derives): Display the ruleno.
19150 * src/lalr.c (initialize_F, transpose): Better variable locality
19151 to improve readability.
19152 Avoid variables used as mere abbreviations.
19153
fe961097
AD
191542001-12-05 Akim Demaille <akim@epita.fr>
19155
19156 * src/lalr.c (traverse): Use arrays instead of pointers.
19157
e3e4e814
AD
191582001-12-05 Akim Demaille <akim@epita.fr>
19159
19160 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19161 the handling of squeue.
19162 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19163
630e182b
AD
191642001-12-05 Akim Demaille <akim@epita.fr>
19165
19166 Because useless nonterminals are now kept alive (instead of being
19167 `destroyed'), we now sometimes examine them, and store information
19168 related to them. Hence we need to know their number, and adjust
19169 memory allocations.
19170
19171 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19172 static.
19173 * src/LR0.c (allocate_itemsets): The memory allocated to
19174 `symbol_count' was used for two different purpose: once to count
19175 the number of occurrences of each symbol, and later reassigned to
19176 `shift_symbol', containing the symbol that can be shifted from a
19177 given state.
19178 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19179 only, and...
19180 (new_itemsets): Allocate `shift_symbol' here.
19181 (allocate_itemsets): symbol_count includes useless nonterminals.
19182 Make room for them.
19183 (free_storage): Use `free', not `XFREE', for pointers that cannot
19184 be null.
19185
81b51460
AD
191862001-12-05 Akim Demaille <akim@epita.fr>
19187
19188 * src/nullable.c (set_nullable): Deobfuscate the handling of
19189 ritem.
19190 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19191
3067fbef
AD
191922001-12-05 Akim Demaille <akim@epita.fr>
19193
19194 * src/gram.c, src/gram.h (ritem_print): New.
19195 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19196 (This useless function was defined only to work around VMS linkers
19197 that can't handle compilation units with variables only).
19198 * src/reduce.c (dump_grammar): Use it to trace the construction of
19199 ritem.
19200
c2bea5f9
PE
192012001-12-04 Paul Eggert <eggert@twinsun.com>
19202
7d27c823
PE
19203 * src/bison.simple (union yyalloc): Change member names
19204 to be the same as the stack names.
19205 (yyparse): yyptr is now union yyalloc *, not char *.
19206 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19207 and may generate better code on some machines.
c2bea5f9
PE
19208 (yystpcpy): Use prototype if __STDC__ is defined, not just
19209 if __cplusplus is defined.
35687a9d 19210
2c8a9dfa
AD
192112001-11-30 Akim Demaille <akim@epita.fr>
19212
19213 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19214 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19215 Gettext doesn't compile cleanly, and dies with -Werror.
19216 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19217 Include WARNING_CFLAGS here.
19218 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19219 before being defined.
19220
f4e421e6
AD
192212001-11-27 Paul Eggert <eggert@twinsun.com>
19222
19223 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19224 First arg is int, not unsigned.
19225 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19226 (SIZE_MAX, UINT_MAX): New macros.
19227 (quotearg_n_options): Abort if N is negative.
19228 Avoid overflow check on hosts where size_t is 64 bits and int
19229 is 32 bits, as overflow is impossible there.
19230 Fix off-by-one typo that caused unnecessary reallocation.
19231
7093d0f5
AD
192322001-11-29 Paul Eggert <eggert@twinsun.com>
19233
19234 Name space cleanup in generated parser.
19235
19236 * doc/bison.texinfo (Bison Parser): Discuss system headers
19237 and their effect on the user name space.
19238
19239 * src/bison.simple:
19240 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19241 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19242 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19243
19244 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19245 on user names when possible.
19246
19247 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19248 Simplify test for whather <alloca.h> exists.
19249
19250 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19251
19252 (<stdio.h>): Include if YYDEBUG.
19253
19254 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19255 ! defined (yyoverflow) && ! defined (yymemcpy).
19256
19257 (yymemcpy, yyparse): Rename local variables as needed so that
19258 they all begin with 'yy'.
19259
19260 (yystrlen, yystpcpy): New functions.
19261
19262 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19263 All uses changed.
19264
19265 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19266 instead of relying on string.h functions. Use YYSTACK_ALLOC
19267 and YYSTACK_FREE instead of malloc and free.
19268
fd51e5ff
AD
192692001-11-30 Akim Demaille <akim@epita.fr>
19270
19271 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19272 before their first uses.
19273 (YYBISON, YYPURE): Move to the top of the output.
19274
7d13ff5f
AD
192752001-11-30 Akim Demaille <akim@epita.fr>
19276
19277 * tests/reduce.at (Useless Nonterminals): Fix.
19278
892a3995
AD
192792001-11-30 Akim Demaille <akim@epita.fr>
19280
19281 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19282 if body instead of `;' to pacify GCC's warnings.
19283
68f1e3ed
AD
192842001-11-30 Akim Demaille <akim@epita.fr>
19285
19286 Instead of mapping the LHS of unused rules to -1, keep the LHS
19287 valid, but flag the rules as invalid.
19288
19289 * src/gram.h (rule_t): `useful' is a new member.
19290 * src/print.c (print_grammar): Adjust.
19291 * src/derives.c (set_derives): Likewise.
19292 * src/reader.c (packgram, reduce_output): Likewise.
19293 * src/reduce.c (reduce_grammar_tables): Likewise.
19294 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19295
d2d1b42b
AD
192962001-11-30 Akim Demaille <akim@epita.fr>
19297
19298 * src/reduce.c (reduce_output): Formatting changes.
19299 * src/print.c (print_results, print_grammar): Likewise.
19300 * tests/regression.at (Rule Line Numbers)
19301 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19302
760b53a8
AD
193032001-11-30 Akim Demaille <akim@epita.fr>
19304
19305 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19306 useless nonterminals, move them at the end of the symbol arrays.
19307 (reduce_output): Adjust.
19308 * tests/reduce.at (Useless Nonterminals): Adjust.
19309
00238958
AD
193102001-11-30 Akim Demaille <akim@epita.fr>
19311
19312 * src/reduce.c: Various comment/formatting changes.
19313 (nonterminals_reduce): New, extracted from...
19314 (reduce_grammar_tables): here.
19315 (reduce_grammar): Call nonterminals_reduce.
19316
396452de
PE
193172001-11-29 Paul Eggert <eggert@twinsun.com>
19318
19319 * src/bison.simple (YYSTACK_REALLOC): Remove.
19320 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19321 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19322 New macros.
19323 (union yyalloc): New type.
19324 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19325 an arbitrary restriction on hosts where size_t is wider than int.
19326
19327 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19328 a parser stack overflow. Allocate just one block of memory for all
19329 three stacks, instead of allocating three blocks; this typically is
19330 faster and reduces fragmentation.
19331
19332 Do not limit the number of items in the stack to a value that fits
19333 in 'int', as this is an arbitrary limit on hosts with 64-bit
19334 size_t and 32-bit int.
19335
147e184c
MA
193362001-11-29 Marc Autret <autret_m@epita.fr>
19337
19338 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19339 of defining YYERROR_VERBOSE.
19340 [AT_DATA]: $4 is now out of C declarations in the prologue.
19341
426cf563
MA
193422001-11-28 Marc Autret <autret_m@epita.fr>
19343
19344 * src/reader.c (parse_dquoted_param): New.
19345 (parse_skel_decl): Use it.
19346 * src/lex.h: Add its prototype.
19347 * src/lex.c (literalchar): Become not static.
19348
c7925b99
MA
193492001-11-28 Marc Autret <autret_m@epita.fr>
19350
19351 * src/output.h: And put its extern declaration here.
19352 * src/output.c (error_verbose): Define here.
19353 (prepare): Echo name modification.
19354 * src/getargs.h: Clean its extern declaration.
19355 * src/getargs.c (error_verbose_flag): Remove.
19356 (getargs): Remove case 'e'.
19357 * src/options.c (option_table): 'error-verbose' is now seen as simple
19358 percent option.
19359 Include output.h.
19360
19361 * src/reader.c (read_declarations): Remove case tok_include.
19362 (parse_include_decl): Remove.
19363 * src/lex.h (token_t): Remove tok_include.
19364 * src/options.c (option_table): 'include' is now a simple command line
19365 option.
19366
5b5d1929
MA
193672001-11-28 Marc Autret <autret_m@epita.fr>
19368
19369 * src/bison.simple: Adjust muscle names.
19370 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19371 * src/output.c (prepare): s/_/-/ for the muscles names.
19372 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19373
8850be4b
MA
193742001-11-28 Marc Autret <autret_m@epita.fr>
19375
19376 * src/bison.simple: Fix debug.
19377 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19378
4a38e613
AD
193792001-11-28 Akim Demaille <akim@epita.fr>
19380
19381 * src/LR0.c (shifts_new): New.
19382 (save_shifts, insert_start_shift, augment_automaton): Use it.
19383
4b35e1c1
AD
193842001-11-28 Akim Demaille <akim@epita.fr>
19385
19386 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19387 keep ruleno only.
19388
d2b04478
AD
193892001-11-28 Akim Demaille <akim@epita.fr>
19390
19391 * src/closure.c (closure): Instead of looping over word in array
19392 then bits in words, loop over bits in array.
19393
2c4c30aa
AD
193942001-11-28 Akim Demaille <akim@epita.fr>
19395
19396 * src/closure.c (closure): No longer optimize the special case
19397 where all the bits of `ruleset[r]' are set to 0, to make the code
19398 clearer.
19399
576890b7
AD
194002001-11-28 Akim Demaille <akim@epita.fr>
19401
19402 * src/closure.c (closure): `r' and `c' are new variables, used to
19403 de-obfuscate accesses to RULESET and CORE.
19404
cb487d7d
AD
194052001-11-28 Akim Demaille <akim@epita.fr>
19406
19407 * src/reduce.c (reduce_print): Use ngettext.
19408 (dump_grammar): Improve the trace accuracy.
19409
6013d43f
AD
194102001-11-28 Akim Demaille <akim@epita.fr>
19411
19412 * src/reduce.c (dump_grammar): Don't translate trace messages.
19413
cb4956ee
AD
194142001-11-28 Akim Demaille <akim@epita.fr>
19415
19416 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19417 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19418 as all tags are free'ed afterwards.
19419 From Enrico Scholz.
19420
648185ab
PE
194212001-11-27 Paul Eggert <eggert@twinsun.com>
19422
19423 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19424 use alloca when we didn't want to, and vice versa.
19425
68254a03
MA
194262001-11-27 Marc Autret <autret_m@epita.fr>
19427
9113b58f
AD
19428 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19429 initialization.
68254a03
MA
19430 * src/output.c (prepare): Remove its update.
19431
04d843a2
MA
194322001-11-27 Marc Autret <autret_m@epita.fr>
19433
19434 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19435 Use %error-verbose.
19436
d2079671 194372001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
19438
19439 * src/bison.simple: Remove YYERROR_VERBOSE using.
19440 Use %%error_verbose.
19441 (yyparse): Likewise.
19442 * src/output.c (prepare): Give its final value.
19443 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19444 * src/getargs.h: Add its extern declaration.
19445 * src/getargs.c (error_verbose_flag): New int.
19446 (getargs): Update to catch new case.
19447 * src/options.c (option_table): 'error-verbose' is a new option.
19448 (shortopts): Update.
19449
e0327bc8
AD
194502001-11-27 Akim Demaille <akim@epita.fr>
19451
19452 * src/system.h: Use intl/libgettext.h.
19453 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19454
000f1a3c
AD
194552001-11-27 Akim Demaille <akim@epita.fr>
19456
19457 * tests/torture.at (Exploding the Stack Size with Malloc):
19458 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19459
26cfe0be
AD
194602001-11-27 Akim Demaille <akim@epita.fr>
19461
19462 * src/files.c: Include error.h.
19463 Reported by Hans Aberg.
19464
f6bd5427
MA
194652001-11-26 Marc Autret <autret_m@epita.fr>
19466
d2079671 19467 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
19468 (read_declarations): Add case tok_include.
19469 * src/getargs.h (include): Add its extern definition.
19470 * src/getargs.c (include): New const char *.
19471 (getargs): Add case '-I'.
19472 * src/options.c (option_table): Add include as command line and
19473 percent option.
19474 * src/lex.h (token_t): Add tok_include.
19475
2ca209c1
AD
194762001-11-26 Akim Demaille <akim@epita.fr>
19477
19478 * src/reader.c (readgram): Make sure rules for mid-rule actions
19479 have a lineno equal to that of their host rule.
19480 Reported by Hans Aberg.
19481 * tests/regression.at (Rule Line Numbers): New.
19482
0e41b407
AD
194832001-11-26 Akim Demaille <akim@epita.fr>
19484
19485 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19486 size_ts.
19487
194882001-11-26 Akim Demaille <akim@epita.fr>
19489
19490 * src/complain.c, src/complain.h (error): Remove, provided by
19491 lib/error.[ch].
19492
e0c40012
AD
194932001-11-26 Akim Demaille <akim@epita.fr>
19494
19495 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19496 issue an error message.
19497 * tests/regression.at (Invalid %directive): New.
19498 Reported by Hans Aberg.
19499
5e147124
AD
195002001-11-26 Akim Demaille <akim@epita.fr>
19501
19502 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19503 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19504
a034c8b8
AD
195052001-11-26 Akim Demaille <akim@epita.fr>
19506
19507 * src/conflicts.c (conflicts_print): Don't complain at all when
19508 there are no reduce/reduce conflicts, and as many shift/reduce
19509 conflicts as expected.
19510 * tests/regression.at (%expect right): Adjust.
19511
c64a20f3
AD
195122001-11-23 Akim Demaille <akim@epita.fr>
19513
19514 * lib/alloca.c: Update, from fileutils.
19515
5b0d29bb
AD
195162001-11-23 Akim Demaille <akim@epita.fr>
19517
19518 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19519
722c4bfe
AD
195202001-11-23 Akim Demaille <akim@epita.fr>
19521
19522 * src/system.h: Include alloca.h.
19523 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19524
6255b435
AD
195252001-11-23 Akim Demaille <akim@epita.fr>
19526
19527 * src/print_graph.c (print_actions): Remove `rule', unused.
19528 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19529 pacify GCC's signed < unsigned warnings.
19530 * src/closure.c (itemsetsize): Likewise.
19531 * src/reader.c (symbol_list_new): Static.
19532
b29b2ed5
AD
195332001-11-23 Akim Demaille <akim@epita.fr>
19534
19535 Attaching lineno to buckets is stupid, since only one copy of each
19536 symbol is kept, only the line of the first occurrence is kept too.
19537
19538 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19539 * src/reader.c (rline_allocated): Remove, unused.
19540 (symbol_list): Have a `line' member.
19541 (symbol_list_new): New.
19542 (readgram): Use it.
19543 * src/print.c (print_grammar): Output the rule line numbers.
19544 * tests/regression.at (Solved SR Conflicts)
19545 (Unresolved SR Conflicts): Adjust.
19546 Reported by Hans Aberg.
19547
a81b1d4a
MA
195482001-11-22 Marc Autret <autret_m@epita.fr>
19549
19550 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19551
c1ecb3c1
MA
195522001-11-22 Marc Autret <autret_m@epita.fr>
19553
19554 * src/muscle_tab.c (muscle_init): Remove initialization of
19555 skeleton muscle.
19556 * src/output.c (output_master_parser): Do it here.
19557
fbe01355
AD
195582001-11-20 Akim Demaille <akim@epita.fr>
19559
19560 * po/sv.po: New.
19561 * configure.in (ALL_LINGUAS): Adjust.
19562 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19563 longer contains strings to translate.
19564
81e895c0
AD
195652001-11-19 Akim Demaille <akim@epita.fr>
19566
19567 * src/conflicts.c (conflicts_print): Add a missing \n.
19568
6bb1878b
AD
195692001-11-19 Akim Demaille <akim@epita.fr>
19570
19571 * src/nullable.c (nullable_print): New.
19572 (set_nullable): Call it when tracing.
19573 Better locality of variables.
19574
d9ec2d07
AD
195752001-11-19 Akim Demaille <akim@epita.fr>
19576
19577 * src/print.c (print_actions): Better locality of variables.
19578
720e5c1b
AD
195792001-11-19 Akim Demaille <akim@epita.fr>
19580
19581 * src/derives.c (print_derives): Fix and enrich.
19582 * src/closure.c (print_fderives): Likewise.
19583
fb908786
AD
195842001-11-19 Akim Demaille <akim@epita.fr>
19585
19586 * src/closure.c (itemsetend): Remove, replaced with...
19587 (itemsetsize): new.
19588
125ecb56
AD
195892001-11-19 Akim Demaille <akim@epita.fr>
19590
19591 * src/LR0.c (kernel_end): Remove, replaced with...
19592 (kernel_size): new.
19593
d8cf039f
AD
195942001-11-19 Akim Demaille <akim@epita.fr>
19595
19596 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19597 to clarify.
19598
7bec0760
AD
195992001-11-19 Akim Demaille <akim@epita.fr>
19600
19601 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19602
c87d4863
AD
196032001-11-19 Akim Demaille <akim@epita.fr>
19604
19605 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19606 trace messages.
19607 * src/LR0.c: Likewise.
19608 (allocate_itemsets): Use arrays instead of pointers to clarify.
19609
9bfe901c
AD
196102001-11-19 Akim Demaille <akim@epita.fr>
19611
19612 * src/getargs.c (statistics_flag): Replace with...
19613 (trace_flag): New.
19614 (longopts): Accept --trace instead of --statistics.
19615 * src/getargs.h, src/options.c: Adjust.
19616 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19617 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19618
97db7bd4
AD
196192001-11-19 Akim Demaille <akim@epita.fr>
19620
cc72668c 19621 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
19622 pointers to clarify the code.
19623 (save_reductions, save_shifts): Factor common parts of alternatives.
19624
2c5f66ed
AD
196252001-11-19 Akim Demaille <akim@epita.fr>
19626
19627 * src/LR0.c (new_state, get_state): Complete TRACE code.
19628 * src/closure.c: Include `reader.h' to get `tags', needed by the
19629 trace code.
19630 Rename the conditional DEBUG as TRACE.
19631 Output consistently TRACEs to stderr, not stdout.
19632 * src/derives.c: Likewise.
19633 * src/reduce.c: (inaccessable_symbols): Using if is better style
19634 than goto.
19635 Use `#if TRACE' instead of `#if 0' for tracing code.
19636
300f275f
AD
196372001-11-19 Akim Demaille <akim@epita.fr>
19638
19639 * src/system.h (LIST_FREE, shortcpy): New.
19640 * src/LR0.c: Use them.
19641 * src/output.c (free_itemsets, free_reductions, free_shifts):
19642 Remove, replaced by LIST_FREE.
19643
f59c437a
AD
196442001-11-19 Akim Demaille <akim@epita.fr>
19645
19646 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19647 (REDUCTIONS_ALLOC): New.
19648 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19649 allocation.
19650
6986fd9e
AD
196512001-11-19 Akim Demaille <akim@epita.fr>
19652
19653 * src/LR0.c (new_state): Complete trace code.
19654 * src/nullable.c (set_nullable): Don't translate traces.
19655
4bc30f78
AD
196562001-11-19 Akim Demaille <akim@epita.fr>
19657
19658 * src/print_graph.c (print_core): Better locality of variables.
19659 * src/print.c (print_core): Likewise.
19660
08a946e0
AD
196612001-11-19 Akim Demaille <akim@epita.fr>
19662
19663 * src/vcg.c: You do the output, so you are responsible of the
19664 handling of VCG syntax, in particular: use quotearg.
19665 * src/print_graph.c: Don't.
19666 (print_actions): Don't output the actions as part of the nodes,
19667 since that's the job of the edges.
19668 (print_state): Don't output by hand: fill the node description,
9bfe901c 19669 and ask for its output.
08a946e0 19670
f0473484
AD
196712001-11-19 Akim Demaille <akim@epita.fr>
19672
cc72668c
AD
19673 * src/bison.simple (yyparse): When verbosely reporting an error,
19674 no longer put additional quotes around token names.
f0473484
AD
19675 * tests/calc.at: Adjust.
19676
e41dc700
AD
196772001-11-19 Akim Demaille <akim@epita.fr>
19678
19679 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19680 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19681 * src/output.c: Adjust.
19682
652a871c
AD
196832001-11-19 Akim Demaille <akim@epita.fr>
19684
19685 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19686 (rule_t): this.
19687 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19688
b2ed6e58
AD
196892001-11-19 Akim Demaille <akim@epita.fr>
19690
19691 * src/gram.h (rule_t): New.
19692 (rule_table): New.
19693 (rrhs, rlhs): Remove, part of state_t.
19694 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19695 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19696 * src/reader.c, src/reduce.c: Adjust.
19697
edad7067
AD
196982001-11-19 Akim Demaille <akim@epita.fr>
19699
19700 * src/reader.c (symbols_output): New, extracted from...
19701 (packsymbols): Here.
19702 (reader): Call it.
19703
3feec034
AD
197042001-11-19 Akim Demaille <akim@epita.fr>
19705
19706 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19707 (maxrhs): this new function.
19708
ddcd5fdf
AD
197092001-11-19 Akim Demaille <akim@epita.fr>
19710
cc72668c 19711 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
19712 Adjust.
19713
bb527fc2
AD
197142001-11-19 Akim Demaille <akim@epita.fr>
19715
cc72668c 19716 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
19717 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19718 * src/lalr.c: Adjust.
19719
a845a697
AD
197202001-11-19 Akim Demaille <akim@epita.fr>
19721
19722 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19723 (set_state_table): handle the `lookaheads' members.
19724
f004bf6a
AD
197252001-11-19 Akim Demaille <akim@epita.fr>
19726
cc72668c
AD
19727 * src/lalr.h (lookaheads): Removed array, whose contents is now
19728 a member of...
f004bf6a
AD
19729 (state_t): this structure.
19730 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19731 Adjust.
19732
de326cc0
AD
197332001-11-19 Akim Demaille <akim@epita.fr>
19734
cc72668c
AD
19735 * src/lalr.h (consistent): Removed array, whose contents is now
19736 a member of...
de326cc0
AD
19737 (state_t): this structure.
19738 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19739 Adjust.
19740
90b4416b
AD
197412001-11-19 Akim Demaille <akim@epita.fr>
19742
cc72668c
AD
19743 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19744 contents are now members of...
90b4416b
AD
19745 (state_t): this structure.
19746 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19747 Adjust.
19748
9703cc49
AD
197492001-11-19 Akim Demaille <akim@epita.fr>
19750
19751 * src/lalr.h (state_t): New.
19752 (state_table): Be a state_t * instead of a core **.
19753 (accessing_symbol): Remove, part of state_t.
19754 * src/lalr.c: Adjust.
19755 (set_accessing_symbol): Merge into...
19756 (set_state_table): this.
19757 * src/print_graph.c, src/conflicts.c: Adjust.
19758
d803322e
AD
197592001-11-14 Akim Demaille <akim@epita.fr>
19760
19761 * tests/calc.at, tests/output.at, tests/regression.at,
19762 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19763 now the tests are run in private dirs, therefore AC_CLEANUP and
19764 family can be simplified to 0-ary.
19765 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19766 use abs. path to find config.h.
19767 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19768 stderr, there can be way too much random noise.
19769 Instead pass -Werror to GCC and rely on the exit status.
19770 Reported by Wolfram Wagner.
19771
3d76b07d
AD
197722001-11-14 Akim Demaille <akim@epita.fr>
19773
19774 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19775 defined only if yyoverflow is defined, to avoid `warning: unused
19776 variable `yyvs1''.
19777 Reported by The Test Suite.
19778
09b503c8
AD
197792001-11-14 Akim Demaille <akim@epita.fr>
19780
19781 * src/print.c: Include reduce.h.
19782 Reported by Hans Aberg.
19783
197842001-11-14 Akim Demaille <akim@epita.fr>
19785
19786 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19787 Revert a previous patch: these are really const.
19788 * src/conflicts.c (conflict_report): Additional useless pair of
19789 braces to pacify GCC's warnings for `if () if () {} else {}'.
19790 * src/lex.c (parse_percent_token): Replace equal_offset with
19791 arg_offset.
19792 arg is const.
19793 Be sure to strdup `arg' when used, since there is no reason for
19794 token_buffer not to change.
19795
0f37a994
AD
197962001-11-14 Akim Demaille <akim@epita.fr>
19797
19798 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19799 definition.
19800 * src/main.c (main): Use them.
19801 Suggested by Hans Aberg.
19802
d39d93b8
AD
198032001-11-12 Akim Demaille <akim@epita.fr>
19804
19805 * src/system.h (ngettext): Now that we use ngettext, be sure to
19806 provide a default definition when NLS are not used.
19807
9edcd895
AD
198082001-11-12 Akim Demaille <akim@epita.fr>
19809
19810 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19811 Use @kbd to denote user input.
19812 (Language and Grammar): ANSIfy the example.
19813 Adjust its layout for info/notinfo.
19814 (Location Tracking Calc): Output error messages to stderr.
19815 Output locations in a more GNUtically correct way.
19816 Fix a couple of Englishos.
19817 Adjust @group/@end group pairs.
19818
7da99ede
AD
198192001-11-12 Akim Demaille <akim@epita.fr>
19820
e3aa65c5 19821 %expect was not functioning at all.
7da99ede
AD
19822
19823 * src/conflicts.c (expected_conflicts): Set to -1.
19824 (conflict_report): Use ngettext.
19825 (conflicts_print): Check %expect and make its violation an error.
19826 * doc/bison.texinfo (Expect Decl): Adjust.
19827 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19828 * tests/regression.at (%expect not enough, %expect right)
19829 (%expect too much): New.
19830
ba9dda1a
AD
198312001-11-12 Akim Demaille <akim@epita.fr>
19832
19833 * tests/regression.at (Conflicts): Rename as...
19834 (Unresolved SR Conflicts): this.
19835 (Solved SR Conflicts): New.
19836
337c5bd1
AD
198372001-11-12 Akim Demaille <akim@epita.fr>
19838
19839 * src/reduce.c (print_results): Rename as...
19840 (reduce_output): This.
19841 Output to OUT, passed as argument, instead of output_obstack.
19842 (dump_grammar): Likewise.
19843 (reduce_free): New.
19844 Also free V1.
19845 (reduce_grammar): No longer call reduce_output, since...
19846 * src/print.c (print_results): do it.
19847 * src/main.c (main): Call reduce_free;
19848
c73a41af
AD
198492001-11-12 Akim Demaille <akim@epita.fr>
19850
19851 * src/conflicts.c (print_reductions): Accept OUT as argument.
19852 Output to it, not to output_obstack.
19853 * src/print.c (print_actions): Adjust.
19854
0df87bb6
AD
198552001-11-12 Akim Demaille <akim@epita.fr>
19856
19857 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19858 the result instead of using...
19859 (src_total, rrc_total, src_count, rrc_count): Remove.
19860 (any_conflicts): Remove.
19861 (print_conflicts): Split into...
19862 (conflicts_print, conflicts_output): New.
19863 * src/conflicts.h: Adjust.
19864 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 19865 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
19866 * tests/regression.at (Conflicts): New.
19867 Reported by Tom Lane.
19868
e4d3d4de
AD
198692001-11-12 Akim Demaille <akim@epita.fr>
19870
19871 * tests/regression.at (Invalid input): Remove, duplicate with
19872 ``Invalid input: 1''.
19873
6d7d248e
AD
198742001-11-12 Akim Demaille <akim@epita.fr>
19875
19876 * tests/torture.at (AT_DATA_STACK_TORTURE)
19877 (Exploding the Stack Size with Alloca)
19878 (Exploding the Stack Size with Malloc): New.
19879
e9e4c321
AD
198802001-11-12 Akim Demaille <akim@epita.fr>
19881
19882 * src/bison.simple (YYSTACK_REALLOC): New.
19883 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 19884 Reported by Per Allansson.
e9e4c321 19885
5f7e0832
AD
198862001-11-12 Pascal Bart <pascal.bart@epita.fr>
19887
19888 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19889 define CPP macro, which substitute YYSTYPE by yystype.
19890 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19891 with yyltype/YYLTYPE. This allows inclusion of the generated
19892 header within the parser if the compiler, such as GGC, accepts
19893 multiple equivalent #defines.
19894 From Akim.
19895
e3f1699f
AD
198962001-11-05 Akim Demaille <akim@epita.fr>
19897
19898 * src/reader.c (symbols_output): New, extracted from...
19899 (packsymbols): here.
19900 (reader): Adjust.
19901
65be0866
AD
199022001-11-05 Akim Demaille <akim@epita.fr>
19903
19904 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19905
e4d910bf
AD
199062001-11-05 Akim Demaille <akim@epita.fr>
19907
19908 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19909 pattern.
19910
951366c1
AD
199112001-11-05 Akim Demaille <akim@epita.fr>
19912
19913 * src/options.h (struct option_table_struct): set_flags is void*.
19914 * src/options.c (longopts): Support `--output' and `%output'.
19915 (usage): Adjust.
19916 * src/lex.h (tok_setopt): Remove, replaced with...
19917 (tok_intopt, tok_stropt): these new guys.
19918 * src/lex.c (getopt.h): Not needed.
19919 (token_buffer, unlexed_token_buffer): Not const.
19920 (percent_table): Promote `-' over `_' in directive names.
19921 Active `%name-prefix', `file-prefix', and `output'.
19922 (parse_percent_token): Accept possible arguments to directives.
19923 Promote `-' over `_' in directive names.
19924
d8988b2f
AD
199252001-11-04 Akim Demaille <akim@epita.fr>
19926
19927 * doc/bison.texinfo (Decl Summary): Split the list into
19928 `directives for grammars' and `directives for bison'.
19929 Sort'em.
19930 Add description of `%name-prefix', `file-prefix', and `output'.
19931 Promote `-' over `_' in directive names.
19932 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19933 Simplify the description of `--name-prefix'.
19934 Promote `-' over `_' in directive names.
19935 Promote `--output' over `--output-file'.
19936 Fix the description of `--defines'.
19937 * tests/output.at: Exercise %file-prefix and %output.
19938
6468d18e
AD
199392001-11-02 Akim Demaille <akim@epita.fr>
19940
19941 * doc/refcard.tex: Update.
19942
6b7e85b9
AD
199432001-11-02 Akim Demaille <akim@epita.fr>
19944
19945 * src/symtab.h (SUNDEF): New.
19946 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19947 stand for `uninitialized', instead of 0.
19948 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19949 * src/lex.c (lex): Adjust.
19950
19951 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19952 Number it 0.
19953 Let yylex return it instead of a plain 0.
19954 Reported by Dick Streefland.
19955
cd5aafcf
AD
199562001-11-02 Akim Demaille <akim@epita.fr>
19957
19958 * tests/regression.at (Mixing %token styles): New test.
19959
037ca2f1
AD
199602001-11-02 Akim Demaille <akim@epita.fr>
19961
19962 * src/reader.c (parse_thong_decl): Formatting changes.
19963 (token_translations_init): New, extracted from...
19964 (packsymbols): Here.
19965 Adjust.
19966
270a173c
AD
199672001-11-01 Akim Demaille <akim@epita.fr>
19968
19969 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19970 Check that `9foo.y' produces correct cpp guards.
19971 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19972 guards.
19973 Reported by Wwp.
19974
561f9a30
AD
199752001-11-01 Akim Demaille <akim@epita.fr>
19976
19977 * tests/regression.at (Invalid input: 2): New.
19978 * src/lex.c (unlexed_token_buffer): New.
19979 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19980 too.
19981 Reported by Wwp.
19982
f987e9d2
AD
199832001-11-01 Akim Demaille <akim@epita.fr>
19984
19985 * tests/calc.at: Catch up with 1.30.
19986 * configure.in: Bump to 1.49a.
19987 Adjust to newer Autotest.
19988
0846f581
PB
199892001-10-19 Pascal Bart <pascal.bart@epita.fr>
19990
19991 * src/conflicts.c: Move global variables rrc_total and src_total ...
19992 (print_conflicts): here.
19993 * src/output.c (output): Free global variable user_toknums.
19994 * src/lex.c (token_obstack): Become static.
19995
3c1a79b3
AD
199962001-10-18 Akim Demaille <akim@epita.fr>
19997
19998 * tests/atlocal.in (GCC): Add.
19999 * tests/calc.at: s/m4_match/m4_bmatch/.
20000 s/m4_patsubst/m4_bpatsubst/.
20001 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
20002 * configure.in: AC_SUBST(GCC).
20003
5d52e7d0
MA
200042001-10-14 Marc Autret <autret_m@epita.fr>
20005
20006 * src/options.c (create_long_option_table): Fix.
20007
631aa1d3
AD
200082001-10-10 Akim Demaille <akim@epita.fr>
20009
20010 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
20011
f6ec6d13
AD
200122001-10-04 Akim Demaille <akim@epita.fr>
20013
20014 * src/reader.c (parse_union_decl): Push the caracters in
20015 union_obstack, not attrs_obstack.
20016
342b8b6e
AD
200172001-10-04 Akim Demaille <akim@epita.fr>
20018
20019 Merge in the branch 1.29.
20020
20021 * src/reader.c (packsymbols): Use a temporary obstack for
20022 `%%tokendef', since output_stack is already used elsewhere.
20023
20024 2001-10-02 Akim Demaille <akim@epita.fr>
20025
20026 Bump 1.29d.
20027
20028 2001-10-02 Akim Demaille <akim@epita.fr>
20029
20030 Version 1.29c.
20031
20032 2001-10-02 Akim Demaille <akim@epita.fr>
20033
20034 * tests/regression.at (Invalid CPP headers): New.
20035 From Alexander Belopolsky.
20036 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
20037
20038 2001-10-02 Akim Demaille <akim@epita.fr>
20039
20040 * tests/regression.at (Invalid input): New.
20041 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
20042 Reported by Shura.
20043
20044 2001-10-02 Akim Demaille <akim@epita.fr>
20045
20046 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20047
20048 2001-10-02 Akim Demaille <akim@epita.fr>
20049
20050 * src/output.c (output_parser): Assert `skeleton'.
20051 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20052 systems.
20053 From Shura.
20054
20055 2001-10-01 Marc Autret <autret_m@epita.fr>
20056
20057 * src/lex.h: Echo modifications.
20058 * src/lex.c (unlex): Parameter is now token_t.
20059 From Hans Aberg.
20060
20061 2001-10-01 Marc Autret <autret_m@epita.fr>
20062
20063 * src/main.c: Include lex.h.
20064 From Hans Aberg.
20065
20066 2001-09-29 Akim Demaille <akim@epita.fr>
20067
20068 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20069
20070 2001-09-28 Akim Demaille <akim@epita.fr>
20071
20072 * tests/testsuite.at: Update to newer Autotest.
20073 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20074
20075 2001-09-27 Akim Demaille <akim@epita.fr>
20076
20077 Position independent wrapper.
20078
20079 * tests/bison: Remove.
20080 * tests/bison.in: New.
20081 * configure.in: Adjust.
20082
20083 2001-09-27 Paul Eggert <eggert@twinsun.com>
20084
20085 Port quotearg fixes from tar 1.13.24.
20086
20087 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20088 tm to be declared.
20089 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20090 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20091
20092 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20093 * m4/mbrtowc.m4: New file.
20094 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20095 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20096
20097 2001-09-27 Akim Demaille <akim@epita.fr>
20098
20099 Bump to 1.29c.
20100
20101 2001-09-27 Akim Demaille <akim@epita.fr>
20102
20103 Version 1.29b.
20104
20105 2001-09-25 Akim Demaille <akim@epita.fr>
20106
20107 * src/system.h: Include `xalloc.h'.
20108 Remove it from the C files.
20109 * src/files.c (output_files): Free the obstacks.
20110 * src/lex.c (init_lex): Rename as...
20111 (lex_init): this.
20112 (lex_free): New.
20113 * src/main.c (main): Use it.
20114
20115 2001-09-24 Marc Autret <autret_m@epita.fr>
20116
20117 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20118 to output informations in fout (FILE*).
20119 (open_graph, close_graph): Likewise.
20120 (output_graph, output_edge, output_node): Likewise.
20121 * src/vcg.h: Update function prototypes.
20122 * src/print_graph.c (print_graph): Open output graph file.
20123 (print_actions): Adjust.
20124 * src/files.h: Remove extern declaration.
20125 * src/files.c: Remove graph_obstack declaration.
20126 (open_files): Remove graph_obstack initialization.
20127 (output_files): Remove graph_obstack saving.
20128
20129 2001-09-24 Marc Autret <autret_m@epita.fr>
20130
20131 * src/files.c (compute_output_file_names): Fix.
20132
20133 2001-09-24 Marc Autret <autret_m@epita.fr>,
20134 Akim Demaille <akim@epita.fr>
20135
20136 * src/reader.c (reader): Remove call to free_symtab ().
20137 * src/main.c (main): Call it here.
20138 Include symtab.h.
20139 * src/conflicts.c (initialize_conflicts): Rename as...
20140 (solve_conflicts): this.
20141 * src/print.c (print_core, print_actions, print_state)
20142 (print_grammar): Dump to a file instead a `output_obstack'.
20143 (print_results): Dump `output_obstack', and then proceed with the
20144 FILE *.
20145 * src/files.c (compute_output_file_names, close_files): New.
20146 (output_files): Adjust.
20147 * src/main.c (main): Adjust.
20148
20149 2001-09-23 Marc Autret <autret_m@epita.fr>
20150
20151 * src/files.c (compute_header_macro): Computes header macro name
20152 from spec_defines_file when given.
20153
20154 2001-09-23 Marc Autret <autret_m@epita.fr>
20155
20156 * src/files.c (output_files): Add default extensions.
20157
20158 2001-09-22 Akim Demaille <akim@epita.fr>
20159
20160 * src/conflicts.c (finalize_conflicts): Rename as...
20161 (free_conflicts): this.
20162
20163 2001-09-22 Akim Demaille <akim@epita.fr>
20164
20165 * src/gram.c (gram_free): Rename back as...
20166 (dummy): this.
20167 (output_token_translations): Free `token_translations'.
20168 * src/symtab.c (free_symtab): Free the tag field.
20169
20170 2001-09-22 Akim Demaille <akim@epita.fr>
20171
20172 Remove `translations' as it is always set to true.
20173
20174 * src/gram.h: Adjust.
20175 * src/reader.c (packsymbols, parse_token_decl): Adjust
20176 * src/print.c (print_grammar): Adjust.
20177 * src/output.c (output_token_translations): Adjust.
20178 * src/lex.c (lex): Adjust.
20179 * src/gram.c: Be sure the set pointers to NULL.
20180 (dummy): Rename as...
20181 (gram_free): this.
20182
20183 2001-09-22 Akim Demaille <akim@epita.fr>
20184
20185 * configure.in: Invoke AM_LIB_DMALLOC.
20186 * src/system.h: Use dmalloc.
20187 * src/LR0.c: Be sure to have pointers initialized to NULL.
20188 (allocate_itemsets): Allocate kernel_items only if needed.
20189
20190 2001-09-22 Akim Demaille <akim@epita.fr>
20191
20192 * configure.in: Bump to 1.29b.
20193 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20194 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20195 need xmalloc.c in calc.y.
20196 From Pascal Bart.
20197
20198 2001-09-21 Akim Demaille <akim@epita.fr>
20199
20200 Version 1.29a.
20201 * Makefile.maint, config/config.guess, config/config.sub,
20202 * config/missing: Update from masters.
20203 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20204 upon package.m4.
20205 * configure.in (ALL_LINGUAS): Add `tr'.
20206
20207 2001-09-21 Akim Demaille <akim@epita.fr>
20208
20209 * tests/Makefile.am (package.m4): Move to...
20210 ($(srcdir)/$(TESTSUITE)): here.
20211
20212 2001-09-20 Akim Demaille <akim@epita.fr>
20213
20214 * src/complain.c: No longer try to be standalone: use system.h.
20215 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20216 * src/complain.h: Likewise.
20217 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20218 Remove the unused variable `n'.
20219 From Albert Chin-A-Young.
20220
20221 2001-09-18 Marc Autret <autret_m@epita.fr>
20222
20223 * doc/bison.1: Update.
20224 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20225 descriptions.
20226 (Option Cross Key): Update.
20227 Add --graph.
20228
20229 2001-09-18 Marc Autret <autret_m@epita.fr>
20230
20231 * tests/regression.at: New test (comment in %union).
20232
20233 2001-09-18 Marc Autret <autret_m@epita.fr>
20234
20235 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20236 do that.
20237 Reported by Keith Browne.
20238
20239 2001-09-18 Marc Autret <autret_m@epita.fr>
20240
20241 * tests/output.at: Add tests for --defines and --graph.
20242
20243 2001-09-18 Marc Autret <autret_m@epita.fr>
20244
20245 * tests/output.at: Removes tests of %{header,src}_extension features.
20246
20247 2001-09-18 Akim Demaille <akim@epita.fr>
20248
20249 * tests/Makefile.am (package.m4): New.
20250 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20251 (_AT_CHECK_CALC_ERROR): Likewise.
20252 Factor the `, ' part of verbose error messages.
20253
20254 2001-09-18 Marc Autret <autret_m@epita.fr>
20255
20256 * src/getargs.c (longopts): Declare --defines and --graph as options
20257 with optional arguments.
20258 * src/files.h: Add extern declarations.
20259 * src/files.c (spec_graph_file, spec_defines_file): New.
20260 (output_files): Update.
20261 Remove CPP-outed code.
20262
20263 2001-09-18 Marc Autret <autret_m@epita.fr>
20264
20265 Turn off %{source,header}_extension feature.
20266
20267 * src/files.c (compute_exts_from_gf): Update.
20268 (compute_exts_from_src): Update.
20269 (output_files): CPP-out useless code.
20270 * src/files.h: Remove {header,source}_extension extern declarations.
20271 * src/reader.c (parse_dquoted_param): CPP-out.
20272 (parse_header_extension_decl): Remove.
20273 (parse_source_extension_decl): Remove.
20274 (read_declarations): Remove cases tok_{hdrext,srcext}.
20275 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20276 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20277
20278 2001-09-10 Akim Demaille <akim@epita.fr>
20279
20280 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20281 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20282 (AT_CHECK_OUTPUT): this.
20283 Merely check ls' exit status, its output is useless.
20284
20285 2001-09-10 Akim Demaille <akim@epita.fr>
20286
20287 * tests/calc.at: Use m4_match.
20288 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20289
20290 2001-09-10 Marc Autret <autret_m@epita.fr>,
20291 Akim Demaille <akim@epita.fr>
20292
20293 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20294 enum color_e.
20295 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20296 to `normal'.
20297 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20298 * src/lex.h: Adjust prototype.
20299 (token_t): Add `tok_undef'.
20300 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20301 (parse_percent_token): Now returns token_t.
20302 Add default statement in switch.
20303 (lex): Separate `c' as an input variable, from the token_t result
20304 part.
20305 (unlexed): Is a token_t.
20306
20307 2001-09-10 Akim Demaille <akim@epita.fr>
20308
20309 * configure.in: Bump to 1.29a.
20310
20311 2001-09-07 Akim Demaille <akim@epita.fr>
20312
20313 Version 1.29.
20314
20315 2001-08-30 Akim Demaille <akim@epita.fr>
20316
20317 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20318 * m4/atconfig.m4: Remove.
20319 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20320 * tests/bison: New.
20321 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20322 m4_if, m4_patsubst, and m4_regexp.
20323 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20324 `input' file instead of echo.
20325
20326 2001-08-29 Akim Demaille <akim@epita.fr>
20327
20328 Bump to 1.28e.
20329
20330 2001-08-29 Akim Demaille <akim@epita.fr>
20331
20332 Version 1.28d.
20333
20334 2001-08-29 Paul Eggert <eggert@twinsun.com>
20335
20336 * src/bison.simple (yyparse): Don't take the address of an
20337 item before the start of an array, as that doesn't conform to
20338 the C Standard.
20339
20340 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20341
20342 * doc/bison.texinfo (Location Tracking Calc): New node.
20343
20344 2001-08-29 Paul Eggert <eggert@twinsun.com>
20345
20346 * src/output.c (output): Do not define const, as this now
20347 causes more problems than it cures.
20348
20349 2001-08-29 Akim Demaille <akim@epita.fr>
20350
20351 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20352 the nodes.
20353 Be sure to tag the `detailmenu'.
20354
20355 2001-08-29 Akim Demaille <akim@epita.fr>
20356
20357 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20358 download in a tmp dir.
20359
20360 2001-08-28 Marc Autret <autret_m@epita.fr>
20361
20362 * config/depcomp: New file.
20363
20364 2001-08-28 Marc Autret <autret_m@epita.fr>
20365
20366 * doc/bison.1 (mandoc): Adjust.
20367 From Juan Manuel Guerrero.
20368
20369 2001-08-28 Marc Autret <autret_m@epita.fr>
20370
20371 * src/print_graph.c (print_state): Fix.
20372
20373 2001-08-27 Marc Autret <autret_m@epita.fr>
20374
20375 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20376 char * members.
20377 Echo modifications to the functions prototypes.
20378 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20379
20380 2001-08-27 Marc Autret <autret_m@epita.fr>
20381
20382 * src/vcg.c: Include `xalloc.h'.
20383 (add_colorentry): New.
20384 (add_classname): New.
20385 (add_infoname): New.
20386 * src/vcg.h: Add new prototypes.
20387
20388 2001-08-27 Akim Demaille <akim@epita.fr>
20389
20390 * Makefile.maint: Sync. again with CVS Autoconf.
20391
20392 2001-08-27 Akim Demaille <akim@epita.fr>
20393
20394 * Makefile.maint: Formatting changes.
20395 (po-update, cvs-update, update): New targets.
20396 (AMTAR): Remove.
20397
20398 2001-08-27 Akim Demaille <akim@epita.fr>
20399
20400 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20401 * Makefile.maint: Sync. with CVS Autoconf.
20402
20403 2001-08-27 Marc Autret <autret_m@epita.fr>
20404
20405 * src/vcg.h (struct infoname_s): New.
20406 (struct colorentry_s): New.
20407 (graph_s): New fields {vertical,horizontal}_order in structure.
20408 Add `infoname' field.
20409 Add `colorentry' field;
20410 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20411 (G_HORIZONTAL_ORDER): New.
20412 (G_INFONAME): New.
20413 (G_COLORENTRY): New.
20414 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20415 Add output of `infoname'.
20416 Add output of `colorentry'.
20417
20418 2001-08-27 Marc Autret <autret_m@epita.fr>
20419
20420 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20421 This one shadowed a global parameter.
20422
20423 2001-08-24 Marc Autret <autret_m@epita.fr>
20424
20425 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20426 instead of `unsigned'.
20427 (print_state): Do not call obstack_object_size () in obstack_grow ()
20428 to avoid macro variables shadowing.
20429
20430 2001-08-23 Marc Autret <autret_m@epita.fr>
20431
20432 * src/lex.c (percent_table): Typo: s/naem/name/.
20433 Add graph option.
20434 Normalize new options declarations.
20435
20436 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20437
20438 * tests/suite.at: Exercise %header_extension and %source_extension.
20439
20440 2001-08-16 Marc Autret <autret_m@epita.fr>
20441
20442 * src/reader.c (parse_dquoted_param): New.
20443 (parse_header_extension_decl): Use it.
20444 (parse_source_extension_decl): Likewise.
20445
20446 2001-08-16 Marc Autret <autret_m@epita.fr>
20447
20448 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20449 (get_xxxx_str): Use assert () instead of complain ().
20450 Remove return invokations in default cases.
20451 (get_decision_str): Modify default behaviour. Remove second argument.
20452 Echo modifications on calls.
20453 (output_graph): Fix.
20454
20455 2001-08-16 Marc Autret <autret_m@epita.fr>
20456
20457 * src/getargs.c (usage): Update with ``-g, --graph''.
20458
20459 2001-08-16 Marc Autret <autret_m@epita.fr>
20460
20461 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20462 (Option Cross Key): Likewise.
20463 * doc/bison.1: Update.
20464
1c8c2190
PB
204652001-09-25 Pascal Bart <pascal.bart@epita.fr>
20466
20467 * src/output.c (output_master_parser): Don't finish action_obstack.
20468 (output_parser): Don't care about the muscle action, here.
20469 (prepare): Copy the action_obstack in the action muscle.
20470 (output): Free action_obstack.
20471
180d45ba
PB
204722001-09-23 Pascal Bart <pascal.bart@epita.fr>
20473
20474 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20475 will contain `%union' declaration.
20476 (parse_union_decl): Delete #line directive output.
20477 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20478 informations about %union.
20479 (parse_union_decl): Copy the union_obstack in the muscle stype.
20480 * src/bison.simple: Add new #line directive.
20481 Add typdef %%stype YYSTYPE.
20482
c51d1a19
PB
204832001-09-23 Pascal Bart <pascal.bart@epita.fr>
20484
20485 * src/bison.simple: Add new `#line' directive.
20486
6f9344da
PB
204872001-09-22 Pascal Bart <pascal.bart@epita.fr>
20488
20489 * src/bison.simple: New `#line' directive.
20490 * src/output.c (output_parser): Support new dynamic muscle input_line.
20491
652def80
MA
204922001-09-22 Marc Autret <autret_m@epita.fr>
20493
20494 * src/output.c (output_master_parser): New.
20495 (output_parser): Be more re-entrant.
20496
25b222fa
MA
204972001-09-21 Marc Autret <autret_m@epita.fr>
20498
20499 * src/reader.c (copy_definition, parse_union_decl): Update and use
20500 `linef' muscle.
20501 (copy_action): Likewise.
20502 Use obstack_1grow ().
20503 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20504
6bc35ae5
MA
205052001-09-21 Marc Autret <autret_m@epita.fr>
20506
20507 * src/options.c (option_table): Adjust.
20508 * src/lex.c (parse_percent_token): Fix.
20509
c0629aa1
PB
205102001-09-20 Pascal Bart <pascal.bart@epita.fr>
20511
20512 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 20513
82b6d266
PB
205142001-09-20 Pascal Bart <pascal.bart@epita.fr>
20515
20516 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20517 is now an option_table_struct*.
20518 (option_strcmp): New function option_strcmp.
20519 (parse_percent_token): Call option_strcmp.
20520 * src/getargs.c (xalloc.h, options.h): Include it.
20521 (getargs): Call create_long_option_table.
20522 (getargs): Free longopts at the end of the function.
20523 (shortopts): Move in options.c.
20524 * src/options.c (create_long_option_table): New function. Convert
20525 information from option_table to option structure.
20526 * src/reader.c (options.h): Include it.
20527
20528 * src/Makefile.am: Adjust.
20529 * src/options.c (option_table): Create from longopts and percent_table.
20530 * src/getargs.c (longopts): Delete.
20531 * src/lex.c (struct percent_table_struct): Delete.
20532 (percent_table): Delete.
20533 (options.h): Include it.
20534 * src/options.c: Create.
20535 * src/options.h: Create.
20536 Declare enum opt_access_e.
20537 Define struct option_table_struct.
20538
75f5aaea
MA
205392001-09-20 Marc Autret <autret_m@epita.fr>
20540
20541 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20542 sections of Bison.
20543
f508cb0a
PB
205442001-09-19 Pascal Bart <pascal.bart@epita.fr>
20545
20546 * src/bison.simple: s/%%filename/%%skeleton.
20547 * src/muscle_tab.c (getargs.h): Include it.
20548 (muscle_init): Insert new muscle skeleton.
20549
13105fc1
PB
205502001-09-18 Pascal Bart <pascal.bart@epita.fr>
20551
20552 * src/output.c (output_parser): Delete unused variable actions_dumped.
20553
b0c4483e
PB
205542001-09-07 Pascal Bart <pascal.bart@epita.fr>
20555
20556 * src/output.c (output): Delete call to reader_output_yylsp.
20557 * src/reader.c (reader): Likewise.
ba0fe3c7 20558 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 20559
11d82f03
MA
205602001-09-02 Marc Autret <autret_m@epita.fr>
20561
20562 * src/reader.c: Include muscle_tab.h.
20563 (parse_union_decl): Update.
20564 (parse_macro_decl): Rename parse_muscle_decl.
20565 Update to use renamed functions and variable.
20566 (read_declarations, copy_action, read_additionnal_code, : Updated
20567 with correct variables and functions names.
20568 (packsymbols, reader): Likewise.
342b8b6e 20569
11d82f03 20570 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 20571
11d82f03
MA
20572 * src/output.c: Include muscle_tab.h
20573 In all functions using macro_insert, change by using muscle_insert ().
20574 (macro_obstack): Rename muscle_obstack.
20575 Echo modifications in the whole file.
20576 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20577 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20578 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20579
20580 * src/muscle_tab.h: Update double inclusion macros.
20581 (macro_entry_s): Rename muscle_entry_s.
20582 Update prototypes.
342b8b6e 20583
11d82f03
MA
20584 * src/muscle_tab.c: Include muscle_tab.h.
20585 Rename macro_tabble to muscle_table.
20586 (mhash1, mhash2, mcmp): Use muscle_entry.
20587 (macro_init): Rename muscle_init. Update.
20588 (macro_insert): Rename muscle_insert. Update.
20589 (macro_find): Rename muscle_find. Update.
20590
20591 * src/main.c: Include muscle_tab.h.
20592 (main): Call muscle_init ().
20593 * src/Makefile.am (bison_SOURCES): Echo modifications.
20594
93a37297
MA
205952001-09-02 Marc Autret <autret_m@epita.fr>
20596
f753cd62 20597 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 20598
f753cd62
MA
20599 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20600
206012001-09-02 Marc Autret <autret_m@epita.fr>
20602
20603 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 20604
682d48cd
PB
206052001-09-01 Pascal Bart <pascal.bart@epita.fr>
20606
342b8b6e 20607 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
20608 filename.
20609
087c8fda
MA
206102001-09-01 Marc Autret <autret_m@epita.fr>
20611
20612 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20613 to an explicit value to activate the feature. We do it here.
20614
dda680cb
PB
206152001-08-31 Pascal Bart <pascal.bart@epita.fr>
20616
20617 * src/output.c (prepare): Delete the `filename' muscule insertion.
20618 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20619 (parse_union_decl): Likewise.
20620 * src/macrotab.c (macro_init): Initialize filename by infile.
20621
9e644e64
MA
206222001-08-31 Marc Autret <autret_m@epita.fr>
20623
20624 * src/bison.simple (YYLSP_NEEDED): New definition.
20625 * src/output.c (prepare): Add macro insertion of `locations_flag'
20626
17da6427
PB
206272001-08-31 Pascal Bart <pascal.bart@epita.fr>
20628
20629 * src/output.c (prepare): Delete insertion of previous muscles,
20630 and insert the `prefix' muscles.
20631 * src/macrotab.c (macro_init): Likewise.
20632 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 20633 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
20634 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20635 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 20636 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
20637 name_prefix.
20638
e8cb70b9
PB
206392001-08-31 Pascal Bart <pascal.bart@epita.fr>
20640
20641 * src/main.c (main): Standardize.
20642 * src/output.c (output_table_data, output_parser): Likewise.
20643 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20644
63c2d5de
MA
206452001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20646
342b8b6e 20647 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
20648 %%epilogue.
20649 * src/output.c (output): Rename %%declarations to %%prologue.
20650 * src/bison.simple: Echo modifications.
342b8b6e 20651
d8cb5183
MA
206522001-08-31 Marc Autret <autret_m@epita.fr>
20653
20654 * src/reader.c (readgram): CleanUp.
20655 (output_token_defines): Likewise.
20656 (packsymbols): Likewise.
20657 (reader): Likewise.
20658 * src/output.c (output): CPP-out useless code.
20659
6c686258
PB
206602001-08-31 Pascal Bart <pascal.bart@epita.fr>
20661
342b8b6e 20662 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
20663 output_trailers and output_headers.
20664 * src/output.h: Remove obsolete functions prototypes of output_headers
20665 and output_trailers.
20666
8f451ef7
PB
206672001-08-30 Pascal Bart <pascal.bart@epita.fr>
20668
20669 * src/main.c: Include macrotab.h.
342b8b6e 20670 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
20671 Adjust functions prototypes.
20672 * src/macrotab.c (macro_insert): Constify key and value.
20673 (macro_find): Constify key.
20674 (macro_insert): Include 'xalloc.h'
20675 (macro_insert): Use XMALLOC.
20676 (macro_find): Constify return value.
20677 * src/output.c (output_table_data): Rename table to table_data.
20678 (output_parser): Constify macro_key, macro_value.
20679
997b6fd0 206802001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
20681
20682 * src/reader.c (parse_skel_decl): New.
342b8b6e 20683 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
20684 * src/lex.h (token_t): New token `tok_skel'.
20685 * src/lex.c (percent_table): Add skeleton option entry.
20686 Standardize.
20687
ff48177d
MA
206882001-08-29 Marc Autret <autret_m@epita.fr>
20689
20690 * src/bison.simple: Add %%user_code directive at the end.
20691 * src/reader.c (read_additionnal_code): New.
20692 (reader): Use it.
20693 * src/output.c (output_program): Remove.
20694 (output): Update.
20695
b33160bf
MA
206962001-08-28 Marc Autret <autret_m@epita.fr>
20697
20698 * src/output.c (output_actions): Clean up.
4e5caae2 20699 (output_gram): CPP-out useless code.
b33160bf
MA
20700 * src/reader.c (reader): Clean up, CPP-out useless code.
20701
d1a2daf7
PB
207022001-08-28 Pascal Bart <pascal.bart@epita.fr>
20703
342b8b6e 20704 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 20705 directive.
d1a2daf7
PB
20706 * src/bison.simple: Add `%%definitions'.
20707
2b763dfe
MA
207082001-08-28 Marc Autret <autret_m@epita.fr>
20709
20710 * config/depcomp: New file.
20711
f1a87ef6
PE
207122001-08-27 Paul Eggert <eggert@twinsun.com>
20713
20714 * src/bison.simple (yyparse): Don't take the address of an
20715 item before the start of an array, as that doesn't conform to
20716 the C Standard.
20717
82e236e2
RA
207182001-08-27 Robert Anisko <robert.anisko@epita.fr>
20719
f1a87ef6 20720 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
20721 obstack. It was done too late here.
20722
20723 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20724 completely wrong.
20725 (reader): Initialize the macro obstack here, since we need it to grow
20726 '%define' directives.
20727
20728 * src/reader.h: Declare the macro obstack as extern.
20729
b0cfa28a
RA
207302001-08-27 Robert Anisko <robert.anisko@epita.fr>
20731
20732 * src/output.c (output_parser): Fix. Store single '%' characters in
20733 the output obstack instead of throwing them away.
20734
6fc74234
AD
207352001-08-27 Akim Demaille <akim@epita.fr>
20736
20737 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20738
9c76d118
RA
207392001-08-25 Robert Anisko <robert.anisko@epita.fr>
20740
20741 * lib/Makefile.am: Adjust.
20742
a8289c62
RA
207432001-08-25 Robert Anisko <robert.anisko@epita.fr>
20744
20745 * src/bison.simple: Update and add '%%' directives.
20746
b6610515
RA
207472001-08-25 Robert Anisko <robert.anisko@epita.fr>
20748
20749 * src/reader.c (reader): Remove calls to 'output_headers' and
20750 'output_trailers'. Remove some C output.
20751 (readgram): Disable a piece of code that was writing a default
20752 definition for 'YYSTYPE'.
20753 (reader_output_yylsp): Remove.
20754 (packsymbols): Output token defintions to a macro.
20755 (copy_definition): Disable C output.
6fc74234 20756
b6610515
RA
20757 * src/reader.c (parse_macro_decl): New function used to parse macro
20758 declarations.
20759 (copy_string2): Put the body of copy_string into this new function.
20760 Add a parameter to let the caller choose whether he wants to copy the
20761 string delimiters or not.
20762 (copy_string): Be a simple call to copy_string2 with the last argument
20763 bound to true.
20764 (read_declarations): Add case for macro definition.
20765 (copy_identifier): New.
6fc74234 20766 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
20767 rather than lex.
20768
26f609ff
RA
207692001-08-25 Robert Anisko <robert.anisko@epita.fr>
20770
20771 * src/output.c (prepare): Add prefixed names.
20772 (output_parser): Output semantic actions.
20773 (output_parser): Fix bug on '%%line' directives.
6fc74234 20774
26f609ff
RA
20775 * src/output.c (output_headers): Remove. The C code printed by this
20776 function should now be in the skeletons.
20777 (output_trailers): Remove.
20778 (output): Disable call to 'reader_output_yylsp'.
20779 (output_rule_data): Do not output tables to the table obstack.
20780
20781 * src/output.c: Remove some C dedicated output.
20782 Improve the use of macro and output obstacks.
20783 (output_defines): Remove.
6fc74234 20784
26f609ff
RA
20785 * src/output.c (output_token_translations): Associate 'translate'
20786 table with a macro. No output to the table obstack.
20787 (output_gram): Same for 'rhs' and 'prhs'.
20788 (output_stos): Same for 'stos'.
20789 (output_rule_data): Same for 'r1' and 'r2'.
20790 (token_actions): Same for 'defact'.
20791 (goto_actions): Same for 'defgoto'.
20792 (output_base): Same for 'pact' and 'pgoto'.
20793 (output_table): Same for 'table'.
20794 (output_check): Same for 'check'.
6fc74234 20795
26f609ff
RA
20796 * src/output.c (output_table_data): New function.
20797 (output_short_table): Remove.
20798 (output_short_or_char_table): Remove.
6fc74234 20799
26f609ff
RA
20800 * src/output.c (output_parser): Replace most of the skeleton copy code
20801 with something new. Skeletons are now processed character by character
20802 rather than line by line, and Bison looks for '%%' macros. This is the
20803 first step in making Bison's output process (a lot) more flexible.
20804 (output_parser): Use the macro table.
20805
6f43b113
RA
208062001-08-25 Robert Anisko <robert.anisko@epita.fr>
20807
20808 * src/main.c (main): Initialize the macro table.
20809
dd3127cf
RA
208102001-08-25 Robert Anisko <robert.anisko@epita.fr>
20811
20812 * src/lex.c (percent_table): Add tok_define.
20813 * src/lex.h: Add tok_define.
20814
aa321494
RA
208152001-08-25 Robert Anisko <robert.anisko@epita.fr>
20816
20817 * src/macrotab.c: New file.
20818 * src/macrotab.h: New file.
20819 * src/Makefile.am: Update.
20820
68bd3b6b
RA
208212001-08-25 Robert Anisko <robert.anisko@epita.fr>
20822
20823 * lib/hash.c: New file.
20824 * lib/hash.h: New file.
20825 * lib/Makefile.am: Update.
20826
45f8dd1e
AD
208272001-08-15 Akim Demaille <akim@epita.fr>
20828
20829 Version 1.28c.
20830
40a64a7a 208312001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
20832
20833 * src/reader.c (readgram): Indent output macro YYSTYPE.
20834 (packsymbols): Likewise.
20835 (output_token_defines): Likewise.
20836 * src/files.c: Standardize.
20837 (compute_header_macro): New.
20838 (defines_obstack_save): New. Use compute_header_macro.
20839 (output_files): Update. Use defines_obstack_save.
20840
f9a8293a
AD
208412001-08-15 Akim Demaille <akim@epita.fr>
20842
20843 * doc/bison.texinfo (Table of Symbols): Document
20844 YYSTACK_USE_ALLOCA.
20845
150ca7a7
AD
208462001-08-15 Akim Demaille <akim@epita.fr>
20847
20848 * missing: Update from CVS Automake.
20849 * config/config.guess, config/config.sub, config/texinfo.tex:
20850 Update from gnu.org.
20851
69b5cec4
AD
208522001-08-15 Akim Demaille <akim@epita.fr>
20853
20854 * Makefile.maint: Sync with CVS Autoconf.
20855
f2b5126e
PB
208562001-08-14 Pascal Bart <pascal.bart@epita.fr>
20857
69b5cec4 20858 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
20859 `fdl.texi'.
20860 * doc/fdl.texi: Add to package.
20861
4ecbf796
MA
208622001-08-14 Marc Autret <autret_m@epita.fr>
20863
20864 Turn on %{source,header}_extension features.
20865
69b5cec4 20866 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
20867 source_extension.
20868 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 20869 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
20870 between options.
20871
95fb5662
MA
208722001-08-14 Marc Autret <autret_m@epita.fr>
20873
20874 * src/files.c (compute_base_names): Add extensions computing when
20875 `--file-prefix' used.
20876 Standardize function calls.
20877
78d09da9
MA
208782001-08-13 Marc Autret <autret_m@epita.fr>
20879
69b5cec4 20880 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
20881 defining it (defined but null disables alloca).
20882
5a009f2c
MA
208832001-08-13 Marc Autret <autret_m@epita.fr>
20884
20885 * src/bison.simple (_yy_memcpy): CPP reformat.
20886
1e41465a
PB
208872001-08-13 Pascal Bart <pascal.bart@epita.fr>
20888
20889 * tests/atconfig.in (CPPFLAGS): Fix.
20890
c67a198d
PB
208912001-08-10 Pascal Bart <pascal.bart@epita.fr>
20892
79282c6c 20893 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
20894 `gpl.texi'.
20895 * doc/gpl.texi: Add to package.
20896
09a6de7e
MA
208972001-08-10 Marc Autret <autret_m@epita.fr>
20898
20899 * src/print_graph.h: Fix.
20900 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20901
b77b9ee0
AD
209022001-08-10 Akim Demaille <akim@epita.fr>
20903
20904 * src/system.h: Provide default declarations for stpcpy, strndup,
20905 and strnlen.
20906
3e259915
MA
209072001-08-10 Robert Anisko <anisko_r@epita.fr>
20908
20909 * doc/bison.texinfo (Locations): Update @$ stuff.
20910
ca96bc2d
MA
209112001-08-09 Robert Anisko <anisko_r@epita.fr>
20912
20913 * src/bison.simple (YYLLOC_DEFAULT): Update.
20914 (yyparse): Adjust.
20915
fdc6758b
MA
209162001-08-08 Marc Autret <autret_m@epita.fr>
20917
b77b9ee0 20918 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
20919 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20920 Reported by Fabrice Bauzac.
957d4dbf 20921
600cad3b
MA
209222001-08-08 Marc Autret <autret_m@epita.fr>
20923
20924 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20925 * src/vcg.c (output_node): Fix.
20926 * src/vcg.h: Cleanup.
20927 * src/print_graph.c: Add comments.
b77b9ee0 20928 (node_output_size): New global variable. Simplify the formatting of
600cad3b 20929 the VCG graph output.
b77b9ee0 20930 (print_actions): Unused code is now used. It notifies the final state
600cad3b 20931 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 20932 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
20933 blue.
20934 Get the current node name and node_obstack by argument.
20935 (node_obstack): New variable.
20936 (print_state): Manage node_obstack.
20937 (print_core): Use node_obstack given by argument.
20938 A node is not only computed here but in print_actions also.
20939 (print_graph): CPP out useless code instead of commenting it.
20940
976e528f
AD
209412001-08-07 Pascal Bart <pascal.bart@epita.fr>
20942
20943 * tests/atconfig.in (CPPFLAGS): Fix.
20944
20e8e5ca
AD
209452001-08-07 Akim Demaille <akim@epita.fr>
20946
20947 * src/print_graph.c (quote): New.
20948 (print_core): Use it.
20949
957d4dbf 209502001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 20951
3e3da797
AD
20952 * src/vcg.c (complain.h): Include it.
20953 Unepitaize `return' invocations.
c4b66126 20954 [NDEBUG] (main): Remove.
79282c6c 20955 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
20956 * src/files.c (open_files): Initialize graph_obstack.
20957 * src/print_graph.c (print_actions): CPP out useless code.
20958 (print_core): Don't output the last `\n' in labels.
20959 Use `quote'.
20960 * src/files.c (output_files): Output the VCG file.
20961 * src/main.c (main): Invoke print_graph ();
3e3da797 20962
957d4dbf 209632001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
20964
20965 Automaton VCG graph output.
20966 Using option ``-g'' or long option ``--graph'', you can generate
20967 a gram_filename.vcg file containing a VCG description of the LALR (1)
20968 automaton of your grammar.
20969
20970 * src/main.c: Call to print_graph() function.
20971 * src/getargs.h: Update.
20972 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20973 (graph_flag): New flag.
20974 (longopts): Update.
20975 (getargs): Add case `g'.
20976 * src/files.c (graph_obstack): New obstack struct.
20977 (open_files): Initialize new obstack.
20978 (output_files): Saves graph_obstack if required.
20979 * src/files.h (graph_obstack): New extern declaration.
20980 * src/Makefile.am: Add new source files.
20981
927c1557 209822001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
20983
20984 * src/print_graph.c, src/print_graph.h (graph): New.
20985 * src/vcg.h: New file.
20986 * src/vcg.c: New file, VCG graph handling.
20987
7333d403
AD
209882001-08-06 Marc Autret <autret_m@epita.fr>
20989
20990 Add of %source_extension and %header_extension which specify
20991 the source or/and the header output file extension.
20992
20993 * src/files.c (compute_base_names): Remove initialisation of
20994 src_extension and header_extension.
20995 (compute_exts_from_gf): Update.
20996 (compute_exts_from_src): Update.
20997 (output_files): Update.
20998 * src/reader.c (parse_header_extension_decl): New.
20999 (parse_source_extension_decl): New.
21000 (read_declarations): New case statements for the new tokens.
21001 * src/lex.c (percent_table): Add entries for %source_extension
21002 and %header_extension.
21003 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
21004
84163231
AD
210052001-08-06 Marc Autret <autret_m@epita.fr>
21006
21007 * configure.in: Bump to 1.28c.
21008 * doc/bison.texinfo: Texinfo thingies.
21009
8303fc42
AD
210102001-08-04 Pascal Bart <pascal.bart@epita.fr>
21011
21012 * tests/atconfig.in (CPPFLAGS): Add.
21013 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
21014
70a84437
AD
210152001-08-03 Akim Demaille <akim@epita.fr>
21016
21017 Version 1.28b.
21018
2ce10144
AD
210192001-08-03 Akim Demaille <akim@epita.fr>
21020
21021 * tests/Makefile.am (check-local): Ship testsuite.
21022 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
21023 Include `string.h'.
21024
1e3e4bc1
AD
210252001-08-03 Akim Demaille <akim@epita.fr>
21026
21027 * configure.in: Try using -Wformat when compiling.
21028
42b45b7f
AD
210292001-08-03 Akim Demaille <akim@epita.fr>
21030
21031 * configure.in: Bump to 1.28b.
21032
8f13fe33
AD
210332001-08-03 Akim Demaille <akim@epita.fr>
21034
21035 * src/complain.c: Adjust strerror_r portability issues.
21036
b37ba92c
AD
210372001-08-03 Akim Demaille <akim@epita.fr>
21038
21039 Version 1.28a.
21040
b0ce6046
AD
210412001-08-03 Akim Demaille <akim@epita.fr>
21042
21043 * src/getargs.c, src/getarg.h (skeleton)): Constify.
21044 * src/lex.c (literalchar): Avoid name clashes on `buf'.
21045 * src/getargs.c: Include complain.h.
21046 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21047 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21048
d01c415b
AD
210492001-08-03 Akim Demaille <akim@epita.fr>
21050
21051 * src/reader.c (readgram): Display hidden chars in error messages.
21052
459dd1a6
AD
210532001-08-03 Akim Demaille <akim@epita.fr>
21054
21055 Update to gettext 0.10.39.
21056
53b74c0c
AD
210572001-08-03 Akim Demaille <akim@epita.fr>
21058
21059 * lib/strspn.c: New.
21060
234a3be3
AD
210612001-08-01 Marc Autret <autret_m@epita.fr>
21062
21063 * doc/bison.texinfo: Update.
21064 * doc/bison.1 (mandoc): Update.
21065 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21066 * src/files.c: Support output files extensions computing.
21067 (src_extension): New static variable.
21068 (header_extension): New static variable.
21069 (tr): New function.
21070 (get_extension_index): New function, gets the index of an extension
21071 filename in a string.
21072 (compute_exts_from_gf): New function, computes extensions from the
21073 grammar file extension.
21074 (compute_exts_from_src): New functions, computes extensions from the
21075 C source file extension, file given by ``-o'' option.
21076 (compute_base_names): Update.
21077 (output_files): Update.
21078
847bf1f5
AD
210792001-08-01 Robert Anisko <anisko_r@epita.fr>
21080
d995fee7 21081 * doc/bison.texi: Document @$.
847bf1f5
AD
21082 (Locations): New section.
21083
d074a105
AD
210842001-07-18 Akim Demaille <akim@epita.fr>
21085
21086 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21087 * config/prev-version.txt, config/move-if-change: New.
21088 * Makefile.am: Adjust.
21089
3419715d
AD
210902001-07-08 Pascal Bart <pascal.bart@epita.fr>
21091
21092 * src/bison.simple (yyparse): Suppress warning `comparaison
21093 between signed and unsigned'.
21094
62ab6972
AD
210952001-07-05 Pascal Bart <pascal.bart@epita.fr>
21096
21097 * src/getargs.h (raw_flag): Remove.
21098 * src/getargs.c: Die on `-r'/`--raw'.
21099 * src/lex.c (parse_percent_token): Die on `%raw'.
21100 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21101 * tests/calc.at: Suppress test with option `--raw'.
21102
1e24cc5b
AD
211032001-07-14 Akim Demaille <akim@epita.fr>
21104
21105 * config/: New.
21106 * configure.in: Require Autoconf 2.50.
21107 Update to gettext 0.10.38.
21108
32dfccf8
AD
211092001-03-16 Akim Demaille <akim@epita.fr>
21110
21111 * doc/bison.texinfo: ANSIfy the examples.
21112
cd5bd6ac
AD
211132001-03-16 Akim Demaille <akim@epita.fr>
21114
21115 * getargs.c (skeleton): New variable.
21116 (longopts): --skeleton is a new option.
21117 (shortopts, getargs): -S is a new option.
21118 * getargs.h: Declare skeleton.
21119 * output.c (output_parser): Use it.
21120
5141b016
AD
211212001-03-16 Akim Demaille <akim@epita.fr>
21122
21123 * m4/strerror_r.m4: New.
21124 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21125 * lib/error.h, lib/error.c: Update.
21126
447992b9
AD
211272001-03-16 Akim Demaille <akim@epita.fr>
21128
21129 * src/getargs.c (longopts): Clean up.
21130
274d42ce
AD
211312001-02-21 Akim Demaille <akim@epita.fr>
21132
21133 * src/reader.c (gensym): `gensym_count' is your own.
21134 Use a static buf to create the symbol name, as token_buffer is no
21135 longer a buffer.
21136
22c821f3
AD
211372001-02-08 Akim Demaille <akim@epita.fr>
21138
21139 * src/conflicts.c (conflict_report): Be sure not to append to res
21140 between two calls, which could happen if both first sprintf were
21141 skipped, but not the first cp += strlen.
21142
18569462
AD
211432001-02-08 Akim Demaille <akim@epita.fr>
21144
21145 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21146 New, from fileutils 4.0.37.
21147 * configure.in: Require Autoconf 2.49c. I took some time before
21148 making this decision. This is the only way out for portability
21149 issues in Bison, it would mean way too much duplicate effort to
21150 import in Bison features implemented in 2.49c since 2.13.
21151 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21152
0d8f3c8a
AD
211532001-02-02 Akim Demaille <akim@epita.fr>
21154
21155 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 21156 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 21157
f17bcd1f
AD
211582001-01-19 Akim Demaille <akim@epita.fr>
21159
21160 Get rid of the ad hoc handling of token_buffer in the scanner: use
21161 the obstacks.
21162
21163 * src/lex.c (token_obstack): New.
21164 (init_lex): Initialize it. No longer call...
21165 (grow_token_buffer): this. Remove it.
21166 Adjust all the places which used it to use the obstack.
21167
511e79b3
AD
211682001-01-19 Akim Demaille <akim@epita.fr>
21169
21170 * src/lex.h: Rename all the tokens:
21171 s/\bENDFILE\b/tok_eof/g;
21172 s/\bIDENTIFIER\b/tok_identifier/g;
21173 etc.
21174 Let them be enums, not #define, to ease debugging.
21175 Adjust all the code.
21176
0d6508ef
AD
211772001-01-18 Akim Demaille <akim@epita.fr>
21178
21179 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21180 * src/lex.c (maxtoken, grow_token_buffer): Static.
21181
6deb4447
AD
211822001-01-18 Akim Demaille <akim@epita.fr>
21183
21184 Since we now use obstacks, more % directives can be enabled.
21185
21186 * src/lex.c (percent_table): Also accept `%yacc',
21187 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21188 `%debug'.
21189 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21190 instead of returning a token.
21191 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21192 * src/reader.c (read_declarations): Adjust.
21193 * src/files.c (open_files): Don't call `compute_base_names', don't
21194 compute `attrsfile' since they depend upon data which might be
21195 *in* the input file now.
21196 (output_files): Do it here.
21197 * src/output.c (output_headers): Document the fact that this patch
21198 introduces a guaranteed SEGV for semantic parsers.
21199 * doc/bison.texinfo: Document them.
21200 * tests/suite.at: Exercise these %options.
21201
ff4423cc
AD
212022000-12-20 Akim Demaille <akim@epita.fr>
21203
21204 Also handle the output file (--verbose) with obstacks.
21205
21206 * files.c (foutput): Remove.
21207 (output_obstack): New.
21208 Adjust all dependencies.
21209 * src/conflicts.c: Return a string.
21210 * src/system.h (obstack_grow_string): Rename as...
21211 (obstack_sgrow): this. Be ready to work with non literals.
21212 (obstack_fgrow4): New.
21213
956dba3a
AD
212142000-12-20 Akim Demaille <akim@epita.fr>
21215
21216 * src/files.c (open_files): Fix the computation of short_base_name
21217 in the case of `-o foo.tab.c'.
21218
337bab46
AD
212192000-12-20 Akim Demaille <akim@epita.fr>
21220
21221 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21222 (copy_dollar): Now that everything uses obstacks, get rid of the
21223 FILE * parameters.
21224
5d3214b8
AD
212252000-12-20 Akim Demaille <akim@epita.fr>
21226
21227 * src/files.c (open_files): Actually the `.output' file is based
21228 on the short_base_name, not base_name.
21229 * tests/suite.at (Checking output file names): Adjust.
21230
29092a57
AD
212312000-12-20 Akim Demaille <akim@epita.fr>
21232
21233 * src/bison.s1: Remove, we now use directly...
21234 * src/bison.simple: this.
21235 * src/Makefile.am: Use pkgdata instead of data.
21236
ea5607fd
AD
212372000-12-20 Akim Demaille <akim@epita.fr>
21238
21239 * src/files.c (guard_obstack): New.
21240 (open_files): Initialize it.
21241 (output_files): Dump it...
21242 * src/files.h: Export it.
21243 * src/reader.c (copy_guard): Use it.
21244
27110317
AD
212452000-12-19 Akim Demaille <akim@epita.fr>
21246
21247 * src/files.c (outfile, defsfile, actfile): Removed as global
21248 vars.
21249 (open_files): Don't compute them.
21250 (output_files): Adjust.
21251 (base_name, short_base_name): Be global.
21252 Adjust dependencies.
21253
19c50364
AD
212542000-12-19 Akim Demaille <akim@epita.fr>
21255
21256 * src/files.c (strsuffix): New.
21257 (stringappend): Be just like strcat but allocate.
21258 (base_names): Eve out from open_files.
21259 Try to simplify the rather hairy computation of base_name and
21260 short_base_name.
21261 (open_files): Use it.
21262 * tests/suite.at (Checking output file names): New test.
21263
573c1d9f
AD
212642000-12-19 Akim Demaille <akim@epita.fr>
21265
21266 * src/system.h (obstack_grow_literal_string): Rename as...
21267 (obstack_grow_string): this.
21268 * src/output.c (output_parser): Recognize `%% actions' instead of
21269 `$'.
21270 * src/bison.s1: s/$/%% actions/.
21271 * src/bison.hairy: Likewise.
21272
ef7ddedd
AD
212732000-12-19 Akim Demaille <akim@epita.fr>
21274
21275 * src/output.c (output_parser): Compute the `#line' lines when
21276 there are.
21277 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21278 Suggested by Hans Aberg.
21279
ff61dabd
AD
212802000-12-19 Akim Demaille <akim@epita.fr>
21281
21282 Let the handling of the skeleton files be local to the procedures
21283 that use it.
21284
21285 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21286 longer static.
21287 (fparser, open_extra_files): Remove.
21288 (open_files, output_files): Don't take care of fparser.
21289 * src/files.h: Adjust.
21290 * src/output.c (output_parser): Open and close the file to the
21291 skeleton.
21292 * src/reader.c (read_declarations): When %semantic_parser, open
21293 fguard.
21294
55b96341
AD
212952000-12-19 Akim Demaille <akim@epita.fr>
21296
21297 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21298 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21299
358c15b7
AD
213002000-12-19 Akim Demaille <akim@epita.fr>
21301
21302 * src/files.c (open_files): Yipee! We no longer need all the code
21303 looking for `/tmp' since we have no tmp file.
21304
7de3329e
AD
213052000-12-19 Akim Demaille <akim@epita.fr>
21306
21307 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21308 New macros.
21309 * src/files.c (open_files): Less dependency on MSDOS etc.
21310
3abcd459
AD
213112000-12-14 Akim Demaille <akim@epita.fr>
21312
21313 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21314 Provide a default definition.
21315 Use it when executing the default @ action.
21316 * src/reader.c (reader_output_yylsp): No longer include
21317 `timestamp' and `text' in the default YYLTYPE.
21318
2a91a95e
AD
213192000-12-12 Akim Demaille <akim@epita.fr>
21320
21321 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21322 (copy_guard): Quote the file names.
21323 Reported by Laurent Mascherpa.
21324
14d3eb9b
AD
213252000-12-12 Akim Demaille <akim@epita.fr>
21326
21327 * src/output.c (output_headers, output_program, output): Be sure
21328 to escape special characters when outputting filenames.
21329 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21330 (output_headers): Don't depend on them, Use ACTSTR.
21331
d7045ec6
AD
213322000-11-17 Akim Demaille <akim@epita.fr>
21333
21334 * lib/obstack.h: Formatting changes.
21335 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21336 prevents type checking.
21337 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21338 cast the value to (void *): assigning a `foo *' to a `void *'
21339 variable is valid.
21340 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21341 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21342 append characters.
21343
6fd54b73
AD
213442000-11-17 Akim Demaille <akim@epita.fr>
21345
21346 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21347 as...
21348 (suite.m4, regression.m4, calc.m4): these.
21349 * tests/atgeneral.m4: Update from CVS Autoconf.
21350
4c50eae6
AD
213512000-11-17 Akim Demaille <akim@epita.fr>
21352
21353 * tests/regression.m4 (%union and --defines): New test,
21354 demonstrating a current bug in the obstack implementation.
21355
a35f64ea
AD
213562000-11-17 Akim Demaille <akim@epita.fr>
21357
21358 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21359 macros.
21360 Use them to declare the variables which are global or local to
21361 `yyparse'.
21362
7de23534
AD
213632000-11-17 Akim Demaille <akim@epita.fr>
21364
21365 * acconfig.h: Remove, no longer used.
21366
aa7815f5
AD
213672000-11-07 Akim Demaille <akim@epita.fr>
21368
21369 * src: s/Copyright (C)/Copyright/g.
21370
5af1f549
AD
213712000-11-07 Akim Demaille <akim@epita.fr>
21372
21373 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21374 defining.
21375 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21376
553e2b22
AD
213772000-11-07 Akim Demaille <akim@epita.fr>
21378
21379 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21380 Merge in a single CPP if/else.
21381
8a4f41d6
AD
213822000-11-07 Akim Demaille <akim@epita.fr>
21383
21384 * src/output.c (output): Remove useless variables.
21385 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21386 argument `data' for consistency with the prototypes.
21387 Qualify it `const'.
21388 (obstack_copy, obstack_copy0): Rename the second argument as
21389 `address' for consistency. Qualify it `const'.
21390 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21391 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21392 `const' their input argument (`data' or `address').
21393 Adjust the corresponding macros to include `const' in casts.
21394
095a3fb5
AD
213952000-11-03 Akim Demaille <akim@epita.fr>
21396
21397 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21398 s/PFILE1/BISON_HAIRY/.
21399 Adjust dependencies.
21400
d1cdce7c
AD
214012000-11-03 Akim Demaille <akim@epita.fr>
21402
090c5ebf 21403 For some reason, this was not applied.
d1cdce7c
AD
21404
21405 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21406 `unlink': it's no longer used.
21407
9311529b
AD
214082000-11-03 Akim Demaille <akim@epita.fr>
21409
21410 * src/files.c (skeleton_find): New function, eved out of...
21411 (open_files, open_extra_files): here.
21412
d8880f69
AD
214132000-11-03 Akim Demaille <akim@epita.fr>
21414
21415 Don't use `atexit'.
21416
21417 * src/files.c (obstack_save): New function.
21418 (done): Rename as...
21419 (output_files): this.
21420 Use `obstack_save'.
21421 * src/main.c (main): Don't use `atexit' to register `done', since
21422 it no longer has to remove tmp files, just call `output_files'
21423 when there are no errors.
21424
0dbb648e
AD
214252000-11-02 Akim Demaille <akim@epita.fr>
21426
21427 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21428 `unlink': it's no longer used.
21429 * src/files.h: Formatting changes.
21430
896fe5c1
AD
214312000-11-02 Akim Demaille <akim@epita.fr>
21432
21433 Remove the last uses of mktemp and unlink/delete.
21434
21435 * src/files.c (fdefines, ftable): Removed.
21436 (defines_ostack, table_obstack): New.
21437 Adjust dependencies of the former into uses of the latter.
21438 * src/output.c (output_short_or_char_table, output_short_table):
21439 Convert to using obstacks.
21440 * src/reader.c (copy_comment2): Accept one FILE * and two
21441 obstacks.
21442 (output_token_defines, reader_output_yylsp): Use obstacks.
21443 * src/system.h (obstack_fgrow3): New.
1f65350a 21444 * po/POTFILES.in: Adjust.
896fe5c1 21445
dd60faec
AD
214462000-11-01 Akim Demaille <akim@epita.fr>
21447
21448 Change each use of `fattrs' into a use of `attrs_obstack'.
21449
21450 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21451 * src/files.c (fattrs): Remove.
21452 (attrs_obstack): New.
21453 Adjust all dependencies.
21454 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21455
8c7ebe49
AD
214562000-11-01 Akim Demaille <akim@epita.fr>
21457
21458 Introduce obstacks.
21459 Change each use of `faction' into a use of `action_obstack'.
21460
21461 * lib/obstack.h, lib/obstack.c: New files.
21462 * src/files.c (faction): Remove.
21463 (action_obstack): New.
21464 Adjust all dependencies.
21465
77aee789
AD
214662000-10-20 Akim Demaille <akim@epita.fr>
21467
21468 * lib/quote.h (PARAMS): New macro. Use it.
21469
43591cec
AD
214702000-10-16 Akim Demaille <akim@epita.fr>
21471
21472 * src/output.c (output_short_or_char_table): New function.
21473 (output_short_table, output_token_translations): Use it.
21474 (goto_actions): Use output_short_table.
21475
1e9798d5
AD
214762000-10-16 Akim Demaille <akim@epita.fr>
21477
21478 * src/symtab.c (bucket_new): New function.
21479 (getsym): Use it.
21480
21481 * src/output.c (output_short_table): New argument to display the
21482 comment associated with the table.
21483 Adjust dependencies.
21484 (output_gram): Use it.
21485 (output_rule_data): Nicer output layout for YYTNAME.
21486
f282676b
AD
214872000-10-16 Akim Demaille <akim@epita.fr>
21488
21489 * src/lex.c (read_typename): New function.
21490 (lex): Use it.
21491 * src/reader.c (copy_dollar): Likewise.
21492
550a72a3
AD
214932000-10-16 Akim Demaille <akim@epita.fr>
21494
21495 * src/reader.c (copy_comment2): Expect the input stream to be on
21496 the `/' which is suspected to open a comment, instead of being
21497 called after `//' or `/*' was read.
21498 (copy_comment, copy_definition, parse_union_decl, copy_action)
21499 (copy_guard): Adjust.
21500
131e2fef
AD
215012000-10-16 Akim Demaille <akim@epita.fr>
21502
21503 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21504 `read_signed_integer'.
21505
79282c5a
AD
215062000-10-16 Akim Demaille <akim@epita.fr>
21507
21508 * src/reader.c (copy_dollar): New function.
21509 (copy_guard, copy_action): Use it.
21510
ff4a34be
AD
215112000-10-16 Akim Demaille <akim@epita.fr>
21512
21513 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21514 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21515 New files, from Fileutils 4.0.27.
21516 * src/main.c (printable_version): Remove.
21517 * src/lex.c, src/reader.c: Use `quote'.
21518
215192000-10-04 Akim Demaille <akim@epita.fr>
21520
21521 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21522
14ded682
AD
215232000-10-04 Akim Demaille <akim@epita.fr>
21524
21525 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21526
8e03724b
AD
215272000-10-04 Akim Demaille <akim@epita.fr>
21528
21529 When a literal string is used to define two different tokens,
21530 `bison -v' segfaults.
21531 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21532
21533 * tests/regression.m4: New file.
21534 Include the core of the sample provided by Piotr Gackiewicz.
21535 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21536 properly.
21537
a9e64249
AD
215382000-10-04 Akim Demaille <akim@epita.fr>
21539
21540 * src/reader.c (parse_expect_decl): Keep `count' within the size
21541 of `buffer'.
21542 From Neil Booth.
21543
da9abf43
AD
215442000-10-02 Paul Eggert <eggert@twinsun.com>
21545
21546 * bison.s1 (yyparse): Assign the default value
21547 unconditionally, to avoid a GCC warning and make the parser a
21548 tad smaller.
21549
c33638bb
AD
215502000-10-02 Akim Demaille <akim@epita.fr>
21551
21552 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21553 options.
21554
444c570a
AD
215552000-10-02 Akim Demaille <akim@epita.fr>
21556
21557 * src/derives.c, src/print.c, src/reduce.c: To ease the
21558 translation, move some `\n' out of the translated strings.
21559
89cab50d
AD
215602000-10-02 Akim Demaille <akim@epita.fr>
21561
21562 The location tracking mechanism is precious for parse error
21563 messages. Nevertheless, it is enabled only when `@n' is used in
21564 the grammar, which is a different issue (you can use it in error
21565 message, but not in the grammar per se). Therefore, there should
21566 be another means to enable it.
21567
21568 * src/getargs.c (getargs): Support `--locations'.
21569 (usage): Report it.
21570 * src/getargs.h (locationsflag): Export it.
21571 * src/lex.c (percent_table): Support `%locations'.
21572 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21573 with `locationsflag'.
21574 * doc/bison.texinfo: Document `--locations' and `%locations'.
21575 Sort the options.
21576 * tests/calc.m4: Test it.
21577
21578 For regularity of the names, replace each
21579 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21580 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21581 In addition replace each `flag' with `_flag'.
21582
d6c2cba0
AD
215832000-10-02 Akim Demaille <akim@epita.fr>
21584
21585 Also test parse error messages, including with YYERROR_VERBOSE.
21586
21587 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21588 associative).
21589 Use it to check the computations.
21590 Use it to check `nonassoc' is honored.
21591 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21592 `--yyerror-verbose'.
21593 (_AT_CHECK_CALC): Adjust to this option.
21594 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21595
5a35a6cb
AD
215962000-10-02 Akim Demaille <akim@epita.fr>
21597
21598 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21599 the latter demonstrates a flaw in the handling of non debugging
21600 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21601 was used in order to simplify:
21602
21603 #if YYDEBUG
21604 if (yydebug)
21605 {
21606 ...
21607 }
21608 #endif
21609
21610 into
21611
21612 if (yydebug)
21613 {
21614 ...
21615 }
21616
21617 unfortunately this leads to a CPP conflict when
21618 `--name-prefix=foo' is used since it produces `#define yydebug
21619 foodebug'.
21620
21621 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21622 (YYDPRINTF): New macro.
21623 Spread its use.
21624 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21625 the bison options.
21626 Also test `--verbose', `--defines' and `--name-prefix'.
21627
71da9eea
AD
216282000-10-02 Akim Demaille <akim@epita.fr>
21629
21630 Improve the readability of the produced parsers.
21631
21632 * src/bison.s1: Formatting changes.
21633 Improve the comment related to the `$' mark.
21634 (yydefault): Don't fall through to `yyresume': `goto' there.
21635 * src/output.c (output_parser): When the `$' is met, skip the end
21636 of its line.
21637 New variable, `number_of_dollar_signs', to check there's exactly
21638 one `$' in the parser skeleton.
21639
95e36146
AD
216402000-10-02 Akim Demaille <akim@epita.fr>
21641
21642 * lib/xstrdup.c: New file, from the fileutils.
21643 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21644 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21645 instead of strlen + xmalloc + strcpy.
21646 * src/symtab.c (copys): Remove, use xstrdup instead.
21647
d7020c20
AD
216482000-10-02 Akim Demaille <akim@epita.fr>
21649
21650 * src/gram.h (associativity): New enum type which replaces the
21651 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21652 `right_assoc', `left_assoc' and `non_assoc'.
21653 Adjust all dependencies.
21654 * src/reader.c: Formatting changes.
21655 (LTYPESTR): Don't define it, use it as a literal in
21656 `reader_output_yylsp'.
21657 * src/symtab.h (symbol_class): New enum type which replaces the
21658 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21659 `sunknown', `stoken and `snterm'.
21660
1916f98e
AD
216612000-10-02 Akim Demaille <akim@epita.fr>
21662
21663 * src/getargs.c (fixed_outfiles): Rename as...
21664 (yaccflag): for consistency and accuracy.
21665 Adjust dependencies.
21666
d7913476
AD
216672000-10-02 Akim Demaille <akim@epita.fr>
21668
21669 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21670 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21671 difficult and introduced a lot of core dump. It turns out that
21672 Bison used an implementation of `xmalloc' based on `calloc', and
21673 at various places it does depend upon the initialization to 0. I
21674 have not tried to isolate the pertinent places, and all the former
21675 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21676 someone should address this issue.
21677
21678 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21679 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21680 files.
21681 Adjust dependencies.
21682 * src/warshall.h: New file.
21683 Propagate.
21684
340ef489
AD
216852000-10-02 Akim Demaille <akim@epita.fr>
21686
21687 Various anti-`extern in *.c' changes.
21688
21689 * src/system.h: Include `assert.h'.
21690
b2ca4022
AD
216912000-10-02 Akim Demaille <akim@epita.fr>
21692
21693 * src/state.h (nstates, final_state, first_state, first_shift)
21694 (first_reduction): Move their exportation from here...
21695 * src/LR0.h: to here.
21696 Adjust dependencies.
21697 * src/getargs.c (statisticsflag): New variable.
21698 Add support for `--statistics'.
21699 Adjust dependencies.
21700
21701 Remove a lot of now useless `extern' statements in most files.
21702
403b315b
AD
217032000-10-02 Akim Demaille <akim@epita.fr>
21704
21705 * src/LR0.h: New file.
21706 Propagate its use.
21707
07a58c13
AD
217082000-10-02 Akim Demaille <akim@epita.fr>
21709
21710 * src/print.h: New file.
21711 Propagate its use.
21712 * src/print.c: Formatting and ordering changes.
21713 (verbose, terse): Replace with...
21714 (print_results): this new function.
21715 Adjust dependencies.
21716
0619caf0
AD
217172000-10-02 Akim Demaille <akim@epita.fr>
21718
21719 * src/conflicts.c (conflict_report): New function.
21720 (conflict_log, verbose_conflict_log): Replace with...
21721 (print_conflicts): this function.
21722 Adjust dependencies.
21723 * src/conflicts.h: New file.
21724 Propagate its inclusion.
21725
3519ec76
AD
217262000-10-02 Akim Demaille <akim@epita.fr>
21727
21728 * src/nullable.h: New file.
21729 Propagate its inclusion.
21730 * src/nullable.c: Formatting changes.
21731
015acc48
AD
217322000-10-02 Akim Demaille <akim@epita.fr>
21733
21734 * src/reduce.h: New file.
21735 Propagate its inclusion.
21736 * src/reduce.c: Topological sort and other formatting changes.
21737 (bool, TRUE, FALSE): Move their definition to...
21738 * src/system.h: here.
21739
8963a27b
AD
217402000-10-02 Akim Demaille <akim@epita.fr>
21741
21742 * src/files.c: Formatting changes.
21743 (tryopen, tryclose, openfiles): Rename as...
21744 (xfopen, xfclose, open_files): this.
21745 (stringappend): static.
21746 * src/files.h: Complete the list of exported symbols.
21747 Propagate its use.
21748
a70083a3
AD
217492000-10-02 Akim Demaille <akim@epita.fr>
21750
21751 * src/reader.h: New file.
21752 Propagate its use instead of tedious list of `extern' and
21753 prototypes.
21754 * src/reader.c: Formatting changes, topological sort,
21755 s/register//.
21756
abadc117
AD
217572000-10-02 Akim Demaille <akim@epita.fr>
21758
21759 * src/lex.h: Prototype `lex.c' exported functions.
21760 * src/reader.c: Adjust.
21761 * src/lex.c: Formatting changes.
21762 (safegetc): Rename as...
21763 (xgetc): this.
21764
720d742f
AD
217652000-10-02 Akim Demaille <akim@epita.fr>
21766
21767 * src/lalr.h: New file.
21768 Propagate its inclusion instead of prototypes and `extern'.
21769 * src/lalr.c: Formatting changes, topological sorting etc.
21770
f2acea59
AD
217712000-10-02 Akim Demaille <akim@epita.fr>
21772
21773 * src/output.c (token_actions): Introduce a temporary array,
21774 YYDEFACT, that makes it possible for this function to use
21775 output_short_table.
21776
d019d655
AD
217772000-10-02 Akim Demaille <akim@epita.fr>
21778
21779 `user_toknums' is output as a `short[]' in `output.c', while it is
21780 defined as a `int[]' in `reader.c'. For consistency with the
21781 other output tables, `user_toknums' is now defined as a table of
21782 shorts.
21783
21784 * src/reader.c (user_toknums): Be a short table instead of an int
21785 table.
21786 Adjust dependencies.
21787
21788 Factor the short table outputs.
21789
21790 * src/output.c (output_short_table): New function.
21791 * src/output.c (output_gram, output_stos, output_rule_data)
21792 (output_base, output_table, output_check): Use it.
21793
6c89f1c1
AD
217942000-10-02 Akim Demaille <akim@epita.fr>
21795
21796 * src/output.c (output): Topological sort of the functions, in
21797 order to get rid of the `static' prototypes.
21798 No longer use `register'.
21799 * src/output.h: New file.
21800 Propagate its inclusion in files explicitly prototyping functions
21801 from output.c.
21802
d9efd181
AD
218032000-09-21 Akim Demaille <akim@epita.fr>
21804
21805 * src/atgeneral.m4: Update from Autoconf.
21806
c29240e7 218072000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
21808
21809 * src/closure.h: New file.
21810 * src/closure.c: Formatting changes, topological sort over the
21811 functions, use of closure.h.
21812 (initialize_closure, finalize_closure): Rename as...
21813 (new_closure, free_closure): these. Adjust dependencies.
21814 * src/LR0.c: Formatting changes, topological sort, use of
21815 cloture.h.
21816 (initialize_states): Rename as...
21817 (new_states): this.
21818 * src/Makefile.am (noinst_HEADERS): Adjust.
21819
499daa50
AD
218202000-09-20 Akim Demaille <akim@epita.fr>
21821
21822 * src/acconfig.h: Don't protect config.h against multiple
21823 inclusion.
21824 Don't define PARAMS.
21825 * src/system.h: Define PARAMS.
21826 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21827 purpose of config.h. system.h must not try to fix wrong
21828 definitions in config.h.
21829
cc84fd5d
AD
218302000-09-20 Akim Demaille <akim@epita.fr>
21831
21832 * src/derives.h: New file.
21833 * src/main.c, src/derives.h: Use it.
21834 Formatting changes.
21835 * src/Makefile.am (noinst_HEADERS): Adjust.
21836
db5b3a89
AD
218372000-09-20 Akim Demaille <akim@epita.fr>
21838
21839 * tests/atgeneral.m4: Update from Autoconf.
21840 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21841 (AT_CHECK_CALC): New macros.
21842 Use these macros to test bison with options `', `--raw',
21843 `--debug', `--yacc', `--yacc --debug'.
21844
ceed8467
AD
218452000-09-19 Akim Demaille <akim@epita.fr>
21846
21847 * src/output.c: Formatting changes.
21848 * src/machine.h: Remove, leaving its contents in...
21849 * src/system.h: here.
21850 Include stdio.h.
21851 Adjust all dependencies on stdio.h and machine.h.
21852 * src/getargs.h: New file.
21853 Let all `extern' declarations about getargs.c be replaced with
21854 inclusion of `getargs.h'.
21855 * src/Makefile.am (noinst_HEADERS): Adjust.
21856
21857 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21858 scope.
21859 (yyerror): Returns void, not int.
21860 * doc/bison.texinfo: Formatting changes.
21861
05a1d24b
AD
218622000-09-19 Akim Demaille <akim@epita.fr>
21863
21864 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21865 portable.
21866
cbd25751
AD
218672000-09-18 Akim Demaille <akim@epita.fr>
21868
21869 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21870 * src/Makefile.am (INCLUDES): Don't.
21871 Be ready to fetch headers in lib/.
21872
13863333
AD
218732000-09-18 Akim Demaille <akim@epita.fr>
21874
21875 * doc/bison.texinfo: Update the copyright.
21876 ANSIfy and GNUify the examples.
21877 Remove the old menu.
21878
0d533154
AD
218792000-09-18 Akim Demaille <akim@epita.fr>
21880
21881 First set of tests: use the `calc' example from the documentation.
21882
21883 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21884 is defined only when YYDEBUG is.
21885 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21886 * src/files.c (tryopen, tryclose): Formatting changes.
21887 Move to the top and be static.
21888 * src/reader.c (read_signed_integer): Likewise.
21889 * tests/calc.m4: New file.
21890 * Makefile.am, suite.m4: Adjust.
21891 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21892
e79137ac
AD
218932000-09-18 Akim Demaille <akim@epita.fr>
21894
21895 Add support for an Autotest test suite for Bison.
21896
21897 * m4/m4.m4, m4/atconfig.m4: New files.
21898 * m4/Makefile.am (EXTRA_DIST): Adjust.
21899 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21900 files.
21901 * src/getargs.c: Display a more standard --version message.
21902 * src/reader.c (reader): Formatting changes.
21903 No longer depend upon VERSION_STRING.
21904 * configure.in: No longer use `dnl'.
21905 Set up the test suite and the new directory `tests/.
21906 (VERSION_STRING): Remove.
21907
27821bff
AD
219082000-04-14 Akim Demaille <akim@epita.fr>
21909
21910 * src/reader.c (copy_comment2): New function, same as former
21911 `copy_comment', but outputs into two FILE *.
21912 (copy_comment): Use it.
21913 (parse_union_decl): Use it.
21914 (get_type, parse_start_decl): Use the same `invalid' message.
21915 (parse_start_decl, parse_union_decl): Use the same `multiple'
21916 message.
21917 (parse_union_decl, copy_guard, copy_action): Use the same
21918 `unmatched' message.
21919 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21920
cfe5fbc0
AD
219212000-03-31 Akim Demaille <akim@epita.fr>
21922
21923 * src/files.c (tryopen, tryclose): Move to the top.
21924 Be static.
21925
cb7db13e
AD
219262000-03-31 Akim Demaille <akim@epita.fr>
21927
21928 * src/main.c (main): Don't call `done', exit does it.
21929
a0f6b076
AD
219302000-03-31 Akim Demaille <akim@epita.fr>
21931
36281465
AD
21932 * allocate.c: s/return (foo)/return foo/.
21933 * lalr.c: Likewise.
21934 * LR0.c: Likewise.
21935 * output.c: Likewise.
21936 * reader.c: Likewise.
21937 * symtab.c: Likewise.
21938 * vmsgetargs.c: Likewise.
21939
219402000-03-31 Akim Demaille <akim@epita.fr>
21941
21942 Clean up the error reporting functions.
a0f6b076
AD
21943
21944 * src/report.c: New file.
21945 * src/report.h: Likewise.
21946 * src/Makefile.am: Adjust.
21947 * m4/error.m4: New file.
21948 * m4/Makefile.am: Adjust.
21949 * configure.in (jm_PREREQ_ERROR): Call it.
21950 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21951 Remove.
21952 (fatal, fatals): Remove. All callers use complain.c::fatal.
21953 (warn, warni, warns, warnss, warnss): Remove. All callers use
21954 complain.c::complain.
21955 (toomany): Remove, use fatal instead.
21956 * src/files.c (done): No argument, use complain_message_count.
21957 * src/main.c (main): Register `done' to `atexit'.
21958
21959 * src/getargs.c (usage): More `fputs', less `fprintf'.
21960
18539825
AD
219612000-03-28 Akim Demaille <akim@epita.fr>
21962
21963 * lib/: New directory.
21964 * Makefile.am (SUBDIRS): Adjust.
21965 * configure.in: Adjust.
21966 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21967 useless.
21968 * src/alloca.c: Moved to lib/.
21969 * src/getopt.c: Likewise.
21970 * src/getopt1.c: Likewise.
21971 * src/getopt.h: Likewise.
21972 * src/ansi2knr.c: Likewise.
21973 * src/ansi2knr.1: Likewise.
21974 * src/Makefile.am: Adjust.
21975 * lib/Makefile.am: New file.
21976
9f306f2a
AD
219772000-03-28 Akim Demaille <akim@epita.fr>
21978
21979 * src/getargs.c (usage): Refresh the help message.
21980
0ba347b6
AD
219812000-03-17 Akim Demaille <akim@epita.fr>
21982
21983 * src/getopt1.c: Updated from textutils 2.0e
21984 * src/getopt.c: Likewise.
21985 * src/getopt.h: Likewise.
21986
dbe7f271
AD
219872000-03-17 Akim Demaille <akim@epita.fr>
21988
21989 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21990 the file name, not the whole `#line LINE FILE'.
21991
75bbe78d
AD
219922000-03-17 Akim Demaille <akim@epita.fr>
21993
21994 On syntax errors, report the token on which we choked.
21995
aa5fd0ee
AD
21996 * src/bison.s1 (yyparse): In the label yyerrlab, when
21997 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 21998
7b306f52
AD
219992000-03-17 Akim Demaille <akim@epita.fr>
22000
aa5fd0ee 22001 * src/reader.c (copy_at): New function.
7b306f52
AD
22002 (copy_guard): Use it.
22003 (copy_action): Use it.
22004
e87b5700
AD
220052000-03-17 Akim Demaille <akim@epita.fr>
22006
22007 Be kind to translators, save some useless translations.
22008
aa5fd0ee 22009 * src/main.c (banner): New function.
e87b5700
AD
22010 (fatal_banner): Use it.
22011 (warn_banner): Use it.
22012
ae3c3164
AD
220132000-03-17 Akim Demaille <akim@epita.fr>
22014
aa5fd0ee
AD
22015 * src/reader.c (copy_definition): Use copy_string and
22016 copy_comment. Removed now unused `match', `ended',
22017 `cplus_comment'.
ae3c3164
AD
22018 (copy_comment, copy_string): Moved, to be visible from
22019 copy_definition.
22020
4dc58e7c
AD
220212000-03-17 Akim Demaille <akim@epita.fr>
22022
aa5fd0ee
AD
22023 * src/reader.c (copy_string): Declare `static inline'. No
22024 problems with inline, since it is checked by configure.
4dc58e7c
AD
22025 (copy_comment): Likewise.
22026
0a6384c4
AD
220272000-03-17 Akim Demaille <akim@epita.fr>
22028
aa5fd0ee 22029 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 22030
3cef001a
AD
220312000-03-17 Akim Demaille <akim@epita.fr>
22032
aa5fd0ee 22033 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
22034 (copy_action): Use it. Removed now unused `match', `ended',
22035 `cplus_comment'.
22036 (copy_guard): Likewise.
22037
ca36d2ef
AD
220382000-03-17 Akim Demaille <akim@epita.fr>
22039
aa5fd0ee 22040 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
22041 (copy_action): Use it.
22042 (copy_guard): Likewise.
22043
6666f98f
AD
220442000-03-17 Akim Demaille <akim@epita.fr>
22045
22046 Change the handling of @s so that they behave exactly like $s.
22047 There is now a pseudo variable @$ (readble and writable), location
22048 of the lhs of the rule (by default ranging from the location of
22049 the first symbol of the rhs, to the location of the last symbol,
22050 or, if the rhs is empty, YYLLOC).
22051
22052 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22053 yyval.
22054 (yyparse): When providing a default semantic action, provide a
22055 default location action.
22056 (after the $): No longer change `*YYLSP', just stack YYLOC the
22057 same way you stack YYVAL.
22058 * src/reader.c (read_declarations): Use warns.
22059 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22060 (copy_action, case '@'): Likewise.
22061 Use a standard error message, to save useless work from
22062 translators.
22063
41aca2e0
AD
220642000-03-17 Akim Demaille <akim@epita.fr>
22065
aa5fd0ee
AD
22066 * src/bison.s1: Formatting and cosmetics changes.
22067 * src/reader.c: Likewise.
41aca2e0
AD
22068 Update the Copyright notice.
22069
dc08c1d5
AD
220702000-03-17 Akim Demaille <akim@epita.fr>
22071
aa5fd0ee
AD
22072 * src/bison.s1 (#line): All set to `#line' only, since the
22073 Makefile now handles them.
dc08c1d5 22074
9ee3c97b
AD
220752000-03-16 Akim Demaille <akim@epita.fr>
22076
22077 * src/output.c (output_rule_data): Output the documentation of
22078 some of the tables.
22079 (Copyright notice): Update.
22080 Formatting changes.
22081
0de741ca
AD
220822000-03-16 Akim Demaille <akim@epita.fr>
22083
22084 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22085 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22086 One `#if YYDEBUG' remains, since it uses variables which are
22087 defined only if `YYDEBUG != 0'.
22088
bb10be54
AD
220892000-03-16 Akim Demaille <akim@epita.fr>
22090
22091 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22092 and related variables so that the similarities are highlighted.
22093
b07b484a
AD
220942000-03-16 Akim Demaille <akim@epita.fr>
22095
22096 * src/bison.s1: Properly indent CPP directives.
22097
361f60b3
AD
220982000-03-16 Akim Demaille <akim@epita.fr>
22099
22100 * src/bison.s1: Properly indent the `alloca' CPP section.
22101
8c44d3ec
AD
221022000-03-16 Akim Demaille <akim@epita.fr>
22103
22104 Do not hard code values of directories in `configure.in'.
22105 Update the `configure' tool chain.
22106
22107 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22108 src/makefile.am.
22109 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22110 (AC_OUTPUT): Add m4/Makefile.
22111 Bump to bison 1.28a, 1.29 has never been released.
22112 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22113 handled via src/Makefile.am.
22114 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22115 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22116 autoheader.
22117 * Makefile.am (SUBDIRS): Add m4.
22118 (ACLOCAL_AM_FLAGS): New variable.
22119 (AUTOMAKE_OPTIONS): Add check-news.
22120 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22121 the proper line number and file name.
22122 (DEFS): Propagate the location of bison library files and of the
22123 locale files.
22124 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22125 builddir.
22126 * acinclude.m4: Remove, replaced by the directory m4.
22127 * m4/Makefile.am (EXTRA_DIST): New variable.
22128 * m4/gettext.m4: New file, from the fileutils.
22129 * m4/lcmessage.m4: Likewise
22130 * m4/progtest.m4: Likewise.
22131 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22132
f95997e7
AD
221332000-03-10 Akim Demaille <akim@epita.fr>
22134
22135 * src/closure.c:
22136 Formatting changes of various comments.
22137 Respect the GNU coding standards at various places.
22138 Don't use `_()' when no translation is needed.
22139
221401999-12-13 Jesse Thilo <jthilo@gnu.org>
22141
22142 * src/files.c:
22143 OS/2 honors TMPDIR environment variable.
22144
221451999-12-13 Jesse Thilo <jthilo@gnu.org>
22146
22147 * doc/bison.texinfo: Tweaked spelling and grammar.
22148 Updated ISBN.
22149 Removed reference to price of printed copy.
22150 Mention BISON_SIMPLE and BISON_HAIRY.
22151
221521999-12-13 Jesse Thilo <jthilo@gnu.org>
22153
22154 * configure.in, NEWS:
22155 Bison 1.29 released.
22156
221571999-10-27 Jesse Thilo <jthilo@gnu.org>
22158
22159 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22160 Added reference card.
22161
221621999-07-26 Jesse Thilo <jthilo@gnu.org>
22163
22164 * po/ru.po: Added Russian translation.
22165
221661999-07-26 Jesse Thilo <jthilo@gnu.org>
22167
22168 * configure.in: Added Russian translation.
22169
221701999-07-06 Jesse Thilo <jthilo@gnu.org>
22171
22172 * configure.in, NEWS, README:
22173 Released version 1.28.
22174
221751999-06-14 Jesse Thilo <jthilo@gnu.org>
22176
22177 * src/system.h:
22178 Squashed redefinition warning on some systems.
22179
22180 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22181 Have configure build version string instead of relying on ANSI string
22182 concatentation.
22183
221841999-06-14 Jesse Thilo <jthilo@gnu.org>
22185
22186 * po/POTFILES.in: Got rid of version.c.
22187
221881999-06-14 Jesse Thilo <jthilo@gnu.org>
22189
22190 * acconfig.h, configure.in:
22191 Have configure build version string instead of relying on ANSI string
22192 concatentation.
22193
221941999-06-08 Jesse Thilo <jthilo@gnu.org>
22195
22196 * doc/bison.1:
22197 Dropped mention of `+' for long-named options.
22198
221991999-05-30 Jesse Thilo <jthilo@gnu.org>
22200
22201 * src/files.c: Added <unistd.h> for unlink().
22202
22203 * src/Makefile.am, src/system.h:
22204 I18n fixes.
22205
222061999-05-30 Jesse Thilo <jthilo@gnu.org>
22207
22208 * README: Added a FAQ list.
22209
22210 * configure.in, acconfig.h:
22211 I18n fixes.
22212
222131999-05-30 Jesse Thilo <jthilo@gnu.org>
22214
22215 * doc/FAQ, doc/Makefile.am:
22216 Added a FAQ list.
22217
222181999-05-19 Jesse Thilo <jthilo@gnu.org>
22219
22220 * src/alloc.h, src/symtab.h, src/version.c:
22221 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22222
222231999-04-18 Jesse Thilo <jthilo@gnu.org>
22224
22225 * src/.cvsignore, src/Makefile.am:
22226 Reorganized: sources in `src', documentation in `doc'.
22227
22228 * src/lex.c (literalchar):
22229 fixed the code for escaping double quotes (thanks
22230 Jonathan Czisny.)
22231
222321999-04-18 Jesse Thilo <jthilo@gnu.org>
22233
22234 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22235 Adjusted paths to reflect directory reorganization.
22236
222371999-04-18 Jesse Thilo <jthilo@gnu.org>
22238
22239 * doc/.cvsignore, doc/Makefile.am:
22240 Reorganized: sources in `src', documentation in `doc'.
22241
222421999-04-18 Jesse Thilo <jthilo@gnu.org>
22243
22244 * configure.in:
22245 Updated AC_INIT file to reflect directory reorganization.
22246
22247 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22248 Reorganized: sources in `src', documentation in `doc'.
22249
222501999-04-13 Jesse Thilo <jthilo@gnu.org>
22251
22252 * src/allocate.c:
22253 Don't declare calloc() and realloc() if not necessary.
22254
222551999-04-13 Jesse Thilo <jthilo@gnu.org>
22256
22257 * configure.in, acconfig.h, acinclude.m4:
22258 Don't declare calloc() and realloc() if not necessary.
22259
222601999-03-23 Jesse Thilo <jthilo@gnu.org>
22261
22262 * po/.cvsignore: Added i18n support.
22263
222641999-03-23 Jesse Thilo <jthilo@gnu.org>
22265
22266 * acconfig.h, configure.in, Makefile.am:
22267 Added i18n support.
22268
222691999-03-22 Jesse Thilo <jthilo@gnu.org>
22270
22271 * src/bison.s1: Fixed #line numbers.
22272
222731999-03-15 Jesse Thilo <jthilo@gnu.org>
22274
22275 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22276 Added PO files from Translation Project.
22277
222781999-03-03 Jesse Thilo <jthilo@gnu.org>
22279
22280 * Makefile.am:
22281 Added support for non-ANSI compilers (ansi2knr).
22282
222831999-02-16 Jesse Thilo <jthilo@gnu.org>
22284
22285 * configure.in: Bumped version number to 1.27.
22286
22287 * Makefile.am:
22288 Added `bison.simple' to list of files removed by `make distclean'.
22289
222901999-02-12 Jesse Thilo <jthilo@gnu.org>
22291
22292 * src/files.c, src/files.h:
22293 Defined locations of parser files in config.h instead of Makefile.
22294
222951999-02-12 Jesse Thilo <jthilo@gnu.org>
22296
22297 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22298 Defined locations of parser files in config.h instead of Makefile.
22299
223001999-02-09 Jesse Thilo <jthilo@gnu.org>
22301
22302 * Makefile.am:
22303 Removed inappropriate use of $< macro.
22304
223051999-02-05 Jesse Thilo <jthilo@gnu.org>
22306
22307 * po/Makefile.in.in, po/POTFILES.in:
22308 Add `po' directory skeleton.
22309
223101999-01-27 Jesse Thilo <jthilo@gnu.org>
22311
22312 * README: Document help-bison list.
22313
22314 * configure.in: Add check for mkstemp().
22315
223161999-01-20 Jesse Thilo <jthilo@gnu.org>
22317
22318 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22319 Hush a few compiler warnings.
22320
22321 * src/files.c:
22322 Add tryclose(), which verifies that fclose was successful.
22323 Hush a couple of compiler warnings.
22324
223251999-01-20 Jesse Thilo <jthilo@gnu.org>
22326
22327 * Makefile.am, OChangeLog:
22328 ChangeLog is now automatically generated. Include the old version as
22329 OChangeLog.
22330
223311999-01-14 Jesse Thilo <jthilo@gnu.org>
22332
22333 * 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:
22334 Update FSF address.
22335
223361999-01-14 Jesse Thilo <jthilo@gnu.org>
22337
22338 * doc/bison.texinfo: Fix formatting glitch.
22339
22340 * doc/bison.texinfo: Update FSF address.
22341
223421999-01-14 Jesse Thilo <jthilo@gnu.org>
22343
22344 * acconfig.h: Update FSF address.
22345
223461999-01-08 Jesse Thilo <jthilo@gnu.org>
22347
22348 * src/system.h:
22349 Don't define PACKAGE here, since config.h defines it.
22350
223511998-12-30 Jesse Thilo <jthilo@gnu.org>
22352
22353 * src/reader.c: Update copyright date.
22354
22355 * src/main.c:
22356 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22357 favor of output directly to stderr (avoids buffer overruns).
22358
22359 * src/reader.c: Some checks for premature EOF.
22360
22361 * 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:
22362 Use prototypes if the compiler understands them.
22363
22364 * src/files.c: Honor TMPDIR on Unix hosts.
22365 Use prototypes if the compiler understands them.
22366
22367 * src/reader.c:
22368 Fix a couple of buffer overrun bugs.
22369 Use prototypes if the compiler understands them.
22370
22371 * src/system.h: Include unistd.h and ctype.h.
22372 Use #ifdef instead of #if for NLS symbols.
22373
223741998-12-30 Jesse Thilo <jthilo@gnu.org>
22375
22376 * doc/bison.texinfo:
22377 Delete comment "consider using @set for edition number, etc..." since
22378 we now are doing so.
22379
223801998-12-30 Jesse Thilo <jthilo@gnu.org>
22381
22382 * configure.in:
22383 Use prototypes if the compiler understands them.
22384
22385 * NEWS: Document 1.26 highlights.
22386
22387 * Makefile.am: Require Automake 1.3 or later.
22388
22389 * acconfig.h:
22390 Use prototypes if the compiler understands them.
22391
223921998-12-29 Jesse Thilo <jthilo@gnu.org>
22393
22394 * src/version.c:
22395 Use VERSION symbol from automake for version number.
22396
223971998-12-29 Jesse Thilo <jthilo@gnu.org>
22398
22399 * acconfig.h, configure.in, version.cin:
22400 Use VERSION symbol from automake for version number.
22401
224021998-11-28 Jesse Thilo <jthilo@gnu.org>
22403
22404 * Makefile.am:
22405 Distribute original version of simple parser (bison.s1), not built
22406 version (bison.simple).
22407
224081998-11-28 Jesse Thilo <jthilo@gnu.org>
22409
22410 * doc/bison.texinfo: Add info dir entry.
22411
22412 * doc/bison.texinfo:
22413 Let automake put version number into documentation.
22414
224151998-11-26 Jesse Thilo <jthilo@gnu.org>
22416
22417 * src/bison.cld, src/build.com, src/vmshlp.mar:
22418 Add non-RCS files from /gd/gnu/bison.
22419
224201998-11-26 Jesse Thilo <jthilo@gnu.org>
22421
22422 * doc/bison.1:
22423 Document the BISON_HAIRY and BISON_SIMPLE variables.
22424
224251998-11-25 Jesse Thilo <jthilo@gnu.org>
22426
22427 * src/version.c: Build version.c automatically.
22428
22429 * src/reader.c:
22430 Fix token numbering (used to start at 258, not 257).
22431
22432 * src/system.h: Include config.h.
22433
22434 * src/getargs.c: Update bug report address.
22435
22436 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22437 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22438
224391998-11-25 Jesse Thilo <jthilo@gnu.org>
22440
22441 * Makefile.am:
22442 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22443
22444 * configure.in, version.cin:
22445 Build version.c automatically.
22446
22447 * AUTHORS: Add AUTHORS file.
22448
22449 * README: Update bug report address.
22450
22451 * bison.simple:
22452 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22453
22454 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22455 Add automake stuff.
22456
224571998-11-25 Jesse Thilo <jthilo@gnu.org>
22458
22459 * doc/bison.texinfo: Clean up some formatting.
22460
224611998-05-05 Richard Stallman <rms@gnu.org>
22462
22463 * doc/bison.texinfo:
22464 Explain better why to make a pure parser.
22465
224661998-01-05 Richard Stallman <rms@gnu.org>
22467
22468 * src/files.c (openfiles):
22469 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22470 find a temporary directory, if possible. Do not unlink files while
22471 they are open.
22472
224731997-08-25 Richard Stallman <rms@gnu.org>
22474
22475 * src/reader.c (stack_offset;):
22476 Change some warni to warns.
22477
22478 * src/lex.c (literalchar): Use warns, not warni.
22479
224801997-06-28 Richard Stallman <rms@gnu.org>
22481
22482 * src/bison.s1: Add a Bison version comment.
22483
22484 * src/main.c (fatal, warn, berror):
22485 Use program_name.
22486
224871997-06-28 Richard Stallman <rms@gnu.org>
22488
22489 * Makefile.in (bison_version): New variable.
22490 (dist): Use that variable.
22491 (bison.s1): Substitute the Bison version into bison.simple.
22492
22493 * bison.simple: Add a Bison version comment.
22494
224951997-06-18 Richard Stallman <rms@gnu.org>
22496
22497 * src/main.c (fatal, warn, berror):
22498 Make error messages standard.
22499 (toomany): Improve error message text.
22500
22501 * 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:
22502 new.h renamed to alloc.h.
22503
225041997-06-18 Richard Stallman <rms@gnu.org>
22505
22506 * Makefile.in: new.h renamed to alloc.h.
22507
225081997-05-24 Richard Stallman <rms@gnu.org>
22509
22510 * src/lex.c (literalchar):
22511 Fix the code for escaping \, " and '.
22512
22513 (lex): Avoid trouble when there are many chars
22514 to discard in a char literal with just several chars in it.
22515
225161997-05-17 Richard Stallman <rms@gnu.org>
22517
22518 * src/bison.s1:
22519 Use malloc, if using alloca is troublesome.
22520 (YYSTACK_USE_ALLOCA): New flag macro.
22521 Define it for some systems and compilers.
22522 (YYSTACK_ALLOC): New macro.
22523 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22524 If it was malloc'd, free it.
22525
225261997-05-17 Richard Stallman <rms@gnu.org>
22527
22528 * bison.simple:
22529 Use malloc, if using alloca is troublesome.
22530 (YYSTACK_USE_ALLOCA): New flag macro.
22531 Define it for some systems and compilers.
22532 (YYSTACK_ALLOC): New macro.
22533 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22534 If it was malloc'd, free it.
22535
225361997-04-23 Richard Stallman <rms@gnu.org>
22537
22538 * src/bison.s1:
22539 (alloca) [__hpux]: Always define as __builtin_alloca.
22540
225411997-04-23 Richard Stallman <rms@gnu.org>
22542
22543 * bison.simple:
22544 (alloca) [__hpux]: Always define as __builtin_alloca.
22545
225461997-04-22 Richard Stallman <rms@gnu.org>
22547
22548 * src/bison.s1:
22549 [__hpux]: Include alloca.h (right for HPUX 10)
22550 instead of declaring alloca (right for HPUX 9).
22551
22552 * src/bison.s1 (__yy_memcpy):
22553 Declare arg `count' as unsigned int.
22554 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22555
225561997-04-22 Richard Stallman <rms@gnu.org>
22557
22558 * bison.simple:
22559 [__hpux]: Include alloca.h (right for HPUX 10)
22560 instead of declaring alloca (right for HPUX 9).
22561
22562 * bison.simple (__yy_memcpy):
22563 Declare arg `count' as unsigned int.
22564 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22565
225661997-01-03 Richard Stallman <rms@gnu.org>
22567
22568 * src/allocate.c: [__STDC__ or _MSC_VER]:
22569 Declare calloc and realloc to return void *.
22570
225711997-01-02 Richard Stallman <rms@gnu.org>
22572
22573 * src/system.h:
22574 [_MSC_VER]: Include stdlib.h and process.h.
22575 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22576
22577 * src/main.c (main): Return FAILURE as a value.
22578 (printable_version): Declare arg as int, not char.
22579
225801997-01-02 Richard Stallman <rms@gnu.org>
22581
22582 * Makefile.in (dist):
22583 Explicitly check for symlinks, and copy them.
22584
225851996-12-19 Richard Stallman <rms@gnu.org>
22586
22587 * src/files.c:
22588 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22589
225901996-12-18 Paul Eggert <eggert@gnu.org>
22591
22592 * src/bison.s1 (yyparse):
22593 If __GNUC__ and YYPARSE_PARAM are both defined,
22594 declare yyparse to have a void * argument.
22595
225961996-12-18 Paul Eggert <eggert@gnu.org>
22597
22598 * bison.simple (yyparse):
22599 If __GNUC__ and YYPARSE_PARAM are both defined,
22600 declare yyparse to have a void * argument.
22601
226021996-12-17 Richard Stallman <rms@gnu.org>
22603
22604 * src/reduce.c (nbits): Add some casts.
22605
226061996-08-12 Richard Stallman <rms@gnu.org>
22607
22608 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22609
226101996-08-12 Richard Stallman <rms@gnu.org>
22611
22612 * bison.simple: Test _MSDOS as well as _MSDOS_.
22613
226141996-07-31 Richard Stallman <rms@gnu.org>
22615
22616 * src/bison.s1:
22617 [__sun && __i386]: Include alloca.h.
22618
226191996-07-31 Richard Stallman <rms@gnu.org>
22620
22621 * bison.simple:
22622 [__sun && __i386]: Include alloca.h.
22623
226241996-07-30 Richard Stallman <rms@gnu.org>
22625
22626 * src/bison.s1: Comment change.
22627
22628 * src/bison.s1: Test _MSDOS_, not MSDOS.
22629
226301996-07-30 Richard Stallman <rms@gnu.org>
22631
22632 * bison.simple: Comment change.
22633
22634 * bison.simple: Test _MSDOS_, not MSDOS.
22635
226361996-06-01 Richard Stallman <rms@gnu.org>
22637
22638 * 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:
22639 Insert `_' macro around many string constants.
22640
22641 * src/main.c:
22642 Insert `_' macro around many string constants.
22643
22644 (main): Call setlocale, bindtextdomain and textdomain.
22645
22646 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22647 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22648 [ENABLE_NLS]: Include libintl.h.
22649 [ENABLE_NLS] (gettext): Define.
22650 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22651 (N_, PACKAGE, LOCALEDIR): New macros.
22652
226531996-06-01 Richard Stallman <rms@gnu.org>
22654
22655 * POTFILES.in: New file.
22656
22657 * Makefile.in (allocate.o):
22658 Define target explicitly.
22659
22660 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22661 (LDFLAGS): Set to @LDFLAGS@.
22662 (configure): Run autoconf only if preceding `cd' succeeds.
22663 (bison.s1): Redirect output to temporary file then move the
22664 temporary to the target, rather than redirecting directly to bison.s1.
22665 (clean): Remove config.status and config.log.
22666 (distclean): Don't remove config.status here.
22667
226681996-05-12 Richard Stallman <rms@gnu.org>
22669
22670 * src/bison.s1:
22671 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22672
226731996-05-12 Richard Stallman <rms@gnu.org>
22674
22675 * bison.simple:
22676 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22677
226781996-05-11 Richard Stallman <rms@gnu.org>
22679
22680 * src/bison.s1 (__yy_memcpy):
22681 Really reorder the args, as was supposedly done on Feb 14 1995.
22682 (yyparse): Calls changed accordingly.
22683
226841996-05-11 Richard Stallman <rms@gnu.org>
22685
22686 * Makefile.in (dist): Don't use $(srcdir).
22687
22688 * bison.simple (__yy_memcpy):
22689 Really reorder the args, as was supposedly done on Feb 14 1995.
22690 (yyparse): Calls changed accordingly.
22691
226921996-01-27 Richard Stallman <rms@gnu.org>
22693
22694 * src/output.c (output_rule_data):
22695 Test YYERROR_VERBOSE in the conditional
22696 around the definition of ttyname.
22697
226981995-12-29 Richard Stallman <rms@gnu.org>
22699
22700 * src/bison.s1:
22701 Fix line numbers in #line commands.
22702
227031995-12-29 Richard Stallman <rms@gnu.org>
22704
22705 * bison.simple:
22706 Fix line numbers in #line commands.
22707
227081995-12-27 Richard Stallman <rms@gnu.org>
22709
22710 * src/bison.s1 (YYPARSE_PARAM_DECL):
22711 In C++, make it always null.
22712 (YYPARSE_PARAM_ARG): New macro.
22713 (yyparse): Use YYPARSE_PARAM_ARG.
22714
227151995-12-27 Richard Stallman <rms@gnu.org>
22716
22717 * bison.simple (YYPARSE_PARAM_DECL):
22718 In C++, make it always null.
22719 (YYPARSE_PARAM_ARG): New macro.
22720 (yyparse): Use YYPARSE_PARAM_ARG.
22721
227221995-11-29 Richard Stallman <rms@gnu.org>
22723
22724 * doc/bison.texinfo:
22725 Describe literal string tokens, %raw, %no_lines, %token_table.
22726
227271995-11-29 Daniel Hagerty <hag@gnu.org>
22728
22729 * doc/bison.texinfo: Fixed update date
22730
227311995-10-16 Richard Stallman <rms@gnu.org>
22732
22733 * src/version.c: Version 1.25.
22734
227351995-10-16 Richard Stallman <rms@gnu.org>
22736
22737 * NEWS: *** empty log message ***
22738
227391995-10-16 Richard Stallman <rms@gnu.org>
22740
22741 * doc/bison.1, doc/bison.rnh:
22742 Add new options.
22743
227441995-10-15 Richard Stallman <rms@gnu.org>
22745
22746 * src/vmsgetargs.c, src/getargs.c:
22747 Added -n, -k, and -raw switches.
22748 (noparserflag, toknumflag, rawtoknumflag): New variables.
22749
22750 * src/symtab.h (SALIAS):
22751 New #define for adding aliases to %token.
22752 (struct bucket): Added `alias' field.
22753
22754 * src/reduce.c (reduce_grammar):
22755 Revise error message.
22756 (print_notices): Remove final `.' from error message.
22757
22758 * src/reader.c (reader_output_yylsp):
22759 New function.
22760 (readgram): Use `#if 0' around code that accepted %command
22761 inside grammar rules: The documentation doesn't allow it,
22762 and it will fail since the %command processors scan for the next %.
22763 (parse_token_decl): Extended the %token
22764 declaration to allow a multi-character symbol as an alias.
22765 (parse_thong_decl): New function.
22766 (read_declarations): Added %thong declarations.
22767 (read_declarations): Handle NOOP to deal with allowing
22768 % declarations as another means to specify the flags.
22769 (readgram): Allow %prec prior to semantics embedded in a rule.
22770 (skip_to_char, read_declarations, copy_definition)
22771 (parse_token_decl, parse_start_decl, parse_type_decl)
22772 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22773 (get_type_name, copy_guard, copy_action, readgram)
22774 (get_type, packsymbols): Revised most error messages.
22775 Changed `fatal' to `warnxxx' to avoid aborting for error.
22776 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22777 (read_declarations): Improve the error message for
22778 an invalid character. Do not abort.
22779 (read_declarations, copy_guard, copy_action): Use
22780 printable_version to avoid unprintable characters in printed output.
22781 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22782 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22783 Allow the type of a non-terminal can be given
22784 more than once, as long as all specifications give the same type.
22785
22786 * src/output.c:
22787 (output_headers, output_trailers, output, output_gram)
22788 (output_rule_data): Implement noparserflag variable.
22789 Implement toknumflag variable.
22790 (output): Call reader_output_yylsp to output LTYPESTR.
22791
22792 * src/main.c (main):
22793 If reader sees an error, don't process the grammar.
22794 (fatals): Updated to not use VARARGS1.
22795 (printable_version, int_to_string, warn, warni, warns, warnss)
22796 (warnsss): New error reporting functions. Avoid abort for error.
22797
22798 * src/lex.h:
22799 Added THONG and NOOP for alias processing.
22800 Added SETOPT for the new code that allows setting options with %flags.
22801
22802 * src/lex.c:
22803 Include getopt.h. Add some extern decls.
22804 (safegetc): New function to deal with EOF gracefully.
22805 (literalchar); new function to deal with reading \ escapes.
22806 (lex): Use literalchar.
22807 (lex): Implemented "..." tokens.
22808 (literalchar, lex, parse_percent_token): Made tokenbuffer
22809 always contain the token. This includes growing the token
22810 buffer while reading an integer.
22811 (parse_percent_token): Replaced if-else statement with percent_table.
22812 (parse_percent_token): Added % declarations as another
22813 way to specify the flags -n, -l, and -r. Also added hooks for
22814 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22815 major changes to files.c.
22816 (lex) Retain in the incoming stream a character following
22817 an incorrect '/'.
22818 (skip_white_space, lex): Revised most error messages
22819 and changed fatal to warn to avoid aborting.
22820 (percent_table): Added %thong declarations.
22821
22822 * src/gram.h: Comment changes.
22823
22824 * src/files.c (openfiles, open_extra_files, done):
22825 Add faction flag
22826 and actfile file. Handle noparserflag. Both for -n switch.
22827
22828 * src/conflicts.c (resolve_sr_conflict):
22829 Remove use of alloca.
22830
228311995-06-01 Jim Meyering <meyering@gnu.org>
22832
22833 * doc/bison.texinfo: *** empty log message ***
22834
228351995-05-06 Richard Stallman <rms@gnu.org>
22836
22837 * src/bison.s1: Comment change.
22838
228391995-05-06 Richard Stallman <rms@gnu.org>
22840
22841 * bison.simple: Comment change.
22842
228431995-05-03 Richard Stallman <rms@gnu.org>
22844
22845 * src/version.c: Version now 1.24.
22846
22847 * src/bison.s1: Change distribution terms.
22848
22849 * src/version.c: Version now 1.23.
22850
228511995-05-03 Richard Stallman <rms@gnu.org>
22852
22853 * doc/bison.texinfo:
22854 Rewrite "Conditions for Using Bison".
22855 Update version to 1.24.
22856
228571995-05-03 Richard Stallman <rms@gnu.org>
22858
22859 * bison.simple: Change distribution terms.
22860
228611995-02-23 Richard Stallman <rms@gnu.org>
22862
22863 * src/files.c: Test __VMS_POSIX as well as VMS.
22864
228651995-02-14 Jim Meyering <meyering@gnu.org>
22866
22867 * src/bison.s1 (__yy_memcpy):
22868 Renamed from __yy_bcopy to avoid
22869 confusion. Reverse FROM and TO arguments to be consistent with
22870 those of memcpy.
22871
228721995-02-14 Jim Meyering <meyering@gnu.org>
22873
22874 * bison.simple (__yy_memcpy):
22875 Renamed from __yy_bcopy to avoid
22876 confusion. Reverse FROM and TO arguments to be consistent with
22877 those of memcpy.
22878
228791994-11-10 David J. MacKenzie <djm@gnu.org>
22880
22881 * NEWS: reformat
22882
22883 * NEWS: New file.
22884
22885 * Makefile.in (DISTFILES): Include NEWS.
22886
22887 * Makefile.in (DISTFILES):
22888 Include install-sh, not install.sh.
22889
22890 * configure.in: Update to Autoconf v2 macro names.
22891
228921994-10-05 David J. MacKenzie <djm@gnu.org>
22893
22894 * Makefile.in: fix typo
22895
22896 * Makefile.in (prefix, exec_prefix):
22897 Let configure set them.
22898
228991994-09-28 David J. MacKenzie <djm@gnu.org>
22900
22901 * Makefile.in: Set datadir to $(prefix)/share.
22902
229031994-09-15 Richard Stallman <rms@gnu.org>
22904
22905 * src/bison.s1:
22906 Update copyright notice and GPL version.
22907
229081994-09-15 Richard Stallman <rms@gnu.org>
22909
22910 * bison.simple:
22911 Update copyright notice and GPL version.
22912
229131994-07-12 Richard Stallman <rms@gnu.org>
22914
22915 * src/reduce.c, src/reader.c:
22916 entered into RCS
22917
229181994-05-05 David J. MacKenzie <djm@gnu.org>
22919
22920 * Makefile.in: entered into RCS
22921
229221994-03-26 Richard Stallman <rms@gnu.org>
22923
22924 * src/bison.s1: entered into RCS
22925
229261994-03-26 Richard Stallman <rms@gnu.org>
22927
22928 * bison.simple: entered into RCS
22929
229301994-03-25 Richard Stallman <rms@gnu.org>
22931
22932 * src/main.c: entered into RCS
22933
229341994-03-24 Richard Stallman <rms@gnu.org>
22935
22936 * src/conflicts.c: entered into RCS
22937
229381994-01-02 Richard Stallman <rms@gnu.org>
22939
22940 * Makefile.in: *** empty log message ***
22941
229421993-11-21 Richard Stallman <rms@gnu.org>
22943
22944 * src/bison.s1: *** empty log message ***
22945
229461993-11-21 Richard Stallman <rms@gnu.org>
22947
22948 * doc/bison.texinfo: entered into RCS
22949
22950 * doc/bison.texinfo: *** empty log message ***
22951
229521993-11-21 Richard Stallman <rms@gnu.org>
22953
22954 * bison.simple: *** empty log message ***
22955
229561993-10-25 David J. MacKenzie <djm@gnu.org>
22957
22958 * doc/bison.texinfo: *** empty log message ***
22959
229601993-10-19 Richard Stallman <rms@gnu.org>
22961
22962 * src/bison.s1: *** empty log message ***
22963
229641993-10-19 Richard Stallman <rms@gnu.org>
22965
22966 * bison.simple: *** empty log message ***
22967
229681993-10-14 Richard Stallman <rms@gnu.org>
22969
22970 * src/bison.s1: *** empty log message ***
22971
229721993-10-14 Richard Stallman <rms@gnu.org>
22973
22974 * bison.simple: *** empty log message ***
22975
229761993-09-14 David J. MacKenzie <djm@gnu.org>
22977
22978 * doc/bison.texinfo: *** empty log message ***
22979
229801993-09-13 Noah Friedman <friedman@gnu.org>
22981
22982 * Makefile.in: *** empty log message ***
22983
229841993-09-10 Richard Stallman <rms@gnu.org>
22985
22986 * src/conflicts.c: *** empty log message ***
22987
22988 * src/system.h: entered into RCS
22989
229901993-09-10 Richard Stallman <rms@gnu.org>
22991
22992 * doc/bison.1: entered into RCS
22993
229941993-09-06 Noah Friedman <friedman@gnu.org>
22995
22996 * src/version.c: entered into RCS
22997
229981993-09-06 Noah Friedman <friedman@gnu.org>
22999
23000 * Makefile.in: *** empty log message ***
23001
230021993-07-30 David J. MacKenzie <djm@gnu.org>
23003
23004 * Makefile.in: *** empty log message ***
23005
230061993-07-24 Richard Stallman <rms@gnu.org>
23007
23008 * src/bison.s1: *** empty log message ***
23009
230101993-07-24 Richard Stallman <rms@gnu.org>
23011
23012 * bison.simple: *** empty log message ***
23013
230141993-07-08 David J. MacKenzie <djm@gnu.org>
23015
23016 * Makefile.in: *** empty log message ***
23017
230181993-07-04 Richard Stallman <rms@gnu.org>
23019
23020 * src/bison.s1: *** empty log message ***
23021
230221993-07-04 Richard Stallman <rms@gnu.org>
23023
23024 * bison.simple: *** empty log message ***
23025
230261993-06-26 David J. MacKenzie <djm@gnu.org>
23027
23028 * src/getargs.c: entered into RCS
23029
230301993-06-26 David J. MacKenzie <djm@gnu.org>
23031
23032 * doc/bison.texinfo: *** empty log message ***
23033
23034 * doc/bison.1: New file.
23035
230361993-06-25 Richard Stallman <rms@gnu.org>
23037
23038 * src/getargs.c: New file.
23039
230401993-06-16 Richard Stallman <rms@gnu.org>
23041
23042 * src/bison.s1: *** empty log message ***
23043
230441993-06-16 Richard Stallman <rms@gnu.org>
23045
23046 * bison.simple: *** empty log message ***
23047
230481993-06-03 Richard Stallman <rms@gnu.org>
23049
23050 * src/bison.s1: New file.
23051
230521993-06-03 Richard Stallman <rms@gnu.org>
23053
23054 * doc/bison.texinfo: *** empty log message ***
23055
230561993-06-03 Richard Stallman <rms@gnu.org>
23057
23058 * bison.simple: New file.
23059
230601993-05-19 Richard Stallman <rms@gnu.org>
23061
23062 * doc/bison.texinfo: New file.
23063
230641993-05-07 Noah Friedman <friedman@gnu.org>
23065
23066 * Makefile.in: *** empty log message ***
23067
230681993-04-28 Noah Friedman <friedman@gnu.org>
23069
23070 * src/reader.c: *** empty log message ***
23071
230721993-04-23 Noah Friedman <friedman@gnu.org>
23073
23074 * src/alloc.h: entered into RCS
23075
230761993-04-20 David J. MacKenzie <djm@gnu.org>
23077
23078 * src/version.c: *** empty log message ***
23079
23080 * src/files.c, src/allocate.c:
23081 entered into RCS
23082
23083 * src/reader.c: *** empty log message ***
23084
23085 * src/lex.c: entered into RCS
23086
23087 * src/conflicts.c: New file.
23088
23089 * src/symtab.c: entered into RCS
23090
23091 * src/alloc.h: New file.
23092
23093 * src/LR0.c: entered into RCS
23094
230951993-04-18 Noah Friedman <friedman@gnu.org>
23096
23097 * src/reader.c: New file.
23098
23099 * src/version.c: *** empty log message ***
23100
231011993-04-18 Noah Friedman <friedman@gnu.org>
23102
23103 * Makefile.in: *** empty log message ***
23104
231051993-04-17 Noah Friedman <friedman@gnu.org>
23106
23107 * Makefile.in: *** empty log message ***
23108
231091993-04-15 Richard Stallman <rms@gnu.org>
23110
23111 * src/main.c, src/files.c:
23112 New file.
23113
231141993-04-15 Noah Friedman <friedman@gnu.org>
23115
23116 * configure.in: entered into RCS
23117
23118 * configure.in: *** empty log message ***
23119
23120 * configure.in: New file.
23121
231221993-04-14 Richard Stallman <rms@gnu.org>
23123
23124 * Makefile.in: New file.
23125
231261993-04-13 Richard Stallman <rms@gnu.org>
23127
23128 * src/version.c: New file.
23129
231301993-03-25 Richard Stallman <rms@gnu.org>
23131
23132 * src/output.c: entered into RCS
23133
231341992-09-25 Richard Stallman <rms@gnu.org>
23135
23136 * configure.bat: entered into RCS
23137
231381992-06-22 Richard Stallman <rms@gnu.org>
23139
23140 * src/vmsgetargs.c: entered into RCS
23141
231421992-06-22 Richard Stallman <rms@gnu.org>
23143
23144 * doc/bison.rnh: entered into RCS
23145
231461992-04-20 David J. MacKenzie <djm@gnu.org>
23147
23148 * README: entered into RCS
23149
231501992-01-22 Richard Stallman <rms@gnu.org>
23151
23152 * src/machine.h: entered into RCS
23153
231541991-12-21 Richard Stallman <rms@gnu.org>
23155
23156 * src/lalr.c, src/closure.c:
23157 entered into RCS
23158
231591991-12-20 Richard Stallman <rms@gnu.org>
23160
23161 * src/state.h: entered into RCS
23162
231631991-12-18 Richard Stallman <rms@gnu.org>
23164
23165 * src/print.c, src/nullable.c, src/derives.c:
23166 entered into RCS
23167
231681991-11-03 David J. MacKenzie <djm@gnu.org>
23169
23170 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23171 entered into RCS
23172
231731988-09-09 Richard Stallman <rms@gnu.org>
23174
23175 * src/bison.hairy: entered into RCS
23176
231771987-12-16 Richard Stallman <rms@gnu.org>
23178
23179 * REFERENCES: entered into RCS
dc546b0f 23180
f294a2c2 23181
04098407 23182 -----
f294a2c2 23183
04098407 23184 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
9126263e 23185 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
95021767 23186 Free Software Foundation, Inc.
f294a2c2 23187
04098407
PE
23188 Copying and distribution of this file, with or without
23189 modification, are permitted provided the copyright notice and this
23190 notice are preserved.