]> git.saurik.com Git - bison.git/blame - ChangeLog
Coding style changes.
[bison.git] / ChangeLog
CommitLineData
5f5a90df
AD
12009-03-02 Akim Demaille <demaille@gostai.com>
2
3 Coding style changes.
4 * data/lalr1.cc (b4_symbol_constructor_declaration_)
5 (b4_symbol_constructor_declarations)
6 (b4_symbol_constructor_definition_)
7 (b4_symbol_constructor_definitions)
8 (b4_yytranslate_definition): Rename as...
9 (b4_symbol_constructor_declare_)
10 (b4_symbol_constructor_declare)
11 (b4_symbol_constructor_define_)
12 (b4_symbol_constructor_define)
13 (b4_yytranslate_define): these.
14 * data/variant.hh (b4_variant_definition): Rename as...
15 (b4_variant_define): this.
16
b47b6ff7
AD
172009-03-02 Akim Demaille <demaille@gostai.com>
18
19 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
20 * data/bison.m4 (b4_percent_define_if_define): New.
21 * data/c++.m4 (b4_variant_if): Move to...
22 * data/bison.m4: Here, using b4_percent_define_if_define.
23 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
24 * data/bison.m4: Here, using b4_percent_define_if_define.
25
1d6b689b
AD
262009-03-02 Akim Demaille <demaille@gostai.com>
27
28 Dub symbol_type_base as a public type.
29 * data/c++.m4 (b4_public_types_declare): Now define
30 symbol_type_base and symbol_type.
31 (b4_public_types_define): New.
32 In both cases, the definitions are taken verbatim from lalr1.cc.
33 * data/lalr1.cc: Adjust.
34
4f84717d
AD
352009-03-02 Akim Demaille <demaille@gostai.com>
36
37 b4_public_types_declare.
38 * data/c++.m4 (b4_public_types_declare): New.
39 * data/glr.cc, data/lalr1.cc: Use it.
40
b9e4eb5b
AD
412009-03-02 Akim Demaille <demaille@gostai.com>
42
43 b4_semantic_type_declare.
44 * data/c++.m4 (b4_semantic_type_declare): New.
45 Factors and generalizes what was in glr.cc and lalr1.cc.
46 * data/variant.hh (b4_semantic_type_declare): Redefine it for
47 variants.
48 * data/lalr1.cc, data/glr.cc: Use it.
49
6a6e7f0c
AD
502009-02-26 Akim Demaille <demaille@gostai.com>
51
52 Upgrade gnulib.
53 * gnulib: Upgrade from master.
54 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
55 Regen.
56
e9e61b00
AD
572009-02-25 Akim Demaille <demaille@gostai.com>
58
59 Remove useless arguments.
60 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
61 relevant.
62
3eead995
AD
632009-02-25 Akim Demaille <demaille@gostai.com>
64
65 Comment changes.
66 * data/lalr1.cc: here.
67
87f28efe
AD
682009-02-25 Akim Demaille <demaille@gostai.com>
69
70 Fix glr.cc's debug level handling.
71 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
72 glr.c which is used.
73 (debug_level, set_debug_level): Adjust.
74
9be2a009
AD
752009-02-25 Akim Demaille <demaille@gostai.com>
76
77 Copyright years.
78 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
79
07a6e87d
AD
802009-02-25 Akim Demaille <demaille@gostai.com>
81
82 Style changes.
83 * etc/bench.pl.in (generate_grammar_list): Consitently use
84 location_type, not yy::location.
85
33c78bd2
AD
862009-02-25 Akim Demaille <demaille@gostai.com>
87
88 Comment change.
89 * data/lalr1.cc: here.
90
49572920
AD
912009-02-19 Akim Demaille <demaille@gostai.com>
92
93 Make yyparser::error public.
94 * data/lalr1.cc: here.
95 There is no good reason to keep it private (and it is convenient
96 to use it from the scanner for instance). It is already public in
97 glr.cc.
98
88654b47
AD
992009-02-19 Akim Demaille <demaille@gostai.com>
100
101 Comment changes.
102 * data/glr.cc: here.
103
4524c55b
AD
1042009-02-19 Akim Demaille <demaille@gostai.com>
105
106 Remove trailing blanks.
6a6e7f0c
AD
107 The epilogue has its own ending \n, no need to add another.
108
4524c55b
AD
109 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
110 epilogue.
111 * data/glr.cc: dnl when extending the epilogue.
112 Remove stray "private:".
113
6ceccee8
AD
1142009-02-19 Akim Demaille <demaille@gostai.com>
115
116 Use b4_c_modern.
117 * data/c.m4 (b4_c_function_decl): Here.
118
9c6a8966
AD
1192009-02-19 Akim Demaille <demaille@gostai.com>
120
121 Comment changes.
122 * data/lalr1.cc: here.
123
507aa0e2
AD
1242009-02-19 Akim Demaille <demaille@gostai.com>
125
126 Extract variant.hh
127 * data/variant.hh: New, extracted from...
128 * data/lalr1.cc: here.
129 Adjust.
130 * data/local.mk: Adjust.
131
51bacae6
AD
1322009-02-19 Akim Demaille <demaille@gostai.com>
133
134 Extract stack.hh from lalr1.cc.
135 * data/stack.hh: New.
136 * data/lalr1.cc: Extract from here.
137 * data/local.mk: Adjust.
138
06c3084f
JD
1392009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
140
141 Add reminder about uploading public key to keys.gnupg.net.
142 * HACKING (Release Procedure): Here.
143
0ea583d2
AD
1442009-01-28 Akim Demaille <demaille@gostai.com>
145
146 * NEWS: Update information about 2.4.1 and 2.4.2.
147
402b123d
AD
1482008-11-04 Akim Demaille <demaille@gostai.com>
149
150 Reformat NEWS.
151 * NEWS: Use more outline-mode markup.
152 Suggested by Jim Meyering.
153
74553c98
AD
1542009-01-08 Akim Demaille <demaille@gostai.com>
155
156 Fix grep portability issues.
157 Grep on Solaris does not support -q.
158 Reported by Summum Bonum.
159
160 * NEWS: Add a stub for 2.4.2.
161 * THANKS: Add Summum Bonum.
162 * tests/atlocal.in (EGREP): New.
163 (CC, CXX, XSLTPROC): Make it possible to override them via
164 envvars.
165 * tests/java.at: Use $EGREP instead of egrep.
166 Use AT_CHECK's ignore instead of grep's -q.
167
84eedf86
AD
1682008-12-11 Akim Demaille <demaille@gostai.com>
169
170 Pass the token type to yysyntax_error.
171 * data/yacc.c (yysyntax_error): Take the transated token instead
172 of the raw number.
173 Adjust callers.
174 * TODO: Update.
175
5860cc8c
AD
1762008-12-11 Akim Demaille <demaille@gostai.com>
177
178 Formatting changes.
179 * data/glr.c: Formatting changes.
180
2b008529
AD
1812008-12-11 Akim Demaille <demaille@gostai.com>
182
183 Propagate i18n changes into glr.c.
184 * TODO: Update.
185 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
186 building the error message format dynamically.
187 * data/lalr1.java: Formatting changes.
188
2cd1af95
AD
1892008-12-11 Akim Demaille <demaille@gostai.com>
190
191 Use testsuite -C.
192 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
193 Solves problems when top_srcdir is an absolute path.
194 Suggested by Eric Blake.
195 * configure.ac: Require Autoconf 2.62.
196
eeb29422
AD
1972008-12-11 Akim Demaille <demaille@gostai.com>
198
199 Simplify the i18n of the error messages.
200 * data/lalr1.cc: Comment changes.
201 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
202 lalr1.cc instead of building dynamically the format string.
203
6617622c
AD
2042008-12-08 Akim Demaille <demaille@gostai.com>
205
206 Fix portability issue in the test suite.
207 * tests/local.at (AT_MATCHES_CHECK): New.
208 Based on Perl instead of Sed. Sed has too many portability
209 pitfalls, not ever Sed is GNU Sed.
210 * tests/actions.at (Fix user actions without a trailing semicolon):
211 Use it.
212
2ca1136c
AD
2132008-12-08 Akim Demaille <demaille@gostai.com>
214
215 Update data/README.
216 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
217
6c63b895
AD
2182008-12-08 Akim Demaille <demaille@gostai.com>
219
220 Install autoconf as a submodule to get m4sugar.
221 * .gitmodules: Add submodules/autoconf.
222 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
223 submodules/autoconf.
224
417e31d2
AD
2252008-12-08 Akim Demaille <demaille@gostai.com>
226
227 Test token.prefix in all the skeletons.
228 * data/java.m4 (b4_token_enum): Use the token.prefix.
229 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
230 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
231 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
232 * tests/java.at: Comment changes.
233 (AT_CHECK_JAVA_MINIMAL): Define the END token.
234 (Java parser class and package names): Add token.prefix check.
235
97abf544
AD
2362008-12-08 Akim Demaille <demaille@gostai.com>
237
238 Fix regeneration of atconfig.
239 * tests/local.mk (tests/atconfig): The rule was incorrect, but
240 remove it: now that there is no tests/Makefile.am, the top-level
241 Makefile properly updates atconfig when needed.
242
e8cd1ad6
DJ
2432008-12-07 Di-an Jan <dianj@freeshell.org>
244
245 Implement the FIXME that ends an user action with a semicolon
246 if it seems necessary.
247 * src/scan-code.l (flex rules section): Flag cpp directive from
248 any `#' to the first unescaped end-of-line. Semicolon is not
249 needed after `;', `{', '}', or cpp directives and is needed after
250 any other token (whitespaces and comments have no effect).
251 * tests/actions.at (Fix user actions without a trailing semicolon):
252 New test.
253 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
254 to make user actions complete statements.
255 Adjust column numbers in error messages.
256 * tests/regression.at (Fix user actions without a trailing semicolon):
257 Remove. Covered by new test.
258
ce9447fc
AD
2592008-12-07 Akim Demaille <demaille@gostai.com>
260
261 Update gnulib.
262 * gnulib: Update from master.
263
d333175f
EB
2642008-12-05 Eric Blake <ebb9@byu.net>
265
266 Avoid compiler warning.
267 * src/output.c (muscle_insert_item_number_table): Delete unused
268 function.
269
215b40ac
EB
2702008-12-02 Eric Blake <ebb9@byu.net>
271
272 Build testsuite with newer autoconf.
273 * tests/output.at (m4_expand): Don't override in newer autoconf,
274 where the underlying implementation changed.
275 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
276 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
277 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
278 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
279 since some of them contain unbalanced ')'.
280
3bb21113
AD
2812008-12-01 Akim Demaille <demaille@gostai.com>
282
283 Use b4_symbol for printers and destructors everywhere.
284 * data/bison.m4 (b4_symbol_action_location): New.
285 * data/c.m4 (b4_symbol_actions): Remove.
286 Adjust all callers to use by b4_symbol_foreach and the corresponding
287 b4_symbol_printer/destructor macro.
288 * data/glr.cc: Adjust.
289 * data/lalr1.java: Adjust the %destructor sanity check.
290 * src/output.c (symbol_code_props_output): Remove, we no longer
291 need the b4_symbol_printers/destructors tables.
292
fb7c5b1f
AD
2932008-12-01 Akim Demaille <demaille@gostai.com>
294
295 Use b4_symbol_case_.
296 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
297 b4_symbol_case_.
298
cf6fb222
AD
2992008-12-01 Akim Demaille <demaille@gostai.com>
300
301 Move b4_symbol based macro to bison.m4.
302 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
303 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
304 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
305 (b4_type_foreach): Move to...
306 * data/bison.m4: Here.
307 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
308 b4_symbol_value_template instead of b4_symbol_value.
cf6fb222 309
e3c52a63
AD
3102008-12-01 Akim Demaille <demaille@gostai.com>
311
312 b4_symbol/type_foreach.
313 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
314 Use them.
315
2bde9113
AD
3162008-12-01 Akim Demaille <demaille@gostai.com>
317
318 Use the symbol properties to output the printer/destructor for lalr1.cc.
30c10faf
AD
319 Instead of defining complex list of tuples to define various
320 properties of the symbols, we now prefer to define symbols as
321 "structs" in m4: using the symbol key (its number), and the
322 property name, b4_symbol gives it value. Use this to handle
323 destructors and printers.
324
2bde9113
AD
325 * src/output.c (CODE_PROP): New.
326 (prepare_symbol_definitions): Use it to define the printer and
327 destructor related attributes of the symbols.
328 * data/lalr1.cc (b4_symbol_actions): Rename as...
329 (b4_symbol_action): this.
330 Use b4_symbol instead of 6 arguments.
331 (b4_symbol_printer, b4_symbol_destructor): New.
332 Use them instead of b4_symbol_actions.
333
44494bf6
AD
3342008-12-01 Akim Demaille <demaille@gostai.com>
335
336 Avoid capturing variables too easily.
337 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
338 v__ and p__ instead of v and p.
339
fad814bd
AD
3402008-12-01 Akim Demaille <demaille@gostai.com>
341
342 Remove spurious empty line before syncline.
343 * data/bison.m4 (b4_syncline): Don't output an empty line before
344 the output.
345
feda5527
AD
3462008-11-26 Akim Demaille <demaille@gostai.com>
347
348 Convert lib/Makefile.am into lib/local.mk.
349 The real problem is rather gnulib.mk, which itself is extracted
350 from a Makefile.am that gnulib expects to the "recursive". The
351 tool prefix-gnulib-mk converts such a gnulib.mk to be
352 non-recursive. Also, some AC_SUBST variables need to be adjusted.
353
354 * etc/prefix-gnulib-mk: New.
355 * bootstrap (slurp): Use it to convert further gnulib.mk.
356 No longer try to avoid re-creation of lib/gnulib.mk as the changes
357 are deeper.
358 * lib/Makefile.am: Rename as...
359 * lib/local.mk: this.
360 Adjust to be prefixed.
361 * Makefile.am, configure.ac: Adjust.
362 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
363
56ddee7f
AD
3642008-11-26 Akim Demaille <demaille@gostai.com>
365
366 s/_FLAGS/FLAGS/.
367 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
368 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
369 Reported by Eric Blake.
370
728e89a0
AD
3712008-11-26 Akim Demaille <demaille@gostai.com>
372
373 Use b4_parser_tables_define in glr.cc.
374 * data/glr.c: Use b4_parser_tables_define instead of defining the
375 (deterministic integral) tables by hand.
376
2c1bf9bd
AD
3772008-11-26 Akim Demaille <demaille@gostai.com>
378
379 Use b4_parser_tables_define in Java.
380 * data/java.m4 (b4_typed_parser_table): Rename as...
381 (b4_typed_parser_table_define): this, for consistency.
382 Accept a comment as $4.
383 Move $2 into yy*_.
384 (b4_integral_parser_table): Rename as...
385 (b4_integral_parser_table_define): this.
386 * data/lalr1.java: Adjust all uses.
387 Use b4_parser_tables_define instead of generation by hand.
388
ba206cf4
AD
3892008-11-26 Akim Demaille <demaille@gostai.com>
390
391 Prepare the convergence bw C style and Java table generation.
392 * data/bison.m4 (b4_tables_map, b4_tables_declare)
393 (b4_tables_define): Rename as...
394 (b4_integral_parser_tables_map, b4_parser_tables_declare)
395 (b4_parser_tables_define): these.
396 * data/c.m4 (b4_table_define): Rename as...
397 (b4_integral_parser_table_define): this.
398 * data/lalr1.cc: Adjust.
399 (b4_table_define, b4_table_declare): Rename as...
400 (b4_integral_parser_table_define)
401 (b4_integral_parser_table_declare): these.
402 (yyrline_): Move the comment where it is actually used.
403 * data/yacc.c: Adjust.
404 (yyrline): Use b4_integral_parser_table_define.
405
d12f8e49
AD
4062008-11-26 Akim Demaille <demaille@gostai.com>
407
408 Regen.
409 * src/parse-gram.h, src/parse-gram.c: Regen.
410
0991e29b
AD
4112008-11-26 Akim Demaille <demaille@gostai.com>
412
413 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
414 * data/lalr1.cc (b4_tables_map): Move to...
415 * data/bison.m4: here.
416 Update the comment for yytable during the flight.
417 (b4_tables_declare, b4_tables_define): New.
418 * data/lalr1.cc: Use them.
419 * data/c.m4 (b4_table_define): New.
420 * data/yacc.c: Use b4_tables_define instead of output the tables
421 by hand.
422 * tests/regression.at (Web2c Actions): Adjust the expected output,
423 the order of the tables changed.
424
3d3bc1fe
AD
4252008-11-26 Akim Demaille <demaille@gostai.com>
426
427 Get rid of (yy)rhs and (yy)prhs.
428 These tables are no longer needed in the parsers, and they don't seem to
429 be useful. They are not documented either.
feda5527 430
3d3bc1fe
AD
431 * src/output.c (prepare_rules): Get rid of rhs and prhs.
432 Adjust the computation of (yy)r2.
433
08c81469
AD
4342008-11-26 Akim Demaille <demaille@gostai.com>
435
436 Rule length is unsigned.
437 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
438
932b0c96
AD
4392008-11-26 Akim Demaille <demaille@gostai.com>
440
441 Get rid of lalr1-split.cc.
442 It was no longer maintainer.
feda5527 443
932b0c96
AD
444 * data/lalr1-split.cc: Remove.
445 * etc/bench.pl.in (bench_fusion_parser): Remove.
446 Adjust.
447
8452c667
AD
4482008-11-26 Akim Demaille <demaille@gostai.com>
449
450 Use yy* consistently.
451 * data/glr.c: Now that yyrhs no longer exists as a global
452 variable, rename local "rhs" variables into "yyrhs" for
453 consistency.
454
783aa653
AD
4552008-11-25 Akim Demaille <demaille@gostai.com>
456
457 Get rid of yyrhs and yyprhs in glr.c.
458 * data/glr.c (yyrhs, yyprhs): Remove.
459 Instead, use the state stack and yystos.
460
6130b755
AD
4612008-11-25 Akim Demaille <demaille@gostai.com>
462
463 Flag glr tests.
464 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
465 as an Autotest keyword.
466
95a7b1c9
AD
4672008-11-25 Akim Demaille <demaille@gostai.com>
468
469 Prefer TESTSUITE_FLAGS.
470 TESTSUITEFLAGS is barely readable.
feda5527 471
95a7b1c9
AD
472 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
473 for backward compatibility.
474 Use the former instead of the latter.
475
b4f18401
AD
4762008-11-25 Akim Demaille <demaille@gostai.com>
477
478 Get rid of yyrhs and yyprhs in larl1.java.
479 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
480 (yy_reduce_print): Rather, use yystos_ and the state stack.
481
c265fd6b
AD
4822008-11-25 Akim Demaille <demaille@gostai.com>
483
484 Formatting changes.
485
68dbdee8
AD
4862008-11-25 Akim Demaille <demaille@gostai.com>
487
488 Get rid of yyrhs and yyprhs in yacc.c.
30c10faf
AD
489 They were used to get the symbol types, given a rule number, when
490 displaying the top of the stack before a reduction. But the
491 symbol type is available from the state stack. This has two be
492 benefits: two tables less in the parser (making it smaller), and a
493 more consistent use of the three stacks which will help to fuse
494 them.
feda5527 495
68dbdee8
AD
496 * data/yacc.c (yyprhs, yyrhs): Remove.
497 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
498 (yy_reduce_print): Take yyssp as argument.
499 Use it, together with yystos, to get the symbol type.
500 * tests/regression.at (Web2c Report): Remove these tables from the
501 expected output.
502
6ab1adbe
AD
5032008-11-25 Akim Demaille <demaille@gostai.com>
504
505 b4_tables_map.
506 The point is to factor the generation of the tables across skeletons.
507 This is language dependant.
feda5527 508
6ab1adbe
AD
509 * data/c.m4 (b4_comment_): New.
510 Should be usable to define how to generate tables independently of
511 the language.
512 (b4_c_comment): New.
513 (b4_comment): Bounce to b4_c_comment.
514 Now support $2 = [PREFIX] for indentation.
515 * data/lalr1.cc (b4_table_declare): Don't output a comment if
516 there is no comment.
517 Indent it properly when there is one.
518 Output the ending semicolon.
519 (b4_table_define): Space changes.
520 Output the ending semicolon.
521 (b4_tables_map): New.
522 Use it twice instead of declaring and defining the (integral)
523 tables by hand.
524
0fddb3d5
AD
5252008-11-25 Akim Demaille <demaille@gostai.com>
526
527 b4_table_declare.
528 * data/lalr1.cc (b4_table_declare): New.
529 Use it to declare the tables defined with b4_table_define.
530 (b4_table_define): Declare a third arg to match b4_table_declare
531 signature.
532 Move all the comments around invocations of b4_table_define into
533 the invocations itselves.
534 Move things around to have the order for declarations and
535 definitions.
536
c4ddc0fb
AD
5372008-11-25 Akim Demaille <demaille@gostai.com>
538
539 Formatting changes.
540 * data/lalr1.java: here.
541
e0c653e7
AD
5422008-11-25 Akim Demaille <demaille@gostai.com>
543
544 b4_args is more general than only C++.
545 * data/lalr1.cc (b4_args, _b4_args): Move to...
546 * data/bison.m4: here.
547
4182a0a1
DJ
5482008-11-21 Di-an Jan <dianj@freeshell.org>
549
550 Implement no-XXX arguments for --warnings, --report, --trace.
551 * src/getargs.c (flags_argmatch): Handles no-XXX.
552 Fix typo in doxygen comment.
553
01466c3e
AD
5542008-11-21 Akim Demaille <demaille@gostai.com>
555
556 Display the changes in cross-options.texi.
557 * build-aux/cross-options.pl ($sep): New, to separate items.
558 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
559 changes.
560
a7c09cba
DJ
5612008-11-20 Di-an Jan <dianj@freeshell.org>
562
563 Improves options in the manual.
564 * doc/bison.texinfo (-g, -x): Add space before argument.
565 (Option Cross Key): Implement FIXME: listing directives also.
566 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
567 (Short Option): Special case -d. Put arguments inside @option.
feda5527 568 (Bison Directive): Add column, automatically extracted from
a7c09cba
DJ
569 src/scan-gram.l (actual name passed as the first argument)
570 with special case for %define.
571 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
572 to build-aux/cross-options.pl.
573 * src/getargs.c (usage): Document limitations of cross-options.pl.
574 * src/scan-gram.l: Likewise.
575
6c88b51e
JD
5762008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
577
578 Fix unexpanded macros in GLR defines file.
579 Reported by Csaba Raduly at
580 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
581 * THANKS (Csaba Raduly): Add.
582 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
583 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
584 lexer in a separate module that includes the defines file.
585 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
586 source.
587 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
588 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
589 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
590 (AT_DATA_SOURCE_PROLOGUE): New.
591 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
592 (AT_DATA_SOURCE): New.
593 (AT_FULL_COMPILE): Extend to support an additional source file.
594
1e034807
AD
5952008-11-18 Akim Demaille <demaille@gostai.com>
596
597 More TODO.
598 * TODO: More short term issues.
599
e3dda35c
AD
6002008-11-18 Akim Demaille <demaille@gostai.com>
601
602 Regen.
603 * src/parse-gram.h, src/parse-gram.c: Regen.
604
bd187d7b
AD
6052008-11-18 Akim Demaille <demaille@gostai.com>
606
607 Use b4_subtract where possible.
608 * data/lalr1.cc (b4_subtract): Move to...
609 * data/bison.m4: here.
610 * data/glr.c (b4_rhs_data): Use it.
611 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
612
6085ab0d
AD
6132008-11-18 Akim Demaille <demaille@gostai.com>
614
615 Remove incorrect mode specification.
616 * data/glr.cc: Don't pretend it's C code.
617
9ce405ce
JD
6182008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
619
620 Simplify last patch slightly.
621 * src/getargs.c (getargs): Here.
622
a8beef7e
JD
6232008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
624
625 Fix last warning from --enable-gcc-warnings.
626 * src/getargs.c (getargs): Don't assign const address to non-const
627 pointer.
628
d50eea6d
JD
6292008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
630
631 Don't let maintainer-*-check targets force a version update.
632 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
633 handled.
634
f5f419de
DJ
6352008-11-17 Di-an Jan <dianj@freeshell.org>
636
637 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
638 Align menus. Adjust word wrapping. Use node names for menu names.
639 (Examples): Don't abbreviate node names.
640 (LocalWords): Remove abbreviations.
641 (Copying): Make description a sentence.
d50eea6d 642 (Java Action Features): Remove period to match the rest of menu.
f5f419de 643
d73e55e0
DJ
6442008-11-17 Di-an Jan <dianj@freeshell.org>
645
646 Handles several --enable-gcc-warnings.
647 * src/getargs.c (command_line_location): Set parameters to void.
648 * src/output.c (symbol_type_name_cmp): Make static.
649 (symbols_by_type_name): Set parameters to void.
650 (symbol_definitions_output): Remove unused parameter. Rename as...
651 (prepare_symbol_definitions): this.
652 (muscles_output): Move symbol_definitions_output to...
653 (output): here as prepare_symbol_definitions.
654 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
d50eea6d 655 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
d73e55e0 656
68c989de
DJ
6572008-11-17 Di-an Jan <dianj@freeshell.org>
658
659 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
660 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
661
23ce6f4c
AD
6622008-11-16 Akim Demaille <demaille@gostai.com>
663
664 Add missing $(EXEEXT).
665 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
666 "src/bison$(EXEEXT)".
667 Reported by Di-an Jan.
668
dd704c35
AD
6692008-11-15 Akim Demaille <demaille@gostai.com>
670
671 * TODO: Update.
672
dab244d5
AD
6732008-11-15 Akim Demaille <demaille@gostai.com>
674
675 Formatting changes.
676 * tests/input.at: here.
677
4b4da9fb
AD
6782008-11-15 Akim Demaille <demaille@gostai.com>
679
680 Remove duplicate header inclusion.
681 * src/LR0.c: here.
682
4ea3f53d
AD
6832008-11-15 Akim Demaille <demaille@gostai.com>
684
685 * src/parse-gram.h, src/parse-gram.c: Regen.
686
cb823b6f
AD
6872008-11-15 Akim Demaille <demaille@gostai.com>
688
689 Support parametric types.
b06df3c2
AD
690
691 There are two issues to handle: first scanning nested angle
692 bracket pairs to support types such as std::pair< std::string,
693 std::list<std::string> > >.
694
695 Another issue is to address idiosyncracies of C++: do not glue two
696 closing angle brackets together (otherwise it's operator>>), and
697 avoid sticking blindly a TYPE to the opening <, as it can result
698 in '<:' which is a digraph for '['.
699
cb823b6f
AD
700 * src/scan-gram.l (brace_level): Rename as...
701 (nesting): this.
702 (SC_TAG): New.
703 Implement support for complex tags.
b06df3c2 704 (tag): Accept
cb823b6f
AD
705 , but not <.
706 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
707 (b4_symbol_variant): Leave space around types as parameters.
708 * examples/variant.yy: Use nested template types and leading ::.
709 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
710 Rename as...
711 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
712 * tests/c++.at: Test parametric types.
713
7b6e6753
AD
7142008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
715
716 Test token.prefix.
717 This is not sufficient, but we test at least that the make_SYMBOL
718 interface is not affected by token.prefix. A more general test
719 will be implemented when the support of token.prefix is generalized
720 to more skeletons.
b06df3c2 721
7b6e6753
AD
722 * tests/c++.at: One more variant test, using token.prefix.
723
dddec537
AD
7242008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
725
726 Test the make_TOKEN interface.
727 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
728 Factor the common code in yylex.
729 Use it to test "%define lex_symbol".
730
7d3e21ba
AD
7312008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
732
733 Formatting change.
734
4fc55348
AD
7352008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
736
737 Simplify code for variants bench marks.
738 * etc/bench.pl.in (&generate_grammar_list): Define and use
739 location_type.
740 Factor the common code in yylex.
741
070e6509
AD
7422008-11-15 Akim Demaille <demaille@gostai.com>
743
744 Better error message.
745 * bootstrap (find_tool): Fix the error message.
746
0078681b
AD
7472008-11-15 Akim Demaille <demaille@gostai.com>
748
749 Update variant.yy to newest interface.
750 * examples/variant.yy: Define lex_symbol.
751 Adjust.
752
ff084799
AD
7532008-11-15 Akim Demaille <demaille@gostai.com>
754
755 Don't use locations in variant.yy.
756 * examples/variant.yy: Adjust to not using locations.
757
b0d79ec6
AD
7582008-11-15 Akim Demaille <demaille@gostai.com>
759
760 Comment changes.
761 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
762 comments for the license.
763
d4977ce3
AD
7642008-11-15 Akim Demaille <demaille@gostai.com>
765
766 Remove tests/Makefile.am.
767 * tests/Makefile.am: Rename as...
768 * tests/local.mk: this.
769 * Makefile.am, configure.ac: Adjust.
770 * Makefile.am (DISTCLEANFILES): Define.
771 (maintainer-check, maintainer-xml-check, maintainer-push-check):
772 Remove, we no longer need to bounce to the real targets.
773
87f1149a
AD
7742008-11-15 Akim Demaille <demaille@gostai.com>
775
776 Comment changes.
777
36415906
AD
7782008-11-15 Akim Demaille <demaille@gostai.com>
779
780 djgpp/local.mk.
781 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
782 * djgpp/local.mk: this new file.
783
e2c2f696
AD
7842008-11-15 Akim Demaille <demaille@gostai.com>
785
786 Remove doc/Makefile.am.
787 * doc/Makefile.am: Rename as...
788 * doc/local.mk: this.
789 Adjust paths
790 * Makefile.am, configure.ac: Adjust.
791 * Makefile.am (MOSTLYCLEANFILES): New.
792 * src/local.mk: Adjust.
793
2ead32e6
AD
7942008-11-15 Akim Demaille <demaille@gostai.com>
795
796 Move sc_tight_scope into maint.mk.
b06df3c2
AD
797 It does not work, and I don't know how it was supposed to work: it
798 seems to be looking for sources in the build tree. I just moved
799 it at a better place, fixing it is still required.
800
2ead32e6
AD
801 * src/local.mk (echo): Remove.
802 (sc_tight_scope): Move to...
803 * maint.mk: here.
804
2df9ec37
AD
8052008-11-15 Akim Demaille <demaille@gostai.com>
806
807 Regen.
808 * src/parse-gram.h, src/parse-gram.h: Regen.
809
0305d25e
AD
8102008-11-15 Akim Demaille <demaille@gostai.com>
811
812 Remove src/Makefile.am.
813 * src/Makefile.am: Rename as...
814 * src/local.mk: this.
815 Prefix all the paths with src/.
816 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
817 (AM_CPPFLAGS): Find find in builddir/src.
818 (YACC): Move the flags into...
819 (AM_YFLAGS): here.
820 * maint.mk (sc_tight_scope): Disable.
821 It used to bounce to the version in src/Makefile.am which is now
822 part of this very Makefile.
823 * Makefile.am, configure.ac: Adjust.
824 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
825 include "..." to find files "here": we are no longer in src/, so
826 qualify the includes with src/.
827 * doc/Makefile.am (PREPATH): No longer include the top_builddir
828 prefix.
829 (.x.1): Adjust to be able to create src/foo from the top level
830 Makefile, instead of going bounce to src/Makefile the creation of
831 foo.
832
5277c0a3
AD
8332008-11-15 Akim Demaille <demaille@gostai.com>
834
835 Remove useless variable.
836 * doc/Makefile.am (srcsrcdir): Remove.
837
6a5aa0cd
AD
8382008-11-15 Akim Demaille <demaille@gostai.com>
839
840 Remove data/Makefile.am.
841 * data/Makefile.am: Rename as...
842 * data/local.mk: this.
843 Adjust paths.
844 * Makefile.am, configure.ac: Adjust.
845
7cb794dc
AD
8462008-11-15 Akim Demaille <demaille@gostai.com>
847
848 Remove etc/Makefile.am.
849 * etc/Makefile.am: Rename as...
850 * etc/local.mk: this.
851 Adjust.
852 * Makefile.am, configure.ac: Adjust.
853
cd409e3b
AD
8542008-11-15 Akim Demaille <demaille@gostai.com>
855
856 Remove examples/local.mk.
857 examples/calc++/Makefile.am might be interesting to keep as is, since
858 it is an example in itself.
2df9ec37 859
cd409e3b
AD
860 * examples/Makefile.am: Rename as...
861 * examples/local.mk: this.
862 Adjust.
863 * Makefile.am, configure.ac: Adjust.
864
9a1e4214
AD
8652008-11-15 Akim Demaille <demaille@gostai.com>
866
867 Remove build-aux/Makefile.am.
868 Recursive Makefiles are really way too slow, let's get rid of some of
869 them.
2df9ec37 870
9a1e4214
AD
871 * build-aux/Makefile.am: Rename as...
872 * build-aux/local.mk: this.
873 Adjust paths.
874 * Makefile.am, configure.ac: Adjust.
875
0634493c
AD
8762008-11-15 Akim Demaille <demaille@gostai.com>
877
878 Provide convenience constructors for locations and positions.
879 * data/location.cc (position::position): Accept file, line and
880 column as arguments with default values.
881 Always qualify initial line and column literals as unsigned.
882 (location::location): Provide convenience constructors.
883
fe1b448a
AD
8842008-11-15 Akim Demaille <demaille@gostai.com>
885
b06df3c2
AD
886 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
887 token type.
fe1b448a
AD
888 Using template buys us nothing, and makes it uselessly complex to
889 construct a symbol. Besides, it could not be generalized to other
890 languages, while make_FOO would work in C/Java etc.
2df9ec37 891
fe1b448a
AD
892 * data/lalr1.cc (b4_symbol_): New.
893 (b4_symbol): Use it.
894 (b4_symbol_constructor_declaration_)
895 (b4_symbol_constructor_definition_): Instead of generating
896 specializations of an overloaded template function, just generate
897 several functions whose names are forged from the token names
898 without the token.prefix.
899 (b4_symbol_constructor_declarations): Generate them for all the
900 symbols, not just by class of symbol type, now that instead of
901 specializing a function template by the token, we generate a
902 function named after the token.
903 (b4_symbol_constructor_specialization_)
904 (b4_symbol_constructor_specializations): Remove.
905 * etc/bench.pl.in: Adjust to this new API.
906
5679f311
AD
9072008-11-13 Akim Demaille <demaille@gostai.com>
908
909 %define token.prefix.
b06df3c2
AD
910 Provide a means to add a prefix to the name of the tokens as
911 output in the generated files. Because of name clashes, it is
912 good to have such a prefix such as TOK_ that protects from names
913 such as EOF, FILE etc. But it clutters the grammar itself.
2df9ec37 914
5679f311
AD
915 * data/bison.m4 (token.prefix): Empty by default.
916 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
917 * data/lalr1.cc (b4_symbol): Ditto.
918
3204049e
AD
9192008-11-13 Akim Demaille <demaille@gostai.com>
920
921 Compute at M4 time some of the subtractions.
90290ce5 922 * data/lalr1.cc (b4_subtract): New.
3204049e
AD
923 (b4_rhs_data): Use it.
924
202598d3
AD
9252008-11-13 Akim Demaille <demaille@gostai.com>
926
927 symbol::token.
b06df3c2 928 This allows the user to get the type of a token returned by yylex.
2df9ec37 929
202598d3
AD
930 * data/lalr1.cc (symbol::token): New.
931 (yytoknum_): Define when %define lex_symbol, independently of
932 %debug.
933 (yytoken_number_): Move into...
934 (symbol::token): here, since that's the only use.
935 The other one is YYPRINT which was not officially supported
936 by lalr1.cc, and anyway it did not work since YYPRINT uses this
937 array under a different name (yytoknum).
938
fc2476c7
AD
9392008-11-13 Akim Demaille <demaille@gostai.com>
940
941 YYERRCODE.
942 * TODO (YYERRCODE): Mention the case of $undef.
943
865f1e9f
AD
9442008-11-13 Akim Demaille <demaille@gostai.com>
945
946 TODO: YYPRINT.
947 * TODO (YYPRINT): New.
948
cb0b136a
AD
9492008-11-13 Akim Demaille <demaille@gostai.com>
950
951 Comment changes.
952 * data/lalr1.cc, data/yacc.c: Fix the description of the
953 yytranslate and yytoknum tables.
954
2c086d29
AD
9552008-11-13 Akim Demaille <demaille@gostai.com>
956
957 Define make_symbol in the header.
b06df3c2
AD
958 To reach good performances these functions should be inlined (yet
959 this is to measure precisely). To this end they must be available
960 to the caller.
2df9ec37 961
2c086d29
AD
962 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
963 location_type with the class name.
964 Since will now be output in the header, declare "inline".
965 No longer use b4_symbol_constructor_specializations, but
966 b4_symbol_constructor_definitions in the header.
967 Don't call it in the *.cc file.
968
1c4af381
AD
9692008-11-13 Akim Demaille <demaille@gostai.com>
970
971 Define yytranslate in the header for lex_symbol.
972 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
973 into the header file when using %define lex_symbol.
974 (yytranslate_): Declare inline.
975
e51b0a82
AD
9762008-11-13 Akim Demaille <demaille@gostai.com>
977
b06df3c2
AD
978 Define the constructors of symbol_type in
979 b4_symbol_constructor_definitions.
e51b0a82 980 The constructors are called by the make_symbol functions, which a
b06df3c2
AD
981 forthcoming patch will move elsewhere. Hence the interest of
982 putting them together.
2df9ec37 983
b06df3c2
AD
984 The stack_symbol_type does not need to be moved, it is used only
985 by the parser.
2df9ec37 986
e51b0a82
AD
987 * data/lalr1.cc: Move symbol_type and symbol_base_type
988 constructors into...
989 (b4_symbol_constructor_definitions): here.
990 Adjust.
991
78835571
AD
9922008-11-13 Akim Demaille <demaille@gostai.com>
993
994 Make it easier to move the definition of yytranslate_.
995 Forthcoming changes will make it possible to use yytranslate_
996 from outside the parser implementation file.
2df9ec37 997
78835571
AD
998 * data/lalr1.cc (b4_yytranslate_definition): New.
999 Use it.
1000
c1e6c88c
AD
10012008-11-13 Akim Demaille <demaille@gostai.com>
1002
1003 Remove useless class specification.
1004 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
1005 to refer to the class name to use a type defined by the class for
1006 arguments of member functions.
1007
4654b0c0
AD
10082008-11-13 Akim Demaille <demaille@gostai.com>
1009
1010 Finer input type for yytranslate.
1011 This patch is debatable: the tradition expects yylex to return an int
1012 which happens to correspond to token_number (which is an enum). This
1013 allows for instance to return characters (such as '*' etc.). But this
1014 goes against the stronger typing I am trying to have with the new
1015 lex interface which return a symbol_type. So in this case, feed
1016 yytranslate_ with a token_type.
2df9ec37 1017
4654b0c0
AD
1018 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
1019 expect a token_type.
1020
dd735e4e
AD
10212008-11-13 Akim Demaille <demaille@gostai.com>
1022
1023 Honor lex-params in %define lex_symbol mode.
1024 * data/lalr1.cc: Use b4_lex_param.
1025
6659366c
AD
10262008-11-13 Akim Demaille <demaille@gostai.com>
1027
1028 Simplify names.
1029 * src/output.c (symbol_definitions_output): Rename symbol
1030 attributes type_name and has_type_name as type and has_type.
1031 * data/lalr1.cc: Adjust uses.
1032
e9805e57
AD
10332008-11-13 Akim Demaille <demaille@gostai.com>
1034
1035 Use b4_type_names for the union type.
b06df3c2
AD
1036 The union used to compute the size of the variant used to iterate
1037 over the type of all the symbols, with a lot of redundancy. Now
1038 iterate over the lists of symbols having the same type-name.
2df9ec37 1039
e9805e57
AD
1040 * data/lalr1.cc (b4_char_sizeof_): New.
1041 (b4_char_sizeof): Use it.
1042 Adjust to be called with a list of numbers instead of a single
1043 number.
1044 Adjust its caller for new-line issues.
1045
aea10ef4
AD
10462008-11-13 Akim Demaille <demaille@gostai.com>
1047
1048 Define the "identifier" of a symbol.
b06df3c2
AD
1049 Symbols may have several string representations, for instance if
1050 they have an alias. What I call its "id" is a string that can be
1051 used as an identifier. May not exist.
2df9ec37 1052
b06df3c2
AD
1053 Currently the symbols which have the "tag_is_id" flag set are
1054 those that don't have an alias. Look harder for the id.
2df9ec37 1055
aea10ef4
AD
1056 * src/output.c (is_identifier): Move to...
1057 * src/symtab.c (is_identifier): here.
1058 * src/symtab.h, src/symtab.c (symbol_id_get): New.
1059 * src/output.c (symbol_definitions_output): Use it to define "id"
1060 and "has_id".
1061 Remove the definition of "tag_is_id".
1062 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
1063 "tag_is_id" were used to produce code.
1064 We still use "tag" for documentation.
1065
2ea7730c
AD
10662008-11-11 Akim Demaille <demaille@gostai.com>
1067
1068 Locations are no longer required by lalr1.cc.
1069 * data/lalr1.cc (_b4_args, b4_args): New.
1070 Adjust all uses of locations to make them optional.
1071 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
1072 (AT_CHECK_NAMESPACE): Check the use of locations.
1073 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
1074 without locations with lalr1.cc.
1075 Test these cases.
1076 * tests/output.at: Check lalr1.cc with and without location
1077 support.
1078 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
1079 Don't use locations.
1080
7ca2266a
AD
10812008-11-11 Akim Demaille <demaille@gostai.com>
1082
1083 AT_FULL_COMPILE.
1084 * tests/local.at (AT_FULL_COMPILE): New.
1085 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
1086
1a7a65f9
AD
10872008-11-11 Akim Demaille <demaille@gostai.com>
1088
1089 Support parens in calc++.
1090 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
1091 * examples/calc++/test (run): Check the expected output.
1092 Adjust callers.
1093 Check parens too.
1094
c944f7f2
AD
10952008-11-11 Akim Demaille <demaille@gostai.com>
1096
1097 Simplify lalr1.cc since %defines is mandatory.
1098 * data/lalr1.cc: Remove useless calls to b4_defines_if.
1099
dada3cd1
AD
11002008-11-11 Akim Demaille <demaille@gostai.com>
1101
1102 TODO: yyfmt.
1103 * TODO (yysyntax_error): New item.
1104
422c18f4
AD
11052008-11-11 Akim Demaille <demaille@gostai.com>
1106
1107 Prefer M4 to CPP.
1108 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
1109 YYERROR_VERBOSE.
1110
a0ffc175
AD
11112008-11-11 Akim Demaille <demaille@gostai.com>
1112
1113 Support i18n of the parse error messages.
1114 * TODO (lalr1.cc/I18n): Remove.
1115 * data/lalr1.cc (yysyntax_error_): Support the translation of the
1116 error messages, as done in yacc.c.
1117 Stay within the yy* pseudo namespace.
1118
00a8a083
AD
11192008-11-11 Akim Demaille <demaille@gostai.com>
1120
1121 More TODO.
1122 * TODO (single stack, yysyntax_error): New.
1123
09277875
AD
11242008-11-11 Akim Demaille <demaille@gostai.com>
1125
1126 Make it possible to return a symbol_type from yylex.
1127 * data/lalr1.cc (b4_lex_symbol_if): New.
1128 (parse): When lex_symbol is defined, expected yylex to return the
1129 complete lookahead.
1130 * etc/bench.pl.in (generate_grammar_list): Extend to support this
1131 yylex interface.
1132 (bench_variant_parser): Exercise it.
1133
64c1b92a
AD
11342008-11-11 Akim Demaille <demaille@gostai.com>
1135
1136 Remove useless bench case.
1137 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
1138 no longer used.
1139
2722aa42
AD
11402008-11-11 Akim Demaille <demaille@gostai.com>
1141
1142 Improve display of directives.
1143 * etc/bench.pl.in (parse_term): Don't add useless eol.
1144
918eb7c5
AD
11452008-11-11 Akim Demaille <demaille@gostai.com>
1146
1147 Use string_cast in the bench.
1148 * etc/bench.pl.in (generate_grammar_list): Define and use
1149 string_cast.
1150
39be9022
AD
11512008-11-11 Akim Demaille <demaille@gostai.com>
1152
1153 Replace yychar with a Boolean.
1154 * data/lalr1.cc (parse::yychar): Replace by...
1155 (parse::yyempty): this.
1156
a2e3fa77
AD
11572008-11-11 Akim Demaille <demaille@gostai.com>
1158
1159 Factor the tables.
1160 * TODO: New item.
1161
aba12ad1
AD
11622008-11-11 Akim Demaille <demaille@gostai.com>
1163
1164 Let yytranslate handle the eof case.
1165 * data/lalr1.cc (yytranslate_): Handle the EOF case.
1166 Adjust callers.
1167 No longer expect yychar to be equal to yyeof_, rather, test the
1168 lookahead's (translated) kind.
1169
27cb5b59
AD
11702008-11-11 Akim Demaille <demaille@gostai.com>
1171
1172 yychar cannot be empty in yyerrlab.
1173 * TODO (yychar == yyempty_): New.
1174 * data/lalr1.cc: Remove the handling of this case.
1175 This eases forthcoming changes related to yychar and yytranslate.
1176
fce629c0
AD
11772008-11-11 Akim Demaille <demaille@gostai.com>
1178
1179 Bench: syntactic sugar for %define/#define.
1180 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
1181 (&bench_push_parser, bench_variant_parser): Use this feature.
1182 (&eat): New.
1183 Use it.
1184
ce671960
AD
11852008-11-11 Akim Demaille <demaille@gostai.com>
1186
1187 Less memory pressure on the "list" bench.
1188 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
1189 the values, to limit memory pressure.
1190
2873fdf8
AD
11912008-11-11 Akim Demaille <demaille@gostai.com>
1192
1193 Introduce make_symbol.
b06df3c2
AD
1194 make_symbol provides a means to construct a full symbol (kind,
1195 value, location) in a single shot. It is meant to be a Symbol
1196 constructor, parameterized by the symbol kind so that overloading
1197 would prevent incorrect kind/value pairs. Unfortunately
1198 parameterized constructors do not work well in C++ (unless the
1199 parameter also appears as an argument, which is not acceptable),
1200 hence the use of a function instead of a constructor.
2df9ec37 1201
2873fdf8
AD
1202 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1203 (b4_symbol_constructor_declarations)
1204 (b4_symbol_constructor_specialization_)
1205 (b4_symbol_constructor_specializations)
1206 (b4_symbol_constructor_definition_)
1207 (b4_symbol_constructor_definitions): New.
1208 Use them where appropriate to generate declaration, declaration of
1209 the specializations, and implementations of the templated
1210 overloaded function "make_symbol".
1211 (variant::variant): Always define a default ctor.
1212 Also provide a copy ctor.
1213 (symbol_base_type, symbol_type): New ctor overloads for value-less
1214 symbols.
1215 (symbol_type): Now public, so that functions such as yylex can use
1216 it.
1217
8be046d7
AD
12182008-11-11 Akim Demaille <demaille@gostai.com>
1219
1220 Inform m4 whether a tag is a valid id.
1221 * src/output.c (is_identifier): New.
1222 (symbol_definitions_output): Use it to define tag_is_id.
1223 But maybe this should be done at m4 level?
1224
de62edee
AD
12252008-11-11 Akim Demaille <demaille@gostai.com>
1226
1227 Test 214 was failing: it greps with a pattern containing [ ]*
1228 which obviously meant to catch spaces and tabs, but contained only
1229 spaces. Tabulations in sources are a nuisance, so to simplify the
1230 matter, get rid of all the tabulations in the Java sources. The
1231 other skeletons will be treated equally later.
1232
1233 * data/java.m4, data/lalr1.java: Untabify.
1234 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
1235 tabulations are no longer generated.
1236
905f0697
PB
12372008-11-11 Paolo Bonzini <bonzini@gnu.org>
1238
1239 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
1240 * configure.ac: Adjust usage.
1241 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1242 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
1243 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
1244
09ccae9b
DJ
12452008-11-10 Di-an Jan <dianj@freeshell.org>
1246
1247 Workaround Java's ``code too large'' problem for parser tables
1248 in most cases, by using one function per initialization.
1249 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
1250 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
1251 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
1252 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
1253 (yytname_): Use b4_typed_parser_table.
1254 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
1255 ``code too large'' error.
1256
1979121c
DJ
12572008-11-10 Di-an Jan <dianj@freeshell.org>
1258
1259 * NEWS: Document them.
de62edee 1260
1979121c
DJ
1261 General Java skeleton improvements.
1262 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
1263 using gcj < 4.3 in the testsuite, according to comments in
1264 gnulib/m4/javacomp.m4.
1265 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
1266 location_type, position_type): Remove extraneous brackets from
1267 b4_percent_define_default.
1268 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
1269 m4_define and m4_define_default.
1270 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
1271 which marks the end of user code with appropriate syncline, like all
1272 the other skeletons.
1273 (b4_user_post_prologue): Add. Don't silently drop.
1274 (yylex): Remove.
1275 (parse): Inline yylex.
1276 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
1277 (%{...%}): Fix typo of %code imports.
1278 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
1279
1280 Support annotations on parser class with %define annotations.
1281 * data/lalr1.java (annotations): Add to parser class modifier.
1282 * doc/bison.texinfo (Java Parser Interface): Document
1283 %define annotations.
1284 (Java Declarations Summary): Document %define annotations.
1285 * tests/java.at (Java parser class modifiers): Test annotations.
1286
1287 Do not generate code for %error-verbose unless requested.
1288 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
1289 Make private. Make conditional on %error-verbose.
1290 (getErrorVerbose, setErrorVerbose): New.
1291 (yytnamerr_): Make conditional on %error-verbose.
1292 (yysyntax_error): Make some code conditional on %error-verbose.
1293 * doc/bison.texinfo (Java Bison Interface): Remove the parts
1294 about %error-verbose having no effect.
1295 (getErrorVerbose, setErrorVerbose): Document.
1296
1297 Move constants for token names to Lexer interface.
1298 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
1299 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
1300 (parse): Qualify EOF to Lexer.EOF.
1301 * doc/bison.texinfo (Java Parser Interface): Move documentation of
1302 EOF and token names to Java Lexer Interface.
1303 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
1304
1305 Make yyerror public.
1306 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
1307 (yyerror): Change to public. Add Javadoc comments. Use longer
1308 parameter names. Make the body rather than the declarator
1309 conditional on %locations.
1310 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
1311
1312 Allow user to add code to the constructor with %code init.
1313 * data/java.m4 (b4_init_throws): New, for %define init_throws.
1314 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
1315 Add %code init to the front of the constructor body.
1316 * doc/bison.texinfo (YYParser.YYParser): Document %code init
1317 and %define init_throws.
1318 (Java Declarations Summary): Document %code init and
1319 %define init_throws.
1320 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
1321 (Java constructor init and init_throws): Add tests.
de62edee 1322
42f832d6
AD
13232008-11-10 Akim Demaille <demaille@gostai.com>
1324
1325 Update TODO.
1326 * TODO (-D): is implemented.
1327 (associativity): Same precedence must have the same associativity.
1328 For instance, how can a * b / c be parsed if * is %left and / is
1329 %right?
1330 (YYERRORCODE, YYFAIL, YYBACKUP): New.
1331
247efe34
AD
13322008-11-10 Akim Demaille <demaille@gostai.com>
1333
1334 Formatting changes.
1335
5d731440
AD
13362008-11-10 Akim Demaille <demaille@gostai.com>
1337
1338 More information about the symbols.
1339 * src/output.c (type_names_output): Document all the symbols,
1340 including those that don't have a type-name.
1341 (symbol_definitions_output): Define "is_token" and
1342 "has_type_name".
1343 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
1344 type-name, now that they are defined too in b4_type_names.
1345
21db118b
AD
13462008-11-10 Akim Demaille <demaille@gostai.com>
1347
1348 Regen.
1349
6ed15cde
AD
13502008-11-10 Akim Demaille <demaille@gostai.com>
1351
1352 Make parser::yytranslate static.
b06df3c2
AD
1353 Small speedup (1%) on the list grammar. And makes yytranslate_
1354 available in non member functions.
de62edee 1355
6ed15cde
AD
1356 * data/lalr1.cc (yytranslate_): Does not need to be a instance
1357 function.
1358
30bb2edc
AD
13592008-11-10 Akim Demaille <demaille@gostai.com>
1360
1361 Avoid trailing spaces.
1362 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
1363 * data/lalr1.cc: Don't indent before rule and symbol actions, as
1364 they can be empty, and anyway this incorrectly indents the first
1365 action.
1366
b3a28fd4
AD
13672008-11-10 Akim Demaille <demaille@gostai.com>
1368
1369 Comment changes.
1370
914202bd
AD
13712008-11-10 Akim Demaille <demaille@gostai.com>
1372
1373 Use "enum" for integral constants.
1374 This is just nicer to read, I observed no speedup.
de62edee 1375
914202bd
AD
1376 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
1377 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
1378 (yyuser_token_number_max_, yyundef_token_): Move into...
1379 (yytranslate_): here.
1380
c17f9a4a
AD
13812008-11-10 Akim Demaille <demaille@gostai.com>
1382
1383 Shortcuts in bench directives.
1384 * etc/bench.pl.in (parse_dirs): New.
1385 Use it.
1386 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
1387 Create the benches in "benches/".
1388
b9855ea5
AD
13892008-11-10 Akim Demaille <demaille@gostai.com>
1390
1391 Formatting changes.
1392 * data/lalr1.cc: here.
1393
6e097787
AD
13942008-11-10 Akim Demaille <demaille@gostai.com>
1395
1396 Adjust verbose message to using emacs.
1397 * etc/bench.pl.in: Inform compilation-mode when we change the
1398 directory.
1399 (generate_grammar_list): Recognize %define "variant" in addition
1400 to %define variant.
1401
4c3cc7da
AD
14022008-11-10 Akim Demaille <demaille@gostai.com>
1403
1404 Classify symbols by type-name.
1405 * src/uniqstr.h (UNIQSTR_CMP): New.
1406 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
1407 (type_names_output): New.
1408 (muscles_output): Use it.
1409 * data/lalr1.cc (b4_symbol_action_): Remove.
1410 (b4_symbol_case_, b4_type_action_): New.
1411 Adjust uses of b4_symbol_action_ to use b4_type_action_.
1412
d69c9694
AD
14132008-11-10 Akim Demaille <demaille@gostai.com>
1414
1415 Change the handling of the symbols in the skeletons.
1416 Before we were using tables which lines were the symbols and which
1417 columns were things like number, tag, type-name etc. It is was
1418 difficult to extend: each time a column was added, all the numbers had
1419 to be updated (you asked for colon $2, not for "tag"). Also, it was
1420 hard to filter these tables when only a subset of the symbols (say the
1421 tokens, or the nterms, or the tokens that have and external number
1422 *and* a type-name) was of interest.
de62edee 1423
d69c9694
AD
1424 Now instead of monolithic tables, we define one macro per cell. For
1425 instance "b4_symbol(0, tag)" is a macro name which contents is
1426 self-decriptive. The macro "b4_symbol" provides easier access to
1427 these cells.
de62edee 1428
d69c9694
AD
1429 * src/output.c (type_names_output): Remove.
1430 (symbol_numbers_output, symbol_definitions_output): New.
1431 (muscles_output): Call them.
1432 (prepare_symbols): Define b4_symbols_number.
1433
5263bea9
AD
14342008-11-10 Akim Demaille <demaille@gostai.com>
1435
1436 --trace=muscles
1437 * src/getargs.h, src/getargs.c (trace_muscle): New.
1438 (trace_types, trace_args): Support it.
1439 * src/output.c (output_skeleton): Use it.
1440
4175f6bb
AD
14412008-11-10 Akim Demaille <demaille@gostai.com>
1442
1443 muscles_output.
1444 * src/output.c (muscles_output): New, extracted from...
1445 (output_skeleton): here.
1446 Adjust.
1447
1de69d6a
AD
14482008-11-10 Akim Demaille <demaille@gostai.com>
1449
1450 Formatting changes.
1451
36db78a7
AD
14522008-11-10 Akim Demaille <demaille@gostai.com>
1453
1454 Update the variant example.
1455 * examples/variant.yy: Formatting changes.
1456 One stage build.
1457
e5eb92e7
AD
14582008-11-10 Akim Demaille <demaille@gostai.com>
1459
1460 Support constructor with an argument.
1461 This improves the "list" bench by 2%.
de62edee 1462
e5eb92e7
AD
1463 * data/lalr1.cc (variant::build): Add an overloaded version with
1464 an argument.
1465 * tests/c++.at (AT_CHECK_VARIANT): Check it.
1466
76307410
AD
14672008-11-10 Akim Demaille <demaille@gostai.com>
1468
1469 Test variants.
1470 * tests/c++.at (AT_CHECK_VARIANTS): New.
1471 Use it with and without %define assert.
1472
d78f0ac9
AD
14732008-11-10 Akim Demaille <demaille@gostai.com>
1474
1475 Add %precedence support.
1476 Unfortunately it is not possible to reuse the %prec directive. This
1477 is because to please POSIX, we do not require to end the rules with a
1478 semicolon. As a result,
de62edee 1479
d78f0ac9 1480 foo: bar %prec baz
de62edee 1481
d78f0ac9
AD
1482 is ambiguous: either a rule which precedence is that of baz, or a rule,
1483 and then a declaration of the precedence of the token baz.
de62edee 1484
d78f0ac9
AD
1485 * doc/bison.texinfo: Document %precedence.
1486 (Precedence Only): New.
1487 * src/assoc.h, src/assoc.c (precedence_assoc): New.
1488 * src/conflicts.c (resolve_sr_conflict): Support it.
1489 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
1490 Parse it.
1491 * tests/calc.at: Use %precedence for NEG.
1492 * tests/conflicts.at (%precedence does not suffice)
1493 (%precedence suffices): New tests.
1494
c85be41a
AD
14952008-11-09 Akim Demaille <demaille@gostai.com>
1496
1497 Make benches in a sub dirs.
1498 * etc/bench.pl.in ($dir): New.
1499 Use it.
1500 Check the use of constructors with an argument.
1501 (bench_variant_parser): Fix.
1502
db65ca1f
AD
15032008-11-09 Akim Demaille <demaille@gostai.com>
1504
1505 fix eof condition
1506
9b0efa5b
AD
15072008-11-09 Akim Demaille <demaille@gostai.com>
1508
1509 Fix --help.
1510
432ac57a
AD
15112008-11-09 Akim Demaille <demaille@gostai.com>
1512
1513 Require the generation of parse-gram.output.
1514 * src/Makefile.am (YACC): Pass --report=all.
1515
deef2a0a
AD
15162008-11-09 Akim Demaille <demaille@gostai.com>
1517
1518 Formatting changes.
1519
df72984a
AD
15202008-11-09 Akim Demaille <demaille@gostai.com>
1521
1522 Update TODO.
1523 * TODO: Remove obsolete items.
1524 Update others.
1525
f10e19fd
AD
15262008-11-09 Akim Demaille <demaille@gostai.com>
1527
1528 Enhance bench.pl.
1529 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
1530 (@token, $grammar, $bench): New.
1531 (generate_grammar_variant): Rename as...
1532 (generate_grammar_list): this.
1533 (generate_grammar): Adjust.
1534 (bench_grammar): Rename as...
1535 (bench): this.
1536 Use it in the various bench-marking routines.
1537 (-b, -g): New options.
1538
5de9c593
AD
15392008-11-09 Akim Demaille <demaille@gostai.com>
1540
1541 Use a static hierarchy for symbols in the C++ parser.
1542 * data/lalr1.cc (symbol_base_type, symbol_type)
1543 (stack_symbol_type): Make it a static hierarchy.
1544 Adjust dependencies.
1545
757f8f98
AD
15462008-11-09 Akim Demaille <demaille@gostai.com>
1547
1548 bench.pl -d, --directive.
1549 * etc/bench.pl.in (@directive): New.
1550 (&bench_grammar): Use it.
1551 (&bench_list_grammar): New, to provide access to the "variant"
1552 grammar.
1553 Use it.
1554 (getopts): Support -d, --directive.
1555
d3be4f6d
AD
15562008-11-09 Akim Demaille <demaille@gostai.com>
1557
1558 Use inline for small operations.
1559 * data/lalr1.cc (symbol_base_type, symbol_type)
1560 (stack_symbol_type): Declare constructor and other operations as
1561 inline.
1562 (yy_destroy_): Inline.
1563
1f7d007b
AD
15642008-11-09 Akim Demaille <demaille@gostai.com>
1565
1566 Introduce a hierarchy for symbols.
1567 * data/lalr1.cc (symbol_base_type, symbol_type): New.
1568 (data_type): Rename as...
1569 (stack_symbol_type): this.
1570 Derive from symbol_base_type.
1571 (yy_symbol_value_print_): Merge into...
1572 (yy_symbol_print_): this.
1573 Rename as...
1574 (yy_print_): this.
1575 (yydestruct_): Rename as...
1576 (yy_destroy_): this.
1577 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
1578 (parser::parse): yyla is now of symbol_type.
1579 Use its type member instead of yytoken.
1580
bc0b0477
AD
15812008-11-09 Akim Demaille <demaille@gostai.com>
1582
1583 Rename data_type and stack_symbol_type.
1584 * data/lalr1.cc (data_type): Rename as...
1585 (stack_symbol_type): this.
1586
57295d14
AD
15872008-11-09 Akim Demaille <demaille@gostai.com>
1588
1589 Handle semantic value and location together.
1590 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
1591 yydata.value and yydata.location.
1592 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
1593 (YY_SYMBOL_PRINT): Now take semantic value and location as a
1594 single arg.
1595 Adjust all callers.
1596 (yydestruct_): New overload for a stack symbol.
1597
e9b0834e
AD
15982008-11-09 Akim Demaille <demaille@gostai.com>
1599
1600 Push a complete symbol, not connected parts.
1601 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
1602 state, value and location.
1603 Adjust callers.
1604
6082531a
AD
16052008-11-09 Akim Demaille <demaille@gostai.com>
1606
1607 Agregate yylval and yylloc.
1608 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
1609 (parser::yyla): this.
1610
33c195cc
AD
16112008-11-09 Akim Demaille <demaille@gostai.com>
1612
1613 Rely on the state stack to display reduction traces.
b06df3c2
AD
1614 To display rhs symbols before a reduction, we used information
1615 about the rule reduced, which required the tables yyrhs and
1616 yyprhs. Now use rely only on the state stack to get the same
1617 information.
de62edee 1618
33c195cc
AD
1619 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
1620 Use them.
1621 (parser::yyrhs_, parser::yyprhs_): Remove.
1622 (parser::yy_reduce_print_): Use the state stack.
1623
e1f93869
AD
16242008-11-09 Akim Demaille <demaille@gostai.com>
1625
1626 Fuse yyval and yyloc into yylhs.
1627 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
1628 yylhs.
1629 (parse): Replace yyval and yyloc with yylhs.value and
1630 yylhs.location.
1631 After a user action, compute yylhs.state earlier.
1632 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
1633 fresh error_token.
1634
2935744b
DJ
16352008-11-09 Di-an Jan <dianj@freeshell.org>
1636
1637 Remove unused variable.
1638 * src/output.c (type_names_output): Remove unused variable sep.
1639
bbf9ca37
PB
16402008-11-09 Paolo Bonzini <bonzini@gnu.org>
1641
1642 Change tests/output.at quoting.
1643 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
1644 expanding arguments.
1645
d9a9b96b
JD
16462008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1647
1648 Don't add a semicolon to actions for %skeleton or %language.
1649 It breaks Java test cases as reported by Akim Demaille.
1650 * src/scan-code.l: Implement.
1651
51365192
JD
16522008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
1653
1654 Clean up %skeleton and %language priority implementation.
1655 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
1656 remove static qualifier because others will soon need to see it.
1657 (language_prio): Likewise.
1658 (getargs): Use command_line_prio rather than 0.
1659 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
1660 enum fields.
1661 (skeleton_prio): Extern it.
1662 (language_prio): Extern it.
1663 * src/parse-gram.y: Use grammar_prio rather than 1.
1664
9380cfd0
AD
16652008-11-07 Akim Demaille <demaille@gostai.com>
1666
1667 Moving push traces into yypush_.
1668 * data/lalr1.cc (yypush_): Now takes a optional trace message.
1669 Adjust all uses.
1670
8901f32e
AD
16712008-11-07 Akim Demaille <demaille@gostai.com>
1672
1673 The single-stack C++ parser is now the standard one.
1674 * data/lalr1.cc: Rename as...
1675 * data/lalr1-split.cc: this.
1676 * data/lalr1-fusion.cc: Rename as...
1677 * data/lalr1.cc: this.
1678 * etc/bench.pl.in: Adjust.
1679
8cdabf02
AD
16802008-11-07 Akim Demaille <demaille@gostai.com>
1681
1682 Avoid empty-if warnings.
1683 Reported by Quentin Hocquet.
de62edee 1684
8cdabf02
AD
1685 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
1686 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
1687
5a893c2b
AD
16882008-11-07 Akim Demaille <demaille@gostai.com>
1689
1690 Pass command line location to skeleton_arg and language_argmatch.
1691 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
1692 The location argument is now mandatory.
1693 Adjust all dependencies.
1694 (getargs): Use command_line_location.
1695
58697c6d
AD
16962008-11-07 Akim Demaille <demaille@gostai.com>
1697
1698 -D, --define.
1699 * src/getargs.c (usage): Document -D.
1700 Fix help string for --locations.
1701 (command_line_location): New.
1702 (short_options, long_options, getargs): Support -D, --define.
1703 (getargs): Move -d support at the right place.
1704 * doc/bison.texinfo (Bison Options): Update.
1705 * tests/input.at (%define, --define): New.
1706
9fe5a457
AD
17072008-11-07 Akim Demaille <demaille@gostai.com>
1708
1709 Initialize the muscle table before parsing the command line.
1710 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
1711 (getargs): Define file_name.
1712 * src/main.c (main): Initialize muscle_tab before calling
1713 getargs.
1714 * src/muscle_tab.c (muscle_init): No longer define file_name, as
1715 its value is not available yet.
1716
56c5eca9
AD
17172008-11-07 Akim Demaille <demaille@gostai.com>
1718
1719 Locations without columns for command line arguments.
1720 * src/location.c (location_print): Don't display negative columns.
1721 * src/location.h: Document this.
1722
9b9e0a7d
AD
17232008-11-07 Akim Demaille <demaille@gostai.com>
1724
1725 Fix --help.
1726 * src/getargs.c (usage): Fix help string for -W.
1727
74eae918
AD
17282008-11-07 Akim Demaille <demaille@gostai.com>
1729
1730 Handle more general types of option arguments.
1731 * build-aux/cross-options.pl: The argument ends at the first
1732 space, not the first non-symbol character.
1733 Use @var for each word appearing the argument description.
1734
a3d4c6fb
AD
17352008-11-07 Akim Demaille <demaille@gostai.com>
1736
1737 Destroy the variants that remain on the stack in case of error.
1738 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
1739 destructor.
1740 Display the value only if yymsg is nonnull.
1741 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
1742
2d32fc9f
AD
17432008-11-07 Akim Demaille <demaille@gostai.com>
1744
1745 Add "%define assert" to variants.
1746 This is used to help the user catch cases where some value gets
1747 ovewritten by a new one. This should not happen, as this will
1748 probably leak.
de62edee 1749
2d32fc9f
AD
1750 Unfortunately this uncovered a bug in the C++ parser itself: the
1751 lookahead value was not destroyed between two calls to yylex. For
1752 instance if the previous lookahead was a std::string, and then an int,
1753 then the value of the std::string was correctly taken (i.e., the
1754 lookahead was now an empty string), but std::string structure itself
1755 was not reclaimed.
de62edee 1756
2d32fc9f
AD
1757 This is now done in variant::build(other&) (which is used to take the
1758 value of the lookahead): other is not only stolen from its value, it
1759 is also destroyed. This incurs a new performance penalty of a few
1760 percent, and union becomes faster again.
de62edee 1761
2d32fc9f
AD
1762 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
1763 (b4_variant_if): New.
1764 (variant::built): New.
1765 Use it whereever the status of the variant changes.
1766 * etc/bench.pl.in: Check the penalty of %define assert.
1767
f6038cb8
AD
17682008-11-07 Akim Demaille <demaille@gostai.com>
1769
1770 Use "%define variant" in bench.pl.
1771 * etc/bench.pl.in: No longer use the pseudo directive %variants,
1772 just use %define variants.
1773
ccde1f98
AD
17742008-11-07 Akim Demaille <demaille@gostai.com>
1775
1776 Regen.
1777 * src/parse-gram.h, src/parse-gram.c: Regen.
1778
58bd33b7
JD
17792008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
1780
1781 Fix user actions without a trailing semicolon.
1782 Reported by Sergei Steshenko at
1783 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
1784 * THANKS (Sergei Steshenko): Add.
1785 * src/scan-code.l (SC_RULE_ACTION): Fix it.
1786 * tests/regression.at (Fix user actions without a trailing semicolon):
1787 New test case.
1788
639867b5
AD
17892008-11-04 Akim Demaille <demaille@gostai.com>
1790
1791 Use b4_copyright_years.
1792 * data/yacc.c (b4_copyright_years): New.
1793 Fix its value according to the comments in the file.
1794 Use it and undefine it.
1795
3c262606
AD
17962008-11-04 Akim Demaille <demaille@gostai.com>
1797
1798 Formatting changes.
1799 * data/lalr1-fusion.cc, src/parse-gram.y: here.
1800
a2b93d52
AD
18012008-11-04 Akim Demaille <demaille@gostai.com>
1802
1803 Formatting changes.
1804 * data/lalr1-fusion.cc: here.
1805
3a2803df
AD
18062008-11-04 Akim Demaille <demaille@gostai.com>
1807
1808 Use strict on bench.pl.
1809 * etc/bench.pl.in (&run, &generate_grammar): New.
1810 Rename the grammar generating functions for consistency.
1811 Change the interface so that the list of benches to run is passed
1812 as (optionless) arguments.
1813 (&compile): Use &run.
1814
a0d4650a
AD
18152008-11-04 Akim Demaille <demaille@gostai.com>
1816
1817 Remove spurious initial empty lines.
1818 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1819 * data/yacc.c: End the @output lines with an @.
1820
cac9e09b
AD
18212008-11-04 Akim Demaille <demaille@gostai.com>
1822
1823 Improve the display of sizes.
1824 * etc/bench.p.in: Higher precision.
1825 Sort by decreasing size.
1826
4af4348a
AD
18272008-11-04 Akim Demaille <demaille@gostai.com>
1828
1829 Don't memcpy C++ structures.
1830 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
1831 arguments.
1832 (variant::build): New overload for
1833 copy-construction-that-destroys.
1834 (variant::swap): New.
1835 (parser::yypush_): Use it in variant mode.
1836
ef05c4d6
AD
18372008-11-04 Akim Demaille <demaille@gostai.com>
1838
1839 Better defaults for bench.pl.
1840 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
1841 default values.
1842 Adjust &verbose uses.
1843 (-q, --quiet): New.
1844
9718cfa9
AD
18452008-11-04 Akim Demaille <demaille@gostai.com>
1846
1847 Make variant.yy more complex.
1848 std::list cannot be copied via memcpy, they are more demanding than
1849 std::string. Use one std::list to strengthen the test.
de62edee 1850
9718cfa9
AD
1851 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
1852 Adjust.
1853 Create a list of strings, instead of a single large string.
1854
a6df593d
AD
18552008-11-04 Akim Demaille <demaille@gostai.com>
1856
1857 bench.pl --bench.
1858 * etc/bench.pl.in (--bench, $bench): New.
1859
006a0303
AD
18602008-11-04 Akim Demaille <demaille@gostai.com>
1861
1862 Sort methods.
1863 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
1864 Define it after as().
1865
faef3466
AD
18662008-11-04 Akim Demaille <demaille@gostai.com>
1867
1868 Useless parens.
1869 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
1870
2141aded
AD
18712008-11-04 Akim Demaille <demaille@gostai.com>
1872
1873 Issue missing synclines after user actions.
1874 * data/c.m4 (b4_case): Issue synclines on the output file.
1875
e426d17b
AD
18762008-11-04 Akim Demaille <demaille@gostai.com>
1877
1878 Remove trailing empty line.
1879 * data/lalr1-fusion.cc: Don't add an empty line after the user's
1880 epilogue.
1881
a9ce3f54
AD
18822008-11-04 Akim Demaille <demaille@gostai.com>
1883
1884 Fix output of copyright years.
1885 * data/bison.m4 (b4_copyright): Fix the indentation of the
1886 copyright year paragraph.
1887 Use b4_copyright_years when no years are given.
1888 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
1889 (b4_copyright_years): New.
1890 Use it.
1891
59c544c2
AD
18922008-11-04 Akim Demaille <demaille@gostai.com>
1893
1894 Avoid the spurious initial empty line.
1895 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
1896 the end of @output request to suppress the empty line that
1897 results.
1898
96b15448
AD
18992008-11-04 Akim Demaille <demaille@gostai.com>
1900
1901 Remove parser::rhs_number_type.
1902 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
1903 (yyrhs_): Use b4_table_define.
1904
f0633174
AD
19052008-11-04 Akim Demaille <demaille@gostai.com>
1906
1907 Fix iteration type.
1908 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
1909
417b8004
AD
19102008-11-04 Akim Demaille <demaille@gostai.com>
1911
1912 Factor the declaration of the integer tables.
1913 * data/lalr1-fusion.cc (b4_table_define): New.
1914 Use it.
1915
1a5246c6
AD
19162008-11-03 Akim Demaille <demaille@gostai.com>
1917
1918 Fix indentation of tables in lalr1.cc
1919 * data/lalr1-fusion.cc: Fix the indentation.
1920
f8a95c9c
AD
19212008-11-03 Akim Demaille <demaille@gostai.com>
1922
1923 Destroy the lhs symbols after reduction.
1924 * data/lalr1-fusion.cc (parse): After the user action, when in
1925 variant mode, destroy the lhs symbols.
1926
d7f4d823
AD
19272008-11-03 Akim Demaille <demaille@gostai.com>
1928
1929 Simplify yysyntax_error_ use.
1930 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
1931 type, but make it unnamed in the declaration when it is not used.
1932
8b9c89fb
AD
19332008-11-03 Akim Demaille <demaille@gostai.com>
1934
1935 Let yy::variant::build return an lvalue.
1936 * data/lalr1-fusion.cc (variant::build): Return a reference to the
1937 object.
1938
83243c24
AD
19392008-11-03 Akim Demaille <demaille@gostai.com>
1940
1941 Define yy::variant only when needed.
1942 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
1943 used.
1944
429b4848
AD
19452008-11-03 Akim Demaille <demaille@gostai.com>
1946
1947 Bench the three-stack lalr1.cc.
1948 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
1949 one-stack one.
1950
414c76a4
AD
19512008-11-03 Akim Demaille <demaille@gostai.com>
1952
1953 Fail on parse error in calc++.
1954 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
1955 status.
1956 * examples/calc++/test ($me, $number, $exit, run): New.
1957 Use them to propagate errors to the exit status.
1958
8a5783fd
AD
19592008-11-03 Akim Demaille <demaille@gostai.com>
1960
1961 Don't specify the skeleton twice in the example.
1962 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
1963 file does what is needed.
1964
0cc5bead
AD
19652008-11-03 Akim Demaille <demaille@gostai.com>
1966
1967 bench: Improve output.
1968 * etc/bench.pl.in (bench_grammar): Tune the printf format.
1969
5b421a4e
AD
19702008-11-03 Akim Demaille <demaille@gostai.com>
1971
1972 bench: check impact of %debug on variants.
1973 * etc/bench.pl.in (variant_grammar): Fix the computation of
1974 $variant.
1975 Generate a grammar file that can work with or without %debug.
1976 Do use the @directive.
1977 (bench_variant_parser): Check impact of %debug.
1978 (@directives): Rename all the occurrences to...
1979 (@directive): this, for consistency.
1980
d11ee647
AD
19812008-11-03 Akim Demaille <demaille@gostai.com>
1982
1983 bench: report the size too.
1984 * etc/bench.pl.in ($iterations): Defaults to -3.
1985 (&bench_grammar): Require hireswallclock.
1986 Compute and display the size of the result.
1987 More comments.
1988
e1b74b92
AD
19892008-11-03 Akim Demaille <demaille@gostai.com>
1990
1991 bench: More use of the verbosity level.
1992 * etc/bench.pl.in ($verbose, &verbose): New.
1993 Use them.
1994 More POD documentation.
1995
7e5f9c54
AD
19962008-11-03 Akim Demaille <demaille@gostai.com>
1997
1998 bench.pl: a command line interface
1999 * etc/bench.pl.in: More doc.
2000 Some fixes in the documentation.
2001 ($cflags, $iterations, &help, &getopt): New.
2002 Use them.
2003 (&variant_grammar): Let the number of stages be 10 times what is
2004 specified.
2005
7109a18d
AD
20062008-11-03 Akim Demaille <demaille@gostai.com>
2007
2008 Bench the use of Boost.Variants.
2009 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
2010 New.
2011 (&compile): Be ready to compile C++ parsers.
2012 (&bench_push_parser): Move debug information to the outermost
2013 level.
2014 * THANKS: Add Michiel De Wilde.
2015
922730fe
AD
20162008-11-03 Akim Demaille <demaille@gostai.com>
2017
2018 bench.pl: Pass directives as a list instead of as a string.
2019 * etc/bench.pl.in (&directives): New.
2020 (&triangular_grammar, &calc_grammar): Use it to format the Bison
2021 directives.
2022 (&triangular_grammar): Do use the directives (were ignored).
2023 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
2024 directives.
2025
7484f1d4
AD
20262008-11-03 Akim Demaille <demaille@gostai.com>
2027
2028 Improve genericity of bench.pl.
2029 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
2030 argument.
2031 (&bench_push_parser): New.
2032 Call it.
2033
15129f25
AD
20342008-11-03 Akim Demaille <demaille@gostai.com>
2035
2036 Add documentation to bench.pl.
2037 * etc/bench.pl.in: Comment changes.
2038
0e0ed236
AD
20392008-11-03 Akim Demaille <demaille@gostai.com>
2040
2041 Fuse the three stacks into a single one.
de62edee 2042
b06df3c2
AD
2043 In order to make it easy to perform benchmarks to ensure that
2044 there are no performance loss, lalr1.cc is forked into
2045 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
2046 lalr1.cc.
2047
2048 Meanwhile, to make sure that lalr1-fusion.cc is correctly
2049 exercized by the test suite, the user must install a symbolic link
2050 from lalr1.cc to it.
de62edee 2051
b06df3c2
AD
2052 Instead of having three stacks (state, value, location), use a
2053 stack of triples. This considerably simplifies the code (and it
2054 will be easier not to require locations as currently does the C++
2055 parser), and also gives a 10% speedup according to
2056 etc/bench (probably mainly since memory allocation is done once
2057 instead of three times).
de62edee 2058
0e0ed236
AD
2059 Another motivation is to make it easier to destruct properly
2060 semantic values: now that they are bound to their state (hence
2061 symbol type) it will be easier to call the appropriate destructor.
de62edee 2062
0e0ed236 2063 These changes should probably benefit the C parser too.
de62edee 2064
b06df3c2
AD
2065 * data/lalr1.cc: Copy as...
2066 * data/lalr1-fusion.cc: this new file.
0e0ed236
AD
2067 (b4_rhs_value, b4_rhs_location): New definitions overriding those
2068 from c++.m4.
2069 (state_stack_type, semantic_stack_type, location_stack_type)
2070 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
2071 (data_type, stack_type, yystack_): New.
2072 (YYLLOC_DEFAULT, yypush_): Adjust.
2073 (yyerror_range): Now based on data_type, not location_type.
2074
7dedf26e
AD
20752008-11-03 Akim Demaille <demaille@gostai.com>
2076
2077 Push the state, value, and location at the same time.
2078 This is needed to prepare a forthcoming patch that fuses the three
2079 stacks into one.
de62edee 2080
7dedf26e
AD
2081 * data/lalr1.cc (parser::yypush_): New.
2082 (parser::yynewstate): Change the semantics: instead of arriving to
2083 this label when value and location have been pushed, but yystate
2084 is to be pushed on the state stack, now the three of them must
2085 have been pushed before. yystate still must be the new state.
2086 This allows to use yypush_ everywhere instead of individual
2087 handling of the stacks.
2088
c4585f1e
AD
20892008-11-03 Akim Demaille <demaille@gostai.com>
2090
2091 Prefer references to pointers.
2092 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
2093 definition to use references instead of pointers.
2094 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
2095 Take the value and location as references.
2096 Adjust callers.
2097
56017c17
AD
20982008-11-03 Akim Demaille <demaille@gostai.com>
2099
2100 stack::size instead of stack::height.
2101 * data/lalr1.cc (stack::height): Rename as...
2102 (stack::size): this.
2103 Fix the output type.
2104 Comment changes.
2105
5ab8c47b
AD
21062008-11-03 Akim Demaille <demaille@gostai.com>
2107
2108 Use variants to support objects as semantic values.
b06df3c2
AD
2109 This patch was inspired by work by Michiel De Wilde. But he used
2110 Boost variants which (i) requires Boost on the user side, (ii) is
2111 slow, and (iii) has useless overhead (the parser knows the type of
2112 the semantic value there is no reason to duplicate this
2113 information as Boost.Variants do).
2114
2115 This implementation reserves a buffer large enough to store the
2116 largest objects. yy::variant implements this buffer. It was
2117 implemented with Quentin Hocquet.
de62edee 2118
5ab8c47b
AD
2119 * src/output.c (type_names_output): New.
2120 (output_skeleton): Invoke it.
2121 * data/c++.m4 (b4_variant_if): New.
2122 (b4_symbol_value): If needed, provide a definition for variants.
2123 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
2124 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
2125 (b4_char_sizeof, yy::variant): New.
2126 (parser::parse): If variants are requested, define
2127 parser::union_type, parser::variant, change the definition of
2128 semantic_type, construct $$ before running the user action instead
2129 of performing a default $$ = $1.
2130 * examples/variant.yy: New.
2131 Based on an example by Michiel De Wilde.
2132
1fa5d8bb
AD
21332008-11-03 Akim Demaille <demaille@gostai.com>
2134
2135 Parameterize the extraction of semantic values.
2136 To make future changes easier, no longer rely on ".TYPE" being the
2137 way to get a semantic value.
de62edee 2138
1fa5d8bb
AD
2139 * data/c.m4 (b4_symbol_value): New.
2140 Use it.
2141 * data/c++.m4, data/yacc.c: Use it.
2142 * data/glr.c: Use b4_symbol_value.
2143 (b4_rhs_data): New.
2144 Use it.
2145
91ba8a55
AD
21462008-11-03 Akim Demaille <demaille@gostai.com>
2147
2148 Prepare easier M4 changes.
2149 * data/lalr1.cc: Use escaped [] instead of literals to prepare
2150 future changes.
2151
c9ba9e59
JD
21522008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2153
2154 Initiate further development.
2155 * NEWS: Create an empty section for new entries.
2156 * gnulib: Update submodule to HEAD.
2157
bfb40910
JD
21582008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2159
2160 * NEWS: Version 2.4.
2161
241fda7a
JD
21622008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2163
2164 Prepare for next release.
2165 * NEWS: Briefly mention changes since 2.3b.
2166 * README: Say GNU m4 1.4.6, which we've been requiring in release
2167 announcements already, not 1.4.3, which breaks the build.
2168
ed4d67dc
JD
21692008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
2170
2171 Say %language is experimental.
2172 We're thinking of extending it's effect on output file naming. See the
2173 thread at
2174 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
2175 * NEWS: Say it's experimental.
2176 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
2177 recommend it over %skeleton for now.
2178 (Bison Options): Likewise.
2179 (C++ Bison Interface): Use %skeleton not %language.
2180 (Calc++ Parser): Use %skeleton not %language.
2181 * src/getargs.c (usage): Say it's experimental.
2182
e254a580
DJ
21832008-11-01 Di-an Jan <dianj@freeshell.org>
2184 Paolo Bonzini <bonzini@gnu.org>
2185
2186 Support all Java parser class modifiers.
2187 * data/java.m4 (b4_percent_define_get3): New.
2188 (b4_final_if, b4_strictfp_if): New.
2189 * data/lalr1.java (final, strictfp, extends, implements): Support.
2190 * doc/bison.texinfo (final, strictfp, extends, implements): Add
2191 documentation.
2192 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
2193 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
2194 (AT_CHECK_JAVA_GREP): New.
2195 (Java parser class modifiers): New test.
2196 (Java parser class extends and implements): New test.
2197
2198 Model exception propagation better with throws and lex_throws.
2199 * data/java.m4 (b4_list2): New.
2200 (throws): Change default.
2201 * data/lalr1.java (yyaction): Add throws.
2202 (parse): Add lex_throws in addition to throws.
2203 * doc/bison.texinfo (throws, lex_throws): Add documentation.
2204 * tests/java.at (Java throws specifications): New test.
2205
2206 Improve documentation for Java parsers.
2207 * doc/bison.texinfo (Java Parsers): Add subsections.
2208 Don't quote first argument of %define.
2209 (Java Bison Interface): Document output files. Move documentation
2210 of parser class and merge into Java Parser Interface. Document
2211 features that error out. Document directives with no effect.
2212 Move note about Javadoc higher.
2213 (Java Semantic Values): Explicitly mention stype.
2214 Document that generic types cannot be used.
2215 (Java Location Values): Use @deftypeivar. Document constructors.
2216 Correct return value for toString.
2217 (Java Parser Interface): List undocumented constants/fields.
2218 Move documentation of fields added by %parse-param closer to list
2219 of members. Document that token names are added as fields.
2220 Document constructors accurately. Remove error method.
2221 (Java Scanner Interface): Move note on %pure-parser to Java Bison
2222 Interface. Describe %code lexer and yylex accutately.
2223 Remove documentation that does not match the code.
2224 (Java Action Features): New.
2225 (Java Differences): Add reference. Add item on semantic values.
2226 Add note about @{ ... @}. Clarify %% epilogue placement.
2227 (Java Declarations Summary): New.
2228
2229 Fix Java skeleton.
2230 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
2231 (b4_remove_comma): Quote test argument.
2232 (b4_identification): Remove "bison" field.
2233 * tests/java.at (Java parser class and package names): New test.
2234 (Java %parse-param and %lex-param): New test.
2235 (Java stype, position_class and location_class): New test.
2236
f259e4e6
PB
22372008-10-31 Di-an Jan <dianj@freeshell.org>
2238
2239 * data/lalr1.jave: Update copyright years.
2240 (YYParser): Correct name of "generated from" file in Javadoc:
2241 use b4_file_name instead of @ofile@.
2242 (Location constructor): Correct Javadoc parameter name.
2243 (yylloc): Add missing opening m4 quote after b4_location_if.
2244 This removes a stray [ in the Javadoc of Lexer.getStartPos.
2245 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
2246 (YYParser constructor): Correct Javadoc parameter name.
2247
cae5057f
JD
22482008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
2249
2250 Always put auxiliary code files in the same dir as other output files.
2251 * src/files.c (compute_file_name_parts): When the user specifies
2252 --output but not --file-prefix, extract the directory prefix from the
2253 file prefix not from the grammar file name. This affects the location
2254 of files like location.hh generated by the C++ skeleton. The includes
2255 in the other output files require this fix.
2256 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
2257 for expected output files.
2258 (Output files): Add a test for the above.
2259
4af432ba
JD
22602008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
2261
2262 * gnulib: Update submodule to HEAD.
2263
e26d4e43
JD
22642008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
2265
2266 Update copyright year.
2267 * src/files.c: Here.
2268
c0ee9e21
DJ
22692008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
2270
2271 Don't overwrite the input file.
2272 * src/files.c (output_file_name_check): Fatal error if using input file
2273 for output.
2274 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
2275 argument.
2276 (Conflicting output files): Add test.
2277
482dc52f
AD
22782008-10-28 Akim Demaille <demaille@gostai.com>
2279
2280 Space changes.
2281 * data/lalr1.cc: Formatting changes.
2282
52cbbe84
AD
22832008-10-28 Akim Demaille <demaille@gostai.com>
2284
2285 Don't define debugging functions when !YYDEBUG.
2286 * data/lalr1.cc (debug_stream, set_debug_stream)
2287 (debug_level_type, debug_level, set_debug_level): Don't
2288 declare them when YYDEBUG is not defined.
2289 The implementation are already YYDEBUG-aware.
2290
0925d5bf
AD
22912008-10-28 Akim Demaille <demaille@gostai.com>
2292
2293 Prefer "continue" for empty loop bodies.
2294 * etc/bench.pl.in: Use "continue" instead of {}.
2295
cf98343c
AD
22962008-10-28 Akim Demaille <demaille@gostai.com>
2297
2298 Space and comments changes.
2299 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
2300 * data/c.m4, data/lalr1.cc: Space changes.
2301
9f467b7d
AD
23022008-10-28 Akim Demaille <demaille@gostai.com>
2303
2304 Make gnulib a submodule.
2305 * gnulib: New.
2306 * .gitmodules (gnulib): New.
2307
0f0e1ace
JD
23082008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2309
2310 Fix yyerror_range for user-defined location type in C++. Reported by
2311 Georg Sauthoff at
2312 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
2313 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
2314 * THANKS (Georg Sauthoff): Add.
2315
548e2104
JD
23162008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
2317
2318 Update several administrative files mainly to facilitate releasing.
2319 * HACKING (Administrivia): Make the git-merge-changelog notes more
2320 helpful.
2321 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
2322 (Release Procedure): Update for git and add numerous details that were
2323 previously missing.
2324 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
2325 * maint.mk (announcement): Don't list bison as a bootstrap tool so
2326 that announcements don't claim we bootstrapped with whatever bison
2327 happened to be in PATH. Add flex as a bootstrap tool.
2328 * Makefile.maint: Remove, previously replaced by maint.mk.
2329 * Makefile.cfg: Remove, and migrate settings to...
2330 * cfg.mk: ... here for the sake of `make announcement'.
2331 * bootstrap.conf (gnulib_modules): Add announce-gen.
2332 * README: Say GNU Bison instead of just Bison. Suggested by Karl
2333 Berry.
2334
ddf17a6e
PB
23352008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
2336
2337 Small but important bugfixes for the Java skeleton.
2338 * data/lalr1.java (yyerror): Change Location to b4_location_type.
2339 (yy_symbol_print): Call toString on yyvaluep.
2340
e1145ad8
AD
23412008-08-29 Akim Demaille <demaille@gostai.com>
2342
2343 Clarify UPDATED use.
215b40ac 2344 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 2345 not to the release date of Bison.
215b40ac 2346 Reported by Joel E. Denny.
e1145ad8 2347
0df72d78
AD
23482008-08-29 Akim Demaille <demaille@gostai.com>
2349
2350 * README: Update FAQ pointer.
2351 Reported by Joel E. Denny.
2352
9a90b6bb
EB
23532008-08-27 Eric Blake <ebb9@byu.net>
2354
2355 Resync m4sugar from autoconf.
2356 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
2357 (m4_init): Adjust to latest m4.git changes.
2358 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
2359 effects.
2360 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
2361 (_m4_list_cmp): Reduce side effects.
2362
65015668
AD
23632008-08-27 Akim Demaille <demaille@gostai.com>
2364
2365 Check yyerrok in calc.at.
215b40ac
EB
2366 * tests/calc.at (calc.y): Use yyerrok on "( error )".
2367 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
2368 expected.
65015668 2369
98e26a92
AD
23702008-08-27 Akim Demaille <demaille@gostai.com>
2371
2372 Support yyerrok in lalr1.cc.
2373 YYBACKUP is still to import back into lalr1.cc.
215b40ac 2374 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 2375
86c0e784
JD
23762008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2377
2378 For maintainer-check*, don't recompile for a $(VERSION) update.
2379 * cfg.mk: New file.
2380 (_is-dist-target): Override the one in GNUmakefile.
2381 * Makefile.am (EXTRA_DIST): Add cfg.mk.
2382
88511166
JD
23832008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
2384
2385 Update for recent change to gnulib.
2386 * src/parse-gram.y: Don't include strverscmp.h. It comes from
2387 string.h now.
2388
6bbb2ed5
EB
23892008-08-15 Eric Blake <ebb9@byu.net>
2390
d67c52e8
EB
2391 Remaining m4sugar merge from autoconf.
2392 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
2393 * data/m4sugar/foreach.m4: New file, copied from autoconf.
2394 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
2395 * src/output.c (output_skeleton): Tell m4 how to find it.
2396
6bbb2ed5
EB
2397 Partial m4sugar merge from autoconf: m4_map.
2398 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
2399 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
2400 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
2401 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
2402 for empty list.
2403 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
2404 Likewise.
2405 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
2406 declares it.
2407
8dce3875
JD
24082008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
2409
2410 Keep .version and PACKAGE_VERSION in sync.
2411 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
2412 dependency, and add comments justifying this in more detail. Discussed
2413 starting at
2414 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
2415
882a1fbf
EB
24162008-08-06 Eric Blake <ebb9@byu.net>
2417
a3764451
EB
2418 Partial m4sugar merge from autoconf: m4_shiftn.
2419 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
2420 (m4_shift2, m4_shift3): New macros.
2421 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
2422 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
2423 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
2424 * data/java.m4 (b4_remove_comma): Likewise.
2425
882a1fbf
EB
2426 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
2427 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
2428 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
2429 (m4_init): Consolidate wrapped text into single m4_wrap.
2430 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
2431 in wrapped text.
2432
a30e920d
EB
24332008-08-05 Eric Blake <ebb9@byu.net>
2434
dfcc5959
EB
2435 Partial m4sugar merge from autoconf: builtins, version.m4.
2436 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
2437 (m4_prepend): Remove, as it is unused and inherently quadratic,
2438 whereas m4_append is linear in newer m4.
2439 (m4_mkstemp): New builtin.
2440 (m4_symbols): Make rename conditional.
2441 (m4_version_prereq): Ensure fatal error if used in bison, which
2442 intentionally lacks version.m4.
2443
a30e920d
EB
2444 Fix comments in m4sugar.
2445 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
2446
445b7470
JD
24472008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2448
2449 Update for recent .gitignore fix in Gnulib.
2450 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
2451 anchored .gitignore entries.
2452
a1e50014
JD
24532008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
2454
2455 Set gnu or gnits strictness.
2456 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
2457 development and gnits strictness for releases. Based on Eric Blake's
2458 suggestion at
2459 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
2460
d43f77e7
PB
24612008-07-31 Paolo Bonzini <bonzini@gnu.org>
2462
2463 * NEWS: Clarify documentation of %language.
2464
fee2ed87
PB
24652008-07-31 Paolo Bonzini <bonzini@gnu.org>
2466
2467 Support usage of git-merge-changelog.
2468 * .gitattributes: New.
2469 * HACKING: Document usage of git-merge-changelog.
2470 * bootstrap: Install git-merge-changelog entries in .git/config
2471 if appropriate.
2472
78029cd5
JD
24732008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2474
2475 Remove remaining dependence on CVS Id keyword.
2476 * ChangeLog: For the sake of people still using CVS, don't use dollars
2477 when mentioning Id.
2478 * data/xslt/bison.xsl: Remove Id from header comments, where it was
2479 unusual anyway.
2480 * data/xslt/xml2dot.xsl: Likewise.
2481 * data/xslt/xml2text.xsl: Likewise.
2482 * data/xslt/xml2xhtml.xsl: Likewise.
2483 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
2484 * doc/Makefile.am (neutralize): Remove, no longer needed.
2485 (.x.1): Don't use neutralize.
2486 (edit): Don't substitute for ID.
2487 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
2488
c53d18b1
JD
24892008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
2490
2491 Fix dependence on computed configure variables.
2492 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
2493 $(top_srcdir)/configure.ac so that changes to computed variables, such
2494 as PACKAGE_VERSION, are seen.
2495 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
2496
5523ac79
JD
24972008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
2498
2499 Update copyright dates for recent changes.
2500 * Makefile.am: Here.
2501 * src/Makefile.am: Here.
2502 * src/reduce.c: Here.
2503 * tests/reduce.at: Here.
2504
8fa36911
JD
25052008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
2506
2507 Use git-version-gen for version names between releases.
2508 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
2509 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
2510 * .prev-version: New.
2511 * .version.in: Remove.
78029cd5 2512 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
2513 revision.
2514 * GNUmakefile: Remove, now copied from Gnulib.
2515 * Makefile.am: Add code suggested by comments in
2516 build-aux/git-version-gen.
2517 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
2518 .prev-version, and .version.
2519 * NEWS (2.3b+): Rename to...
2520 (?.?): ... this because we're dropping the "+" version naming scheme,
2521 but, in general, we still can't be sure of our next release name.
2522 * bootstrap: Add a quick hack to remove from .gitignore the
2523 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
2524 entry. This should really be fixed in gnulib instead.
2525 * bootstrap.conf (gnulib_modules): Add gnumakefile.
2526 * configure.ac (AC_INIT): Set version name by invoking
2527 build-aux/git-version-gen.
2528 (AC_CONFIG_FILES): Remove .version, now generated by
2529 build-aux/git-version-gen.
2530 * maint.mk: New, copied from coreutils.
2531 * doc/.cvsignore (bison.1): Add.
2532 * doc/.gitignore (/bison.1): Add.
2533 * doc/bison.1: Remove, generated.
2534 * src/.cvsignore (revision.c): Remove.
2535 * src/.gitignore (/revision.c): Remove.
2536 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
2537 (BUILT_SOURCES): Remove revision.c.
2538 (revision.c): Remove.
2539 * src/getargs.c (version): Don't print revision after the VERSION.
2540 * src/revision.h: Remove.
2541
bcf07cb7
JD
25422008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
2543
2544 Fix untranslatable composition of sentences. Reported by Goran
2545 Uddeborg at
2546 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
2547 * THANKS (Goran Uddeborg): Add.
2548 * src/reduce.c (reduce_print): Report the number of nonterminals and
2549 rules useless in the grammar in separate sentences.
2550 * tests/reduce.at (Useless Rules): Update output.
2551 (Reduced Automaton): Likewise.
2552 (Underivable Rules): Likewise.
2553 (Empty Language): Likewise.
2554
9aacab9a
JD
25552008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2556
2557 Fix some .gitignore and .cvsignore problems.
2558 * bootstrap (insert_sorted_if_absent): Replace all uses with...
2559 (insert_vc_ignore): ... this new function, which prepends `/' to all
2560 .gitignore entries before passing them to insert_sorted_if_absent.
2561 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
2562 .cvsignore files are maintained even though Bison developers run
2563 bootstrap while using Git.
2564 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
2565 unneeded by Bison.
2566 (gnulib): Add.
2567 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
2568 unneeded. Reported by Eric Blake.
2569 * lib/.gitignore (/*~): Add.
2570 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
2571 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
2572 Blake.
2573 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
2574
a9fc7990
JD
25752008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
2576
2577 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
2578 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
2579 * bootstrap.conf (gnulib_modules): Add unsetenv.
2580 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
2581 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
2582 (/setenv.m4): Add.
2583 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
2584 the first argument because it may become position-dependent, and unset
2585 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
2586 Add comments explaining these issues in more detail.
2587
0f1d6f10
JD
25882008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
2589
2590 Add .gitignore everywhere based on .cvsignore.
2591 * .gitignore: New.
2592 * build-aux/.gitignore: New.
2593 * data/.gitignore: New.
2594 * doc/.gitignore: New.
2595 * etc/.gitignore: New.
2596 * examples/.gitignore: New.
2597 * examples/calc++/.gitignore: New.
2598 * lib/.gitignore: New.
2599 * m4/.gitignore: New.
2600 * po/.gitignore: New.
2601 * runtime-po/.gitignore: New.
2602 * src/.gitignore: New.
2603 * tests/.gitignore: New.
2604
7bd1665a
JD
26052008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2606
2607 * NEWS (2.3b+): New section, empty for now.
2608 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
2609
72c5b982
JD
26102008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
2611
2612 * NEWS (2.3b): Update release date since there has been a delay in
2613 getting the announcements and tarballs out.
2614
bd02cd5d
JD
26152008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2616
2617 * NEWS: Version 2.3b.
2618 * configure.ac (AC_INIT): Likewise.
2619 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
2620
9126263e
JD
26212008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
2622
2623 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
2624 been doing it for years.
2625 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
2626 (Release Procedure): Add FIXME about make alpha being unmaintained.
2627
fa6aa7b3
JD
26282008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
2629
2630 * data/yacc.c: Reformat m4 a little for readability.
2631 * src/lalr.c (build_relations): Correct comment.
2632
d30b312d
JMG
26332008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2634
2635 DJGPP specific issue.
2636 * djgpp/config.sed: Fixes required to run configure scripts generated
2637 by autoconf 2.62.
2638
138d4cd9
JD
26392008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
2640
2641 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
2642 coordinator@translationproject.org.
2643
8f7e2e1f
JD
26442008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
2645
2646 * THANKS: Add Eric Blake.
2647
f55efa38
JD
26482008-04-23 Eric Blake <ebb9@byu.net>
2649
2650 Revert prior patch, by working around autoconf regression.
2651 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
2652 ("Output file name: ("): Uncomment test.
2653 ("Output file name: )"): Likewise.
2654 Based on an idea from Noah Misch.
2655
096c9f9d
JD
26562008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2657
2658 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
2659 2.61. Reported by Juan Manuel Guerrero at
2660 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
2661 * tests/output.at ("Output file name: ("): Comment out test case for
2662 now.
2663 ("Output file name: )"): Likewise.
2664
0f664b89
JD
26652008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2666
2667 * GNUmakefile: Update git-version-gen invocation so make dist
2668 succeeds.
2669
1cfe6375
JD
26702008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
2671
2672 Update to the current gnulib CVS repository, and fix trigraph handling
2673 in Bison.
2674 * bootstrap: Update gnulib CVS repository URL.
2675 (symlink_to_dir): Encapsulate the code that guarantees the destination
2676 directory exists into...
2677 (check_dst_dir): ... this new function, and...
2678 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
2679 fail when copying files into lib/uniwidth/.
2680 * src/output.c (prepare_symbols): When writing yytname muscles, where
2681 symbol names will be encoded in C-string literals, tell quotearg to
2682 escape trigraphs. This used to be the default in gnulib.
2683 * tests/regression.at (Token definitions): Because of the change in
2684 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
2685 escapes trigraphs in symbol names. Thus, yytname no longer has
2686 trigraphs unnecessarily doubly escaped. Update test case output.
2687 Extend test case to be sure Bison's own error messages will no longer
2688 have trigraphs in symbol names unnecessarily escaped once.
2689
74c52fc8
JD
26902008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
2691
2692 Fix make dist infinite loop reported by Juan Manuel Guerrero at
2693 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
2694 * .cvsignore: Add .version.
2695 * .version.in: New.
2696 * bootstrap.conf (gnulib_modules): Add git-version-gen.
2697 * configure.ac (AC_CONFIG_FILES): Add .version.
2698 * build-aux/.cvsignore: Add git-version-gen.
2699
8e55b3aa
JD
27002008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
2701
2702 * NEWS (2.3a+): Mention that -g now takes an argument.
2703 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
2704 consistency. Update the -g and -x entries now that they take
2705 arguments. Use brackets to indicate optional arguments.
2706 * src/getargs.c (usage): Explain the relationship between arguments of
2707 long and short options more completely. Document --defines and -d
2708 separately since the former takes an argument but, for POSIX Yacc, the
2709 latter does not.
2710 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 2711 (getargs): Sort cases.
8e55b3aa 2712
59c5ac72
AD
27132008-02-28 Akim Demaille <demaille@gostai.com>
2714
2715 * doc/bison.texinfo: Fix a few typos.
2716
118d4978
AD
27172008-02-28 Akim Demaille <akim@epita.fr>
2718
2719 * doc/bison.texinfo (Bison Options): Document -W.
2720 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
2721
7020f1e9
AD
27222008-02-28 Akim Demaille <akim@epita.fr>
2723
2724 * src/getargs.c (short_options): Split and sort for readability.
2725 -g and -x take optional arguments, just like their long options.
2726 * build-aux/cross-options.pl: Use /x to make the regexp easier to
2727 understand.
2728 Fix the handling of $opt which resulted in all the argument to be
2729 considered as optional.
2730
59da312b
JD
27312008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
2732
2733 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
2734 say its interface is experimental.
2735 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
2736 Java.
2737 (Bison Options): In the -L and --language entry, mention Java.
2738 (Java Bison Interface): Say the interface is experimental.
2739 * src/getargs.c (usage): Mention -L and --language.
2740
2741 * NEWS (2.3a+): Say the push parsing interface is experimental.
2742 * doc/bison.texinfo (Push Decl): Likewise.
2743 (Decl Summary): Likewise in the "%define api.push_pull" entry.
2744 (Push Parser Function): Likewise.
2745 (Pull Parser Function): Likewise.
2746 (Parser Create Function): Likewise.
2747 (Parser Delete Function): Likewise.
2748 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
2749 yypull_parse, and yypush_parse entries.
2750
2751 * NEWS (2.3a+): Mention XML support, and say the schema is
2752 experimental.
2753 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
2754 * src/getargs.c (usage): Say the XML schema is experimental.
2755
2756 * NEWS (2.3a+): Say option instead of flag.
2757
2bb3ebec
WP
27582008-02-21 Wojciech Polak <polak@gnu.org>
2759
2760 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
2761 text.
2762
333e670c
JD
27632008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
2764
2765 Fix impure push parser compile error reported by Bob Rossi at
2766 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
2767 * data/yacc.c: Clean up whitespace in the output a little.
2768 (yypstate_allocated): Define for impure push parsers regardless of
2769 whether the pull interface is also requested.
2770 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
2771 check impure push parsers without the pull interface.
2772
2773 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
2774 yyerror takes arguments specified by %parse-param while yypstate_new
2775 does not.
2776 * doc/bison.texinfo (Parser Create Function): Document that
2777 yypstate_new returns 0 for multiple impure parser instances.
2778 * tests/push.at (Push Parsing: Multiple impure instances): Update
2779 expected stderr output.
2780
798096e1
JD
27812008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
2782
2783 * runtime-po/POTFILES.in (push.c): Remove.
2784
9ca7f077
JD
27852008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2786
2787 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
2788 * data/push.c: Rename to...
2789 * data/yacc.c: ... this, overwriting it.
2790 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
2791 `%push-pull-parser' -> `%define api.push_pull "both"'.
2792 Remove old yacc.c tests, and update push.c tests to yacc.c.
2793
42ee26bb
JD
27942008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
2795
2796 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
2797 `"%code top" blocks' instead of `%code "top" blocks'.
2798 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
2799 Clean up whitespace in the output a little.
2800
b1cc23c4
JD
28012008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2802
2803 Fix documentation problems reported by Tim Josling at
2804 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
2805 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
2806 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
2807 integers. Explain the effect of literal string aliases on error
2808 messages. Copy token 0 documentation from the C++ skeleton
2809 documentation.
2810
ab7f29f8
JD
28112008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
2812
2813 Accept a token number in a %left, %right, or %nonassoc for POSIX
2814 conformance. Reported by Tim Josling at
2815 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
2816 * NEWS (2.3a+): Mention.
2817 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
2818 and code numbers are treated by precedence declarations.
2819 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
2820 of symbols.1.
2821 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
2822 of symbol.
2823 (symbol.prec): New, just like symbol but allows INT.
2824 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
2825 longer holds.
2826 * tests/regression.at (Token number in precedence declaration): New
2827 test case.
2828
a924ef36
JMG
28292008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
2830
2831 DJGPP specific issues.
2832 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
2833 be changed. Copyright timestamp adjusted.
2834 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
2835 be changed. Copyright timestamp adjusted.
2836 * djgpp/config.site: Copyright timestamp adjusted.
2837 * djgpp/config_h.sed: Copyright timestamp adjusted.
2838 * djgpp/djunpack.bat: Copyright timestamp adjusted.
2839 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
2840 filename translation list.
2841 * djgpp/subpipe.c (init_subpipe): Check the environment variables
2842 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
2843 files shall be created. Before trying to use the temp dir where the
2844 environment variable points to check that the dir really exists. If
2845 not default to the cwd as temp dir. Copyright timestamp adjusted.
2846 * djgpp/subpipe.h: Copyright timestamp adjusted.
2847 * djgpp/testsuite.sed: Copyright timestamp adjusted.
2848
389c8cfd
PE
28492008-01-30 Paul Eggert <eggert@cs.ucla.edu>
2850
2851 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
2852
5d1cfef4
PE
28532008-01-09 Paul Eggert <eggert@cs.ucla.edu>
2854
2855 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
2856 Problem reported by Claudio Saavedra in
2857 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
2858
e2dcf996
WP
28592008-01-05 Wojciech Polak <polak@gnu.org>
2860
2861 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
2862 document's title with the input grammar file name.
2863
da730230
JD
28642007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
2865
2866 Automate regression testing of the XML/XSLT implementation. Discussed
2867 starting at
2868 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
2869 * configure.ac (XSLTPROC): New substitution.
2870 * Makefile.am (maintainer-xml-check): New phony target invoking...
2871 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
2872 invoking make maintainer-check with BISON_TEST_XML=1.
2873 * tests/atlocal.in (XSLTPROC): New.
2874 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
2875 not to report reachable memory when Bison is expected to have a
2876 non-zero exit status and (2) to compare XML/XSLT output with --graph
2877 and --report=all output for every working grammar when
2878 BISON_TEST_XML=1.
2879 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
2880 (AT_BISON_CHECK_XML): New.
2881 (AT_QUELL_VALGRIND): New.
2882 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
2883 (AT_CHECK): ... don't redefine this since this was the old way to
2884 quell Valgrind.
2885 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
2886 AT_BISON_CHECK invocations.
2887 * tests/c++.at: Likewise.
2888 * tests/calc.at: Likewise.
2889 * tests/conflicts.at: Likewise.
2890 * tests/cxx-type.at: Likewise.
2891 * tests/existing.at: Likewise.
2892 * tests/glr-regression.at: Likewise.
2893 * tests/headers.at: Likewise.
2894 * tests/input.at: Likewise.
2895 * tests/java.at: Likewise.
2896 * tests/output.at: Likewise.
2897 * tests/push.at: Likewise.
2898 * tests/reduce.at: Likewise.
2899 * tests/regression.at: Likewise.
2900 * tests/sets.at: Likewise.
2901 * tests/skeletons.at: Likewise.
2902 * tests/synclines.at: Likewise.
2903 * tests/torture.at: Likewise.
2904 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
2905 tends to hang xsltproc.
2906 (Big horizontal): Likewise.
2907
408476bc
JD
29082007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2909
2910 In XML output, remove redundant class attribute on symbol element.
2911 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
2912 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
2913 look up a symbol to determine whether it's a nonterminal or terminal.
2914 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
2915 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
2916
2917 Add prec/assoc information to XML output.
2918 * src/gram.c (grammar_rules_print_xml): For each rule that has a
2919 %prec, add a percent_prec attribute.
2920 * src/print-xml.c (print_grammar): For each terminal that has a
2921 precedence or associativity, add a prec or assoc attribute.
2922 (xml_indent): New.
2923 (xml_puts): Use xml_indent.
2924 (xml_printf): Use xml_indent.
2925 * src/print-xml.h (xml_indent): Prototype.
2926
2927 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
2928 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
2929
d4a26c48
JD
29302007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
2931
2932 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
2933 (bison:ruleByNumber): ... this for clarity.
2934 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
2935 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
2936 (xsl:template match="reduction"): Update.
2937 (xsl:template match="item"): Update.
2938 (xsl:template match="reduction"): Update.
2939
2940 In the XML output, don't print the list of rules where symbols appear.
2941 Compute it in XSLT instead. Discussed at
2942 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
2943 * data/xslt/bison.xsl (bison:ruleByLhs): New.
2944 (bison:ruleByRhs): New.
2945 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
2946 bison:ruleByRhs.
2947 (xsl:template match="terminal/rule"): Remove.
2948 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2949 bison:ruleByRhs.
2950 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2951 Remove.
2952 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
2953 bison:ruleByRhs and mode="number-link" for rule template.
2954 (xsl:template match="terminal/rule"): Remove.
2955 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
2956 bison:ruleByRhs and mode="number-link" for rule template.
2957 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
2958 Rewrite as...
2959 (xsl:template match="rule" mode="number-link"): ... this.
2960 * src/print-xml.c (print_grammar): Don't print the list of rules.
2961
ef1b4273
JD
29622007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
2963
2964 Don't let --report affect XML output; always print all information.
2965 Discussed at
2966 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
2967 * src/conflicts.c (log_resolution): Implement.
2968 * src/print-xml.c (print_core): Implement.
2969 (print_state): Implement.
2970 (print_xml): Implement.
2971
2972 * NEWS (2.3a+): Fix quotes.
2973 * src/parse-gram.y (prologue_declaration): For consistency with -v,
2974 don't let %verbose clear the list specified by --report.
2975
0f6cd9e3
AD
29762007-11-26 Akim Demaille <akim@epita.fr>
2977
2978 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
2979
d80fb37a
JD
29802007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
2981
2982 In the XML output, list useless and unused symbols and rules with the
2983 useful ones and add a "usefulness" attribute. Discussed starting at
2984 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
2985 * src/gram.c (grammar_rules_partial_print_xml): Remove.
2986 (grammar_rules_print_xml): Print all rules instead of just those
2987 useful in the grammar, and add a "usefulness" attribute.
2988 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
2989 * src/print-xml.c (print_rules_useless_in_parser): Remove.
2990 (print_grammar): Print all nonterminals instead of just useful ones,
2991 and add a "usefulness" attribute to nonterminals and terminals.
2992 (print_xml): Don't print a separate "reductions" or
2993 "rules-useless-in-parser" element.
2994 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
2995 (reduce_xml): Remove.
2996 (reduce_token_unused_in_grammar): New.
2997 (reduce_nonterminal_useless_in_grammar): New.
2998 * src/reduce.h (reduce_xml): Remove prototype.
2999 (reduce_token_unused_in_grammar): Add prototype.
3000 (reduce_nonterminal_useless_in_grammar): Add prototype.
3001 * data/xslt/xml2text.xsl: Update for XML changes.
3002 * data/xslt/xml2xhtml.xsl: Update for XML changes.
3003 * tests/reduce.at (Useless Terminals): Update output.
3004 (Useless Rules): Update output.
3005 (Reduced Automaton): Update output.
3006
3007 Say "Terminals unused in grammar" instead of "Unused terminals".
3008 * NEWS (2.3a+): Update.
3009 * doc/bison.texinfo (Understanding): Update example output.
3010 * src/reduce.c (reduce_output): Implement.
3011 * data/xslt/xml2text.xsl: Implement.
3012 * data/xslt/xml2xhtml.xsl: Implement.
3013
1bb2bd75
JD
30142007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
3015
3016 Accept --report-file=FILE to override the default `.output' filename.
3017 * NEWS (2.3a+): Mention.
3018 * doc/bison.texinfo (Bison Options): Add an entry.
3019 * src/files.c (compute_output_file_names): Don't override
3020 spec_verbose_file if already set.
3021 * src/getargs.c (usage): Document --report-file.
3022 (REPORT_FILE_OPTION): New anonymous enum member.
3023 (long_options): Add entry for it.
3024 (getargs): Add case for it setting spec_verbose_file.
3025
3026 * build-aux/cross-options.pl: Don't record a short option just because
3027 there's an arg.
3028 * doc/.cvsignore: Add yacc.1.
3029
a005a9c4
AD
30302007-11-14 Akim Demaille <akim@epita.fr>
3031
3032 * doc/yacc.1.in: New.
3033 * configure.ac, doc/Makefile.am: Adjust.
3034 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
3035 config.h symbol.
3036 Use AC_SUBST for assignments too.
3037 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
3038
cff03fb2
JD
30392007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
3040
3041 * src/gram.c: Remove comments that duplicate comments in gram.h.
3042
3043 When reporting useless rules and nonterminals, say "useless in grammar"
3044 instead of "useless", and say "useless in parser" instead of "never
3045 reduced". Discussed starting at
3046 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
3047 * NEWS (2.3a+): Mention this change.
3048 * data/xslt/xml2text.xsl: Update output text and expected input XML
3049 element names to match changes below.
3050 * data/xslt/xml2xhtml.xsl: Likewise.
3051 (xsl:template match="bison-xml-report"): Add missing entry in Table of
3052 Contents: "Rules useless in parser due to conflicts".
3053 * doc/bison.texinfo (Decl Summary): Reword a little.
3054 (Understanding): Update example output for changes below.
3055 * src/gram.c: (rule_useful_p): Rename to...
3056 (rule_useful_in_grammar_p): ... this.
3057 (rule_useless_p): Rename to...
3058 (rule_useless_in_grammar_p): ... this.
3059 (rule_never_reduced_p): Rename to...
3060 (rule_useless_in_parser_p): ... this.
3061 (grammar_rules_print): Update for renames.
3062 (grammar_rules_print_xml): Update for renames.
3063 (grammar_rules_never_reduced_report): Rename to...
3064 (grammar_rules_useless_report): ... this since it is used for either
3065 kind of useless rule.
3066 * src/gram.h: Reword comments and update function names in prototypes.
3067 * src/main.c (main): Say "rule useless in parser due to conflicts".
3068 * src/print-xml.c (print_rules_never_reduced): Rename to...
3069 (print_rules_useless_in_parser): ... this, and rename output XML
3070 element "rules-never-reduced" to "rules-useless-in-parser".
3071 (print_xml): Update for rename.
3072 * src/print.c (print_results): Say "Rules useless in parser due to
3073 conflicts".
3074 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
3075 (nonterminals_reduce): Say "nonterminal useless in grammar".
3076 (reduce_output): Say "Nonterminals useless in grammar".
3077 Say "Rules useless in grammar".
3078 (reduce_xml): Rename output XML element "useless" to
3079 "useless-in-grammar".
3080 (reduce_print): Don't report the count of grammatically useless rules
3081 as "rules never reduced" just because %yacc is specified.
3082 In the correct report of this count, say nonterminal(s) and rule(s)
3083 "useless in grammar".
3084 * tests/conflicts.at (S/R in initial): Update expected output.
3085 (Defaulted Conflicted Reduction): Likewise.
3086 (Unreachable States After Conflict Resolution): Likewise.
3087 * tests/existing.at (GNU pic Grammar): Likewise.
3088 * tests/reduce.at (Useless Nonterminals): Likewise.
3089 (Useless Rules): Likewise.
3090 (Reduced Automaton): Likewise.
3091 (Underivable Rules): Likewise.
3092 (Empty Language): Likewise.
3093
66f0441d
JD
30942007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
3095
3096 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
3097 here document and before the EOF so that BSD's implementation of Bourne
3098 shell doesn't parse the delimiter as part of the here document.
3099 * doc/.cvsignore: Add cross-options.texi.
3100 * src/getargs.c (usage): Add a blank line after the warning categories.
3101
d0ee4105
PB
31022007-11-08 Paolo Bonzini <bonzini@gnu.org>
3103
3104 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
3105
e8b1fb9b
AD
31062007-11-05 Akim Demaille <akim@epita.fr>
3107
3108 Remove Id: from bison.1.
3109 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
3110 (perl -0777 -pi -e 's/\.PP\nId): New.
3111 (.x.1): Use it to ignore the version control revision.
3112
2f7a96b5
AD
31132007-11-05 Akim Demaille <demaille@gostai.com>
3114
3115 * build-aux/Makefile.am: Ship cross-options.pl.
3116 * doc/Makefile.am: Always refer to cross-options.texi with
3117 $(srcdir).
3118 (MAINTAINERCLEANFILES): Add it.
3119
f4101aa6
AD
31202007-11-04 Akim Demaille <demaille@gostai.com>
3121
3122 Generate the long/short option cross-table.
3123 * build-aux/cross-options.pl: New.
3124 * doc/Makefile.am (cross-options.texi): New.
3125 * doc/bison.texinfo: Use it.
3126
727a1401
AD
31272007-11-04 Akim Demaille <demaille@gostai.com>
3128
3129 Generate bison.1 using help2man.
3130 * doc/common.x, doc/bison.x: New.
3131 * doc/Makefile.am (bison.1, .x.1): New.
3132 The code is taken from autoconf-2.61/man/Makefile.am.
3133 * configure.ac: Look for help2man.
3134
6aeb9c57
AD
31352007-11-04 Akim Demaille <demaille@gostai.com>
3136
3137 Complete --help.
3138 * src/getargs.c (usage): Document -W, make it clear that -d,
3139 -g and -x have optional arguments.
3140
d7be4085
AD
31412007-11-04 Akim Demaille <demaille@gostai.com>
3142
3143 Find sha1sum when named gsha1sum.
3144 * bootstrap (find_tool): New.
3145 ($SHA1SUM): New.
3146
d9df47b6
JD
31472007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3148
3149 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
3150 at
3151 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
3152 * NEWS (2.3a+): Mention.
3153 * data/bison.m4 (b4_pure_if): Don't define it here.
3154 * data/c.m4 (b4_identification): Depend on individual skeletons to
3155 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
3156 values of the %define variables api.pure or api.push_pull. Define
3157 YYPURE, YYPUSH, and YYPULL accordingly.
3158 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
3159 glr.cc has already defined b4_pure_flag.
3160 * data/push.c: Define b4_pure_if based on `%define api.pure'.
3161 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 3162 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
3163 * doc/bison.texinfo (Pure Decl): Update.
3164 (Push Decl): Update.
3165 (Decl Summary): Add api.pure to %define entry.
3166 In %pure-parser entry, say it's deprecated and reference %define.
3167 (Pure Calling): Update.
3168 (Error Reporting): Update.
3169 (C++ Scanner Interface): Update.
3170 (How Can I Reset the Parser): Update.
3171 (Table of Symbols): In %pure-parser entry, say it's deprecated and
3172 reference %define.
3173 * src/getargs.c (pure_parser): Remove global variable.
3174 * src/getargs.h (pure_parser): Remove extern.
3175 * src/output.c (prepare): Don't define pure_flag muscle.
3176 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
3177 wrapper around `%define api.pure'.
3178 * tests/calc.at (Simple LALR Calculator): Update.
3179 (Simple GLR Calculator): Update.
3180 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
3181 Update.
3182 (GLR: Resolve ambiguity, pure, locations): Update.
3183 (GLR: Merge conflicting parses, pure, no locations): Update.
3184 (GLR: Merge conflicting parses, pure, locations): Update.
3185 * tests/glr-regression.at (Uninitialized location when reporting
3186 ambiguity): Update
3187 * tests/input.at (Unused %define api.pure): New test case.
3188 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
3189 AT_PURE_IF and AT_PURE_AND_LOC_IF.
3190 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3191
c373bf8b
JD
31922007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3193
3194 %define push_pull -> %define api.push_pull. Discussed starting at
3195 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
3196 * data/push.c: Expect the new name.
3197 * data/yacc.c: Likewise.
3198 * doc/bison.texinfo (Push Decl): Update.
3199 (Decl Summary): Update %define entry.
3200 (Push Parser Function): Update.
3201 (Pull Parser Function): Update.
3202 (Parser Create Function): Update.
3203 (Parser Delete Function): Update.
3204 * tests/calc.at (Simple LALR Calculator): Update.
3205 * tests/input.at (%define enum variables): Update.
3206 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
3207 (Push Parsing: Multiple impure instances): Update.
3208 (Push Parsing: Unsupported Skeletons): Update.
3209 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
3210 (Exploding the Stack Size with Malloc): Update.
3211
3212 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
3213 other entries some.
3214
32f19b6b
JD
32152007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
3216
3217 For the XML output's terminal element, rename @number to @token-number,
3218 and add @symbol-number. In the nonterminal element, rename @number to
3219 @symbol-number. Discussed starting at
3220 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
3221 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
3222 renames.
3223 (xsl:template match="nonterminal"): Likewise.
3224 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
3225 (xsl:template match="nonterminal"): Likewise.
3226 * src/print-xml.c (print_grammar): Implement.
3227
255a6b90
JD
32282007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
3229
3230 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
3231 2007-10-11 change, the child elements here are items not rules.
408476bc 3232 (xsl:template match="item"): New.
255a6b90
JD
3233 (xsl:template match="rule"): Update for new reduced itemset.
3234 (xsl:template match="point"): Remove.
3235 (xsl:template match="empty"): For consistency with --graph, don't
3236 output "/* empty */".
3237 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
3238 line-wrap, don't pass a negative value as first-line-length since this
3239 won't work with the following changes.
3240 (xsl:template name="line-wrap"): Simplify slightly.
3241 (xsl:template name="ws-search"): Eliminate recursion.
3242 * src/print_graph.c (print_core): Don't print a reduction's lookahead
3243 set next to an item whose dot is not at the end of the RHS even if it
3244 happens to be associated with the same rule.
3245
88c78747
JD
32462007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3247
31984206
JD
3248 Add %define lr.keep_unreachable_states.
3249 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
3250 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
3251 * src/main.c (main): Implement it.
3252 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3253 Extend to test it, and fix a typo.
3254
32552007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
3256
3257 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
3258 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
3259 the example .output text.
3260 * tests/regression.at (Extra lookahead sets in report): Improve wording
3261 of comments.
3262
b7a70162
WP
32632007-10-17 Wojciech Polak <polak@gnu.org>
3264
3265 * src/print-xml.c (print_grammar): Renamed
3266 <terminal> and <nonterminal> attributes:
3267 "type" to "number" and "symbol" to "name".
3268 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
3269 Use new attribute names.
3270 (xsl:template match="nonterminal"): Likewise.
3271 * data/xslt/xml2xhtml.xsl: Likewise.
3272
a0de5091
JD
32732007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
3274
3275 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
3276 (Option Cross Key): Likewise.
3277
3278 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
3279 next to an item whose dot is not at the end of the RHS even if it
3280 happens to be associated with the same rule.
3281 * src/print.c (print_core): Likewise.
3282 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
3283 (Resolved SR Conflicts): Update output.
3284 * tests/regression.at (Extra lookahead sets in report): New test case.
3285
4c20d18d
WP
32862007-10-11 Wojciech Polak <polak@gnu.org>
3287
3288 * src/print-xml.c (print_core): Remove item set
3289 redundancy.
3290 * data/xslt/bison.xsl (bison:ruleNumber): New key.
3291 Improve processing time. Suggested by Joel E. Denny.
3292 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
3293 Write xsl:param "required" attribute as comment.
3294 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
3295 (xsl:template match="rule"): Support new reduced itemset.
3296 (xsl:template match="point"): Remove.
3297 * data/xslt/xml2xhtml.xsl: Likewise.
3298
f506ad1c
JD
32992007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3300
3301 * src/getargs.c (version): Update copyright year.
3302
21f1b063
JD
33032007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
3304
3305 Make xml2dot.xsl and --graph produce the same output.
3306 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
3307 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
3308 escaped later.
3309 (xsl:template name="output-node"): Use the new escape template instead
3310 of the string-replace template directly.
3311 (xsl:template name="output-edge"): Likewise.
3312 (xsl:template name="escape"): New, escapes backslashes and newlines in
3313 addition to quotation marks.
3314 * src/graphviz.c (start_graph, output_node, output_edge): Add
3315 whitespace to output for legibility.
3316
3317 Make xml2text.xsl and --report produce the same output, and remove the
3318 XML "conflicts" element since a conflict summary is easily extracted
3319 from the automaton.
3320 * data/xslt/bison.xsl: New.
3321 (xsl:template match="state" mode="bison:count-conflicts): New.
3322 * data/xslt/xml2text.xsl: Import bison.xsl.
3323 (xsl:template match="bison-xml-report"): Instead of styling the
3324 "conflicts" element, style the "automaton" element with mode
3325 "conflicts". Unlike the former, the latter lists S/R and R/R
3326 conflicts for a state on the same line.
3327 (xsl:template match="conflicts"): Remove.
3328 (xsl:template match="conflict"): Remove.
3329 (xsl:template match="terminal"): Line-wrap the list of rules in which
3330 the terminal is used.
3331 (xsl:template match="nonterminal"): Likewise for nonterminals.
3332 (xsl:template match="automaton" mode="conflicts"): New.
3333 (xsl:template match="state" mode="conflicts"): New.
3334 (xsl:template name="line-wrap"): New.
3335 (xsl:template name="ws-search"): New.
3336 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
3337 (xsl:template match="bison-xml-report"): Instead of styling the
3338 "conflicts" element, style the "automaton" element with mode
3339 "conflicts."
3340 (xsl:template match="conflicts"): Remove.
3341 (xsl:template match="conflict"): Remove.
3342 (xsl:template match="automaton" mode="conflicts"): New.
3343 (xsl:template match="state" mode="conflicts): New.
3344 * src/conflicts.c (conflicts_output_xml): Remove.
3345 * src/conflicts.h (conflicts_output_xml): Remove prototype.
3346 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
3347 * src/print.c (print_grammar): Consistently wrap at the 66th column so
3348 the corresponding XSLT is easier. Also, never wrap between a word and
3349 the comma that follows it.
3350
793fbca5
JD
33512007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3352
3353 Improve C++ namespace support. Discussed starting at
3354 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
3355 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
3356 b4_namespace_close): New macros that interpret the %define variable
3357 "namespace" so its value can contain "::" to indicate nested
3358 namespaces.
3359 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
3360 the above macros.
3361 * data/lalr1.cc (b4_namespace): Likewise.
3362 * data/location.cc (b4_namespace): Likewise.
3363 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
3364 inside a new table in the general %define entry. Document `%define
3365 namespace' there as well. Point the %name-prefix entry to it since it
3366 explains it more completely in the case of C++.
3367 (C++ Bison Interface): Mention `%define namespace' instead of
3368 %name-prefix.
3369 (Table of Symbols): Remove the `%define push_pull' entry. The %define
3370 entry suffices.
3371 * tests/c++.at (Relative namespace references): New test case.
3372 (Absolute namespace references): New test case.
3373 (Syntactically invalid namespace references): New test case.
3374 * tests/input.at (C++ namespace reference errors): New test case.
3375
35b8730d
JD
33762007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
3377
3378 Add syncline support and location accessor to internal %define
3379 interfaces.
3380 * data/bison.m4 (b4_percent_define_get_loc): New.
3381 (b4_percent_define_get_syncline): New.
3382 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
3383 (b4_percent_define_default): Record defining location as line 1 rather
3384 than 0 for the sake of synchronizing #line's, and define
3385 b4_percent_define_syncline(VARIABLE).
3386 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
3387 * src/muscle_tab.c (muscle_syncline_grow): New.
3388 (muscle_code_grow): Use muscle_syncline_grow.
3389 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
3390 define b4_percent_define_syncline(VARIABLE).
3391 (muscle_percent_define_get_loc): New.
3392 (muscle_percent_define_get_syncline): New.
3393 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
3394 remove some unused variables.
3395 (muscle_percent_define_default): Record defining location as line 1
3396 rather than 0 for the sake of synchronizing #line's, and define
3397 b4_percent_define_syncline(VARIABLE).
3398 (muscle_percent_define_check_values): Use
3399 muscle_percent_define_get_loc.
3400 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
3401 (muscle_percent_define_get_syncline): Prototype.
3402 * tests/skeletons.at (%define Boolean variables: invalid skeleton
3403 defaults): Update output for location change.
3404 (Complaining during macro argument expansion): Extend to test
3405 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
3406
7dc4a694
JD
34072007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
3408
3409 Fix some error-reporting macro bugs.
3410 * data/bison.m4 (b4_cat): New.
3411 (b4_error, b4_error_at): Use b4_cat to send error directives directly
3412 to stdout so they don't become arguments to other macros. Update
3413 comments and add examples.
3414 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
3415 add examples.
3416 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
3417 after printing the error directive so that M4 doesn't report subsequent
3418 problems that are induced by this problem.
3419 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
3420 instead of just in them. Recognize @\n in both places. Both expand to
3421 the empty string. Needed by b4_cat.
3422 * tests/skeletons.at (Complaining during macro argument expansion):
3423 New test case.
3424 (Fatal errors make M4 exit immediately): New test case.
3425
d4bd2295
JD
34262007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
3427
3428 Implement --print-datadir.
3429 * src/getargs.c (usage): Mention.
3430 (PRINT_DATADIR_OPTION): New anonymous enum member.
3431 (long_options): Add entry for it.
3432 (getargs): Add case for it calling compute_pkgdatadir.
3433 * src/output.c (output_skeleton): Encapsulate data directory
3434 computation from here...
3435 (prepare): ... and from here...
3436 (compute_pkgdatadir): ... into this new function.
3437 * src/output.h (compute_pkgdatadir): Prototype.
3438
34cdeddf
JD
34392007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
3440
3441 * src/print-xml.c (escape_bufs): New static global variable
3442 replacing...
3443 (xml_escape_n): ... the static local variable buf here.
3444 (print_xml): Free memory for escape_bufs.
3445 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
3446
d782395d
JD
34472007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
3448
3449 Replace `%push-parser' and `%push-pull-parser' with
3450 `%define push_pull "push"' and `%define push_pull "both"'.
3451 `%define push_pull "pull"' is the default.
3452 * doc/bison.texinfo (Push Decl, Push Parser Function,
3453 Pull Parser Function, Parser Create Function, Parser Delete Function):
3454 Update declarations.
3455 (Decl Summary, Table of Symbols): Replace %push-parser and
3456 %push-pull-parser entries with a %define push_pull entry.
3457 * data/bison.m4 (b4_percent_define_check_values): New macro.
3458 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
3459 definitions...
3460 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
3461 definitions...
3462 * data/push.c: ... to here and compute them from the value of the
3463 %define variable push_pull.
3464 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
3465 parsing requests here...
3466 * data/yacc.c: ... hack this to switch to push.c any time
3467 b4_use_push_pull_flag or the %define variable push_pull is set. This
3468 will go away when we mv push.c yacc.c.
3469 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
3470 push parsing is not supported since unused %define variables are
3471 reported anyway.
3472 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
3473 * src/muscle_tab.h (muscle_percent_define_check_values): Update
3474 comments for consistency with b4_percent_define_check_values.
3475 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
3476 muscles.
3477 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
3478 Remove.
3479 (prologue_declaration): Remove %push-parser and %push-pull-parser
3480 rules.
3481 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
3482 * tests/calc.at: Update declarations.
3483 * tests/input.at (%define enum variables): New test case.
3484 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
3485 declaration.
3486 (Push Parsing: Multiple impure instances): Update declaration.
3487 (Push Parsing: Unsupported Skeletons): New test case.
3488 * tests/torture.at (Exploding the Stack Size with Alloca): Update
3489 declaration.
3490 (Exploding the Stack Size with Malloc): Update declaration.
3491
3f999f78
WP
34922007-09-24 Wojciech Polak <polak@gnu.org>
3493
3494 Add XSLT transformations.
3495
3496 * data/xslt/xml2dot.xsl: Transform XML into DOT.
3497 * data/xslt/xml2text.xsl: Transform XML into plain text.
3498 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
3499 * data/Makefile.am (xsltdir): New variable.
3500 (dist_xslt_DATA): Add xslt/*.xsl files.
3501
a4f75309
PE
35022007-09-23 Paul Eggert <eggert@cs.ucla.edu>
3503
3504 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
3505 Problem reported by Wojciech Polak.
3506 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
3507 (xml_printf): Undo change I made on 21 September; that is,
3508 indent 2 spaces, not 1.
3509
ad5feac4
JD
35102007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
3511
3512 Pacify ./configure --enable-gcc-warnings.
3513 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
3514 `char const *' instead of `char *'.
3515 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
3516 local variable `sep'.
3517
41d7a5f2
PE
35182007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3519
3520 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
3521 elsewhere.
3522 * src/print-xml.c: Prefer "const" after types; that's more consistent.
3523 (xml_printf): Indent just 1 space for level.
3524 (e_char, xlate_char): Remove.
3525 (xml_escape_string): Rewrite to avoid undefined behavior (used
3526 storage that was freed from the stack).
3527 (xml_escape_n): Don't bother checking for subscript error.
3528
3f999f78
WP
35292007-09-21 Wojciech Polak <polak@gnu.org>
3530
3531 Add Bison XML Automaton Report.
41d7a5f2
PE
3532
3533 Add support for an -x option to generate an XML report.
3534 It is not documented yet.
3535 * src/print-xml.c: New file.
3536 * src/print-xml.h: Likewise.
3537 * lib/timevar.def (TV_XML): New var.
3538 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
3539 * src/conflicts.c: Include print-xml.h.
3540 (solved_conflicts_xml_obstack): New var.
3541 (log_resolution, conflicts_solve, conflicts_free):
3542 Add support for XML report.
3543 (conflicts_output_val): New function.
3544 * src/conflicts.h (conflicts_output_val): New decl.
3545 * src/files.c (spec_xml_file): New var.
3546 (compute_output_file_names, output_file_names_free): Add XML support.
3547 * src/files.h (spec_xml_file): New decl.
3548 * src/getargs.c (xml_flag): New var.
3549 (usage, short_options, long_options, getargs): Add XML support.
3550 * src/getargs.h (xml_flag): New decl.
3551 * src/gram.c: Include print-xml.h.
3552 (rule_lhs_print_xml, rule_rhs_print_xml):
3553 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
3554 New functions.
3555 * src/gram.h: Declare external ones.
3556 * src/main.c: Include print-xml.h.
3557 (main): Add XML support.
3558 * src/reduce.c: Include print-xml.h.
3559 (reduce_xml): New function.
3560 * src/reduce.h: Declare it.
3561 * src/state.c: Include print-xml.h.
3562 (state_new): Add XML support.
3563 (state_rule_lookahead_tokens_print_xml): New function.
3564 * src/state.h: Declare it.
3565 (struct state): New member solved_conflicts_xml.
3566 * src/symtab.c (symbol_class_get_string): New function.
3567 * src/symtab.h: Declare it.
3568
6d8e724d
PE
35692007-09-21 Paul Eggert <eggert@cs.ucla.edu>
3570
3571 * GNUmakefile: Switch to coreutils's version.
3572 * bootstrap: Likewise.
3573 * Makefile.cfg: Adjust to new GNUmakefile.
3574 * README-hacking: Likewise.
3575
3576 Import from gnulib:
3577
3578 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
3579 Bruno Haible <bruno@clisp.org>
3580
3581 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
3582 and is a script that invokes bison. Tighten the code. Add comments.
3583
922bdd7f
JD
35842007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
3585
3586 Spell "boolean" as "Boolean". Reported by Akim Demaille.
3587 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
3588 * doc/bison.texinfo (Decl Summary): Fix.
3589 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
3590 * tests/input.at (Boolean %define variables): Update output.
3591 * tests/skeletons.at (%define boolean variables: invalid skeleton
3592 defaults): Rename to...
3593 (%define Boolean variables: invalid skeleton defaults): ... this and
3594 update output.
3595
1b17b01d
JD
35962007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
3597
3598 In impure push mode, don't allow more than one yypstate to be allocated
3599 since multiple impure parsers would corrupt yynerrs.
3600 * data/push.c (yypstate_allocated): New static global variable
3601 initialized to 0.
3602 (yypull_parse): If yypstate_new returns 0, don't report it as memory
3603 exhaustion if yypstate_allocated is 1, but still return 2.
3604 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
3605 already 1. Otherwise, set it to 1.
3606 (yypstate_delete): Set it to 0.
3607 * tests/push.at (Push Parsing: Multiple impure instances): New test
3608 case.
3609
9987d1b3
JD
36102007-08-17 Bob Rossi <bob@brasko.net>
3611
3612 * doc/bison.texinfo (Push Decl): Document the push parser.
3613 (Table of Symbols): Ditto.
3614 (Pure Decl): Ditto.
3615 (Decl Summary): Ditto.
3616 (Multiple Parsers, Push Parser Function, Pull Parser Function,
3617 Parser Create Function, Parser Delete Function):
3618 Add new push parser symbols.
3619 (Table of Symbols): Document push-parser, push-pull-parser,
3620 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
3621
f16b0819
PE
36222007-08-15 Paul Eggert <eggert@cs.ucla.edu>
3623
3624 Update to GPLv3.
3625 * doc/gpl-3.0.texi: New file.
3626 * doc/gpl.texi: Remove.
3627 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
3628 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
3629 * README-hacking, TODO, bootstrap, bootstrap.conf:
3630 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
3631 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
3632 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
3633 * data/lalr1.cc, data/lalr1.java, data/location.cc:
3634 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
3635 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
3636 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
3637 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
3638 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
3639 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
3640 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
3641 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
3642 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
3643 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
3644 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
3645 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
3646 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
3647 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
3648 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
3649 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
3650 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
3651 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
3652 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
3653 * src/complain.c, src/complain.h, src/conflicts.c:
3654 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
3655 * src/files.h, src/flex-scanner.h, src/getargs.c:
3656 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
3657 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
3658 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
3659 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
3660 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
3661 * src/print.c, src/print.h, src/print_graph.c:
3662 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
3663 * src/reduce.h, src/relation.c, src/relation.h:
3664 * src/revision.h, src/scan-code.h, src/scan-code.l:
3665 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
3666 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
3667 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
3668 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
3669 * tests/Makefile.am, tests/actions.at, tests/c++.at:
3670 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
3671 * tests/existing.at, tests/glr-regression.at:
3672 * tests/headers.at, tests/input.at, tests/java.at:
3673 * tests/local.at, tests/output.at, tests/push.at:
3674 * tests/reduce.at, tests/regression.at, tests/sets.at:
3675 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
3676 * tests/torture.at:
3677 Update to GPLv3.
3678
728c4be2
JD
36792007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3680
3681 Get rid of broken %no-parser, -n, and --no-parser implementation and
3682 documentation.
3683 * TODO: Don't mention them.
3684 * doc/bison.1: Likewise.
3685 * doc/bison.texinfo (Decl Summary): Likewise.
3686 (Bison Options): Likewise.
3687 (Option Cross Key): Likewise.
3688 * src/getargs.c (no_parser_flag): Remove global variable.
3689 (usage): Don't print description of -n and --no-parser.
3690 (long_options): Remove --no-parser entry here.
3691 (getargs): Remove -n case in the switch here.
3692 * src/getargs.h (no_parser_flag): Remove extern.
3693 * tests/regression.at (Web2c Actions): Remove comment that mentions
3694 --no-parser.
3695
5d31a216
JD
36962007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
3697
3698 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
3699 name user variables starting with `yy'. Just pass NULL instead of a
3700 dummy local &yylval to yypush_parse.
3701 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
3702 starting with `yy'.
3703
a2ea208d
JD
37042007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
3705
3706 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
3707 true since it's then always used regardless of whether yyoverflow is
3708 defined. Reported by Christian Burger at
3709 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
3710 * THANKS: Add Christian Burger.
3711
91661ebb
JD
3712 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
3713 node names: say "Decl Summary" not "Bison Declaration Summary".
3714
cbd50549
JD
37152007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
3716
3717 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
3718 determine whether this function has already complained about an invalid
3719 value for a %define boolean variable, don't check whether Bison has
3720 ever examined the value. As written, the check was a tautology.
3721 Instead, record and check for this complaint using a separate muscle.
3722
eb1b0740
JD
37232007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
3724
3725 Fix push parsing memory leak reported by Brandon Lucia at
3726 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
3727 * THANKS: Add Brandon Lucia.
3728 * data/push.c (yypstate_delete): Free the stack if it was reallocated
3729 but the parse never completed and thus freed it.
3730 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
3731 * tests/testsuite.at: Include push.at.
3732 * test/push.at: New.
3733 (Push Parsing: Memory Leak for Early Deletion): New test case.
3734
9d774aff
JD
37352007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
3736
3737 Improve handling of multiple S/R conflicts in the same state and of S/R
3738 conflicts involving multiple reductions.
3739 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
3740 set for a state here or Bison will abort if it is reassigned on a
3741 later conflicted reduction in the same state.
3742 Similarly, don't finalize and assign the solved conflicts report here
3743 or it will be lost if it is reassigned on a later conflicted reduction
3744 in the same state.
3745 (set_conflicts): Instead, assign them both here after all S/R conflicts
3746 in the state have been fully examined.
3747 * src/print.c (shift_set): Rename to...
3748 (no_reduce_set): ... this.
3749 (print_reductions): Update for rename, and add %nonassoc error action
3750 tokens to no_reduce_set so that, when printing the first remaining
3751 reduction on an error action token, the reduction is enclosed in
3752 brackets.
3753 (print_results): Update for rename.
3754 * tests/conflicts.at (Solved conflicts report for multiple reductions
3755 in a state): New test case.
3756 (%nonassoc error actions for multiple reductions in a state): New test
3757 case.
3758
3759 * src/main.c (main): Don't depend on C99 features.
3760
10159d2a
JD
37612007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
3762
3763 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
3764 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
3765 uniwidth.
10159d2a 3766
953b3935
JD
37672007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
3768
3769 * bootstrap (slurp): Create target directories that don't exist.
3770 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
3771
6ce2d93a
JD
37722007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
3773
3774 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
3775 than item number.
3776 * closure.c (closure): Likewise.
3777 * state.h (reductions): Comment sorting of rules.
3778 (state): Comment sorting of items.
3779
ce3448d5
JD
37802007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
3781
3782 Fix C++ test cases after recent Gnulib changes. Discussed starting at
3783 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
3784 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
3785 definition in order to avoid Gnulib headers since we don't use config.h
3786 here.
3787 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
3788 rather than AT_DATA so that config.h is included.
3789
8a86eef0
JD
37902007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
3791
3792 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
3793 instead of fprintf. Guard these functions with #if YYDEBUG instead of
3794 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
3795 and so that YYFPRINTF is guaranteed to be defined here.
3796
b1a81613
JD
37972007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3798
3799 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
3800 with...
3801 (muscle_percent_define_check_values): ... this more helpful function.
3802 Again, it's not used yet, but it will be.
3803 * src/muscle_tab.h: Likewise.
3804
71b61d4d
JD
3805 Improve some comments in parser table construction.
3806 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
3807 (generate_states): Don't mention ruleset, which is internal to closure.
3808 * src/closure.c (closure): Explain sorting of core and itemset, which
3809 is required for this function to behave correctly.
3810 * src/closure.h (closure): Mention sorting.
3811
2a6b783d
JD
38122007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
3813
3814 * src/lalr.c (state_lookahead_tokens_count): For code readability,
3815 move the check for disabled transitions to an aver since conflict
3816 resolution hasn't happened yet.
3817
3818 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
3819 labels a state as inconsistent just because it has error transitions.
3820 The original form of this check appeared in revision 1.1 of lalr.c,
3821 which was committed on 1991-12-21. Now (at least), changing the
3822 consistency label on such a state appears to have no useful effect in
3823 any of the places it is examined, which I enumerate below. The key
3824 point to understanding each item in this enumeration is that a state
3825 with an error transition is labelled consistent in the first place only
3826 if it has no rules, so the check cannot matter for states that have
3827 rules. (1) Labelling a state as inconsistent will cause set_conflicts
3828 to try to identify its conflicts, and a state must have *rules* to have
3829 conflicts. (2) Labelling a state as inconsistent will affect how
3830 action_row sets the default *rule* for the state. (3) Labelling a
3831 state as inconsistent will cause build_relations to add lookback edges
3832 to *rules* in that state.
3833 * src/state.h (struct state): Word the comment for member consistent
3834 more carefully.
3835
14462c2b
JD
38362007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
3837
3838 Don't depend on C99 features.
3839 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
3840 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
3841 * src/reader.c (check_and_convert_grammar): Fix for-loop.
3842 * src/state.c (state_mark_reachable_states): Fix for-loop.
3843 (state_remove_unreachable_states): Fix for-loop.
3844
3845 Don't widen struct state with member reachable just to temporarily
3846 record reachability. Instead, use a local bitset.
3847 * src/state.h (struct state): Remove member.
3848 * src/state.c (state_new): Don't initialize it.
3849 (state_mark_reachable_states): Rename to...
3850 (state_record_reachable_states): ... this, and use bitset.
3851 (state_remove_unreachable_states): Use bitset.
3852
5a43d418
JD
38532007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
3854
3855 * src/Makefile.am (yacc): Quote target action commands properly so
3856 that the yacc script isn't corrupt. Reported by Hans Aberg at
3857 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
3858
0c650a20
JD
3859 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
3860 the case of pure parsers. Reported by Frans Englich at
3861 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
3862 * THANKS: Add Frans Englich.
3863
61fee93e
JD
3864 * NEWS (2.3a+): In the %code entry, reference section `Bison
3865 Declaration Summary' from the manual now since the %code summary has
3866 moved there.
3867 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
3868 in the rules section must be terminated by semicolons.
3869
f124d423
JD
38702007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
3871
3872 Extend the front-end API for %define variables to more completely
3873 mirror the back-end. This will be useful in the future.
3874 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
3875 Update comments to mention the new front-end counterparts of these
3876 macros.
3877 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
3878 for muscle_string_decode and muscle_location_decode.
3879 (muscle_string_decode): New static function.
3880 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
3881 (muscle_percent_define_get, muscle_percent_define_ifdef): New
3882 functions.
3883 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
3884 muscle_percent_define_get to mimic the b4_percent_define_flag_if
3885 implementation more closely.
3886 (muscle_percent_define_invalid_value): New function.
3887 * src/muscle_tab.h (muscle_percent_define_get,
3888 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
3889 Prototype.
3890
75ad86ee
JD
38912007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
3892
3893 * NEWS (2.3a+): Mention yesterday's state-removal change.
3894 (2.3a): Remove the %language entry, which was added after 2.3a.
3895 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
3896 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
3897 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
3898 tests/existing.at: Update copyright date.
3899
5967f0cf
JD
39002007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3901
3902 If conflict resolution makes states unreachable, remove those states,
3903 report rules that are then unused, and don't report conflicts in those
3904 states.
3905 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
3906 New global function.
3907 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
3908 function.
3909 * src/main.c (main): After conflict resolution, remove the unreachable
3910 states and update all data structures that reference states by number.
3911 * src/state.c (state_new): Initialize each state's reachable member to
3912 false.
3913 (state_mark_reachable_states): New static function.
3914 (state_remove_unreachable_states): New global function.
3915 * src/state.h (struct state): Add member bool reachable.
3916 (state_remove_unreachable_states): Prototype.
3917 * tests/conflicts.at (Unreachable States After Conflict Resolution):
3918 New test case.
3919 * tests/existing.at (GNU pic Grammar): Update test case output now that
3920 an unused rule is discovered.
3921
b09f4f48
JD
39222007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
3923
3924 Minor code cleanup in parser table construction.
3925 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
3926 (new_itemsets, save_reductions): Update for rename to nitemset.
3927 * src/closure.c (nritemset): Rename to...
3928 (nitemset): ... this since the "r" appears to meaningless and isn't
3929 used in the comments.
3930 (closure): Update for rename.
3931 * src/closure.h (nritemset): Update extern to...
3932 (nitemset): ... this.
3933 * src/lalr.c (LA): Fix a typo in comments.
3934 * src/print.c (print_core): Update for rename to nitemset.
3935 * src/print_graph.c (print_graph): Likewise.
3936 * src/state.h: Fix some typos in header comments.
3937
bbb44d83
PE
39382007-04-04 Paul Eggert <eggert@cs.ucla.edu>
3939
9b33de72
PE
3940 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
3941 still sticks to ASCII. Sorry!
3942
bbb44d83
PE
3943 * README-hacking: New file, taken mostly from coreutils, with changes
3944 for Bison. Contains much of the contents of:
3945 * README-cvs: Remove.
3946 * bootstrap: Sync from gnulib.
3947 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
3948 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
3949
29553547
JD
39502007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
3951
3952 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
3953 Setzer.
3954 (Java Differences): Fix some typos.
3955 * THANKS: Add Sebastian Setzer.
3956
01b477c6
PB
39572007-03-07 Paolo Bonzini <bonzini@gnu.org>
3958
730739e4
AD
3959 * data/java.m4 (b4_single_class_if): Remove.
3960 (b4_abstract_if): Look at "%define abstract".
3961 (b4_lexer_if): New.
3962 (b4_union_name): Rename...
3963 (b4_yystype): ... to this. Map to "%define stype".
3964 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
3965 b4_maybe_throws): Fix quoting.
3966 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
3967 * data/lalr1.java (Lexer interface): Always define.
3968 (Lexer interface within parser class): Remove.
3969 (YYLexer class): New, used when "%code lexer" is present.
3970 (constructor): When "%code lexer" is used, pass %lex-param
3971 to the lexer constructor.
3972 (yylex, yyparse): Remove %lex-param from method invocations
3973 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
3974
3975 * doc/bison.texinfo (Java Bison Interface): Mention "%define
3976 abstract". Rename "%define union_name" to "%define stype".
3977 Rename method names according to previous patch.
3978 (Java Scanner Interface): Describe "%code lexer" instead of
3979 "%pure-parser" and "%define single_class".
3980 (Java Differences): Mention "%code lexer".
3981
3982 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
3983 Include scanner here, using macros from tests/local.at.
3984 (AT_DATA_CALC_Y): Remove final argument.
3985 (_AT_CHECK_JAVA_CALC): Likewise.
3986 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
3987 of %locations and %error-verbose.
3988 (main): Test with and without %lex-param.
3989 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
3990 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 3991
122bea3a
JMG
39922007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3993
3994 DJGPP spefic issue. Inhibit the use of disallowed characters for
3995 file name genertion on Win98, WinXP, etc. These are |<>":?*\
3996 and concern testsuite case 46.
3997 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
3998 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
3999 * djgpp/config.bat: Inhibit the use of disallowed characters.
4000
9611cfa2
JD
40012007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
4002
4003 Miscellaneous %define and %code cleanup.
4004 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
4005 values are interpreted.
4006 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
4007 documentation a little more.
4008 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
4009 muscle_percent_define_insert, muscle_percent_code_grow): New
4010 functions/macros.
4011 * src/muscle_tab.h (muscle_percent_define_insert,
4012 muscle_percent_code_grow): Prototype.
4013 * src/parse-gram.y (prologue_declaration): Use
4014 muscle_percent_define_insert and muscle_percent_code_grow when parsing
4015 %define and %code directives.
4016
4017 Make it easy to share %define boolean variables between the front-end
4018 and back-end. Though not used yet, this will be useful in the future.
4019 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
4020 Bison uses of names rather than just skeleton uses of names.
4021 (b4_percent_define_get, b4_percent_define_ifdef): Rename
4022 b4_percent_define_skeleton_variables(VARIABLE) to
4023 b4_percent_define_bison_variables(VARIABLE).
4024 (b4_percent_code_get, b4_percent_code_ifdef): Rename
4025 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
4026 b4_percent_code_bison_qualifiers(QUALIFIER).
4027 (b4_check_user_names_wrap): Update for renames.
4028 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
4029 muscle_percent_define_default): New functions mimicking
4030 b4_percent_define_flag_if and b4_percent_define_default.
4031
4032 For %define variables, report locations for invalid values and
bbb44d83 4033 redefinitions.
9611cfa2
JD
4034 * data/bison.m4 (b4_percent_define_flag_if): Read
4035 b4_percent_define_loc(VARIABLE) to report the location of an invalid
4036 value for VARIABLE.
4037 (b4_percent_define_default): Save a special location in
4038 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
4039 must later be reported as invalid.
4040 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
4041 functions.
4042 (muscle_percent_define_insert): Record the location of VARIABLE in
4043 muscle percent_define_loc(VARIABLE), and use it to report the previous
4044 location for a redefinition.
4045 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
4046 (muscle_percent_define_default): Update like b4_percent_define_default.
4047 (muscle_grow_user_name_list): Rename to...
4048 (muscle_user_name_list_grow): ... this for consistency and use
4049 muscle_location_grow.
4050 * src/muscle_tab.h (muscle_location_grow): Prototype.
4051 * tests/input.at (%define errors): Update expected output.
4052 * tests/skeletons.at (%define boolean variables: invalid skeleton
4053 defaults): New test case.
4054
0bf92491
JD
40552007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
4056
4057 * src/print.c (lookahead_set, state_default_rule): Remove.
4058 (print_reductions): Replace state_default_rule invocation with
4059 equivalent use of yydefact, which was computed in token_actions in
4060 tables.c.
4061 (print_results): Don't allocate lookahead_set.
4062
d3b12988
PB
40632007-02-27 Paolo Bonzini <bonzini@gnu.org>
4064
4065 * data/lalr1.java: Prefix all private members with yy.
4066
f57a7536
JD
40672007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
4068
4069 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 4070 Sebastien Fricker at
f57a7536 4071 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 4072 * THANKS: Add Sebastien Fricker.
f57a7536
JD
4073 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
4074 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
4075 accept a variable number of arguments.
4076
6404a5bf
JD
40772007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4078
4079 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
4080
e4e09639
JMG
40812007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4082
4083 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
4084 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
4085 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
4086
d7e0a1a7
PE
40872007-02-11 Paul Eggert <eggert@cs.ucla.edu>
4088
4089 Undo my 2007-02-07 change, switching back to the c-strcase module
4090 introduced in the 2007-02-03 change. Bruno Haible reported that
4091 the 2007-02-07 change would be dangerous in Turkish if we add a
4092 language whose name contains "i", since "i" is not lowercase "I"
4093 in Turkish.
4094 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
4095 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
4096 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
4097 * m4/.cvsignore: Remove strcase.m4.
4098 * src/getargs.c: Revert 2007-02-07 change, as follows.
4099 Include c-strcase.h.
4100 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
4101
deee93a1
JD
41022007-02-11 Bruno Haible <bruno@clisp.org>
4103
4104 Enable the Java related testsuite tests when the only Java compiler
4105 found is a gcj < 4.3. Discussed at
4106 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
4107 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
4108
574add85
JD
41092007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
4110
4111 * data/Makefile.am: Update copyright date.
4112 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
4113 yypstate_new returns NULL.
4114 (yypstate_new): Return NULL if malloc does.
4115 * src/reader.c (packgram): Move translation of rule actions from the
4116 beginning of packgram to...
4117 (check_and_convert_grammar): ... here right before packgram is invoked
4118 so it's easier to write more complete comments, and remove redundant
4119 code.
4120
e785ccf7
JD
41212007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
4122
4123 As in semantic actions, make @$ in %initial-action, %destructor, and
4124 %printer imply %locations.
4125 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
4126 scanning @$.
4127 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
4128 (@$ in %initial-action implies %locations,
4129 @$ in %destructor implies %locations,
4130 @$ in %printer implies %locations): ... these new test cases.
4131
1cfe1ed7
PE
41322007-02-07 Paul Eggert <eggert@cs.ucla.edu>
4133
4134 Undo most of the 2007-02-03 change, switching to the strcase module
4135 now that gnulib strcase has been fixed.
4136 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
4137 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
4138 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
4139 * m4/.cvsignore: Add strcase.m4.
4140 * src/getargs.c: Revert 2007-02-03 change, as follows.
4141 Don't include c-strcase.h.
4142 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
4143 strcasecmp has "unspecified behavior" outside the POSIX locale,
4144 but it works fine in practice if at least one argument is ASCII,
4145 as is the case in Bison.
4146
0049ec86
PB
41472007-02-07 Paolo Bonzini <bonzini@gnu.org>
4148
4149 * tests/java.at: Skip tests if only one of javac/java is present.
4150 Reported by Joel E. Denny.
4151 * tests/atlocal.in: Adjust copyright years.
4152
41532007-02-05 Paolo Bonzini <bonzini@gnu.org>
4154
4155 * data/lalr1.java (Stack): Work around old verifiers that disallow
4156 access to the private fields of an inner class, from the outer class.
4157 We can make Stack's fields public because user code doesn't have access
4158 to the instance of Stack used by parse(). Reported by Paul Eggert.
4159
2c2b7220
PE
41602007-02-03 Paul Eggert <eggert@cs.ucla.edu>
4161
4162 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
4163 the right spot for these files?
4164 * bootstrap.conf (gnulib_modules): Add c-strcase.
4165 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
4166 c-strncasecmp.c.
4167 * src/getargs.c: Include c-strcase.h.
4168 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
4169 to avoid unspecified behavior.
4170
b2b81dae
JD
41712007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
4172
4173 * doc/bison.texinfo (Decl Summary): Correct typo.
4174
c1d19e10
PB
41752007-01-30 Paolo Bonzini <bonzini@gnu.org>
4176
4177 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
4178 Complain if the value does not match empty, "true" or "false".
4179 * data/c++.m4: Adjust default definitions of %define variables.
4180 * data/java.m4: Adjust default definitions of %define variables.
4181 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
4182 to above behavior.
4183 * tests/input.at (Boolean %define variables): Test new behavior.
4184
8405b70c
PB
41852007-01-29 Paolo Bonzini <bonzini@gnu.org>
4186
4187 * NEWS: Mention java.
4188 * TODO: Remove things that are done.
4189 * bootstrap.conf: Add javacomp-script and javaexec-script.
4190 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
4191
4192 * data/Makefile.am: Add new files.
4193 * data/java-skel.m4: New.
4194 * data/java.m4: New.
4195 * data/lalr1.java: New.
4196
4197 * doc/bison.texinfo: Put "A Complete C++ Example" under
4198 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
4199 under Other Languages.
4200
4201 * src/getargs.c (valid_languages): Add Java.
4202 * src/getargs.h (struct bison_language): Update size of string fields.
4203
4204 * tests/Makefile.am: Add java.at.
4205 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
4206 * tests/java.at: New.
4207 * tests/testsuite.at: Include it.
4208
3eb82471
JD
42092007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
4210
4211 Clean up.
4212 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
4213 at_directive_argv arguments so these no longer have to be global
4214 variables. Also, update the implementation for the following changes.
4215 (fail_for_at_directive_too_many_args,
4216 fail_for_at_directive_too_few_args): Add at_directive_name argument.
4217 (at_directive_name): Remove as at_directive_argv[0] will be used for
4218 this now.
4219 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
4220 for the directive name.
4221 (at_directive_argc, at_directive_argv): Make these local within
4222 skel_lex instead of global.
4223 (INITIAL): Update directive start action for above changes.
4224 (SC_AT_DIRECTIVE_ARG): Rename to...
4225 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
4226 (SC_AT_DIRECTIVE_SKIP_WS): Update.
4227 (scan_skel): Move yylex_destroy to...
4228 (skel_scanner_free): ... here.
4229 * tests/skeletons.at (installed skeleton file name): Rename to...
4230 (installed skeleton file names): ... this.
4231
148d66d8
JD
42322007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
4233
4234 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
4235 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
4236 Summary" not "Directives".
4237 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
4238 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
4239 since the former is now the more complete one.
4240 (Prologue Alternatives): Likewise and do the same for %defines.
4241 (Table of Symbols): Add summary of %code, add summary of %define, and
4242 move full %code documentation to...
4243 (Decl Summary): ... here for consistency with other entries in these
4244 sections.
4245 Move %define entry in order to keep this list alphabetized.
4246 Reword %define entry a little to put less emphasis on the skeleton
4247 concept, which most users shouldn't have to think about.
4248
665f0c24
PE
42492007-01-26 Paul Eggert <eggert@cs.ucla.edu>
4250
4251 Adjust to recent gnulib changes.
4252 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
4253 Add string.h, string_.h, unistd_.h, wchar_.h.
4254 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
4255 * src/system.h: Don't include <stpcpy.h>; this is now done by
4256 <string.h>.
4257
592d0b1e
PB
42582007-01-23 Paolo Bonzini <bonzini@gnu.org>
4259
4260 Simplify implementation of unqualified %code, implement macros for
4261 uniform treatment of boolean %define flags. Document %define.
4262 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
4263 b4_percent_code_ifdef): New.
4264 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
4265 * data/c++.m4: Define default value for global_tokens_and_yystype.
4266 * data/glr.cc: Likewise.
4267 * data/location.cc: Use b4_percent_define_flag_if.
4268
148d66d8 4269 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
4270
4271 * src/parse-gram.y (Unqualified %code): Change muscle name to
4272 b4_percent_code().
4273 (content.opt): Default to empty.
4274
a7867f53
JD
42752007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4276
4277 Implement support for relative and absolute skeleton file names.
4278 Discussed starting at
4279 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
4280 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
4281 (Bison Options): Document in --skeleton entry.
4282 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
4283 full_skeleton can't necessarily hold all of pkgdatadir.
4284 If the specified skeleton file name contains a `/', don't prepend
4285 pkgdatadir.
4286 * src/parse-gram.y (prologue_declaration): If the specified skeleton
4287 file name contains a `/', prepend the grammar file directory.
4288 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
4289 * skeletons.at: New file.
4290 (relative skeleton file names): New test case.
4291 (installed skeleton file names): New test case.
4292 * tests/testsuite.at: Include skeletons.at.
4293
4294 * bootstrap: Update copyright to 2007.
4295
830c9b18
PB
42962007-01-17 Paolo Bonzini <bonzini@gnu.org>
4297
4298 * bootstrap: Remove occurrences of .#bootmp from the files.
4299
a8c2e813
AD
43002007-01-17 Akim Demaille <akim@epita.fr>
4301
4302 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
4303 nonterminals.
4304 Use per-type %printer.
4305
279cabb6
JD
43062007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
4307
4308 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
4309 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4310 djgpp/config.site, src/files.c, src/files.h, src/main.c,
4311 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
4312 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
4313 tests/glr-regression.at, tests/input.at, tests/local.at,
4314 tests/output.at, tests/torture.at: Update copyright to 2007.
4315
bb32f4f2
AD
43162007-01-16 Akim Demaille <akim@epita.fr>
4317
4318 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
4319 error code.
4320 (Calc++ Scanner): Exit with failure if we can't open the input
4321 file.
4322 Accept "-" standing for stdin.
4323 (Calc++ Top Level): Print the result only if the parsing was
4324 successful.
4325
7cff04b5
AD
43262007-01-16 Akim Demaille <akim@epita.fr>
4327
4328 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
4329
a4e25e1d
JD
43302007-01-15 Paolo Bonzini <bonzini@gnu.org>
4331 and Joel E. Denny <jdenny@ces.clemson.edu>
4332
4333 Clean up %define and %code implementation in M4 some. Most
4334 importantly, rename all related macros to be in the b4_percent_define
4335 and b4_percent_code namespaces. Also, complete support for `.' in
4336 %define variable names and %code qualifiers.
4337 * data/bison.m4 (b4_check_user_names): Check for special
4338 "SKELETON-NAMESPACE(name)" macros instead of using two nested
4339 m4_foreach loops.
4340 (b4_get_percent_define, b4_get_percent_code): Rename to...
4341 (b4_percent_define_get, b4_percent_code_get): ... these.
4342 Extend documentation with examples.
4343 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
4344 b4_percent_define_skeleton_variables and
4345 b4_percent_code_skeleton_qualifiers.
4346 Expect any value for the %define variable `foo' to be stored in the
4347 macro named `b4_percent_define(foo)'; expect any %code blocks for the
4348 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
4349 expect any unqualified %code blocks to be stored in a macro named
4350 `b4_percent_code_unqualified'.
4351 Use m4_indir so that %define variable names and %code qualifiers can
4352 contain `.', which is allowed by the grammar parser.
4353 (b4_percent_define_default): New macro to set a default value for a
4354 %define variable.
4355 (m4_wrap): Update wrapped code, and fix some underquoting.
4356 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
4357 Expect grammar uses of %define variables and %code qualifiers to be
4358 defined in b4_percent_define_user_variables and
4359 b4_percent_code_user_qualifiers.
4360 * data/c++.m4: Use b4_percent_define_default rather than
4361 m4_define_default. Fix some underquoting. Skeleton usage of %define
4362 variable define_location_comparison now implies skeleton usage of
4363 %define variable filename_type.
4364 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4365 data/push.c, data/yacc.c: Update macro names.
4366 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
4367 muscle names.
4368
e37c665c
JMG
43692007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4370
4371 DJGPP specific issues.
4372
4373 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
4374 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
4375
7d2d521f
JD
43762007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4377
4378 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
4379 run parsers in all tests so that Valgrind is invoked during
4380 maintainer-check-valgrind.
4381 (Duplicate representation of merged trees): Free all semantic values.
4382 (Duplicated user destructor for lookahead): Likewise.
4383
e0ac9b4b
JD
43842007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4385
4386 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
4387 command-line prefix.
4388 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
4389 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
4390 miss Valgrind messages.
4391 (Exploding the Stack Size with Malloc): Likewise.
4392
78143faa
JD
43932007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
4394
4395 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
4396 locals. Reported by Juan Manuel Guerrero at
4397 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
4398 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
4399 Fix some indentation also.
4400 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
4401 explaining this issue.
4402
7ecec4dd
JD
44032007-01-09 Paolo Bonzini <bonzini@gnu.org>
4404 and Joel E. Denny <jdenny@ces.clemson.edu>
4405
4406 Simplify union and prologue handling, and escape union and lex/parse
4407 params with digraphs.
4408 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
4409 values to the empty string since these are no longer guaranteed
4410 initialized by the front-end.
4411 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
4412 braces around b4_user_stype since this is no longer done by the
4413 front-end.
4414 * src/files.c, src/files.h (pre_prologue_obstack,
4415 post_prologue_obstack): Remove.
4416 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
4417 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
4418 with digraphs. This fixes lex params and parse params.
4419 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
4420 * src/output.c (prepare): Remove muscle insertion of the prologues.
4421 (output): Remove freeing of pre_prologue_obstack and
4422 post_prologue_obstack.
4423 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
4424 than prologue_augment for prologue parsing so you don't need prologue
4425 obstacks.
5c80250c
JD
4426 (grammar_declaration): For %union RHS, use `braceless' instead of
4427 "{...}" so that braces are already stripped and code is escaped with
4428 digraphs.
7ecec4dd
JD
4429 * src/reader.c (prologue_augment): Remove.
4430 (reader): Remove initialization of pre_prologue_obstack and
4431 post_prologue_obstack.
4432 * src/reader.h (prologue_augment): Remove.
4433
4434 * data/c.m4: Remove stray parenthesis.
4435
16dc6a9e
JD
44362007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4437
4438 Remove quotes from variables names in %define directives and from
4439 qualifiers in %code directives, and restrict the characters that are
4440 allowed in them to M4-friendly ones. For %define, continue to support
4441 the quoted form as a deprecated feature. Discussed starting at
4442 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
4443 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
4444 %code.
4445 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
4446 (Decl Summary): In %defines entry, update mention of `%code requires'
4447 and `%code provides'.
16dc6a9e
JD
4448 (C++ Location Values): Update %define uses.
4449 (Calc++ Parser Interface): Likewise.
4450 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 4451 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
4452 * src/parse-gram.y (prologue_declaration): For %define variables, use
4453 `variable' instead of `STRING'.
4454 (grammar_declaration): For %code qualifiers, use `ID' instead of
4455 `STRING'.
4456 (variable): New nonterminal that takes an `ID' or a `STRING'.
4457 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
4458 and %define uses.
4459 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
4460 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
4461 (%define errors): Update %define uses.
4462
e9813cd4
JD
44632007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4464
4465 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
4466 instead of muscle_insert for %define values so that M4-special
4467 characters are replaced with digraphs.
4468 * tests/input.at (%define errors): Extend to check weird values.
4469
6afc30cc
JD
44702007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
4471
4472 Instead of having skeletons declare all valid %define variables and
4473 %code qualifiers, provide macros that retrieve the associated values
4474 and build these lists automatically. Thus Bison will now warn when a
4475 variable or qualifier is not used by the skeleton in the current
4476 invocation regardless of whether it might sometimes be used by that
4477 skeleton in other invocations. Also, move all %define value macros to
4478 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
4479 form, which is replaced by %code.
4480 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
4481 (b4_check_user_names): ... this, and change the series of valid name
4482 arguments to a single list argument for names used in the skeleton
4483 similar to the existing list argument for names used in the grammar.
4484 Warn instead of complaining.
4485 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
4486 values and %code code, to format %code code properly, and to build
4487 lists of all %define variables and %code qualifiers used in the
4488 skeleton: b4_skeleton_percent_define_variables and
4489 b4_skeleton_percent_code_qualifiers.
4490 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
4491 Remove, and...
4492 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
4493 the skeleton names lists can finish building first. In place of
4494 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
4495 expect the lists b4_user_percent_define_variables and
4496 b4_user_percent_code_qualifiers.
4497 * data/c++.m4: Where setting default values for b4_parser_class_name,
4498 b4_location_type, b4_filename_type, b4_namespace, and
4499 b4_define_location_comparison, update their names to the
4500 b4_percent_define_ namespace.
4501 * data/glr.c: Don't use b4_check_percent_define_variables and
4502 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4503 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
4504 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 4505 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
4506 * data/location.cc: Use b4_get_percent_define.
4507 * data/push.c: Don't use b4_check_percent_define_variables and
4508 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
4509 * data/yacc.c: Likewise, and don't call m4_exit in
4510 b4_use_push_for_pull_if or m4_wrap code will never execute.
4511 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
4512 Rename to...
4513 (muscle_grow_user_name_list): ... this for consistency with the
4514 terminology used in bison.m4.
4515 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
4516 %define variable names, and rename muscle used_percent_define_variables
4517 to user_percent_define_variables.
4518 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
4519 user_percent_code_qualifiers.
4520 (content): Remove.
4521 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
4522 {CODE} form is no longer accepted.
4523 * tests/input.at (Reject bad %code qualifiers): Rename to...
4524 (Reject unused %code qualifiers): ... this, and update test output.
4525 (%define error): Update test output.
4526
7eb8a0bc
JD
45272007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
4528
4529 Check for unrecognized %define variables similar to checking for
4530 unrecognized %code qualifiers. Check for redefined %define variables.
4531 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
4532 generalizes...
4533 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
4534 (b4_check_percent_define_variables): New, also wraps it.
4535 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
4536 variables using b4_check_percent_define_variables.
4537 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
4538 all those exercised in the test suite and all those listed in the
4539 `Default values' section of c++.m4. Are there others?
4540 * data/push.c, data/yacc.c: Declare no valid %define variables.
4541 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
4542 similar to muscle_find, but it works even when the muscle stores a
4543 const value.
4544 (muscle_grow_used_name_list): New function for constructing the used
4545 name list muscles that b4_check_for_unrecognized_names requires.
4546 * src/parse-gram.y (prologue_declaration): Warn if a variable is
4547 %define'd more than once. Define the b4_used_percent_define_variables
4548 muscle with muscle_grow_used_name_list.
4549 (grammar_declaration): Abbreviate %code code with
4550 muscle_grow_used_name_list.
4551 * tests/input.at (%define errors): New.
4552
3fc65ead
JD
45532007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4554
4555 Provide warn_at, complain_at, and fatal_at function callbacks to the
4556 skeletons, and use this for %code qualifier complaints.
4557 * data/bison.m4 (b4_error_at): New, invoked by...
4558 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
4559 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
4560 @fatal_at(...@) directives.
4561 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
4562 qualifiers in b4_used_percent_code_qualifiers and to use
4563 b4_complain_at.
4564 * src/location.c, src/location.h (boundary_set_from_string): New global
4565 function.
4566 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
4567 function.
4568 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
4569 to b4_used_percent_code_qualifiers.
4570 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
4571 function.
4572 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
4573 (lineno): Rename to...
4574 (out_lineno): ... this so I don't misunderstand it again.
4575 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
4576 here; these newlines are in the input but not the output file.
4577 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
4578 (at_directive_perform): ... this new static function, and add handling
4579 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
4580 directives.
4581 * tests/input.at (Reject bad %code qualifiers): Update test output with
4582 locations and extend.
4583
4584 * tests/output.at (Output file name: [, Output file name: ]): Remove
4585 bogus comment about these tests failing.
4586
1c7b7e1d
JD
45872007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
4588
4589 Clean up b4_check_percent_code_qualifiers a little.
4590 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
4591 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
4592 documentation and add examples.
4593 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
4594 qualifiers here.
4595
08af01c2
JD
45962007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
4597
4598 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
4599 unreliable -- especially when they're hidden inside another macro.
4600 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
4601 data/c.m4: Remove m4_divert(-1).
4602 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
4603 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
4604 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 4605 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
4606 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
4607 pushed and popped by m4sugar, should be first on the stack.
4608
4609 Provide warn, complain, and fatal function callbacks to the skeletons.
4610 This provides more flexibility than m4_fatal, improves the error
4611 message format, and captures messages for translation. Discussed
4612 starting at
4613 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
4614 * data/bison.m4 (b4_error): New, invoked by...
4615 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
4616 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
4617 directives. Because these M4 macros might be called when the current
4618 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
4619 the previous removal of uses of m4_divert, which caused trouble.
4620 (b4_check_percent_code_qualifiers): Use b4_complain instead of
4621 m4_fatal to report unrecognized %code qualifiers.
4622 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
4623 push parser requests.
4624 * data/glr.c: Use b4_complain instead of m4_fatal to report
4625 non-deterministic push parser requests.
4626 Update @output usage to @output(...@) form.
4627 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
4628 report missing %defines. Update @output usage to @output(...@) form.
4629 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
4630 @output(...@) form.
4631 * src/main.c (main): Invoke skel_scanner_free.
4632 * src/scan-skel.h (skel_scanner_free): Prototype new function.
4633 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
4634 obstack_for_string from flex-scanner.h.
4635 (YY_DECL): Use to declare skel_lex static.
4636 (decode_at_digraphs): Remove; now handled in the new
4637 SC_AT_DIRECTIVE_ARG start condition.
4638 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
4639 functions.
4640 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
4641 at_directive_argv): New static globals.
4642 (INITIAL): Use fail_for_invalid_at.
4643 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
4644 recognize the start of a generalized `@directive(...@)' form and
4645 start...
4646 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
4647 directive args (using the new obstack_for_string), to decode the
4648 contained @ diagraphs, and to perform the directive. It recognizes
4649 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
4650 @output(...@).
4651 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
4652 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
4653 `@,'.
4654 (scan_skel): Initialize obstack_for_string on the first call.
4655 (skel_scanner_free): New function to free obstack_for_string.
4656 * tests/input.at (Reject bad %code qualifiers): Update test output.
4657
8e0a5e9e
JD
46582007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
4659
4660 Consolidate the 4 prologue alternative directives (%code, %requires,
4661 %provides, and %code-top) into a single %code directive with an
4662 optional qualifier field. Discussed at
4663 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
4664 * NEWS (2.3a+): Rewrite the existing entry for the prologue
4665 alternatives.
4666 * doc/bison.texinfo (Prologue Alternatives): Update.
4667 (Decl Summary): Update to %code "requires" and %code "provides".
4668 (Calc++ Parser): Update to %code "requires".
148d66d8 4669 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
4670 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
4671 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
4672 are replaced by b4_percent_code_provides and b4_percent_code_requires,
4673 which are skeleton-specific.
4674 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
4675 declare what %code qualifiers it supports and to complain if any other
4676 qualifiers were used in the grammar.
4677 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
4678 and b4_user_code([b4_percent_code_provides]) in place of
4679 b4_user_requires and b4_user_provides.
4680 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
4681 Add b4_user_code([b4_percent_code_top]) and
4682 b4_user_code([b4_percent_code]).
4683 Invoke b4_check_percent_code_qualifiers.
4684 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4685 PERCENT_REQUIRES): Remove.
4686 (grammar_declaration): Remove RHS's for %code-top, %provides, and
4687 %requires. Rewrite the %code RHS as the unqualified form defining the
4688 muscle b4_percent_code. Add another RHS for the qualified %code form,
4689 which defines muscles of the form b4_percent_code_QUALIFIER and the
4690 b4_used_percent_code_qualifiers muscle.
4691 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
4692 PERCENT_REQUIRES): Remove.
4693 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
4694 %code "requires" and %code "provides".
4695 * tests/input.at (Reject bad %code qualifiers): New.
4696
95021767
JD
46972007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4698
4699 Use the new code_props interface for destructors and printers.
4700 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
4701 printer_location members, and change the type of the destructor and
4702 printer members to code_props.
4703 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
4704 symbol_printer_get, semantic_type_destructor_set,
4705 semantic_type_printer_set, default_tagged_destructor_set,
4706 default_tagless_destructor_set, default_tagged_printer_set,
4707 default_tagless_printer_set): Use code_props in arguments and return
4708 types in place of char const * and location.
4709 (symbol_destructor_location_get, symbol_printer_location_get): Remove
4710 since the locations are now contained in the return of
4711 symbol_destructor_get and symbol_printer_get.
4712 * src/output.c (symbol_destructors_output, symbol_printers_output):
4713 Replace with...
4714 (symbol_code_props_output): ... this to eliminate duplicate code.
4715 (output_skeleton): Update to use symbol_code_props_output.
4716 * src/reader.c (symbol_should_be_used): Update use of
4717 symbol_destructor_get.
4718 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
4719 Update uses of the various _destructor_set and _printer_set functions.
4720 * src/symtab.c: (default_tagged_destructor_location,
4721 default_tagless_destructor_location, default_tagged_printer_location,
4722 default_tagless_printer_location): Remove since we...
4723 (default_tagged_destructor, default_tagless_destructor,
4724 default_tagged_printer, default_tagless_printer): ... change the type
4725 of these to code_props.
4726 (symbol_new, semantic_type_new, symbol_destructor_set,
4727 semantic_type_destructor_set, symbol_destructor_get,
4728 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
4729 symbol_check_alias_consistency, default_tagged_destructor_set,
4730 default_tagless_destructor_set, default_tagged_printer_set,
4731 default_tagless_printer_set): Update.
4732 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
4733 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
4734 code_props members.
4735 (symbol_print): Use SYMBOL_CODE_PRINT.
4736
f6857bbf
JD
47372007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
4738
4739 Use the new code_props interface for rule actions.
4740 * src/symlist.h (symbol_list): Replace action, action_location, and
4741 used members with a code_props action_props member.
4742 * src/reader.c (symbol_should_be_used, grammar_rule_check,
4743 grammar_midrule_action, grammar_current_rule_merge_set,
4744 grammar_current_rule_symbol_append, packgram): Update.
4745 * src/scan-code.h (translate_rule_action): Remove, no longer used.
4746 * src/scan-code.l (handle_action_dollar): Update.
4747 (translate_rule_action): Remove, no longer used.
4748 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
4749
7c0c6181
JD
47502007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4751
4752 Use the new code_props interface in parse-gram.y.
4753 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
4754 Update all uses of translate_* functions to use the new code_props
4755 interface and to use gram_scanner_last_string_free and
4756 code_scanner_last_string_free where possible.
4757 (grammar_declaration): symbol_list_destructor_set and
4758 symbol_list_printer_set now perform the translation, so don't do it
4759 here. Use gram_scanner_last_string_free where possible.
4760 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
4761 translate_code): Remove, no longer used.
4762 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
4763 symbol_list_printer_set): Perform code translation here rather than
4764 depending on the caller to do so.
4765
4766 * src/symlist.h (struct symbol_list): Correct some documentation typos.
4767 * src/scan-gram.h (gram_last_string): Remove declaration.
4768 * src/scan-gram.l (last_string): Declare it static.
4769
28e52c0d
JD
47702007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4771
4772 Encapsulate code properties and related functionality for the various
4773 destructors, printers, and actions into a code_props structure and
4774 interface. This patch merely implements code_props in scan-code.h and
4775 scan-code.l. Future patches will rewrite other modules to use it.
4776 Discussed starting at
4777 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
4778 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
4779 consistently initialize const structs that have an empty location
4780 field.
4781 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
4782 to ensure consistency.
4783 * src/scan-code.h (code_props): New structure.
4784 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
4785 function, macro, and const global variable for initializing a
4786 code_props with no code.
4787 (code_props_plain_init, code_props_symbol_action_init,
4788 code_props_rule_action_init, code_props_translate_code): The rest of
4789 the new code_props functional interface. Among other things, the init
4790 functions set the code_props kind field so that
4791 code_props_translate_code will know whether to behave like
4792 translate_symbol_action, translate_rule_action, or translate_code.
4793 These old translate functions must remain until all other modules are
4794 updated to use the new code_props interface.
4795 (code_scanner_last_string_free): New function similar to
4796 gram_scanner_last_string_free.
4797 (code_scanner_free): Add documentation.
4798 * src/scan-code.l: Implement the new interface.
4799 (code_lex): Make it static, add a code_props* argument, and remove the
4800 rule argument.
4801 (last_string): New static global similar to the one in scan-gram.l.
4802 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
4803 instead of rule.
4804 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
4805 code_props since Bison may one day use this information for destructors
4806 and printers.
4807 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
4808 (handle_action_dollar): Use symbol_list_n_get and set used flag
4809 directly since symbol_list_n_used_set is removed.
4810 (translate_action): Add a code_props* argument and remove the rule,
4811 action, and location arguments. Pass the code_props* on to code_lex.
4812 (translate_rule_action, translate_symbol_action, translate_code):
4813 Rewrite as wrappers around the new code_props interface.
4814 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
4815 it would eventually need to break the encapsulation of code_props.
4816
96034983
JD
48172007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4818
4819 * etc/.cvsignore: New.
4820
945e396c
JD
48212007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
4822
4823 Add maintainer-push-check to run maintainer-check using push parsing in
4824 place of pull parsing where available.
4825 * Makefile.am (maintainer-push-check): New.
4826 * data/bison.m4 (b4_use_push_for_pull_if): New.
4827 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
4828 appropriately based on their existing values.
4829 (yypush_parse): Don't print push-parser-specific diagnostics if push
4830 parsing is being used in place of pull parsing.
4831 * data/yacc.c: If push parsing should replace pull parsing, redirect to
4832 push.c.
4833 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
4834 variable, and insert b4_use_push_for_pull_flag into muscles.
4835 * tests/Makefile.am (maintainer-push-check): New.
4836
7d596384
JD
48372006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4838
4839 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
4840 (whether successful or failed) so that yypush_parse can be invoked
4841 again to start a new parse using the same yypstate.
4842 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
4843 check multiple yypull_parse invocations on the same yypstate. For pull
4844 mode, extend to check multiple yyparse invocations.
4845 (Exploding the Stack Size with Alloca): Extend to try with
4846 %push-pull-parser.
4847 (Exploding the Stack Size with Malloc): Likewise.
4848
4849 * tests/calc.at (Simple LALR Calculator): Don't specify
4850 %skeleton "push.c" since %push-pull-parser implies that now.
4851 * tests/headers.at (export YYLTYPE): Don't check for the push
4852 declarations. Otherwise, this test case can't be used to see if push
4853 mode can truly emulate pull mode.
4854 * tests/input.at (Torturing the Scanner): Likewise.
4855 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
4856 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
4857 AT_YACC_IF, which now includes the case of push mode since %skeleton
4858 need not be used for push mode. This will be more intuitive once
4859 push.c is renamed to yacc.c.
4860
7172e23e
JD
48612006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
4862
4863 For push mode, convert yyparse from a macro to a function, invoke yylex
4864 instead of passing a yylexp argument to yypull_parse, and don't
4865 generate yypull_parse or yyparse unless %push-pull-parser is declared.
4866 Discussed starting at
4867 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
4868 * data/bison.m4 (b4_pull_if): New.
4869 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
4870 * data/push.c: Improve M4 quoting a little.
4871 (b4_generate_macro_args, b4_parenthesize): Remove.
4872 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
4873 any time a pull parser is requested.
4874 Don't #define this as a wrapper around yypull_parse. Instead, when
4875 both push and pull are requested, make it a function that does that
4876 same thing.
4877 (yypull_parse): If there's a b4_prefix, #define this to
4878 b4_prefix[pull_parse] when both push and pull are requested.
4879 Don't define this as a function unless both push and pull are
4880 requested.
4881 Remove the yylexp argument and hard-code yylex invocation instead.
4882 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
4883 %push-parser.
4884 * src/getargs.c (pull_parser): New global initialized to true.
4885 * getargs.h (pull_parser): extern it.
4886 * src/output.c (prepare): Insert pull_flag muscle.
4887 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
4888 (prologue_declaration): Set both push_parser and pull_parser = true for
4889 %push-pull-parser. Set push_parser = true and pull_parser = false for
4890 %push-parser.
4891 * src/scan-gram.l: Don't accept %push_parser as an alternative to
4892 %push-parser since there's no backward-compatibility concern here.
4893 Scan %push-pull-parser.
4894 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
4895 instead of %push-parser.
4896 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
4897 prototype it in the module that calls yyparse.
4898 * tests/input.at (Torturing the Scanner): Likewise.
4899 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
4900
2e7944cb
JD
49012006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
4902
4903 Update etc/bench.pl. Optimize push mode a little (the yyn change
4904 deserves most of the credit).
4905 * Makefile.am (SUBDIRS): Add etc subdirectory.
4906 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
4907 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
4908 yytoken, yyval, and yyloc declarations to...
4909 (yyparse or yypush_parse): ... here to improve performance. For
4910 yypush_parse invocations after the first, be sure to assign yyn its old
4911 value again.
4912 (yypstate_new): Don't bother initializing the yyresult field since the
4913 initial value isn't used.
4914 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
4915 remove the #define that, in push mode, set it to yyps->NAME.
4916 * etc/Makefile.am: New.
4917 * etc/bench.pl: Remove and build it instead from...
4918 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
4919 "tests/bison" from the build directory by default rather than just
4920 invoking "bison" from $PATH.
4921 (calc_grammar): Update push parser code: don't declare yylval globally,
4922 don't define yyparse_wrapper, and don't #define yyparse.
4923 (bench_grammar): Update to check all working combinations of yacc.c,
4924 push.c, impure, pure, pull, and push.
4925
c3d50342
JD
49262006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4927
4928 For push mode, add pull wrappers around yypush_parse.
4929 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
4930 (yypull_parse): New function wrapping yypush_parse.
4931 (yyparse): New #define wrapping yypull_parse.
4932 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
4933 is declared.
4934 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
4935 prototype yylex in the module that calls yyparse, and don't prototype
4936 yyparse there. Otherwise, the yyparse expansion won't compile.
4937 * tests/input.at (Torturing the Scanner): Likewise.
4938
94ebeba5
JD
49392006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
4940
4941 Enable push parsers to operate in impure mode. Thus, %push-parser no
4942 longer implies %pure-parser. The point of this change is to move
4943 towards being able to test the push parser code by running the entire
4944 test suite as if %push-parser had been declared.
4945 * data/push.c (yypush_parse): For impure mode, remove the
4946 yypushed_char, yypushed_val, and yypushed_loc arguments.
4947 Instead, declare these as local variables initialized to the global
4948 yychar, yylval, and yylloc.
4949 For the first yypush_parse invocation only, restore the initial values
4950 of these global variables when it's time to read a token since they
4951 have been overwritten.
4952 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
4953 %push-parser.
4954 * tests/calc.at (Simple LALR(1) Calculator): Always declare
4955 %pure-parser along with %push-parser since this test case was designed
4956 for pure push parsers.
4957 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
4958 (AT_YACC_OR_PUSH_IF): New.
4959 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
4960 add a note that it's still wrong for some cases (as it has been for a
4961 while).
4962 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
4963 %push-parser no longer implies %pure-parser.
4964
a0633178
JD
49652006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4966
4967 Remove some unnecessary differences between the pull parser code and
4968 the push parser code. This patch enables yynerrs in push mode.
4969 * data/push.c: Reformat M4 a little.
4970 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
4971 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
4972 because push mode is on. Instead, if pure mode is on, move yynerrs
4973 to...
4974 (b4_declare_parser_state_variables): ... here.
4975 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
4976 to yyps->NAME so it can be used in yypush_parse.
4977 (yypush_parse): Don't omit uses of yynerrs in push mode.
4978
8646b6a3
JD
49792006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4980
4981 Fix bug such that the first pushed token's value and location are
4982 sometimes overwritten (sometimes by %initial-action) before being used.
4983 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
4984 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
4985 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
4986 more closely mimic the pull parser logic.
4987 Don't copy the pushed token to yychar, yylval, and yylloc until it's
4988 time to read a token, which is after any initialization of yylval and
4989 yylloc.
4990 (gottoken): Rename label to...
4991 (yyread_pushed_token): ... for clarity and to avoid infringing on the
4992 user namespace.
4993
9baf4d74
JD
49942006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
4995
4996 Rearrange initialization of the parser state variables so that the
4997 skeleton doesn't have to have a copy for pull mode and another for push
4998 mode. This patch also fixes at least a bug such that yylloc was not
4999 initialized (with b4_location_initial_line and
5000 b4_location_initial_column) upon calling yypush_parse. However, that
5001 initialization now overwrites the first token's location;
5002 %initial-action assigning @$ already did the same thing, and both bugs
5003 will be fixed in a later patch.
5004 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
5005 (b4_declare_parser_state_variables): Remove initialization of yytoken,
5006 yyss, yyvs, yyls, and yystacksize.
5007 (yypstate_new): Remove initialization of some yypstate fields: yystate,
5008 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
5009 yylsp.
5010 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
5011 yyps->NAME so it can be used in yypush_parse.
5012 (yyparse or yypush_parse): For yypush_parse, don't print the
5013 "Starting parse" diagnostic for invocations after the first.
5014 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
5015 yypush_parse, only do it for the first invocation.
5016 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
5017 initialization to occur in yypush_parse but only on the first
5018 invocation.
5019
23522164
JD
50202006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5021
5022 * data/push.c: Add CPP guards around push parser declarations in both
5023 the header and the code file.
5024 In the code file, move the push parser declarations to the same place
5025 they appear in the header file.
5026 Clean up the M4 some, especially the inconsistent underquoting in
5027 some b4_c_function_def and b4_c_function_decl uses.
5028
bb010fe5
JD
50292006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5030
5031 Encapsulate the push parser state variables into an M4 macro so the
5032 push skeleton doesn't have to list them again for pull mode's yyparse.
5033 For push mode, remove yypush_parse's local equivalents of these
5034 variables to eliminate unnecessary copying between the two sets at
5035 run-time. This patch also fixes at least a bug related to multiple
5036 %initial-action invocations in push mode.
5037 * data/push.c (b4_declare_parser_variables): Rename to...
5038 (b4_declare_scanner_communication_variables): ... this for clarity and
5039 update both uses.
5040 (b4_declare_yyparse_variables): Remove and move its contents to the one
5041 spot where it was invoked.
5042 (b4_declare_parser_state_variables): New macro containing the parser
5043 state variables required by push mode.
5044 (struct yypstate): Replace all fields but yynew with
5045 b4_declare_parser_state_variables.
5046 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
5047 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
5048 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
5049 (yyparse or yypush_parse): For yyparse in pull mode, replace local
5050 parser state variable declarations with
5051 b4_declare_parser_state_variables.
5052 Don't initialize parser state variables when calling yypush_parse since
5053 yypstate_new already does that.
5054 Invoke the user's initial action only upon the first yypush_parse
5055 invocation.
5056 Remove all code that copies between the local parser state variables
5057 and the yypstate.
5058
2d212f8c
JD
50592006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
5060
5061 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
5062 prevent a name collision in a future patch where these names will
5063 sometimes be #define'd.
5064 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
5065 since it no longer has the same name as the existing argument.
5066 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
5067
e6e704dc
JD
50682006-12-19 Paolo Bonzini <bonzini@gnu.org>
5069 and Joel E. Denny <jdenny@ces.clemson.edu>
5070
5071 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
5072 that the argument is case-insensitive, and there's no `=' here.
5073 For the %skeleton entry, mention that %language is better.
5074 (Bison Options): Likewise for --language and --skeleton. Move the
5075 --skeleton entry so that the `Tuning the parser' section is sorted
5076 alphabetically on long options.
5077 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
5078 %language directive in detail here; cross-reference the %language
5079 documentation instead.
5080 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
5081 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 5082 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
5083 * examples/extexi (normalize): Instead of replacing every %require
5084 argument with the current Bison version, just substitute for
5085 `@value{VERSION}'. This guarantees that we're testing what actually
5086 appears in the documentation.
5087 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
5088 rather than `@VERSION@'.
5089
0e021770
PE
50902006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5091
fd575f05
PE
5092 * NEWS: Reword the %language news a bit, and put it earlier.
5093
0e021770
PE
5094 * src/getargs.c (skeleton_arg): Last arg is now location const *.
5095 Rewrite to simplify the logic.
5096 (language_argmatch): Likewise.
fd575f05
PE
5097 (program_name): We now own this var.
5098 * src/getargs.h (struct bison_language): Use char[] rather than
5099 const char *.
0e021770
PE
5100
5101 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
5102 Java is supported.
5103 * src/complain.c (program_name): Remove decl; no longer needed.
5104 * src/main.c (program_name): Remove; now belongs to getargs.
5105
51062006-12-18 Paolo Bonzini <bonzini@gnu.org>
5107
5108 * NEWS: Document %language.
5109
5110 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
5111
5112 * data/c-skel.m4, data/c++-skel.m4: New files.
5113 * data/glr.c: Complain on push parsers.
5114
5115 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
5116 over %skeleton.
148d66d8 5117 (Decl Summary): Document %language and %skeleton.
0e021770
PE
5118 (Command line): Document -L.
5119
5120 * examples/extexi: Rewrite %require directive.
5121 * examples/calc++/Makefile.am: Pass VERSION to extexi.
5122
5123 * src/files.c (compute_exts_from_gc): Look in language structure
5124 for .y extension.
5125 (compute_file_name_parts): Check whether .tab should be added.
5126 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
5127 (language, skeleton_arg, language_argmatch): New.
5128 (long_options): Add --language.
5129 (getargs): Use skeleton_arg, add -L/--language.
5130 * src/getargs.h: Include location.h.
5131 (struct bison_language, language, skeleton_arg, language_argmatch): New.
5132 * src/output.c (prepare): Pick default skeleton from struct language.
5133 Don't dispatch C skeletons here.
5134 * src/parse-gram.y (PERCENT_LANGUAGE): New.
5135 (prologue_declaration): Add "%language" rule, use skeleton_arg.
5136 * src/scan-gram.l ("%language"): New rule.
5137
5138 * tests/calc.at: Test %skeleton and %language.
5139 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
5140 (AT_GLR_IF): Look for %skeleton "glr.cc".
5141 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
5142 (AT_YACC_IF): Reject %language.
5143
5691bf57
PE
51442006-12-18 Paul Eggert <eggert@cs.ucla.edu>
5145
db06f0ce
PE
5146 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
5147 since it wasn't used; only the typedef name 'semantic_type' is needed.
5148 Also, omit trailing white space.
5149
5691bf57
PE
5150 * bootstrap: Sync from coreutils.
5151 (gnulib_extra_files): Add build-aux/announce.gen.
5152 (slurp): Adjust .gitignore files like .cvsignore files.
5153 * build-aux/announce-gen: Remove from CVS, since bootstrap
5154 now creates this.
5155
791934e4
JD
51562006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
5157
5158 Make %push-parser imply %pure-parser. This fixes several bugs; see
5159 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
5160 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
5161 pure_parser = true.
5162 * data/push.c: Don't bother testing b4_push_if when deciding whether
5163 to expand b4_declare_parser_variables globally.
5164 (yypush_parse): Likewise in here.
5165
5166 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
5167 (yy_reduce_print): Reformat M4 for readability.
5168
ee5abb37
JD
51692006-12-15 Bob Rossi <bob@brasko.net>
5170 and Joel Denny <jdenny@ces.clemson.edu>
5171
5172 * data/push.c (yypstate): Add typedef, and update all uses of
5173 struct yypstate to just yypstate.
5174 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
5175
16ca01f9
JD
51762006-12-14 Bob Rossi <bob@brasko.net>
5177
5178 * data/push.c (yypush_parse): Declare prototype regardless of
5179 %locations option.
5180
ab8e7e1a
JD
51812006-12-14 Bob Rossi <bob@brasko.net>
5182
5183 * data/push.c (yyparse): Remove the prototype and the #define when in
5184 push-parser mode.
5185
9bf32be3
JD
51862006-12-13 Bob Rossi <bob@brasko.net>
5187
5188 * data/push.c (yypstate_init): Rename to...
5189 (yypstate_new): ... this and use b4_c_function_def.
5190 (yypstate_delete): New.
5191 (yypush_parse): Change parameters yynval and yynlloc to be const.
5192 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
5193 yypstate_delete functions.
5194
f02e2948
JD
51952006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
5196
5197 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
5198 strange test case titles. Reported by Bob Rossi.
5199
38eb7751
PE
52002006-12-13 Paul Eggert <eggert@cs.ucla.edu>
5201
5202 * TODO: Add pointer to Sylvain Schmitz's work on static detection
5203 of potential ambiguities in GLR grammers.
5204
bd9d212b
JD
52052006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
5206
5207 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
5208 `bison ', use m4_index instead of m4_substr since chopping up a string
5209 containing M4-special characters causes problems here.
5210
5211 Fix a couple of bugs related to special characters in user-specified
5212 file names, and make it easier for skeletons to compute output file
5213 names with the same file name prefix as Bison-computed output file
5214 names.
5215 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
5216 b4_parser_file_name and b4_spec_defines_file instead of
5217 @output_parser_name@ and @output_header_name@, which are now redundant.
5218 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
5219 b4_parser_file_name, b4_spec_defines_file, and the new
5220 @basename(FILENAME@) instead of @output_parser_name@ and
5221 @output_header_name@, which inappropriately escaped the file names as
5222 C string literals.
5223 * src/files.c (all_but_ext): Remove static qualifier.
5224 (compute_output_file_names): Move `free (all_but_ext)' to...
5225 (output_file_names_free): ... here since all_but_ext is needed later.
5226 * src/files.h (all_but_ext): Extern.
5227 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
5228 exactly what MUSCLE_INSERT_STRING used to do.
5229 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
5230 characters are escaped properly.
5231 * src/output.c (prepare): Define muscle file_name_all_but_ext as
5232 all_but_ext.
5233 For pkgdatadir muscle, maintain previous functionality by using
5234 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
5235 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
5236 digraphs would never be expanded. Hopefully no one has M4-special
5237 characters in his Bison installation path.
5238 * src/scan-skel.l: Don't parse @output_header_name@ and
5239 @output_parser_name@ anymore since they're now redundant.
5240 In @output, use decode_at_digraphs.
5241 Parse a new @basename command that invokes last_component.
5242 (decode_at_digraphs): New.
5243 (BASE_QPUTS): Remove unused.
5244 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
5245 (Output file name): New tests.
5246
3f7ca628
JD
52472006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
5248
5249 Warn about output files that are generated by the skeletons and that
5250 conflict with other output files.
5251 * data/glr.c: Don't generate the header file here when glr.cc does.
5252 * src/files.c (file_names, file_names_count): New static globals.
5253 (compute_output_file_names): Invoke output_file_name_check for files
5254 not generated by the skeletons and remove existing checks.
5255 (output_file_name_check): New function that warns about conflicting
5256 output file names.
5257 (output_file_names_free): Free file_names.
5258 * src/files.h (output_file_name_check): Declare.
5259 * src/scan-skel.l: Invoke output_file_name_check for files generated by
5260 the skeletons.
5261 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
5262 (Conflicting output files): New tests.
5263
178e123e
PE
52642006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5265
5266 * doc/bison.texinfo: Fix a couple of typos.
5267
52682006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
5269
5270 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
5271 Rename to...
5272 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
5273 update all uses.
5274 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
5275 (yypush_parse): Rename yypvars argument to yyps and remove redundant
5276 local pv.
5277 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
5278 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
5279
ea17f233
JD
52802006-12-07 Bob Rossi <bob@brasko.net>
5281 and Joel Denny <jdenny@ces.clemson.edu>
5282
5283 * data/push.c (yypvarsinit): Change return type from void* to struct
5284 yypvars*. No longer cast to void* on return.
5285 (struct yypvars): Remove yylen since it need not be remembered between
5286 yypushparse invocations.
5287 (yypushparse): Don't copy between yylen and pv->yylen.
5288
55a30bda
JD
52892006-12-05 Bob Rossi <bob@brasko.net>
5290
5291 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
5292 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
5293 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
5294 (struct yypvars): Remove b4_declare_parser_variables.
5295 (yypvarsinit): Remove init code for removed variables.
5296 (global scope): Do not declare b4_declare_parser_variables if
5297 push or pure mode.
5298 (yypushparse): Add b4_declare_parser_variables.
5299 Init new local variables, and remove init code for removed
5300 yypvars variables.
5301 (yyparse): Delete.
5302 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
5303 and yyparse for other modes.
5304 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
5305 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
5306 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
5307 (AT_PURE_LEX_IF): True if pure or push parser.
5308
85894313
JD
53092006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
5310
5311 Document Yacc prologue alternatives and default %destructor's and
5312 %printer's as experimental. Don't mention Java yet. Discussed at
5313 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
5314 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
5315 (2.3a): Annotate this entry to say the old forms of these features were
5316 also experimental.
5317 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 5318 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
5319 of Java (we'll want this back eventually).
5320
02975b9a
JD
53212006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5322
5323 Support a file name argument to %defines. Deprecate `=' in
5324 %file-prefix, %name-prefix, and %output. Discussed at
5325 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
5326 * NEWS (2.3a+): Mention.
148d66d8 5327 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
5328 form of %defines, and remove `=' from entries for %file-prefix,
5329 %name-prefix, and %output.
5330 * src/parse-gram.y (prologue_declaration): Implement.
5331 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
5332 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
5333 all but one occurrence of %name-prefix.
5334 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
5335 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
5336 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
5337 occurrence of each of %file-prefix and %output. Add check for %defines
5338 with argument.
5339 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
5340 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
5341 Remove the `=' from %output.
5342
287b314e
JD
53432006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
5344
5345 Don't escape $ in test case titles since Autoconf 2.61 now does that
5346 correctly.
5347 * tests/actions.at (Default %printer and %destructor are not for error
5348 or $undefined): Here.
5349 (Default %printer and %destructor are not for $accept): Here.
5350 * tests/input.at (Invalid $n and @n): Here.
5351
3ebecc24
JD
53522006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
5353
5354 Rename <!> to <>. Discussed starting at
5355 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
5356 * NEWS (2.3a+): Update.
148d66d8 5357 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
5358 Update.
5359 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
5360 * src/scan-gram.l (INITIAL): Implement.
5361 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
5362 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
5363 comment.
5364 * tests/actions.at (Default tagless %printer and %destructor,
5365 Default tagged and per-type %printer and %destructor,
5366 Default %printer and %destructor are not for error or $undefined,
5367 Default %printer and %destructor are not for $accept,
5368 Default %printer and %destructor for mid-rule values): Update.
5369 * tests/input.at (Default %printer and %destructor redeclared,
5370 Unused values with default %destructor): Update.
5371
26b8a438
JD
53722006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
5373
5374 Don't let %prec take a nonterminal.
5375 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
5376 token.
5377 * tests/input.at (%prec takes a token): New test checking that %prec
5378 won't take a nonterminal.
5379
07c39ae9
JD
53802006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5381
405d53b7
JD
5382 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
5383 it was double-quoted.
07c39ae9
JD
5384 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
5385 grammar is maintained with Bison's highest standards.
5386 * src/getargs.c: Fix some typos in Doxygen comments.
5387
580b8926
JD
53882006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5389
5390 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
5391 later. Reported by Paul Eggert in
5392 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
5393 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
5394 * src/scan-code.l (translate_action): Don't bother invoking
5395 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
5396 (code_scanner_free): Instead of invoking
5397 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
5398 which frees more.
5399 * src/scan-gram.l (gram_scanner_free): Likewise.
5400 * src/scan-skel.l (scan_skel): Likewise.
5401
4502eadc
JD
54022006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5403
5404 * src/files.c (tr): Change return type to void.
5405 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
5406 has been called previously for the same key.
5407 (muscle_find): Return storage instead of value so that
5408 --enable-gcc-warnings doesn't produce warnings that the return discards
5409 const. aver that the value and storage are the same since storage
5410 could potentially be NULL when value is not.
5411 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
5412 same as 0.
5413
7746c8f6
PE
54142006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5415
5416 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
5417 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
5418 us a slightly cleaner distribution, and also works.
5419 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
5420 gnulib changes.
5421
eb095650
PE
54222006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
5423 and Paul Eggert <eggert@cs.ucla.edu>
5424
5425 Don't let Bison leak memory except when it complains.
5426 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
5427 (spec_defines_file, dir_prefix): Now char *, not const char *,
5428 since they are freed.
5429 * src/files.c: Likewise.
5430 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
5431 Likewise.
5432 (tr): Now operates in-place. All uses changed.
5433 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
5434 values.
5435 (compute_file_name_parts, compute_output_file_names): Don't store
5436 read-only data in variables that will be freed.
5437 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
5438 src_extension, and header_extension.
5439 (output_file_names_free): New public function to free
5440 spec_verbose_file, spec_graph_file, spec_defines_file,
5441 parser_file_name, and dir_prefix.
5442 * src/getargs.c (getargs): Don't store read-only data in variables that
5443 will be freed.
5444 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
5445 (which previously existed but was unused), and quotearg_free.
5446 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
5447 * src/muscle_tab.c: Likewise.
5448 (muscle_entry): Make the value char const *,
5449 and add a new storage member that is char * and can be freed.
5450 (muscle_entry_free): New private function.
5451 (muscle_init): Use it instead of free.
5452 (muscle_insert, muscle_grow): Update and use new storage member.
5453 (muscle_code_grow): Free the string passed to muscle_grow
5454 since it's not needed anymore.
5455 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
5456 add a new `char *code' member.
5457 ("{...}"): Declare semantic type as code.
5458 * src/scan-code.h (translate_rule_action):
5459 (translate_symbol_action, translate_code, translate_action): Return
5460 `char const *' rather than `char *' since external code should not free
5461 these strings.
5462 * src/scan-code.l: Likewise.
5463 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
5464 which is "{...}" in the parser.
5465 * tests/Makefile.am (maintainer-check-valgrind): Set
5466 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
5467 Valgrind.
5468 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
5469 complain.
5470 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
5471 expecting a non-zero exit status sets --leak-check=summary and
5472 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
5473 this case, and we don't want to hear about it.
5474
ac564be4
PE
54752006-11-08 Paul Eggert <eggert@cs.ucla.edu>
5476
5477 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
5478 instead of from the template, to simplify configuration a bit.
5479 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
5480 and m4/wint_t.m4, as they are needed with the latest gnulib.
5481
17bd8a73
JD
54822006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5483
5484 Disable unset/unused mid-rule value warnings by default, and recognize
5485 --warnings=midrule-values to enable them. Discussed starting at
5486 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
5487 * NEWS (2.3a+): Mention.
5488 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
5489 warnings): Add entry for midrule-values subargument.
5490 * src/reader.c (symbol_should_be_used): Don't return true just because
5491 the value is a set/used mid-rule value unless
5492 --warnings=midrule-values was specified.
5493 * tests/input.at (Unused values, Unused values before symbol
5494 declarations): Run tests with and without --warnings=midrule-values.
5495
5496 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
5497 than LIST_FREE directly.
5498
89eb3c76
JD
54992006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5500
5501 Finish implementing --warnings=error, which should not be implied by
5502 --warnings=all (or by its synonyms -W and --warnings without
5503 subarguments).
5504 * src/complain.c (set_warning_issued): New function to report that
5505 warnings are being treated as errors and to record an error if so.
5506 Invoke...
5507 (warn_at, warn): ... here.
5508 * src/getargs.c (warnings_args, warnings_types): Reorder so that
5509 "error - warnings are errors" does not appear above "all - all of the
5510 above".
5511 (getargs): For -W and --warnings without subarguments, don't let
5512 FLAGS_ARGMATCH set warnings_error in warnings_flag.
5513 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
5514
ba7560e2
JD
55152006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
5516
5517 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
5518 empty subargument list. For example: `bison --warnings= parser.y'.
5519
31283fc3
JD
55202006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5521
5522 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
5523 the parser header file so that gcc doesn't warn.
5524
12e35840
JD
55252006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5526
5527 Split the default %destructor/%printer into two kinds: <*> and <!>.
5528 Discussed starting at
5529 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
5530 * NEWS (2.3a+): Mention.
5531 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
5532 previous change today related to mid-rules.
148d66d8 5533 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 5534 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
5535 (TYPE_TAG_ANY): Add as <*>.
5536 (TYPE_TAG_NONE): Add as <!>.
5537 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
5538 for <*> and <!>.
5539 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
5540 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
5541 * src/symlist.c (symbol_list_default_new): Split into tagged and
5542 tagless versions.
5543 (symbol_list_destructor_set, symbol_list_printer_set): Split
5544 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
5545 SYMLIST_DEFAULT_TAGLESS.
5546 * src/symlist.h: Update symbol_list_default*_new prototypes.
5547 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
5548 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
5549 * src/symtab.c (default_destructor, default_destructor_location,
5550 default_printer, default_printer_location): Split each into tagged and
5551 tagless versions.
5552 (symbol_destructor_get, symbol_destructor_location_get,
5553 symbol_printer_get, symbol_printer_location_get): Implement tagged
5554 default and tagless default cases.
5555 (default_destructor_set, default_printer_set): Split each into tagged
5556 and tagless versions.
5557 * src/symtab.h: Update prototypes.
5558 * tests/actions.at (Default %printer and %destructor): Rename to...
5559 (Default tagless %printer and %destructor): ... this, and extend.
5560 (Per-type %printer and %destructor): Rename to...
5561 (Default tagged and per-type %printer and %destructor): ... this, and
5562 extend.
5563 (Default %printer and %destructor for user-defined end token): Extend.
5564 (Default %printer and %destructor are not for error or $undefined):
5565 Update.
5566 (Default %printer and %destructor are not for $accept): Update.
5567 (Default %printer and %destructor for mid-rule values): Extend.
5568 * tests/input.at (Default %printer and %destructor redeclared): Extend.
5569 (Unused values with default %destructor): Extend.
5570
f91b1629
JD
55712006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5572
5573 Don't apply the default %destructor/%printer to an unreferenced midrule
5574 value. Mentioned at
5575 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
5576 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
5577 like $@n instead of just @n so that the default %destructor/%printer
5578 logic doesn't see them as user-defined symbols.
5579 (symbol_is_dummy): Check for both forms of the name.
5580 * src/reader.c (packgram): Remove the `$' from each midrule symbol
5581 name for which the midrule value is referenced in any action.
5582 * tests/actions.at (Default %printer and %destructor for mid-rule
5583 values): New test.
5584 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
5585 for change to dummy symbol names.
5586
519d0004
JD
55872006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5588
5589 Warn about unset midrule $$ if the corresponding $n is used.
5590 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
5591 $n usage.
5592 (packgram): Before invoking grammar_rule_check on any rule, make sure
5593 all actions have already been scanned in order to set `used' flags.
5594 Otherwise, checking that a midrule's $$ is set will not always work
5595 properly because the midrule check must forward-reference the midrule's
5596 parent rule.
5597 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
5598 warning.
5599
a501eca9
JD
56002006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
5601
5602 More improvements to the documentation of the prologue alternatives:
5603 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
5604 Bison manual.
5605 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
5606 some text to clarify the relative importance of the new directives and
5607 to show how these directives may be viewed as code labels.
5608
2cbe6b7f
JD
56092006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
5610
5611 Similar to the recently removed %before-header, add %code-top as the
5612 alternative to the pre-prologue. Mentioned at
5613 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
5614 Also, let the prologue alternatives appear in the grammar section.
5615 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
5616 (prologue_declaration): Move the existing prologue alternatives to...
5617 (grammar_declaration): ... here and add %code-top.
5618 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
5619
5620 Clean up and extend documentation for the prologue alternatives.
5621 * NEWS (2.3a+): Describe prologue alternatives.
5622 * doc/bison.texinfo (Prologue): Move discussion of prologue
5623 alternatives to...
5624 (Prologue Alternatives): ... this new section, and extend it to discuss
5625 all 4 directives in detail.
148d66d8
JD
5626 (Table of Symbols): Clean up discussion of prologue alternatives and
5627 add %code-top.
2cbe6b7f 5628
e557d3ea
JMG
56292006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5630
5631 DJGPP specific issues.
5632
5633 * djgpp/config.bat: config.hin has been moved to lib. Adjust
5634 config.bat accordingly.
5635 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
5636 * djgpp/config.site: Likewise.
5637
136a0f76
PB
56382006-10-16 Paolo Bonzini <bonzini@gnu.org>
5639
27bd5d67
PB
5640 Replace %*-header with %provides, %requires, %code. See discussion at
5641 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
5642
136a0f76
PB
5643 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
5644 (b4_user_start_header): Remove.
5645 * data/glr.c: Use new macros instead of b4_*start_header
5646 and b4_*end_header.
5647 * data/glr.cc: Likewise.
5648 * data/lalr1.cc: Likewise.
5649 * data/push.c: Likewise.
5650 * data/yacc.c: Likewise.
5651
5652 * doc/bison.texinfo: Remove %before-header, rename
5653 %{start,end,after}-header to %requires, %provides, %code.
5654
5655 * src/parse-gram.y: Likewise (also rename token names accordingly).
5656 * src/scan-gram.l: Likewise.
5657 * tests/actions.at: Likewise.
5658
10f429ef
PE
56592006-10-14 Paul Eggert <eggert@cs.ucla.edu>
5660
5661 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
5662 Problem reported by Joel E. Denny.
5663
56642006-10-14 Jim Meyering <jim@meyering.net>
5665
5666 (Sync from coreutils.)
5667 Work also when the working directory (with e.g. coreutils sources)
5668 is version controlled with git, rather than CVS.
5669 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
5670 rather than CVS.
5671 In messages and comments, say e.g., "checked-out sources",
5672 rather than "CVS sources".
5673 (version_controlled_file): New function. Work for git as well as
5674 for CVS. Don't use grep's -q option.
5675 (slurp): Call it here, in place of CVS-specific code.
5676
c4bd5bf7
JD
56772006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
5678
5679 Fix testsuite for ./configure --enable-gcc-warnings:
5680 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
5681 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
5682 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
5683 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
5684 * test/regression.at (Diagnostic that expects two alternatives):
5685 Likewise.
5686
46356ea4
PE
56872006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5688
231ed89a
PE
5689 * bootstrap.conf (gnulib_modules): Add config-h.
5690 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
5691 worry about HAVE_CONFIG_H.
5692 * lib/abitset.c: Likewise.
5693 * lib/bitset.c: Likewise.
5694 * lib/bitset_stats.c: Likewise.
5695 * lib/bitsetv-print.c: Likewise.
5696 * lib/bitsetv.c: Likewise.
5697 * lib/ebitset.c: Likewise.
5698 * lib/get-errno.c: Likewise.
5699 * lib/lbitset.c: Likewise.
5700 * lib/subpipe.c: Likewise.
5701 * lib/timevar.c: Likewise.
5702 * lib/vbitset.c: Likewise.
5703 * lib/bitset.c: Include "bitset.h" first, to test interface.
5704 * lib/bitset_stats.c: Include "bitset_stats.h" first.
5705 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
5706 * lib/bitsetv.c: Include "bitsetv.h" first.
5707 * lib/get-errno.c: Include "get-errno.h" first.
5708 * m4/.cvsignore: Add config-h.m4.
5709 * tests/actions.at (Default %printer and %destructor for ...):
5710 Adjust expected line numbers in output to reflect removal of #if
5711 HAVE_CONFIG_H lines.
5712 * tests/glr-regression.at (Missed %merge type warnings when ...):
5713 Likewise.
5714 * tests/regression.at (Braced code in declaration in rules section):
5715 Likewise.
5716 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
5717 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
5718 Include <config.h> unconditionally.
5719
46356ea4
PE
5720 * bootstrap: Sync from coreutils, as follows:
5721
5722 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5723
5724 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
5725 variable was sometimes used without being initialized. This
5726 messed up the installation of the INSTALL file in some cases.
5727
5728 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5729
5730 * bootstrap (usage, main program, symlink_to_gnulib): Add option
5731 --copy. Inspired by a suggestion from Bruno Haible.
5732
5733 2006-10-03 Jim Meyering <jim@meyering.net>
5734
5735 * bootstrap: Undo last change to this file, since now gnulib-tool
5736 sticks with the automake default in generating dependencies.
5737
dd4bf078
PE
57382006-10-12 Paul Eggert <eggert@cs.ucla.edu>
5739
cf2a5f7c
PE
5740 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
5741 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
5742
5743 * doc/bison.1: Add copyright notice.
5744
5745 * data/glr.c: Don't include <stdarg.h>; not used.
5746
35fe0834
PE
5747 * NEWS: The -g and --graph options now output graphs in Graphviz
5748 DOT format, not VCG format.
5749 * doc/bison.1: Likewise.
5750 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
5751 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
5752 of this change in
5753 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
5754 * TODO: Remove Graphviz entry.
5755 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
5756 remove vcg.c, vcg.h, vcg_defaults.h.
5757 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
5758 * src/graphviz.c, src/graphviz.h: New files.
5759 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
5760 * src/files.h: Make comment more generic.
5761 * src/main.c (main): Likewise.
5762 * src/print_graph.h: Likewise.
5763 * src/getargs.c (usage): Make usage description more generic.
5764 * src/print_graph.c: Include graphviz.h rather than vcg.h.
5765 (static_graph, fgraph): Remove. All uses changed to pass
5766 arguments instead of sharing a static var.
5767 (print_core, print_actions, print_state, print_graph):
5768 Output graphviz format rather than VCG format.
5769 * tests/.cvsignore: Remove *.vcg; add *.dot.
5770 * tests/output.at: Expect *.dot files, not *.vcg files.
5771
dd4bf078
PE
5772 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
5773 accommodates the 2006-10-08 change.
5774
efdd7421
PE
57752006-10-11 Bob Rossi <bob@brasko.net>
5776
5777 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
5778 (b4_yyssa, b4_yyerror_range): New macros.
5779 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
5780 (yypvarsinit): Remove init of removed fields.
5781 (yypushparse): Remove use of removed fields; use new macros instead.
5782
96a1981a
PE
57832006-10-11 Paul Eggert <eggert@cs.ucla.edu>
5784
5785 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
5786 in a push parser. Reindent slightly to match yacc.c better.
5787
57882006-10-11 Bob Rossi <bob@brasko.net>
5789
46356ea4
PE
5790 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
5791 yymsg_alloc fields.
5792 (yypvarsinit, yypushparse): Remove init of removed fields.
5793 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 5794
c1630a8b
PE
57952006-10-09 Paul Eggert <eggert@cs.ucla.edu>
5796
5797 * THANKS: Add Paolo Bonzini and Bob Rossi.
5798
90b9908d
PB
57992006-10-08 Paolo Bonzini <bonzini@gnu.org>
5800
5801 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
5802 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
5803 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
5804 b4_define_user_cde and uses): Remove.
5805 (b4_comment, b4_prefix, b4_sync_start): New.
5806 * data/bison.m4: New file, with most of the content removed from c.m4.
5807 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
5808 * src/output.c (output_skeleton): Pass bison.m4.
5809 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
5810 only if specified.
5811
cf806753
PE
58122006-10-05 Paul Eggert <eggert@cs.ucla.edu>
5813
5814 Fix test failure reported by Tom Lane in
5815 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
5816 and try to make such failures easier to catch in the future.
5817 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
5818 that's now the caller's responsibility.
5819 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
5820 Set yychar = YYEOF if it's negative.
5821 * tests/actions.at (yylex): Abort if asked to read past EOF.
5822 * tests/conflicts.at (yylex): Likewise.
5823 * tests/cxx-type.at (yylex): Likewise.
5824 * tests/glr-regression.at (yylex): Likewise.
5825 * tests/input.at (yylex): Likewise.
5826 * tests/regression.at (yylex): Likewise.
5827 * tests/torture.at (yylex): Likewise.
5828
0e2f006a
PE
58292006-10-01 Paul Eggert <eggert@cs.ucla.edu>
5830
5831 Fix problems with translating English-language diagnostics.
5832 * bootstrap: Fix bug introduced in recent bootstrap changes, with
5833 respect to bison-runtime pot generation. The YY_ stuff
5834 wasn't being captured.
5835 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
5836 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
5837 * runtime-po/POTFILES.in: Add data/push.c.
5838
e3ddc1e3
PE
58392006-09-29 Paul Eggert <eggert@cs.ucla.edu>
5840
5841 Merge bootstrap changes from coreutils.
5842
5843 2006-09-28 Jim Meyering <jim@meyering.net>
5844
5845 Automatically generated dependencies are important even
5846 when all of the sources in a directory come from gnulib.
5847 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
5848 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
5849
5850 2006-09-23 Jim Meyering <jim@meyering.net>
5851
5852 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
5853
5854 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5855
5856 * bootstrap: Add support for --force.
5857 (usage): New function. Describe usage less tersely.
5858 (CVS_only_file): New var.
5859
01e972b3
PE
58602006-09-21 Paul Eggert <eggert@cs.ucla.edu>
5861
5862 * data/push.c (YYPUSH_MORE): Make it an enum instead.
5863 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
5864 Adjust white space and comments to match GNU style better.
5865
c63d3e90
PE
58662006-09-20 Bob Rossi <bob@brasko.net>
5867
5868 * data/push.c (yyresult_get): Remove function.
5869 (YYPUSH_MORE): Add #define.
5870 (yypushparse): Modify return value.
5871
e70f46d1
PE
58722006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5873
5874 * stamp-h.in: Remove; no longer needed.
5875 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
5876 Remove config.h, config.hin, intl (no longer created).
5877 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
5878 stamp-h1.
5879
5880 Sync bootstrap from coreutils, as follows:
5881
5882 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
5883
5884 * bootstrap (symlink_to_gnulib): New function.
5885 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
5886 to copies-of-gnulib.
5887 (cp_mark_as_generated, slurp, gnulib_files):
5888 Avoid making a copy if it's the same as the old version.
5889 (gnulib_files): Add support for this variable (used by Bison).
5890
a92be413
PE
58912006-09-20 Paul Eggert <eggert@cs.ucla.edu>
5892
5893 * src/getargs.c (usage): Rework to use conventions similar to
5894 coreutils, to make translation a bit easier and the code a bit
5895 smaller. Problem reported by Tim Van Holder.
5896
4f82b42a
PE
58972006-09-15 Paul Eggert <eggert@cs.ucla.edu>
5898
3b2942e6
PE
5899 Use some of gnulib's new modules, taken from coreutils.
5900
5901 * bootstrap: Sync from coreutils, except add support for gnulib_files.
5902 * bootstrap.conf: New file.
5903 (gnulib_modules): Add configmake, inttypes, unistd.
5904 (XGETTEXT_OPTIONS): Add complain, complain_at,
5905 fatal, fatal_at, warn, warn_at, unexpected_end.
5906 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
5907 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
5908 (gl_EARLY): Add.
5909 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
5910 (gl_INIT): Add
5911 (GNULIB_AUTOCONF_SNIPPET): Remove.
5912 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
5913 the pickiest.
5914 * lib/.cvsignore: Add inttypes_.h.
5915 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
5916 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
5917 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
5918 no-longer-necessary initializations.
5919 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
5920 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
5921 use the unistd module.
5922 * src/system.h: Likewise.
5923 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
5924 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
5925 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
5926 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
5927 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
5928 * src/system.h: Include inttypes.h unconditionally, now that we
5929 use the inttypes module. Don't bother to include stdint.h, since
5930 inttypes.h now does that for us.
5931 (LOCALEDIR): Remove, now that we use the configmake module.
5932 * src/getargs.c: Include configmake.h.
5933 * src/main.c: Likewise.
5934 * src/output.c: Likewise.
5935 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
5936 not from $abs_top_builddir, since config.h moved.
5937
5938
4f82b42a
PE
5939 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
5940 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
5941
5942 * src/parse-gram.y (symbol_declaration): Don't put statements
5943 before declarations; it's not portable to C89.
5944 * src/scan-code.l (handle_action_at): Likewise.
5945
5946 * src/scan-code.l: Always initialize braces_level; the old code
5947 left it uninitialized and therefore had undefined behavior.
5948
5949 Don't attempt to redefine 'assert', since it runs afoul of
5950 systems where standard headers (mistakenly) include <assert.h>.
5951 Instead, define and use our own alternative, called 'aver'.
5952 * src/reader.c: Don't include assert.h, since we no longer
5953 use assert.
5954 * src/scan-code.l: Likewise.
5955 * src/system.h (assert): Remove, replacing with....
5956 (aver): New function, taking a bool arg. All uses changed.
5957 * src/tables.c (pack_vector): Ensure that aver arg is bool,
5958 not merely an integer.
5959
31c10e38
PE
59602006-09-15 Bob Rossi <bob@brasko.net>
5961
5962 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
5963 * data/c.m4 (YYPUSH): New.
5964 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
5965 * src/getargs.c (push_parser): New var.
5966 * src/getargs.h (push_parser): New declaration.
5967 * src/output.c (prepare): Add macro insertion of `push_flag'.
5968 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
5969 (prologue_declaration): Parse %push-parser.
5970 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
5971 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
5972 list of removed lines from the traces observed.
5973 (AT_CHECK_CALC_LALR): Added push parser tests.
5974
fa7b79c0
PE
59752006-09-13 Paul Eggert <eggert@cs.ucla.edu>
5976
21fe08ca
PE
5977 * NEWS: Version 2.3a.
5978 * configure.ac (AC_INIT): Likewise.
5979
e8ec4d9b
PE
5980 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
5981 "#define YYSTYPE int" that caused "make maintainer-check" to fail
5982 due to header ordering dependencies. I don't know why the #define
5983 was there.
5984
fa7b79c0
PE
5985 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
5986 runtime cost when YYDEBUG is not defined, and so that some tests
5987 that used to fail now work. Problem and initial suggestion by
5988 Paolo Bonzini.
5989 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
5990 * data/glr.cc (b4_parser_class_name):
5991 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
5992 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
5993 (yydebug_) [YYDEBUG]: New member.
5994 (yycdebug_): Now defined only if YYDEBUG.
5995 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
5996 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
5997 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
5998 if YYYDEBUG.
5999 (debug_stream, set_debug_stream, debug_level, set_debug_level):
6000 Define only if YYDEBUG.
6001 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
6002 set_debug_level.
6003 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
6004 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
6005 AT_CHECK_CALC_GLR_CC that are working now.
6006
4ec13d60
PE
60072006-09-12 Paul Eggert <eggert@cs.ucla.edu>
6008
6009 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
6010 We don't need them in glr.cc, and glr.c defines them.
6011 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
6012 assumes that defining it to anything is the same as defining
6013 it to 1. Problem reported by Paolo Bonzini.
6014
8e1687ae
PE
60152006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
6016
6017 * data/c.m4 (b4_null, b4_case): Define.
6018 * src/output.c (prepare_symbols): Use b4_null.
6019 (user_actions_output): Use b4_case.
6020
3dc5e96b
PE
60212006-09-11 Paul Eggert <eggert@cs.ucla.edu>
6022
aef3da86
PE
6023 * data/glr.c (b4_shared_declarations): Put start-header first,
6024 before any #includes that we generate, so that feature-test
6025 macros work. Problem reported by Michael Deutschmann in
6026 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
6027 * data/lalr1.cc: Likewise.
6028 * doc/bison.texinfo (Prologue): Document that feature-test macros
6029 should be defined before any Bison declarations.
6030 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
6031 that depend on location.hh after, not before, Bison decls, since
6032 we now include location.hh after the first user prologue.
6033
3dc5e96b
PE
6034 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
6035 Sander Brandenburg in
6036 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
6037 Also, fix minor white space and comment issues.
aef3da86
PE
6038 (Prologue): Mention that it's better to define feature-test macros
6039 before Bison declarations. Problem reported by Michael Deutschmann.
6040
6041 * README-cvs: Fix typo: "&" should be "&&". Problem reported
6042 by Jim Meyering.
6043 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
6044 This adjusts to recent gnulib changes.
3dc5e96b 6045
b2a0b7ca
JD
60462006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6047
6048 Finish implementation of per-type %destructor/%printer. Discussed
6049 starting at
6050 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
6051 and
6052 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
6053 * NEWS (2.3+): Add a description of this feature to the default
6054 %destructor/%printer description.
6055 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
6056 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6057 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
6058 list node contains a semantic type.
6059 * src/symtab.c, src/symtab.h: Extend with a table that associates
6060 semantic types with their %destructor's and %printer's.
6061 (semantic_type_from_uniqstr, semantic_type_get,
6062 semantic_type_destructor_set, semantic_type_printer_set): New functions
6063 composing the public interface of that table.
6064 (symbol_destructor_get, symbol_destructor_location_get,
6065 symbol_printer_get, symbol_printer_location_get): If there's no
6066 per-symbol %destructor/%printer, look up the per-type before trying
6067 the default.
6068 * tests/actions.at (Per-type %printer and %destructor): New test case.
6069 * tests/input.at (Default %printer and %destructor redeclared):
6070 Extend to check that multiple occurrences of %symbol-default in a
6071 single %destructor/%printer declaration is an error.
6072 (Per-type %printer and %destructor redeclared, Unused values with
6073 per-type %destructor): New test cases.
6074
3be03b13
JD
60752006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
6076
6077 Require default %destructor/%printer to be declared using
6078 %symbol-default instead of an empty symbol list, and start working on
6079 new per-type %destructor/%printer. Discussed at
6080 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
6081 * NEWS (2.3+): Add %symbol-default to example.
6082 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 6083 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
6084 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
6085 (generic_symlist, generic_symlist_item): New nonterminals for creating
6086 a list in which each item is a symbol, semantic type, or
6087 %symbol-default.
6088 (grammar_declaration): Use generic_symlist in %destructor and %printer
6089 declarations instead of symbols.1 or an empty list.
6090 (symbol_declaration, precedence_declaration, symbols.1): Update actions
6091 for changes to symbol_list.
6092 * src/reader.c: Update for changes to symbol_list.
6093 * src/scan-code.l: Likewise.
6094 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
6095 * src/symlist.c, src/symlist.h: Extend such that a list node may
6096 represent a semantic type or a %symbol-default in addition to just an
6097 ordinary symbol. Add switched functions for setting %destructor's and
6098 %printer's.
6099 * tests/actions.at, tests/input.at: Add %symbol-default to all default
6100 %destructor/%printer declarations.
6101
3508ce36
JD
61022006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
6103
6104 Whether the default %destructor/%printer applies to a particular symbol
6105 isn't a question of whether the user *declares* that symbol (in %token,
6106 for example). It's a question of whether the user by any means
6107 *defines* the symbol at all (by simply using a char token, for
6108 example). $end is defined by Bison whereas any other token with token
6109 number 0 is defined by the user. The error token is always defined by
6110 Bison regardless of whether the user declares it with %token, but we
6111 may one day let the user define error as a nonterminal instead.
6112 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
6113 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
6114 the meaning of "user-defined".
6115 * tests/actions.at (Default %printer and %destructor for user-declared
6116 end token): Rename to...
6117 (Default %printer and %destructor for user-defined end token): ...
6118 this.
6119
6120 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
6121 computation of whether to apply the default, don't maintain a list of
6122 every Bison-defined symbol. Instead, just check for a first character
6123 of '$', which a user symbol cannot have, and check for the error token.
6124
9350499c
JD
61252006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
6126
6127 Don't apply the default %destructor or %printer to the error token,
6128 $undefined, or $accept. This change fits the general rule that the
6129 default %destructor and %printer are only for user-declared symbols,
6130 and it solves several difficulties that are described in the new test
6131 cases listed below.
6132 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
6133 * tests/actions.at (Default %printer and %destructor are not for error
6134 or $undefined, Default %printer and %destructor are not for $accept):
6135 New test cases.
6136
4d7370cb
JD
61372006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
6138
6139 Allow %start after the first rule.
6140 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
6141 when parsing the first rule.
6142 (check_and_convert_grammar): Search for it here after all grammar
6143 declarations have been parsed. Skip midrules, which have dummy LHS
6144 nonterminals.
6145 * src/symtab.c (symbol_is_dummy): New function.
6146 * src/symtab.h (symbol_is_dummy): Declare it.
6147 * tests/input.at (%start after first rule): New test.
6148
6d0ef4ec
JD
61492006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6150
6151 Redo some of the previous commit: add back the ability to use
6152 non-aliased/undeclared string literals since it might be useful to
6153 those declaring %token-table.
6154 * src/reader.c (check_and_convert_grammar): Undo changes in previous
6155 commit: don't worry about complaints from symbols_pack.
6156 * src/symtab.c (symbol_new, symbol_class_set,
6157 symbol_check_alias_consistency): Undo changes in previous commit: count
6158 each string literal as a new symbol and token, assign it a symbol
6159 number, and don't complain about non-aliased string literals.
6160 (symbols_pack): Since symbol_make_alias still does not decrement symbol
6161 and token counts but does still set aliased tokens to the same number,
6162 symbol_pack_processor now leaves empty slots in the symbols array.
6163 Remove those slots.
6164 * tests/regression.at (Undeclared string literal): Remove test case
6165 added in previous commit since non-aliased string literals are allowed
6166 again.
6167 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
6168 remove unnecessary string literal declarations.
6169 * tests/sets.at (Firsts): Likewise.
6170
965537bc
JD
61712006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
6172
6173 Don't allow an undeclared string literal, but allow a string literal to
6174 be used before its declaration.
6175 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
6176 symbols_pack complained.
6177 * src/symtab.c (symbol_new): Don't count a string literal as a new
6178 symbol.
6179 (symbol_class_set): Don't count a string literal as a new token, and
6180 don't assign it a symbol number since symbol_make_alias does that.
6181 (symbol_make_alias): It's not necessary to decrement the symbol and
6182 token counts anymore. Don't assume that an alias declaration occurs
6183 before any uses of the identifier or string, and thus don't assert that
6184 one of them has the highest symbol number so far.
6185 (symbol_check_alias_consistency): Complain if there's a string literal
6186 that wasn't declared as an alias.
6187 (symbols_pack): Bail if symbol_check_alias_consistency failed since
6188 symbol_pack asserts that every token has been assigned a symbol number
6189 although undeclared string literals have not.
6190 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 6191 string literal): New test cases.
965537bc
JD
6192 (Characters Escapes, Web2c Actions): Declare string literals as
6193 aliases.
6194 * tests/sets.at (Firsts): Likewise.
6195
47aee066
JD
61962006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
6197
6198 In the grammar scanner, STRING_FINISH unclosed constructs and return
6199 them to the parser in order to improve error messages.
6200 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
6201 SC_BRACED_CODE, SC_PROLOGUE): Implement.
6202 * tests/input.at (Unclosed constructs): New test case.
6203 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
6204 seen.
6205
6206 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
6207 unused global.
6208
1f6b3679
JD
62092006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
6210
6211 Handle string aliases for character tokens correctly.
6212 * src/symtab.c (symbol_user_token_number_set): If the token has an
6213 alias, check and set its alias's user token number instead of its own,
6214 which is set to indicate the alias. Previously, every occurrence of
6215 the character token in the grammar overwrote that alias indicator with
6216 the character code.
6217 * tests/input.at (String aliases for character tokens): New test.
6218
219741d8
JD
62192006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
6220
6221 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
6222
11daa4e7
PE
62232006-08-11 Paul Eggert <eggert@cs.ucla.edu>
6224
6225 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
6226 to prevent failures when building on older platforms.
6227 Check for autopoint failure.
6228 Set XGETTEXT_OPTIONS to values that check for C format strings,
6229 so that translators are warned about them (this also helps
6230 prevent core dumps).
6231
6232 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
6233 function, since it simplifies our code a bit.
6234
6235 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
6236 rather than -W, so we don't get bogus warnings about sign comparisons.
6237 Add -Wpointer-arith, since that warning is useful (it reports code
6238 that does not conform to C89 and that some compilers reject).
6239 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
6240 since it's no longer needed.
6241
f9bfc42a
JD
62422006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
6243
6244 Clean up scanners a bit.
6245 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
6246 definitions so gcc won't warn when obstack_for_string is unused.
6247 * src/scan-code.l: config.h and system.h are already #include'd by
6248 scan-code-c.c, so get rid of them here.
6249 * src/scan-gram.l: Likewise.
6250 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
6251 definitions rather than duplicating the rest of it.
6252 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
6253
06e8700a
JD
62542006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
6255
6256 Suppress signed/unsigned comparison warnings for yycheck.
6257 * data/c.m4 (b4_safest_int_type): New macro.
6258 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
6259 a signed int type, cast it to b4_safest_int_type first.
6260 * data/yacc.c: Likewise.
6261 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
6262 also overwritten.
6263
9c437126
PE
62642006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
6265
6266 * doc/bison.texinfo: Fix some typos.
6267
284d8a13
PE
62682006-08-02 Paul Eggert <eggert@cs.ucla.edu>
6269
6270 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
6271 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
6272
6273 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
6274 the latest gnulib does this a different way.
6275 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
6276 translation was patched, so stop omitting it.
6277
ec5479ce
JD
62782006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6279
6280 Enable declaration of default %printer/%destructor. Make the parser
6281 use these for all user-declared grammar symbols for which the user does
6282 not declare a specific %printer/%destructor. Thus, the parser uses it
6283 for token 0 if the user declares it but not if Bison generates it as
6284 $end. Discussed starting at
6285 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
6286 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
6287 and
6288 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
6289 * NEWS (2.3+): Mention.
6290 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
6291 declare a %destructor for a mid-rule's semantic value. It's just
6292 impossible to declare one specific to it.
6293 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
6294 code. Describe default %destructor form.
6295 * src/parse-gram.y (grammar_declaration): Parse default
6296 %printer/%destructor declarations.
6297 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
6298 and symbol_destructor_location_get rather than accessing the destructor
6299 and destructor_location members of struct symbol.
6300 (symbol_printers_output): Likewise but for %printer's.
6301 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
6302 again.
6303 * src/symtab.c (default_destructor, default_destructor_location,
6304 default_printer, default_printer_location): New static global
6305 variables to record the default %destructor and %printer.
6306 (symbol_destructor_get, symbol_destructor_location_get,
6307 symbol_printer_get, symbol_printer_location_get): New functions to
6308 compute the appropriate %destructor and %printer for a symbol.
6309 (default_destructor_set, default_printer_set): New functions to set the
6310 default %destructor and %printer.
6311 * src/symtab.h: Prototype all those new functions.
6312 * tests/actions.at (Default %printer and %destructor): New test to
6313 check that the right %printer and %destructor are called, that they're
6314 not called for $end, and that $$ and @$ work correctly.
6315 (Default %printer and %destructor for user-declared end token): New
6316 test to check that the default %printer and %destructor are called for
6317 a user-declared end token.
6318 * tests/input.at (Default %printer and %destructor redeclared, Unused
6319 values with default %destructor): New tests to check related grammar
6320 warnings and errors.
6321
868d2d96
JD
63222006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
6323
6324 Clean up handling of %destructor for the end token (token 0).
6325 Discussed starting at
6326 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
6327 and
6328 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
6329
6330 Make the skeletons consistent in how they pop the end token and invoke
6331 its %destructor.
6332 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
6333 state, which has token number 0, since this would invoke the
6334 %destructor for the end token.
6335 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
6336 until after shifting the end token, or else it won't be popped.
6337 * data/yacc.c (yyparse): Likewise.
6338
6339 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
6340 it's the end token. Upon termination, destroy an unshifted lookahead
6341 even when it's the end token.
6342 * data/lalr1.cc (yy::parser::parse): Likewise.
6343 * data/yacc.c (yyparse): Likewise.
6344
6345 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
6346 value warnings for the end token when the user gives the end token a
6347 %destructor.
6348
6349 * tests/actions.at (Printers and Destructors): Test all the above.
6350
62a9592d
PE
63512006-07-24 Paul Eggert <eggert@cs.ucla.edu>
6352
6353 Update to latest gnulib and gettext versions.
6354 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
6355 Add fopen-safer.
6356 (gnulib_files): Add m4/warning.m4. Don't worry about files
6357 overwritten by autopoint.
6358 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
6359 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
6360 rejects them.
6361 Don't use autoreconf; instead, invoke autopoint etc. by hand,
6362 so that we can remove the intl files at a better time.
6363 (intl_files_to_remove): Remove aclocal.m4, since it gets
6364 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
6365 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
6366 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6367 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
6368 Remove datarootdir hack; no longer needed.
6369 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
6370 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
6371 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
6372 strdup.h.
6373 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
6374 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
6375
10d6970f
PE
63762006-07-20 Paul Eggert <eggert@cs.ucla.edu>
6377
6378 * bootstrap: Adjust to today's change to gnulib-tool by invoking
6379 it with --assume-autoconf='latest-stable'.
6380
50a33993
JD
63812006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
6382
6383 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
6384 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
6385 YYSTYPE' and `{'.
6386 * src/muscle_tab.h (muscle_grow): Replace the header comments with
6387 those from muscle_tab.c since the old ones are misleading.
6388
2ce4ed68
AD
63892006-07-13 Akim Demaille <akim@epita.fr>
6390
6391 Support %define "KEY" {VALUE}.
6392 * src/scan-code.h, src/scan-code.l (translate_action)
6393 (translate_rule_action, translate_symbol_action, translate_code):
6394 Return char *, not const char *.
6395 * src/parse-gram.y (declaration): Rename as...
6396 (prologue_declaration): this.
6397 (string_content): Remove this nonterminal, use STRING.
6398 (braceless, content, content.opt): New nonterminal.
6399 Use them.
6400 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
6401 as value.
6402 * src/scan-gram.l (getargs.h): Don't include it.
6403
db7e5eb5
PE
64042006-07-12 Paul Eggert <eggert@cs.ucla.edu>
6405
6406 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
6407 rather than a for-loop that declares a local bool variable. This
6408 should work around a compatibility problem with a Cray x1e C++
6409 compiler reported by Hung Nguyen in
6410 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
6411 The for-loop was introduced in the 2004-11-17 change but I don't
6412 know why it was needed.
6413
a5d80ba5
AD
64142006-07-12 Akim Demaille <akim@epita.fr>
6415
6416 * data/c.m4: Comment changes.
6417
23eb2a69
AD
64182006-07-10 Akim Demaille <akim@lrde.epita.fr>
6419
6420 * src/complain.c (error_message, ERROR_MESSAGE): New.
6421 To factor...
6422 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
6423 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
6424
ddc8ede1
PE
64252006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6426
6427 * NEWS: Instead of %union, you can define and use your own union type
6428 YYSTYPE if your grammar contains at least one <type> tag.
6429 Your YYSTYPE need not be a macro; it can be a typedef.
6430 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
6431 (Union Decl, Decl Summary): Document this.
6432 * data/glr.c (YYSTYPE): Implement this.
6433 * data/glr.cc (YYSTYPE): Likewise.
6434 * data/lalr1.cc (YYSTYPE): Likewise.
6435 * data/yacc.c (YYSTYPE): Likewise.
6436 * src/output.c (prepare): Output tag_seen_flag.
6437 * src/parse-gram.y (declaration, grammar_declaration):
6438 Use 'union_seen' rather than 'typed' to determine whether
6439 %union has been seen, since grammars can now be typed without
6440 %union.
6441 (symbol_declaration, type.opt, symbol_def):
6442 Keep track of whether a tag has been seen.
6443 * src/reader.c (union_seen, tag_seen): New vars.
6444 (typed): remove.
6445 * src/reader.h (union_seen, tag_seen, typed): Likewise.
6446 * src/scan-code.l (untyped_var_seen): New variable.
6447 (handle_action_dollar): Adjust to above changes.
6448 (handle_action_dollar, handle_action_at):
6449 Improve overflow checking for outlandish numbers.
6450 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
6451 avoid new diagnostics generated by above changes.
6452 * tests/regression.at (YYSTYPE typedef): Add test to check
6453 for type tags without %union.
6454
6455 * src/symlist.c (symbol_list_length): Return int, not unsigned
6456 int, since callers expect int. This may need to get revisited
6457 once we have proper integer overflow checking.
6458
6459 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
6460 object is now static.
6461
6462 * src/getargs.c (flags_argmatch): Return void, not int,
6463 to pacify ./configure --enable-gcc-warnings.
6464
6465 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
6466 since last_string is already defined to FLEX_PREFIX (last_string).
6467
7b42569e
AD
64682006-07-09 Akim Demaille <akim@lrde.epita.fr>
6469
6470 Implement --warnings/-W.
6471 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
6472 replaced by...
6473 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
6474 Adjust callers.
6475 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
6476 (warnings_args, warnings_types): New.
6477 (getargs, short_options, long_options): Accept -W/--warnings.
6478 Sort the options by alphabetical order, upper case letter right
6479 before its lower case.
6480
3b452f4e
JD
64812006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
6482
6483 Change %merge result type clash warnings to errors. Discussed at
6484 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
6485 * src/reader.c (record_merge_function_type): Use complain_at.
6486 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6487 declared later): Update test case results.
6488
b8a41559
AD
64892006-07-09 Akim Demaille <akim@lrde.epita.fr>
6490
6491 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
6492 to be in alphabetical order.
6493 (trace_args): Spelling fixes.
6494
cd9e1ba2
PE
64952006-07-09 Paul Eggert <eggert@cs.ucla.edu>
6496
6497 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
6498 so they don't collide with user-defined macros.
6499 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
6500 this was never guaranteed, and now that we're using gnulib stdint,
6501 which defines int_fast16_t to long int, the problem is exposed.
6502
cb48f191
PE
65032006-07-08 Paul Eggert <eggert@cs.ucla.edu>
6504
b8445a15
PE
6505 * data/c.m4 (b4_basename): Simplify a bit, since we don't
6506 need the full POSIX semantics (and weren't implementing them
6507 anyway).
6508
cb48f191
PE
6509 Adjust to Autoconf 2.60 and today's gnulib.
6510 * bootstrap (gnulib_modules): Add stdint.
6511 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
6512 no longer copies it.
6513 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
6514 since stdint needs the former and wcwidth (which is now required
6515 by mbswidth) needs the latter.
6516 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
6517 work around a compatibility glitch between gettext 0.14.6 and
6518 Autoconf 2.60.
6519 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
6520 Do not check for uintptr_t, since new stdint module does the right
6521 thing.
6522 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
6523 Add stdint.h, stdint_.h, wcwidth.h.
6524 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
6525 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
6526 stdint.m4, wchar_t.m4, wcwidth.m4.
6527 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
6528 usual order for ../lib/*.h files.
6529 (file_name_split): Use last_component, not base_name, to adjust
6530 to gnulib changes.
6531 * src/parse-gram.h: Include <strverscmp.h> in the usual order
6532 for ../lib/*.h files.
6533 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
6534 Define unconditionally, since we now assume the stdint module.
6535 * src/scan-skel.l: Include <dirname.h>.
6536 (BASE_QPUTS): Use last_component, not base_name.
6537 * src/system.h: Include <unlocked-io.h> in the usual order
6538 for ../lib/*.h files. Include <stdint.h> unconditionally,
6539 since we now use the stdint module.
6540 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
6541 HAVE_UINTPTR_T, since we now use the stdint module.
6542 (base_name): Remove decl, since files now include <dirname.h>
6543 to get the decl.
6544
cd48d21d
AD
65452006-07-08 Akim Demaille <akim@lrde.epita.fr>
6546
6547 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
6548 New, default to 1.
6549 * data/yacc.c, data/glr.c, data/location.cc: Use them.
6550 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
6551 default.
6552 * tests/calc.at: Adjust.
6553
8ec0a172
AD
65542006-07-08 Akim Demaille <akim@lrde.epita.fr>
6555
b8445a15 6556 * data/c.m4 (b4_basename): New.
8ec0a172
AD
6557 (b4_syncline): Also output the location of its invocation (from
6558 the skeleton).
6559 (b4_user_action, b4_define_user_action, b4_user_actions)
6560 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
6561 (b4_user_stype): New.
6562 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
6563
4a678af8
JD
65642006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6565
6566 In the grammar file, the first column is 1 not 0 on the first line as
6567 on every other line.
6568 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
6569 * tests/input.at (Torturing the Scanner): Update output.
6570
6571 * src/scan-gram.l (scanner_cursor): Declare it static.
6572
dd60572a
JD
65732006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
6574
6575 In warnings, say "previous declaration" rather than "first
6576 declaration".
6577 * src/symtab.c (redeclaration): Do that here.
6578 * src/reader.c (record_merge_function_type): In the case of a result
6579 type clash, report the previous declaration rather than the very first
6580 one in the grammar file.
6581 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6582 declared later): Add a third declaration to check this behavior.
6583 * tests/input.at (Incompatible Aliases): Update output.
6584
2073e1b6
AD
65852006-06-27 Akim Demaille <akim@epita.fr>
6586
6587 * doc/Doxyfile.in: New.
6588 * doc/Makefile.am: Use it.
6589 * src/lalr.h, src/symtab.h: Initial doxygenation.
6590
8ee5b538
JD
65912006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6592
6593 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
6594 declared after the %merge. This continues the effort of the previous
6595 patch.
8ee5b538
JD
6596 * src/reader.c (get_merge_function): Don't set the merger type yet.
6597 (record_merge_function_type): New function for setting the merger type
6598 and checking for clashes.
6599 (grammar_current_rule_merge_set): Set the location of the %merge for
6600 the current rule.
6601 (packgram): Invoke record_merge_function_type for each rule now that
6602 all symbol type declarations have been parsed.
6603 * src/reader.h (merger_list.type_declaration_location): New member
6604 storing the location of the first %merge from which the type for this
6605 merging function was derived.
6606 * src/symlist.h (symbol_list.merger_declaration_location): New member
6607 storing the location of a rule's %merge, if any.
6608 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
6609 declared later): New test to catch the error fixed by the above patch.
6610
ffa4ba3a
JD
66112006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6612
6613 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
6614 declarations appear after the rules. Discussed at
6615 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
6616 and
6617 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
6618 Don't mistake the type of $$ in a midrule to be that of its parent
6619 rule's $$.
ffa4ba3a
JD
6620 * src/reader.c (grammar_current_rule_end): Don't invoke
6621 grammar_rule_check yet since not all symbol declarations may have been
6622 parsed yet.
6623 (grammar_midrule_action): Likewise.
6624 Don't record whether the midrule's $$ has been used yet since actions
6625 haven't been translated yet.
6626 Record the midrule's parent rule and its RHS index within the parent
6627 rule.
6628 (grammar_current_rule_action_append): Don't translate the action yet
6629 since not all symbol declarations may have been parsed yet and, thus,
6630 warnings about types for $$, $n, @$, and @n can't be reported yet.
6631 (packgram): Translate the action and invoke grammar_rule_check now that
6632 all symbol declarations have been parsed.
6633 * src/scan-code.l (handle_action_dollar): Now that this is invoked
6634 after parsing the entire grammar file, the symbol list here in the case
6635 of a midrule is actually the midrule's empty RHS, so reference its
6636 parent rule's RHS where necessary.
6637 On the other hand, now that you can already know it's a midrule, you
6638 aren't forced to think $$ has the same type as its parent rule's $$.
6639 (handle_action_at): In the case of a midrule, reference the parent rule
6640 where necessary.
6641 * src/symlist.c (symbol_list_new): Initialize new midrule-related
6642 members.
6643 (symbol_list_length): Now that this is invoked after all rules have
6644 been parsed, a NULL symbol (rather than a NULL symbol list node)
6645 terminates a rule. symbol_list_print already does this correctly.
6646 * src/symlist.h (symbol_list.midrule_parent_rule,
6647 symbol_list.midrule_parent_rhs_index): New members so that midrules can
6648 remember their relationships with their parents.
6649 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
6650 fixed by the above patch.
6651 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
6652 implementing...
6653 (Unused values): ... this old test case and...
6654 (Unused values before symbol declarations): ... this new test case.
6655 This one is the same as `Unused values' except that all symbol
6656 declarations appear after the rules in order to catch the rest of the
6657 errors fixed by the above patch.
6658
e256e17f
JD
66592006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
6660
300a1930
JD
6661 More cleanup.
6662 * src/reader.c (current_rule): Declare it static since it's no longer
6663 used outside this file.
6664 (grammar_current_rule_action_append): Remove redundant arguments from
6665 translate_rule_action invocation.
6666 * src/reader.h (current_rule): Remove this unused extern.
6667 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
6668 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 6669
381ecb06
JD
66702006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
6671
6672 Clean up yesterday's patch.
6673 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
6674 to...
6675 * src/reader.c (grammar_current_rule_action_append): ... here for
6676 consistency with grammar_current_rule_symbol_append.
6677 * tests/regression.at (Braced code in declaration in rules section):
6678 Make yyerror and yylex static as usual.
6679
4210cd0b
JD
66802006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
6681
6682 Fix bug that mistakes braced code in a declaration in the rules section
6683 to be a rule action. Mentioned at
6684 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
6685 * src/scan-gram.l: Move midrule action detection from the start of the
6686 scanning of any braced code to...
6687 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
6688 action. For readability, use $2 and @2 rather than the equivalent
6689 global variables.
6690 * tests/regression.at (Braced code in declaration in rules section):
6691 New test to catch the error fixed by the above patch.
6692
6693 Work on code readability some.
6694 * src/scan-code.l (current_rule): Get rid of this misleading and
6695 redundant declaration: it's actually extern'ed in reader.h.
6696 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
6697 translate_action): Add a rule argument and use it instead of the global
6698 current_rule.
6699 (translate_rule_action): This already receives current_rule through an
6700 argument, so pass it on to translate_action instead of assigning
6701 current_rule to current_rule.
6702 (translate_symbol_action, translate_code): Pass rule = NULL to
6703 translate_action.
6704
34f98f46
JD
67052006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
6706
6707 Rename %before-definitions to %start-header and %after-definitions to
6708 %end-header. Don't use these declarations to separate pre-prologue
6709 blocks from post-prologue blocks. Add new order-independent
6710 declarations %before-header and %after-header as alternatives to the
6711 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
6712 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
6713 * NEWS (2.3+): Update for these changes.
6714 * data/glr.c (b4_before_definitions): Update to...
6715 (b4_start_header): ... this.
6716 (b4_after_definitions): Update to...
6717 (b4_end_header): ... this.
6718 * data/glr.cc: Likewise.
6719 * data/lalr1.cc: Likewise.
6720 * data/yacc.c: Likewise.
6721 * doc/bison.texinfo (The prologue): Update names, and replace remaining
6722 prologue blocks with %*-header declarations.
6723 (Calc++ Parser): Likewise.
91661ebb 6724 (Decl Summary): Update names.
148d66d8 6725 (Table of Symbols): Update description.
34f98f46
JD
6726 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
6727 (PERCENT_END_HEADER): ... this.
6728 (PERCENT_BEFORE_DEFINITIONS): Update to...
6729 (PERCENT_START_HEADER): ... this.
6730 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6731 (declaration): Update token names and m4 macro names.
6732 When parsing %end-header and %start-header, invoke translate_code
6733 before muscle_code_grow, and no longer set global booleans to remember
6734 whether these declarations have been seen.
6735 Parse new %after-header and %before-header.
6736 * src/reader.c (before_definitions, after_definitions): Remove.
6737 (prologue_augment): Accept a new bool argument to specify whether to
6738 augment the pre-prologue or post-prologue.
6739 * src/reader.h (before_definitions, after_definitions): Remove these
6740 extern's.
6741 (prologue_augment): Add new bool argument.
6742 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
6743 (PERCENT_END_HEADER): ... this.
6744 (PERCENT_BEFORE_DEFINITIONS): Update to...
6745 (PERCENT_START_HEADER): ... this.
6746 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
6747 * tests/actions.at (Printers and Destructors): Update names.
6748
31b2b07e
JD
67492006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
6750
6751 Add comparison operators for C++ location classes. Discussed at
6752 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
6753 * data/c++.m4 (b4_define_location_comparison): New boolean %define
6754 declaration indicating whether filename_type has an operator==. If
6755 filename_type is `std::string', it defaults to `1', `0' otherwise.
6756 * data/location.cc: Iff b4_define_location_comparison is `1', add
6757 operator== and operator!= for class position and for class location.
6758
6759 Some minor fixes.
6760 * src/scan-action.l: Remove unused file.
6761 * src/symtab.c (symbol_printer_set): Use printer_location not
6762 destructor_location.
6763 * src/symtab.h (struct symbol): Replace incorrect source comment for
6764 printer members.
6765 * tests/input.at (Incompatible Aliases): Update output with correct
6766 printer location.
6767
9bc0dd67
JD
67682006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
6769
6770 Don't put the pre-prologue in the header file. For the yacc.c code
6771 file and the glr.c header and code files, move the pre-prologue before
6772 the token definitions. Add new %before-definitions and
6773 %after-definitions to declare code that will go in both the header file
6774 and code file. Discussed at
6775 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
6776 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
6777 and
6778 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
6779 * NEWS (2.3+): Describe these changes.
6780 * data/glr.c (b4_pre_prologue): Move from within to before...
6781 (b4_shared_declarations): ... this.
6782 Add new b4_before_definitions before b4_token_enums.
6783 Add new b4_after_definitions at the end.
6784 * data/glr.cc (b4_pre_prologue): Replace with...
6785 (b4_before_definitions): ... this in the header file.
6786 (b4_after_definitions): New near the end of the header file.
6787 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
6788 code file right before including the header file.
6789 (b4_before_definitions): New in the previous position of
6790 b4_pre_prologue in the header file.
6791 (b4_after_definitions): New near the end of the header file.
6792 * data/yacc.c: Clean up some m4 quoting especially in the header file.
6793 (b4_token_enums_defines): In the code file, move to right before
6794 YYSTYPE for consistency with the header file.
6795 (b4_before_definitions): New right before b4_token_enums_defines in
6796 both the header and code file.
6797 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
6798 header and code file.
6799 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
6800 of prologues for %union dependencies.
91661ebb
JD
6801 (Decl Summary): In %defines description, mention the effect of
6802 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
6803 (Calc++ Parser): Forward declare driver in a %before-definitions rather
6804 than in the pre-prologue so that make check succeeds.
148d66d8 6805 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
6806 %after-definitions.
6807 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
6808 %before-definitions.
6809 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
6810 (declaration): Parse those declarations and append to
6811 b4_before_definitions and b4_after_definitions, respectively.
6812 * src/reader.c (before_definitions, after_definitions): New bools to
6813 track whether those declarations have been seen.
6814 (prologue_augment): Add to the post-prologue if %union,
6815 %before-definitions, or %after-definitions has been seen.
6816 * src/reader.h (before_definitions, after_definitions): New extern's.
6817 * src/scan-gram.l: Scan the new declarations.
6818 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
6819 prologue block in a %before-definitions or a %after-definitions based
6820 on whether the %union is declared.
6821 * tests/regression.at (Early token definitions with --yacc, Early token
6822 definitions without --yacc): Move tests for token definitions into the
6823 post-prologue since token names are no longer defined in the
6824 pre-prologue.
6825
203b9274
AD
68262006-06-20 Akim Demaille <akim@epita.fr>
6827
6828 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
6829 (symbol_get): Use it.
6830 * src/parse-gram.y: Use it.
6831
a7ee59cf
JD
68322006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
6833
6834 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
6835 build succeeds when configured with --enable-gcc-warnings.
6836
5a2baae7
PE
68372006-06-19 Paul Eggert <eggert@cs.ucla.edu>
6838
33ad1a9c
PE
6839 * src/parse-gram.y (char_name): New function.
6840 (CHAR, STRING, string_content): For %printer, properly escape.
6841 (ID): Prefer fputs to fprintf.
6842 (id): Reindent to be consistent with other rules.
6843 Properly quote char.
6844
5a2baae7
PE
6845 The Translation Project changed its way of publishing translations
6846 to maintainers. I haven't received any responses to my request
6847 for supporting the old way, or for documenting the new way. I
6848 have modified 'bootstrap' to use screen scraping
6849 (in this case, HTML scraping). This is unreliable and inelegant,
6850 but I don't see any better way. Yuck.
6851 * bootstrap (TP_URL, WGET_COMMAND): New vars.
6852 (get_translations): New function, which uses HTML scraping to
6853 deduce locations of latest translations.
6854 Use this function to grab both bison and bison-runtime .po files.
6855 Don't bother priming the pump for the runtime-po domain any more,
6856 as it's now translated better than bison is.
6857
58d7a1a1
AD
68582006-06-19 Akim Demaille <akim@epita.fr>
6859
6860 * src/scan-gram.l: No longer "parse" things after `%union' until
6861 `{'. Rather, return a single "%union" token.
6862 No longer make symbols: return strings, and leave the conversion
6863 to symbols to the parser.
6864 (SC_PRE_CODE, token_type): Remove.
6865 * src/parse-gram.y (%union): New field `character'.
6866 Sort tokens.
6867 (CHAR): New token.
6868 (ID, ID_COLON): Now that the scanner no longer makes them
6869 identifiers, adjust all uses to invoke symbol_get.
6870 (id_colon): New, wraps the conversion from string to symbol.
6871 (%union): Accept a possible union_name.
6872 (symbol): Now can be a char.
6873 * data/c.m4 (b4_union_name): Leave a default value.
6874 * data/glr.c, data/yacc.c: Use it.
6875
b931235e
JD
68762006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
6877
6878 For associating token numbers with token names for "yacc.c", don't use
6879 #define statements unless `--yacc' is specified; always use enum
6880 yytokentype. Most important discussions start at:
6881 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
6882 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
6883 and
6884 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
6885 * NEWS (2.3+): Mention.
6886 * data/c.m4 (b4_yacc_if): New.
6887 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
6888 token #define's.
6889 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
6890 on token name definitions.
6891 * src/getargs.c (usage): Capitalize `Yacc' in English.
6892 * src/output.c (prepare): Define b4_yacc_flag.
6893 * tests/regression.at (Early token definitions): Test that tokens names
6894 are defined before the pre-prologue not just before the post-prologue.
6895 Remove this test case and copy to...
6896 (Early token definitions with --yacc): ... this to test #define's.
6897 (Early token definitions without --yacc): ... and this to test enums.
6898
9e6e7ed2
PE
68992006-06-11 Paul Eggert <eggert@cs.ucla.edu>
6900
6901 * NEWS: Reword the post-2.3 change to not be so optimistic about
6902 removing the old "look-ahead" spelling.
6903 Update previous look-ahead/lookahead change reports.
6904 * REFERENCES: look-ahead -> lookahead (since that's
6905 what he actually wrote).
6906 * doc/refcard.tex: look ahead -> lookahead,
6907 look-ahead -> lookahead
6908
742e4900
JD
69092006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
6910
6911 For consistency, use `lookahead' instead of `look-ahead' or
6912 `look_ahead'. Discussed starting at
6913 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
6914 and then at
6915 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
6916 * NEWS: For the next release, note the change to `--report'.
6917 * TODO, doc/bison.1: Update English.
6918 * doc/bison.texinfo: Update English.
6919 (Understanding Your Parser, Bison Options): Document as
6920 `--report=lookahead' rather than `--report=look-ahead'.
6921 * src/conflicts.c: Update English in comments.
6922 (lookahead_set): Rename from look_ahead_set.
6923 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
6924 (resolve_sr_conflict): Rename local look_ahead_tokens to
6925 lookahead_tokens, and update other uses.
6926 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
6927 count_rr_conflicts, conflicts_free): Update uses.
6928 * src/getargs.c (report_args): Move "lookahead" before alternate
6929 spellings.
6930 (report_types): Update uses.
6931 (usage): For `--report' usage description, state `lookahead' spelling
6932 rather than `look-ahead'.
6933 * src/getargs.h (report.report_lookahead_tokens): Rename from
6934 report_look_ahead_tokens.
6935 * src/lalr.c: Update English in comments.
6936 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
6937 (state_lookahead_tokens_count): Rename from
6938 state_look_ahead_tokens_count.
6939 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6940 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
6941 Rename local n_look_ahead_tokens to n_lookahead_tokens.
6942 Update other uses.
6943 Update English in output.
6944 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
6945 * src/print.c: Update English in comments.
6946 (lookahead_set): Rename from look_ahead_set.
6947 (print_reduction): Rename argument lookahead_token from
6948 look_ahead_token.
6949 (print_core, state_default_rule, print_reductions, print_results):
6950 Update uses.
6951 * src/print_graph.c: Update English in comments.
6952 (print_core): Update uses.
6953 * src/state.c: Update English in comments.
6954 (reductions_new): Update uses.
6955 (state_rule_lookahead_tokens_print): Rename from
6956 state_rule_look_ahead_tokens_print, and update other uses.
6957 * src/state.h: Update English in comments.
6958 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
6959 (state_rule_lookahead_tokens_print): Rename from
6960 state_rule_look_ahead_tokens_print.
6961 * src/tables.c: Update English in comments.
6962 (conflict_row, action_row): Update uses.
6963 * tests/glr-regression.at
6964 (Incorrect lookahead during deterministic GLR,
6965 Incorrect lookahead during nondeterministic GLR): Rename
6966 print_look_ahead to print_lookahead.
6967 * tests/torture.at: Update English in comments.
6968 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
6969 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
6970 (Many lookahead tokens): Update uses.
6971 * data/glr.c: Update English in comments.
6972 * lalr1.cc: Likewise.
6973 * yacc.c: Likewise.
6974 * src/conflicts.h: Likewise.
6975 * src/lalr.h: Likewise.
6976 * src/main.c: Likewise.
6977 * src/output.c: Likewise.
6978 * src/parse-gram.c: Likewise.
6979 * src/tables.h: Likewise.
6980 * tests/calc.at: Likewise.
6981
3c40d0b5
JD
69822006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
6983
6984 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
6985
5d278082
PE
69862006-06-07 Paul Eggert <eggert@cs.ucla.edu>
6987
6988 * TODO: Add request from Nelson H. F. Beebe to be able to install
6989 Bison without installing the yacc script.
6990
9e668899
JD
69912006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
6992
6993 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
6994 and yytext if they're already #define'd.
6995 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
6996 * src/scan-code-c.c: ... here.
6997 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
6998 <config.h>.
6999
0c8e079f
JD
70002006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
7001
7002 Get Bison to build again when configured with --enable-gcc-warnings.
7003 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
7004 missing #include's.
7005 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
7006 loc argument as it shadows a global.
7007 * src/scan-gram.l: Remove stray comma that prevents boundary_set
7008 invocation.
7009
7010 * src/.cvsignore: Add scan-code.c.
7011
2346344a
AD
70122006-06-07 Akim Demaille <akim@epita.fr>
7013
7014 * src/scan-gram.l: Move the "add a trailing ; to actions" code
7015 to...
7016 * src/scan-code.l: here.
7017 * tests/input.at (Torturing the Scanner): Fix another location
7018 error.
7019
4862bdfd
AD
70202006-06-07 Akim Demaille <akim@epita.fr>
7021
7022 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
7023
e9071366
AD
70242006-06-06 Akim Demaille <akim@epita.fr>
7025
7026 Extract the parsing of user actions from the grammar scanner.
7027 As a consequence, the relation between the grammar scanner and
7028 parser is much simpler. We can also split "composite tokens" back
7029 into simple tokens.
7030 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
7031 * src/scan-gram.l (add_column_width, adjust_location): Move to and
7032 rename as...
7033 * src/location.h, src/location.c (add_column_width)
7034 (location_compute): these.
7035 Fix the column count: the initial column is 0.
7036 (location_print): Be robust to ending column being 0.
7037 * src/location.h (boundary_set): New.
7038 * src/main.c: Adjust to scanner_free being renamed as
7039 gram_scanner_free.
7040 * src/output.c: Include scan-code.h.
7041 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
7042 Use boundary_set.
7043 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
7044 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
7045 which is now, again, a separate token.
7046 Adjust all dependencies.
7047 Whereever actions with $ and @ are used, use translate_code.
7048 (action): Remove this nonterminal which is now useless.
7049 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
7050 (grammar_current_rule_action_append): Use translate_code.
7051 (packgram): Bound check ruleno, itemno, and rule_length.
7052 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
7053 (last_string, last_braced_code_loc, max_left_semantic_context)
7054 (scanner_initialize, scanner_free, scanner_last_string_free)
7055 (gram_out, gram_lineno, YY_DECL_): Move to...
7056 * src/scan-gram.h: this new file.
7057 (YY_DECL): Rename as...
7058 (GRAM_DECL): this.
7059 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
7060 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
7061 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
7062 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
7063 Move these declarations, and...
7064 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
7065 these to...
7066 * src/flex-scanner.h: this new file.
7067 * src/scan-gram.l (rule_length, rule_length_overflow)
7068 (increment_rule_length): Remove.
7069 (last_braced_code_loc): Rename as...
7070 (gram_last_braced_code_loc): this.
7071 Adjust to the changes of the parser.
7072 Move all the handling of $ and @ into...
7073 * src/scan-code.l: here.
7074 * src/scan-gram.l (handle_dollar, handle_at): Remove.
7075 (handle_action_dollar, handle_action_at): Move to...
7076 * src/scan-code.l: here.
7077 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
7078 scan-code.h, scan-code-c.c, scan-gram.h.
7079 (EXTRA_bison_SOURCES): Add scan-code.l.
7080 (BUILT_SOURCES): Add scan-code.c.
7081 (yacc): Be robust to white spaces.
7082
7083 * tests/conflicts.at, tests/input.at, tests/reduce.at,
7084 * tests/regression.at: Adjust the column numbers.
7085 * tests/regression.at: Adjust the error message.
7891a7c4 7086
184e42f0
JD
70872006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7088
7089 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7090 Use Akim's wording from
7091 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
7092
7891a7c4
JD
70932006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
7094
7095 Between Bison releases, manually append `+' to the previous Bison
7096 release number, and use that as a signal to automatically print the
7097 ChangeLog's CVS Id keyword from --version. Discussed starting at
7098 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
7099 * ChangeLog: Add Id header.
7100 * configure.ac (AC_INIT): Append `+' to `2.3'.
7101 * src/.cvsignore: Add revision.c.
7102 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
7103 (BUILT_SOURCES): Add revision.c.
7104 (revision.c): New target rule. This file defines a new global variable
7105 named revision. It initializes it with either the Id from ChangeLog
7106 or, if VERSION doesn't contain `+', with the empty string.
7107 * src/getargs.c (version): Print the value of revision.
7108 * src/revision.h: Extern revision.
7109
4ad3ed84
PE
71102006-06-05 Paul Eggert <eggert@cs.ucla.edu>
7111
7112 * NEWS: Version 2.3.
7113 * configure.ac (AC_INIT): Likewise.
7114
02103984
PE
71152006-05-30 Paul Eggert <eggert@cs.ucla.edu>
7116
7117 * data/glr.c (YYRECOVERING): Define to be a function-like macro
7118 with no arguments, not as an object-like macro. This is for
7119 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
7120 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
7121 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
7122 Document this.
7123
2c08afa5
JD
71242006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
7125
7126 * src/getargs.c (usage): Back out yesterday's modification of the
7127 --help output so that we don't have to wait for translation before
7128 releasing 2.3.
7129
6077da58
PE
71302006-05-29 Paul Eggert <eggert@cs.ucla.edu>
7131
7132 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
7133 Problem reported by Akim Demaille.
7134
2a26b6c2
JD
71352006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
7136
7137 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
7138
aefef0d6
PE
71392006-05-26 Paul Eggert <eggert@cs.ucla.edu>
7140
7141 * data/yacc.c (yy_reduce_print): Omit trailing white space in
7142 generated source code. Problem reported by Frans Englich in
7143 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
7144
fcd8e201
PE
71452006-05-22 Paul Eggert <eggert@cs.ucla.edu>
7146
7147 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
7148 shell, not within 'make', so that 'make' by an ordinary builder
7149 (using GNU make) does not worry about configuring gzip. This also
7150 works around a bug reported independently by Keith Thompson and by
7151 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
7152 stderr rather than stdout, messing up the build logs.
7153
7b5cdcbd
JD
71542006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7155
7156 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
7157 to make sure that YYID will never be unused. This fixes a 'make
7158 maintainer-check' failure caused by the recent changes to the 'Trivial
7159 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
7160 not used.
7161 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
7162
5ad0a449
JD
71632006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
7164
7165 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
7166 state before an empty RHS is always resolved here. Only the location
7167 of that state is guaranteed to be resolved, and that's enough. This
7168 fixes the remaining bug reported by Derek M. Jones in
7169 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7170 * tests/glr-regression.at (Uninitialized location when reporting
7171 ambiguity): Test the above case.
7172 Also, the embedded comments in this test case claim it checks the case
7173 of an empty RHS that has inherited the initial location. However, the
7174 corresponding LHS was already resolved, so yyresolveLocations didn't
7175 actually have reason to modify it. Fix this by forcing
7176 nondeterministic operation at the beginning of the parse.
7177
50cce58e
PE
71782006-05-20 Paul Eggert <eggert@cs.ucla.edu>
7179
7180 * data/c.m4 (b4_yy_symbol_print_generate):
7181 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
7182 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
7183 of the bugs reported today by Derek M Jones in
7184 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
7185 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
7186 defined to be a type name without parens or brackets.
7187 (Location Type): Similarly for YYLTYPE.
7188 * tests/regression.at (Trivial grammars): Put in a test for this
7189 bug that will be caught by 'make maintainer-check' (though not,
7190 alas, by 'make check' unless your compiler is picky).
7191
ab8d9dc5
PE
71922006-05-19 Paul Eggert <eggert@cs.ucla.edu>
7193
0d2c8934 7194 * NEWS: Version 2.2.
ab8d9dc5
PE
7195 * configure.ac (AC_INIT): Likewise.
7196
9138c575
JD
71972006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
7198
7199 * data/glr.c (yyreportTree): Make room in yystates for the state
7200 preceding the RHS. This fixes the segmentation fault reported by Derek
7201 M. Jones in
7202 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
7203 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
7204 to the user. Reported for yyreportTree by Derek M. Jones later in the
7205 same thread.
7206 * THANKS: Add Derek M. Jones.
7207 Update my email address.
7208 Fix typo in Steve Murphy's name.
7209
276f48df
PE
72102006-05-14 Paul Eggert <eggert@cs.ucla.edu>
7211
d6645148
PE
7212 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
7213 checking against YYLAST that caused the parser to miss a potential
7214 alternative in its diagnostic.
7215 Problem reported by Maria Jose Moron Fernandez in
7216 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
7217 * data/lalr1.cc (yysyntax_error_): Likewise.
7218 * data/yacc.c (yysyntax_error): Likewise.
7219 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
7220 tokens, in case we run into an older C compiler.
7221 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
7222 Use them to check for the off-by-one error fixed above.
7223
276f48df
PE
7224 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
7225 YYSIZE_T, not size_t.
7226 * tests/regression.at (Trivial grammars): New test, to catch
7227 the error fixed by the above patch.
7228
cd8b5791
AD
72292006-05-14 Akim Demaille <akim@lrde.epita.fr>
7230
7231 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
7232 scheme.
7233 Reported by Steve Murphy.
7234
34376418
AD
72352006-05-14 Akim Demaille <akim@lrde.epita.fr>
7236
7237 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
7238 * data/glr.cc: b4_location_flag is now b4_locations_flag.
7239
327afc7c
AD
72402006-05-14 Akim Demaille <akim@lrde.epita.fr>
7241
7242 Implement --trace=m4.
7243 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
7244 * src/output.c (output_skeleton): When set, pass -dV to m4.
7245
7246 Factor the handling of flags in m4.
7247 * src/output.c (prepare): Rename the muscle names debug, defines,
7248 error_verbose to debug_flag, defines_flag, error_verbose_flag.
7249 * data/c.m4: Adjust.
7250 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
7251 Use b4_define_flag_if to define other b4_FLAG_if macros.
7252 (b4_location_if): As a consequence, rename as...
7253 (b4_locations_if): this, for consistency.
7254 Adjust all the skeletons.
7255
ba9ecd19
AD
72562006-05-14 Akim Demaille <akim@lrde.epita.fr>
7257
7258 * etc/bench.pm: Shorten bench names.
7259
4e83ea15
AD
72602006-05-14 Akim Demaille <akim@lrde.epita.fr>
7261
7262 * src/output.h, src/output.c (error_verbose): Move to...
7263 * src/getargs.h, src/getargs.c: here.
7264 Sort the flags.
7265 Adjust dependencies.
7266
6e93d810
PE
72672006-05-13 Paul Eggert <eggert@cs.ucla.edu>
7268
7269 * data/c.m4 (b4_copyright): Put the special exception for Bison
7270 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
7271 uses changed. Suggested by Akim Demaille. Also, wrap the
7272 copyright notice, in case it is longer than 80 columns. Replace
7273 comma by newline after title.
6e93d810 7274
eaea13f5
PE
72752006-05-11 Paul Eggert <eggert@cs.ucla.edu>
7276
7277 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
7278 incompatibility, not a bug. Mention that it wasn't fixed as of
7279 flex 2.5.33.
7280
3cf084ec
AD
72812006-05-11 Akim Demaille <akim@lrde.epita.fr>
7282
7283 * examples/extexi: Enforce the precedence of concatenation over
7284 >>.
0a9f1c7d 7285 Reported by Tommy Nordgren.
3cf084ec 7286
32c96bd7
AD
72872006-05-11 Akim Demaille <akim@lrde.epita.fr>
7288
7289 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
7290 with the member "token".
f94705b2 7291 Reported by Martin Nylin.
32c96bd7 7292
eaea13f5
PE
72932006-05-08 Paul Eggert <eggert@cs.ucla.edu>
7294
7295 * data/glr.c: Switch to Bison 2.2 special-exception language in
7296 the copyright notice. Use more-regular format for titles and
7297 copyright notices.
7298 * data/glr.cc: Likewise.
7299 * data/location.cc: Likewise.
7300 * data/yacc.cc: Likewise.
7301 * doc/bison.texinfo (Conditions): Document this.
7302 * NEWS: likewise. Upgrade version to 2.2.
7303
6e2d1146
AD
73042006-04-27 Akim Demaille <akim@lrde.epita.fr>
7305
7306 * data/glr.cc: Remove dead code.
7307
47671055
PE
73082006-04-25 Paul Eggert <eggert@cs.ucla.edu>
7309
7310 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
7311 that variable and the line breaks the bootstrap. Problem reported
7312 by Juan M. Guerrero.
7313
ed2e6384
AD
73142006-04-24 Akim Demaille <akim@lrde.epita.fr>
7315
7316 * doc/bison.texinfo (Multiple start-symbols): New.
7317
3cedc2dc
AD
73182006-04-24 Akim Demaille <akim@lrde.epita.fr>
7319
7320 * etc/README, etc/bench.pl: New.
7321
b2ddc3f3
AD
73222006-04-03 Akim Demaille <akim@lrde.epita.fr>
7323
7324 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
7325 rule.
7326 Reported by Mickael Labau.
7327 * tests/input.at (Torturing the Scanner): Test it.
7328
91e3ac9a
PE
73292006-03-16 Paul Eggert <eggert@cs.ucla.edu>
7330
7331 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
7332 Problem reported by Bob Rossi.
7333
73342006-03-13 Paul Eggert <eggert@cs.ucla.edu>
7335
7336 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
7337 and didn't really work.
7338 For the index, use @ifnotinfo, not @iftex.
7339 Minor cleanups of spacing and terminology.
7340
5cf61e93
AD
73412006-03-12 Akim Demaille <akim@lrde.epita.fr>
7342
7343 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
7344 of AT_NAME_PREFIX when %name-prefix is not used.
7345
aa08666d
AD
73462006-03-12 Akim Demaille <akim@lrde.epita.fr>
7347
7348 Apply --prefix to C++ skeletons too: they change the namespace.
7349 The test suite already exercize these cases.
7350 * data/c++.m4 (b4_namespace): New.
7351 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
7352 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
7353 * data/yacc.c, data/glr.c: Remove a useless `[]'.
7354 * doc/bison.texinfo: Document it.
7355 (Option Cross Key): Use @multitable in all formats. It looks
7356 nicer, even in TeX outputs.
7357 (Rules): Use the same code whatever the output type is.
7358 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
7359 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
7360 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 7361
45567173
AD
73622006-03-10 Akim Demaille <akim@lrde.epita.fr>
7363
7364 * TODO: Remove dead items.
7365
e9d8f881 73662006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
7367
7368 * doc/FAQ: Remove, merged into...
7369 * doc/bison.texinfo (FAQ): this.
7370 * doc/Makefile.am (EXTRA_DIST): Adjust.
7371
c095d689
AD
73722006-03-10 Akim Demaille <akim@lrde.epita.fr>
7373
7374 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
7375 even if empty.
7376 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
7377 * doc/bison.texinfo (Calc++ Scanner): Use it.
7378
6e0f8287
PE
73792006-03-09 Paul Eggert <eggert@cs.ucla.edu>
7380
7381 Fix two nits reported by twlevo, plus one more that I discovered.
7382
7383 * src/assoc.h (assoc_to_string): Give a name to the arg, as
7384 this is the usual Bison style.
7385 * src/location.h (location_print): Likewise.
7386
7387 * src/reader.h (token_name): Likewise.
7388
d6b771c3
PE
73892006-03-08 Paul Eggert <eggert@cs.ucla.edu>
7390
7391 Fix some nits reported by twlevo.
7392 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
7393 and "POSIX". Use more-modern syntax for URLs. Mention C++
7394 and ask for Java. Don't hardwire OS version numbers. Add
7395 copyright notice.
7396 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
7397 * src/conflicts.c (solved_conflicts_obstack): Now static.
7398
1e137b71
JD
73992006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
7400
7401 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
7402 page. Say "you can use it" not "you may use it" as on the web page;
7403 we're describing capabilities not granting permission.
7404
73f2e47e
PE
74052006-03-06 Paul Eggert <eggert@cs.ucla.edu>
7406
6d05403d
PE
7407 * data/glr.c (yyresolveLocations): Rename local variables to avoid
7408 shadowing warnings. Use usual patter for iterating through RHS.
7409 * tests/glr-regression.at
7410 (Uninitialized location when reporting ambiguity):
7411 Modify yylex so that it uses its argument, rather than trying
7412 to rely on ARGSUSED (which doesn't work for gcc with warnings).
7413 const char -> char const.
7414
73f2e47e
PE
7415 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
7416 Don't use tabs inside commands; it messes up 'ps'.
7417 Problem reported by twlevo.
7418
8710fc41
JD
74192006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
7420
7421 * tests/glr-regression.at (Uninitialized location when reporting
7422 ambiguity): New test case.
7423 * data/glr.c (yyresolveLocations): New function, which uses
7424 YYLLOC_DEFAULT.
7425 (yyresolveValue): Invoke yyresolveLocations before reporting an
7426 ambiguity.
7427 * doc/bison.texinfo (Default Action for Locations): Note
7428 YYLLOC_DEFAULT's usage for ambiguity locations.
7429 (GLR Semantic Actions): Cross-reference those notes.
7430
ae952af2
JD
74312006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
7432
7433 * tests/glr-regression.at (Leaked semantic values when reporting
7434 ambiguity): Remove unnecessary union and type declarations.
7435 (Leaked lookahead after nondeterministic parse syntax error): New test
7436 case.
7437 * data/glr.c (yyparse): Check for zero stacks remaining before
7438 attempting to shift the lookahead so that you don't lose it.
7439
35ee866a
JD
74402006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7441
7442 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
7443 * tests/glr-regression.at (Leaked semantic values when reporting
7444 ambiguity): New test case.
7445 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
7446 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
7447 now unnecessary yystackp parameter.
7448 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
7449 destructors can be called.
7450
7451 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
7452 in existing testcases.
7453
520181ab
JD
74542006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
7455
7456 Don't leak semantic values for parent RHS when a user action cuts the
7457 parser, and clean up related code a bit.
7458 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
7459 cuts parse): Rename to...
7460 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
7461 for leaked parent RHS values.
7462 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
7463 between an unresolved state (non-empty chain of semantic options) and
7464 an incomplete one (signaled by an empty chain).
ae952af2 7465 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
7466 successfully or unsuccessfully resolved yyGLRState to...
7467 (yyresolveValue): ... here so that yyresolveValue always leaves a
7468 yyGLRState with consistent data and thus is easier to understand.
7469 Remove the yyvalp and yylocp parameters since they are always just
7470 taken from the yys parameter. When reporting a discarded merged value
7471 in debugging output, note that it is incompletely merged. Document the
7472 interface.
7473 (yyresolveAction): If resolving any of the RHS states fails, destroy
7474 them all rather than leaking them. Thus, as long as user actions are
7475 written to clean up the RHS correctly, yyresolveAction always cleans up
7476 the RHS of a semantic option. Document the interface.
7477
18d9185c
PE
74782006-02-27 Paul Eggert <eggert@cs.ucla.edu>
7479
7480 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
7481 led to a segmentation fault in GNU Pascal. Problem reported
7482 by Waldek Hebisch.
7483
841a7737
JD
74842006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
7485
7486 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
7487 mid-rule action inside a nonterminal symbol in order to declare a
7488 destructor for its semantic value.
7489
fc3f467f
PE
74902006-02-16 Paul Eggert <eggert@cs.ucla.edu>
7491
7492 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
7493 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
7494 __cplusplus && ! defined _STDLIB_H && !
7495 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
7496 defined free))]: Include <stdlib.h> rather than rolling our own
7497 declarations of malloc and free, to avoid problems with
7498 incompatible declarations (using 'throw') C++'s stdlib.h. This
7499 should fix Debian bug 340012
7500 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
7501 reported by Guillaume Melquiond.
7502
a3af26dd
PE
75032006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7504
4d7bc38c
PE
7505 * NEWS: Clarify symbols versus types in unused-value warnings.
7506
a3af26dd
PE
7507 * configure.ac (AC_INIT): Bump version number.
7508
4e26c69e
PE
75092006-02-13 Paul Eggert <eggert@cs.ucla.edu>
7510
7511 * NEWS: Version 2.1a.
7512 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
7513 since C99 requires this.
7514
498e897c
PE
75152006-02-11 Paul Eggert <eggert@cs.ucla.edu>
7516
7517 * m4/c-working.m4: New file.
7518 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
7519
57bb17ca
PE
75202006-02-10 Paul Eggert <eggert@cs.ucla.edu>
7521
7522 * Makefile.maint: Merge from coreutils.
7523
0be105dc
PE
75242006-02-09 Paul Eggert <eggert@cs.ucla.edu>
7525
7526 More portability fixes for problems summarized by Nelson H. F. Beebe.
7527
7528 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
7529 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
7530 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
7531 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
7532 messes up because C++ code is compiled in 32-bit mode but linked
7533 in 64-bit mode.
7534
6fc0c024
PE
75352006-02-08 Paul Eggert <eggert@cs.ucla.edu>
7536
7537 More portability fixes for problems summarized by Nelson H. F. Beebe.
7538
7870f699
PE
7539 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
7540 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
7541
6fc0c024
PE
7542 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
7543 nodist_PROGRAMS, since we don't need to actually compile the
7544 example if we're just doing a plain 'make'. This avoids bothering
7545 the installer unnecessarily about problems due to weird C++
7546 compilers.
7547
fe6c2fde
PE
75482006-02-06 Paul Eggert <eggert@cs.ucla.edu>
7549
7550 More portability fixes for problems summarized by Nelson H. F. Beebe.
7551
7552 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
7553 than #include "...", and compile with -I'.'. The old method was
7554 not portable, according to Posix and the C standard, and it does
7555 not work with Sun C 5.7, where previous #line directives affect
7556 the working directory used in later #include "..." directives.
7557
927b425b
JMG
75582006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7559
7560 Various DJGGP specific issues in /djgpp
7561
d9735e9e
PE
75622006-02-02 Paul Eggert <eggert@cs.ucla.edu>
7563
7564 More portability fixes for problems summarized by Nelson H. F. Beebe.
7565
7566 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
7567 '#include <map>' works and that you can apply ++ to iterators.
7568
5a6755af
PE
75692006-02-01 Paul Eggert <eggert@cs.ucla.edu>
7570
67a0dc4f
PE
7571 Work around portability problems summarized by Nelson H. F. Beebe in
7572 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
7573
8c86f0ef
PE
7574 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7575 that '#include <string>' works.
7576
de35dd59
PE
7577 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
7578 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
7579 "warning: sorry: semantics of inline function static data `const
7580 unsigned char translate_table[262]' are wrong (you'll wind up with
7581 multiple copies)".
7582
67a0dc4f
PE
7583 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
7584 or, xor to not_, and_, or_, and xor_, respectively. This works
7585 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
7586 random system header somewhere that includes the equivalent of
7587 <iso646.h>.
7588
5a6755af
PE
7589 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
7590 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 7591 Suite Version 2.0.
5a6755af 7592
3f001415
JD
75932006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
7594
7595 During deterministic GLR operation, user actions should be able to
7596 influence the parse by changing yychar. To make this easier to fix and
7597 to make glr.c easier to evolve in general, don't maintain yytoken in
7598 parallel with yychar; just compute yytoken when needed.
7599 * tests/glr-regression.at (Incorrect lookahead during deterministic
7600 GLR): Check that setting yychar in a user action has the intended
7601 effect.
7602 * data/glr.c (yyGLRStack): Remove yytokenp member.
7603 (yyclearin): Don't set *yytokenp.
7604 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
7605 yychar rather than *yytokenp to determine the current lookahead.
7606 Compute yytoken locally when needed.
7607 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
7608 point to.
7609
7610 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
7611 after `--report' documentation.
7612
e2a8c0f5
PE
76132006-01-30 Paul Eggert <eggert@cs.ucla.edu>
7614
7615 * src/parse-gram.y (grammar_declaration): Location of printer
7616 symbol is @1, not list->location. Bug reported by twlevo.
7617 * tests/input.at (Incompatible Aliases): Adjust to above change.
7618
6b702268
PE
76192006-01-29 Paul Eggert <eggert@cs.ucla.edu>
7620
27622431
PE
7621 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
7622 all the test at once. This makes the output easier to read in the
7623 normal case.
7624
6b702268
PE
7625 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
7626 got from <http://bro-ids.org/download.html>. The bug is that
7627 when two actions appeared in succession, the second one was
7628 scanned before the first one was added to the grammar rule
7629 as a midrule action. Bison then output the incorrect warning
7630 "parse.y:905.17-906.36: warning: unused value: $3".
7631 * src/parse-gram.y (BRACED_CODE, action): These are no longer
7632 associated with a value.
7633 (rhs): Don't invoke grammar_current_rule_action_append.
7634 (action): Invoke it here instead.
7635 * src/reader.c (grammar_midrule_action): Now extern.
7636 (grammar_current_rule_action_append): Don't invoke
7637 grammar_midrule_action; that is now the scanner's job.
7638 * src/reader.h (last_string, last_braced_code_loc):
7639 (grammar_midrule_action): New decls.
7640 * src/scan-gram.l (last_string): Now extern, sigh.
7641 (last_braced_code_loc): New extern variable.
7642 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
7643 rule already has an action.
7644 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
7645 * tests/input.at (AT_CHECK_UNUSED_VALUES):
7646 Add some tests to check that the above changes fixed the bug.
7647
d40ba6c2
PE
76482006-01-27 Paul Eggert <eggert@cs.ucla.edu>
7649
7650 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
7651 All used changed. Check whether the symbol has a destructor,
7652 not whether it is typed.
7653 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
7654 that the values are still reported as unused. All line numbers
7655 adjusted.
7656
401aace6
PE
76572006-01-23 Paul Eggert <eggert@cs.ucla.edu>
7658
7659 Work around a bug in bro 0.8, which underparenthesizes its
7660 definition of YYLLOC_DEFAULT.
7661 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
7662 their arguments.
7663 * data/lalr1.cc: Likewise.
7664 * data/yacc.cc: Likewise.
7665
06f01bc4
PE
76662006-01-22 Paul Eggert <eggert@cs.ucla.edu>
7667
401aace6
PE
7668 Work around a bug in Pike 7.0, and give the Pike folks a
7669 better way to override the usual int widths.
7670 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
7671 user can override the types.
7672 (short): #undef, to work around a bug in Pike 7.0.
7673 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
7674 (union yyalloc.yyss): Use yytype_int16 rather than short.
7675 All uses changed.
7676 (yysigned_char): Remove.
7677 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
7678 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
7679 * tests/regression.at (Web2c Actions): Adjust to above changes.
7680
7681 * src/reader.c (check_and_convert_grammar): New function.
7682 (reader): Close the input file even if something went wrong during
7683 parsing. Minor file descriptor leak reported by twlevo.
7684
06f01bc4
PE
7685 * src/assoc.c (assoc_to_string): Use a default: abort (); case
7686 to pacify gcc -Wswitch-default.
7687 * src/scan-gram.l (adjust_location): Use a default: break; case
7688 to pacify gcc -Wswitch-default.
7689 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
7690 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
7691 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
7692 Move these decls to scan-skel.l, since they don't need to be
7693 visible elsewhere.
7694 * src/scan-skel.l: Accept the above decls.
7695 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
7696 is used.
7697
02650b7f
PE
76982006-01-21 Paul Eggert <eggert@cs.ucla.edu>
7699
7700 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
7701 since we don't want to insist on a version number at the start
7702 of the changelog every time.
7703 * Makefile.maint: Sync from coreutils a bit better.
7704 (sc_trailing_blank): Renamed from sc_trailing_space.
7705 All uses changed.
7706 (sc_no_if_have_config_h, sc_require_config_h):
7707 (sc_prohibit_assert_without_use): New rules.
7708 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
7709 (sc_dd_max_sym_length): Fix leading spaces in rule.
7710 (sc_system_h_headers): Prefix with @.
7711 (sc_useless_cpp_parens, m4-check): Output line numbers.
7712 (changelog-check): Allow version only in head.
7713 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
7714 satisfy new Makefile.maint rule.
7715 * data/glr.c: Likewise.
7716 * data/glr.cc: Likewise.
7717 * data/lalr1.cc: Likewise.
7718 * data/yacc.c: Likewise.
7719 * lib/ebitsetv.c: Likewise.
7720 * lib/lbitset.c: Likewise.
7721 * lib/subpipe.c: Likewise.
7722 * lib/timevar.c: Likewise.
7723 * src/system.h: Likewise.
7724 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
7725 * djgpp/Makefile.maint: Add copyright notice.
7726 * djgpp/README.in: Likewise.
7727 * djgpp/config.bat: Likewise.
7728 * djgpp/config.site: Likewise.
7729 * djgpp/config_h.sed: Likewise.
7730 * djgpp/djunpack.bat: Likewise.
7731 * djgpp/config.sed: Fix copyright notice to match standard format.
7732 * djgpp/subpipe.h: Likewise.
7733 * lib/bitsetv-print.c: Likewise.
7734 * lib/bitsetv.c: Likewise.
7735 * lib/subpipe.h: Likewise.
7736 * lib/timevar.c: Likewise.
7737 * lib/timevar.h: Likewise.
7738 * djgpp/subpipe.c: Use standard recipe for config.h.
7739 * lib/abitset.c: Likewise.
7740 * lib/bitset.c: Likewise.
7741 * lib/bitset_stats.c: Likewise.
7742 * lib/bitsetv-print.c: Likewise.
7743 * lib/bitsetv.c: Likewise.
7744 * lib/ebitsetv.c: Likewise.
7745 * lib/get-errno.c: Likewise.
7746 * lib/lbitset.c: Likewise.
7747 * lib/subpipe.c: Likewise.
7748 * lib/timevar.c: Likewise.
7749 * lib/vbitset.c: Likewise.
7750 * tests/local.at: Likewise.
7751 * src/scan-gram.l: Don't include verify.h, since system.h does
7752 that for us.
7753 * .x-sc_require_config_h: New file.
7754 * .x-sc_unmarked_diagnostics: New file.
7755
287c78f6
PE
77562006-01-20 Paul Eggert <eggert@cs.ucla.edu>
7757
287c78f6
PE
7758 Be a bit more systematic about using 'abort'.
7759 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
7760 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
7761 Put 'default: abort ();' before some other case, to satisfy older
7762 pedantic compilers.
7763 * lib/bitset_stats.c (bitset_stats_init): Likewise.
7764 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
7765 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
7766 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
7767 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
7768 (get_decision_str, get_orientation_str, get_node_alignment_str):
7769 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
7770 (get_linestyle_str, get_arrowstyle_str): Likewise.
7771 * src/conflicts.c (resolve_sr_conflict):
7772 Use a default case rather than one for the one remaining enum
7773 value, to catch invalid enum values as well.
7774 * src/lalr.c (set_goto_map, map_goto):
7775 Prefer "assert (FOO);" to "if (!FOO) abort ();".
7776 * src/nullable.c (nullable_compute, token_definitions_output):
7777 Likewise.
7778 * src/reader.c (packgram, reader): Likewise.
7779 * src/state.c (transitions_to, state_new, state_reduction_find):
7780 Likewise.
7781 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
7782 (symbol_pack): Likewise.
7783 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
7784 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
7785 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
7786 * src/system.h: Don't include <assert.h>.
7787 (assert): New macro.
7788
7789 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
7790 (Destructor Decl, Parser Function, Pure Calling):
7791 Describe rules for braces inside C code more carefully.
287c78f6 7792
c66dfadd
PE
77932006-01-19 Paul Eggert <eggert@cs.ucla.edu>
7794
c21493b8
PE
7795 Fix some porting glitches found by Nelson H. F. Beebe.
7796 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
7797 compilers that don't understand that abort () does not return.
7798 * src/state.c (transitions_to): Likewise.
7799 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
7800 that '#include <cstdlib>' works.
7801 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
7802 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
7803 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
7804 for the benefit of some pre-C99 compilers.
7805
b6e3facf
PE
7806 * bootstrap: Undo changes to gnulib files that autoreconf made.
7807
c66dfadd
PE
7808 Minor fixups to get 'make maintainer-check' to work.
7809 * configure.ac: Don't use -Wnested-externs, as it's incompatible
7810 with the new verify.h implementation.
7811 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
7812 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
7813 * data/yacc.c (YYUSE): Likewise.
7814 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
7815 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
7816 * src/parse-gram.y (declaration): Don't pass a string constant
7817 to a function that expects char *, since GCC might complain
7818 about the constant value.
7819 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
7820 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
7821 before #defining them.
7822 * tests/glr-regression.at
7823 (Incorrectly initialized location for empty right-hand side in GLR):
7824 In yyerror, use the msg arg.
7825 (Corrupted semantic options if user action cuts parse):
7826 (Incorrect lookahead during deterministic GLR):
7827 (Incorrect lookahead during nondeterministic GLR):
7828 Don't name a local var 'index'; it shadows string.h's 'index'.
7829
ed94ef2a
AD
78302006-01-19 Akim Demaille <akim@epita.fr>
7831
7832 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
7833 location, not just parts of it.
7834
e9ad4aec
PE
78352006-01-18 Paul Eggert <eggert@cs.ucla.edu>
7836
d6ca7905
PE
7837 * NEWS: Document the fact that multiple %unions are now allowed.
7838 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
7839 * TODO: This feature is now implemented, so remove it from
7840 the wishlist.
d6ca7905 7841
ef1b70e0
PE
7842 * Makefile.maint: Merge with coreutils Makefile.maint.
7843 (CVS_LIST): Use build-aux version if available.
7844 (VERSION_REGEXP): New macro.
7845 (syntax-check-rules): Add sc_no_if_have_config_h,
7846 sc_prohibit_assert_without_use, sc_require_config_h,
7847 sc_useless_cpp_parens.
7848 (sc_obsolete_symbols): Check for O_NDELAY.
7849 (sc_dd_max_sym_length): Track coreutils.
7850 (sc_unmarked_diagnostics): Look in all files, not just *.c.
7851 (sc_useless_cpp_parens): New rule.
7852 (news-date-check): Look for version or today's date.
7853 (changelog-check): Don't require version number near head.
7854 (copyright-check): Use current year instead of hardwiring 2005.
7855 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
7856 (announcement): Add --gpg-key-ID.
7857
7858 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
7859 with "file system".
7860
2073ce56 7861 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
7862 array. Problem reported by twlevo.
7863 * src/reader.c (packgram): Prepend a new sentinel before ritem.
7864 * src/lalr.c (build_relations): Rely on new sentinel.
7865 * src/gram.c (gram_free): Adjust to new sentinel.
7866
b7691f15
JD
78672006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
7868
7869 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
7870 yylookaheadNeeds. All uses updated.
7871 (yysplitStack): Rename local yynewLookaheadStatuses to
7872 yynewLookaheadNeeds.
7873 * data/glr-regression.at (Incorrect lookahead during nondeterministic
7874 GLR): In comments, change `lookahead status' to `lookahead need'.
7875
ddee1b06
PH
78762006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7877
7878 * data/glr.c (yysplitStack): A little stylistic rewrite.
7879
12f4614d
PH
78802006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7881
7882 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
7883
32c29292
JD
78842006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
7885
7886 * doc/bison.texinfo: Fix some typos.
7887 (GLR Semantic Actions): New subsection discussing special
7888 considerations because GLR semantic actions might be deferred.
7889 (Actions): Mention look-ahead usage of yylval.
7890 (Actions and Locations): Mention look-ahead usage of yylloc.
7891 (Special Features for Use in Actions): Add YYEOF entry and mention it
7892 in the yychar entry.
7893 In the yychar entry, remove mention of the local yychar case (pure
7894 parser) since this is irrelevant information when writing semantic
148d66d8 7895 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
7896 yychar is otherwise described as an external variable.
7897 In the yychar entry, don't call it the `current' look-ahead since it
7898 isn't when semantic actions are deferred.
7899 In the yychar and yyclearin entries, add note about deferred semantic
7900 actions.
7901 Add yylloc and yylval entries discussing look-ahead usage.
7902 (Look-Ahead Tokens): When discussing yychar, don't call it the
7903 `current' look-ahead, and do mention yylval and yylloc.
7904 (Error Recovery): Cross-reference `Action Features' when mentioning
7905 yyclearin.
148d66d8 7906 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
7907 look-ahead.
7908 In the yylloc and yylval entries, mention look-ahead usage.
7909
de366a2f 79102006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
7911
7912 * tests/glr-regression.at: Update copyright year to 2006.
7913
bf70fa87
JD
79142006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7915
7916 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
7917 use during nondeterministic operation to track which stacks have
7918 actually needed the current lookahead.
7919 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
7920 Allocate, deallocate, resize, and otherwise shuffle space for
7921 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
7922 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
7923 appropriately during nondeterministic operation.
7924 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
7925 members to store the current lookahead to be used by the deferred
7926 user action.
7927 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
7928 from which the RHS is taken. Set the lookahead members of the new
7929 yySemanticOption according to the lookahead status for stack yyk.
7930 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
7931 yyaddDeferredAction.
7932 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
7933 members of yySemanticOption before invoking yyuserAction, and then set
7934 them back to their current values afterward.
7935 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
7936 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
7937 * tests/glr-regression.at: Remove `.' from the ends of recent test case
7938 titles for consistency.
7939 (Leaked merged semantic value if user action cuts parse): In order to
7940 suppress lint warnings, use arguments in merge function, and assign
7941 char value < 128 in main.
7942 (Incorrect lookahead during deterministic GLR): New test case.
7943 (Incorrect lookahead during nondeterministic GLR): New test case.
7944
05449a2c
JD
79452006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
7946
de366a2f 7947 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
7948 !yyvaluep as signal that no semantic value is available to print.
7949 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
7950 to print a semantic value.
7951
4158e0a1 79522006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 7953
4158e0a1
JD
7954 * tests/glr-regression.at: For consistency with my newer test cases,
7955 don't thank myself.
7956
d659304d
JD
79572006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
7958
7959 * data/glr.c (yyresolveValue): When merging semantic options, if at
7960 least one user action succeeds but a later one cuts the parse, then
7961 destroy the semantic value before returning rather than leaking it.
7962 (yyresolveStates): If a user action cuts the parse and thus
7963 yyresolveValue fails, ignore the (unset) semantic value rather than
7964 corrupting the yyGLRState, and empty the semantic options list since
7965 the user actions should have called all necessary destructors.
7966 Simplify code with YYCHK.
7967 * tests/glr-regression.at (Corrupted semantic options if user action
7968 cuts parse): New test case.
7969 (Undesirable destructors if user action cuts parse): New test case.
7970 Before applying any of this patch, this test case never actually failed
7971 for me... but only because the corrupted semantic options usually
7972 masked this bug.
7973 (Leaked merged semantic value if user action cuts parse): New test
7974 case.
7975
6ec2c0f2
AD
79762006-01-05 Akim Demaille <akim@epita.fr>
7977
7978 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
7979
1b9c21fb
PE
79802006-01-04 Paul Eggert <eggert@cs.ucla.edu>
7981
7982 * data/c.m4 (b4_c_modern): New macro, with a new provision for
7983 _MSC_VER. Problem reported by Cenzato Marco.
7984 (b4_c_function_def): Use it.
7985 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
7986 b4_c_modern.
7987 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
7988 than rolling our own.
7989
84866159
AD
79902006-01-04 Akim Demaille <akim@epita.fr>
7991
7992 Also warn about non-used mid-rule values.
7993 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
7994 member.
7995 (symbol_list_new): Adjust.
7996 * src/reader.c (symbol_typed_p): New.
7997 (grammar_rule_check): Use it.
7998 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
7999 Check its rule.
8000 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
8001 Use it.
8002 * tests/actions.at (Exotic Dollars): Adjust.
8003
378f4bd8
AD
80042006-01-04 Akim Demaille <akim@epita.fr>
8005
8006 * src/reader.c (grammar_midrule_action): If $$ is set in a
8007 mid-rule, move the `used' bit to its lhs.
8008 * tests/input.at (Unused values): New.
8009 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
8010
e2a21b6f
PE
80112006-01-03 Paul Eggert <eggert@cs.ucla.edu>
8012
54662697
PE
8013 * doc/bison.texinfo (Bison Options): Say more accurately what
8014 --yacc does.
8015 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
8016 about declarations in the grammar when in Yacc mode, as POSIX does
8017 not require a diagnostic when the grammar uses extensions.
8018
8019 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
8020
073f9288
PE
8021 Warn about dubious constructions like "%token T T".
8022 Reported by twlevo.
8023 * src/symtab.h (struct symbol.declared): New member.
8024 * src/symtab.c (symbol_new): Initialize it to false.
8025 (symbol_class_set): New arg DECLARING, specifying whether
8026 this is a declaration that we want to warn about, if there
8027 is more than one of them. All uses changed.
8028
1221b78a
PE
8029 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
8030 Allow multiple %union directives, whose contents concatenate.
8031 * src/parse-gram.y (grammar_declaration): Likewise.
8032 Use muscle_code_grow, so that we don't need stype_line any more.
8033 All uses changed.
8034
8035 * src/muscle_tab.c (muscle_grow): Fix comment.
8036
e2a21b6f
PE
8037 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
8038 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
8039 Update copyright year to 2006.
8040
8f7e3cf9
AD
80412006-01-03 Akim Demaille <akim@epita.fr>
8042
8043 Have glr.cc pass (some of) the calc.at tests.
8044 * data/glr.cc (b4_parse_param_orig): New.
8045 (b4_parse_param): Improve its definition, and bound it more
8046 clearly in the skeleton.
8047 (b4_epilogue): Append, instead of prepending, in order to keep
8048 #line consistency.
8049 Simplify the generation of auxiliary functions: locations and
8050 purity are mandated.
8051 (b4_global_tokens_and_yystype): Honor it.
8052 * data/location.cc (c++.m4): Don't include it.
8053 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
8054 and AT_SKEL_CC_IF.
8055 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
8056 AT_LALR1_CC_IF.
8057 Be sure to initialize the first position's filename.
8058 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
8059 mandated anyway.
8060 (AT_CHECK_CALC_GLR_CC): New.
8061 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
8062
3953ed88
AD
80632006-01-02 Akim Demaille <akim@epita.fr>
8064
8065 * src/output.c (output_skeleton): Don't hard wire the inclusion of
8066 c.m4.
0a96ba81 8067 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
8068 * data/glr.cc: Do not include stack.hh.
8069
9ecafbbf
AD
80702006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
8071
8072 * data/glr.c: Reformat whitespace with tabs.
8073 (b4_lpure_formals): Remove this unused m4 macro.
8074 * tests/cxx-type.at: Reformat whitespace with tabs.
8075 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
8076 since it's a member. Rename type to isNterm for clarity.
8077
c4d497a0
AD
80782005-12-29 Akim <akim@sulaco.local>
8079
8080 Let glr.cc catch up with symbol_value_print.
8081 * data/glr.cc (b4_yysymprint_generate): Replace by...
8082 (b4_yy_symbol_print_generate): this.
8083 (yy_symbol_print, yy_symbol_value_print): Declare them.
8084
4517da37
PE
80852005-12-28 Paul Eggert <eggert@cs.ucla.edu>
8086
8087 * src/location.h (boundary): Note that a line or column equal
8088 to INT_MAX indicates an overflow.
8089 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
8090 (rule_length_overflow, increment_rule_length, add_column_width):
8091 New functions.
8092 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
8093 (<SC_BRACED_CODE>"}"):
8094 Use increment_rule_length rather than incrementing it by hand.
8095 (adjust_location, handle_syncline): Diagnose overflow.
8096 (handle_action_dollar, handle_action_at):
8097 Fix bug with monstrosities like $-2147483648.
8098 Remove now-unnecessary checks.
8099 (scan_integer): Verify assumptions and remove now-unnecessary checks.
8100 (convert_ucn_to_byte): Verify assumptions.
8101 (handle_syncline): New arg LOC. All callers changed.
8102 Don't store through a value derived from char const * pointer.
8103
8104 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
8105 GCC warnings.
8106
e3233bf6
PE
81072005-12-27 Paul Eggert <eggert@cs.ucla.edu>
8108
8109 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
8110 Remove unnecessary forward static decls.
8111
8f3596a6
AD
81122005-12-27 Akim Demaille <akim@epita.fr>
8113
8114 * src/reader.c (grammar_current_rule_check): Also check that $$
8115 is used.
8116 Take the rule to check as argument, hence rename as...
8117 (grammar_rule_check): this.
8118 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
8119 Rename as...
8120 (grammar_rule_begin, grammar_rule_end): these, for consistency.
8121 (grammar_midrule_action, grammar_symbol_append): Now static.
8122 * tests/torture.at (input): Don't rely on the default action
8123 being always performed.
8124 * tests/calc.at: "Set" $$ even when the action is "cut" with
8125 YYERROR or other.
8126 * tests/actions.at (Exotic Dollars): Instead of using unused
8127 values, check that the warning is issued.
8128
721be13c
PE
81292005-12-22 Paul Eggert <eggert@cs.ucla.edu>
8130
8131 * NEWS: Improve wording for unused-value warnings.
8132
a0af42fc
AD
81332005-12-22 Akim Demaille <akim@epita.fr>
8134
8135 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
8136 (b4_yysymprint_generate): Rename as...
8137 (b4_yy_symbol_print_generate): this.
8138 Generate yy_symbol_print instead of yysymprint.
8139 Generate also yy_symbol_value_print, and use it.
8140
affac613
AD
81412005-12-22 Akim Demaille <akim@epita.fr>
8142
721be13c 8143 * NEWS: Warn about unused values.
affac613
AD
8144 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
8145 a `used' member.
8146 (symbol_list_n_get, symbol_list_n_used_set): New.
8147 (symbol_list_n_type_name_get): Use symbol_list_n_get.
8148 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
8149 * src/reader.c (grammar_current_rule_check): Check that values are
8150 used.
8151 * src/symtab.c (symbol_print): Accept 0.
8152 * tests/existing.at: Remove the type information.
8153 Empty the actions.
8154 Remove useless actions (beware of mid-rule actions: perl -000
8155 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
8156 * tests/actions.at (Exotic Dollars): Use unused values.
8157 * tests/calc.at: Likewise.
8158 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8159 Likewise.
8160
8161 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
8162 rule_useful_p.
8163
9d9b8b70
PE
81642005-12-21 Paul Eggert <eggert@cs.ucla.edu>
8165
8bb4c753
PE
8166 Undo 2005-12-01 tentative license wording change. The wording is
8167 still being reviewed by the lawyers, and we don't want to wait for
8168 them before publishing a test release. For now, revert to the
8169 previous wording.
8170 * NEWS: Undo 2005-12-01 change.
8171 * data/glr.c: Revert to previous license wording.
8172 * data/glr.cc: Likewise.
8173 * data/lalr1.cc: Likewise.
8174 * data/location.cc: Likewise.
8175 * data/yacc.c: Likewise.
8176
9d9b8b70
PE
8177 * NEWS: Reword %destructor vs YYABORT etc.
8178 * data/glr.c: Use American spacing, for consistency.
8179 * data/glr.cc: Likewise.
8180 * data/lalr1.cc: Likewise.
8181 * data/yacc.c: Likewise.
8182 * data/yacc.c: Reformat comments slightly.
8183 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
8184 for consistency. Fix some spelling errors and reword recently-included
8185 text slightly.
8186 * tests/cxx-type.at: Cast results of malloc, for C++.
8187
2c3b392a
AD
81882005-12-21 Joel E. Denny <address@hidden>
8189
8190 * tests/cxx-type.at: Construct a tree, count the parents of shared
8191 nodes, and free each node once and only once. Previously, the memory
8192 for semantic values was leaked instead.
8193
d6cff4dc
AD
81942005-12-21 Joel E. Denny <address@hidden>
8195
8196 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
8197 (yylval, yylloc): If pure, #define to yystackp->yyval and
8198 yystackp->yyloc similar to yychar and yynerrs.
8199 (yyparse): If pure, remove local yylval and yylloc. Add local
8200 yystackp to accommodate pure definitions of yylval and yylloc.
8201 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
8202 yylvalp and yyllocp to &yylval and &yylloc.
8203 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
8204 namespace. Previously, nerrs and char were missing, but lval and lloc
8205 weren't necessary.
8206 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
8207 yylvalp and yyllocp parameters since, if pure, these are now always
8208 accessible through yystackp. If not pure, they are still accessible
8209 globally.
8210 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
8211 `if (YYID (N))' to pacify lint.
8212
a85284cf
AD
82132005-12-21 Akim Demaille <akim@epita.fr>
8214
8215 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
8216 destroy the RHS symbols of a rule.
8217 * data/yacc.c (yylen): Initialize to 0.
8218 Keep its value to the number of items to possibly shift.
8219 In particular, a regular successful parse that ends on YYFINAL by
8220 a (internal) YYACCEPT must not have yylen != 0.
8221 (yyerrorlab, yyreturn): Pop the RHS.
8222 Reorder a bit to emphasize the `shifting' bits of code.
8223 (YYPOPSTACK): Now accept a number of items to pop.
8224 * data/lalr1.cc: Likewise.
8225 * data/glr.c: Formatting changes.
8226 Use goto instead of fall through.
8227 * doc/bison.texinfo (Destructor Decl): Complete.
8228
d508c281
JMG
82292005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8230
8231 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8232 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
8233 * djgpp/config.bat: Replace every occurence of the file name
8234 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8235 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8236 * djgpp/config.sed: Replace every occurence of the file name
8237 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
8238 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
8239 * djgpp/djunpack.bat: DJGPP specific file.
8240 * djgpp/fnchange.lst: DJGPP specific file.
8241 * djgpp/README.in: Add new information about how to unpack the bison
8242 source on MSDOS and other systems which have 8.3 file name restrictions
8243 using djunpack.bat and fnchange.lst.
8244
3e7a2cd9
PE
82452005-12-12 Paul Eggert <eggert@cs.ucla.edu>
8246
8247 * bootstrap (build_cvs_prefix): Remove; unused.
8248 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
8249 when getting gnulib.
8250
82512005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
8252
8253 * data/glr.c: Reorder typedef declarations for structs to match order
8254 of struct declarations.
8255 Rename yystack everywhere to yystackp except in yyparse where it's not
8256 a pointer.
8257 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
8258 consistency.
8259 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
8260 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
8261 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
8262 lint.
8263
877519f8
PE
82642005-12-09 Paul Eggert <eggert@cs.ucla.edu>
8265
0eca5a39
PE
8266 * tests/sets.at (Accept): Fix typos in regular expression used to
8267 sed out the final state number.
8268
2cec9080
PE
8269 Work around portability problem on Solaris 10: flex-generated
8270 files include <stdio.h> before <config.h>, which messes up
8271 because the latter defines __EXTENSIONS__. Address the problem
8272 by creating two new little files that include <config.h> first,
8273 then include the flex-generated files. Rewrite everyone else
8274 to include <config.h> first, as well.
8275 * lib/timevar.c: Always include "config.h".
8276 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
8277 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
8278 (EXTRA_bison_SOURCES): New macro.
8279 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
8280 * src/system.h: Don't include config.h.
8281 * src/LR0.c: Include <config.h> first.
8282 * src/assoc.c: Likewise.
8283 * src/closure.c: Likewise.
8284 * src/complain.c: Likewise.
8285 * src/conflicts.c: Likewise.
8286 * src/derives.c: Likewise.
8287 * src/files.c: Likewise.
8288 * src/getargs.c: Likewise.
8289 * src/gram.c: Likewise.
8290 * src/lalr.c: Likewise.
8291 * src/location.c: Likewise.
8292 * src/main.c: Likewise.
8293 * src/muscle_tab.c: Likewise.
8294 * src/nullable.c: Likewise.
8295 * src/output.c: Likewise.
8296 * src/parse-gram.y: Likewise.
8297 * src/print.c: Likewise.
8298 * src/print_graph.c: Likewise.
8299 * src/reader.c: Likewise.
8300 * src/reduce.c: Likewise.
8301 * src/relation.c: Likewise.
8302 * src/state.c: Likewise.
8303 * src/symlist.c: Likewise.
8304 * src/symtab.c: Likewise.
8305 * src/tables.c: Likewise.
8306 * src/uniqstr.c: Likewise.
8307 * src/vcg.c: Likewise.
8308
877519f8
PE
8309 * src/parse-gram.y: Fix minor problems uncovered by lint.
8310 (current_lhs, current_lhs_location): Now static.
8311 (current_assoc): Remove unused variable.
8312
8313 Cleanups so that Bison-generated parsers have less lint.
8314 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
8315 Prepend /*ARGSUSED*/, for lint's sake.
8316 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
8317 definition if 'lint' is defined.
8318 (YYID): New macro (or function, if lint).
8319 All uses of /*CONSTCOND*/0 replaced by YYID(0).
8320 * data/yacc.c: Likewise.
8321 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
8322 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
8323 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
8324 is C++ only.
8325 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
8326 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
8327 Use YYID(0) rather than 0, for lint.
8328 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
8329 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
8330
f5228370
PE
83312005-12-07 Paul Eggert <eggert@cs.ucla.edu>
8332
8333 * tests/glr-regression.at
8334 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
8335 Close memory leak reported by twlevo.
8336
69ce078b
PE
83372005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
8338
6ff99711
PE
8339 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
8340 all stacks.
8341 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
8342 * tests/glr-regression.at (No users destructors if stack 0 deleted):
8343 New test case.
8344 (Duplicated user destructor for lookahead): This test now is expected
8345 to succeed.
8346
af3412cd
PE
83472005-12-01 Paul Eggert <eggert@cs.ucla.edu>
8348
32b5b719 8349 * NEWS: Document the following change.
af3412cd
PE
8350 * data/yacc.c: Say "parser skeleton" rather than "file", since
8351 it's no longer just a file.
8352 * data/glr.c: Grant a special exception for C GLR parsers, that
8353 reads like the already-existing exception for C LALR(1) parsers.
8354 * data/glr.cc: Likewise.
8355 * data/lalr1.cc: Likewise.
8356 * data/location.cc: Likewise.
8357 * data/yacc.c: Reword the "written by" statement to clarify that
8358 it was the parser skeleton, not the entire output file.
8359 * data/glr.c: Written by Paul Hilfinger.
8360 * data/glr.cc: Written by Akim Demaille.
8361 * data/lalr1.cc: Likewise.
8362
035aa4a0
PE
83632005-11-18 Paul Eggert <eggert@cs.ucla.edu>
8364
d9963c85
PE
8365 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
8366 Fix typos in previous change that broke 'make check'.
8367 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
8368 supported in C.
8369 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
8370 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
8371 We can revert this once things settle down.
8372
035aa4a0
PE
8373 * src/conflicts.c (conflicts_print): Don't print file name twice
8374 when %expect fails because there were no conflicts.
8375 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
8376 change.
8377 * tests/conflicts.at (%expect not enough, %expect too much):
8378 (%expect with reduce conflicts): Adjust to new behavior.
8379
83802005-11-18 Akim Demaille <akim@epita.fr>
8381
8382 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
8383 errors.
8384 * NEWS: Document this.
8385 * doc/bison.texinfo (Expect Decl): Likewise.
8386
d1ff7a7c
AD
83872005-11-16 Akim Demaille <akim@epita.fr>
8388
8389 Generalize the display of semantic values and locations in traces.
8390 * data/glr.c (yy_reduce_print): Fix indices (again).
8391 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
8392 literal integers.
8393 * data/lalr1.cc (yyreduce_print): Rename as...
8394 (yy_reduce_print): this.
8395 Display values and locations.
8396 * data/yacc.c (yy_reduce_print): Likewise.
8397 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
8398 (yysymprint): Move higher to be visible from yy_reduce_print).
8399 (yyparse): Adjust.
8400 * tests/calc.at: Adjust the expected length of the traces.
8401
6de5398d
AD
84022005-11-14 Akim Demaille <akim@epita.fr>
8403
8404 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
8405 from 1 to N, while values and location start at 0.
8406 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
8407
a1373f55
AD
84082005-11-14 Akim Demaille <akim@epita.fr>
8409
8410 * data/glr.c (yy_reduce_print): Fix the $ number.
8411
613d8952
AD
84122005-11-14 Akim Demaille <akim@epita.fr>
8413
8414 "Use" parse parameters.
8415 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
8416 * data/glr.c, data/glr.cc: Use them.
8417 * data/glr.c (YYUSE): Have a C++ definition that supports
8418 non-pointer types.
8419
b2741627
AD
84202005-11-14 Akim Demaille <akim@epita.fr>
8421
8422 * data/glr.c (yyexpandGLRStack): Declare only if defined.
8423
5059b5c8
AD
84242005-11-14 Akim Demaille <akim@epita.fr>
8425
42249483
AD
8426 * data/glr.cc: New.
8427 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 8428
4626a15d
AD
84292005-11-12 Akim Demaille <akim@epita.fr>
8430
8431 Let position and location be PODs.
8432 * data/location.cc (position::initialize, location::initialize): New.
8433 (position::position, location::location): Define only if
8434 b4_location_constructors is defined.
8435 * data/lalr1.cc (b4_location_constructors): Define it for backward
8436 compatibility.
8437 * doc/bison.texinfo (Initial Action Decl): Use initialize.
8438
84392005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
8440
8441 * data/lalr1.cc: Move the body of the ctor and dtor into the
8442 parser file (instead of the header).
8443 Wrap the implementations in a "namespace yy".
8444
84452005-11-12 Akim Demaille <akim@epita.fr>
8446
8447 Have glr.c include its header file when created.
8448 * data/glr.c (b4_shared_declarations): New.
8449 Output them verbatim in the parser if !%defines, otherwise
8450 output then in the header file, and include it instead.
8451
1989d947
AD
84522005-11-11 Akim Demaille <akim@epita.fr>
8453
8454 * data/glr.c: Comment changes.
8455
84562005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
8457
8458 When yydebug, report semantic and location values for reductions.
8459 * data/glr.c (yy_reduce_print): Report the semantic values and the
8460 locations.
8461 (YY_REDUCE_PRINT): Adjust.
8462 (yyglrReduce): Use them.
8463 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
8464 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
8465 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
8466 traces.
8467
02998094
AD
84682005-11-10 Akim Demaille <akim@epita.fr>
8469
8470 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
8471 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
8472 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
8473
5210672f
PE
84742005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
8475
8476 * m4/cxx.m4, examples/Makefile.am: Don't build
8477 examples/calc++ if no C++ compiler is available. (trivial change)
8478
a8991a1d
AD
84792005-11-09 Akim Demaille <akim@epita.fr>
8480
8481 * src/scan-skel.l: Use a couple of asserts.
8482
36b5e963
AD
84832005-11-03 Akim Demaille <akim@epita.fr>
8484
8485 In some (weird) cases, the final state number is incorrect.
8486 Reported by Alexandre Duret-Lutz.
8487 * src/LR0.c (state_list_append): Remove the computation of
8488 final_state.
8489 (save_reductions): Do it here.
8490 (get_state): Alpha conversion.
8491 (generate_states): Use a for loop.
8492 * src/gram.h (item_number_is_rule_number)
8493 (item_number_is_symbol_number): New.
8494 * src/state.c: Use assert.
8495 * src/system.h: Include assert.h.
8496 * tests/sets.at (Accept): New.
8497
44e7ead1
PH
84982005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
8499
8500 * data/glr.c (yyfill): Adjust comment.
36b5e963 8501 (yyresolveAction): Initialize default location properly
44e7ead1
PH
8502 for empty right-hand sides.
8503 (yydoAction): Ditto.
8504 Add comment explaining apparently dead code.
36b5e963
AD
8505 * tests/glr-regression.at
8506 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 8507 New test.
36b5e963 8508
e10a80ee
PE
85092005-10-30 Paul Eggert <eggert@cs.ucla.edu>
8510
8511 * bootstrap (cleanup_gnulib): New function. Use it to clean up
8512 gnulib when interrupted. This fixes some race conditions and
8513 works around some portability problems (one noted by Paul
8514 Hilfinger).
8515
067b32ee
AD
85162005-10-22 Akim <akim@epita.fr>
8517
8518 * Makefile.cfg: Adjust to config -> build-aux.
8519 Reported by twledo.
8520
4b367315
AD
85212005-10-21 Akim Demaille <akim@epita.fr>
8522
8523 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
8524 the %parse-params.
8525 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
8526 * data/yacc.c (b4_Pure_if): Rename as...
8527 (b4_yacc_pure_if): this.
8528 (YY_SYMBOL_PRINT, yyparse): Adjust.
8529 * doc/bison.texinfo: Formatting changes.
8530
24cc23d9
AD
85312005-10-21 Akim Demaille <akim@epita.fr>
8532
8533 Finish the transition config -> build-aux.
8534 * configure.ac, Makefile.am: Use build-aux.
8535 * config/prev-version, config/announce-gen, config/Makefile.am:
8536 Move to...
8537 * build-aux/prev-version, build-aux/announce-gen,
8538 * build-aux/Makefile.am: here.
8539
d4476375
AD
85402005-10-14 Akim Demaille <akim@epita.fr>
8541
8542 * examples/calc++/test: Use set -x only when VERBOSE.
8543
302c0aee
PE
85442005-10-13 Paul Eggert <eggert@cs.ucla.edu>
8545
8546 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
8547 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
8548
7625ec2c
AD
85492005-10-13 Akim Demaille <akim@epita.fr>
8550
8551 * src/scan-skel.l: Output the base name parts of the parser and
8552 header file names.
302c0aee 8553 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
8554 additional checks.
8555 Use this to exercise C++ outputs in subdirs.
8556 Reported by Oleg Smolsky.
8557
ba0fe3c7
PE
85582005-10-12 Paul Eggert <eggert@cs.ucla.edu>
8559
8560 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
8561 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
8562 Problem reported by John P. Hartmann.
8563 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
8564 already defined it.
8565
9b8a5ce0
AD
85662005-10-12 Akim Demaille <akim@epita.fr>
8567
8568 * src/parse-gram.y (version_check): Exit 63 to please missing
8569 (stands for "version mismatch).
8570 * tests/input.at, doc/bison.texinfo: Adjust.
8571
4f6e011e
PE
85722005-10-10 Paul Eggert <eggert@cs.ucla.edu>
8573
8574 Work around portability problems with Visual Age C compiler
8575 (xlc and xlC_r) reported by John P. Hartmann.
8576 * data/location.cc (initial_column, initial_line): Remove.
8577 All uses replaced by 0 and 1.
8578 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
8579 that xlc complains about.
8580 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 8581 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 8582 as __STDC__.
4d7aa45e
PE
8583 * data/yacc.c (YYMODERN_C): New macro, which also looks at
8584 __STDC_VERSION__. Use it everywhere instead of looking at
8585 __STDC__ and __cplusplus.
4f6e011e 8586
a1b3bf8c
AD
85872005-10-10 Akim Demaille <akim@epita.fr>
8588
8589 * examples/calc++/test: Be quiet unless VERBOSE.
8590
412e44aa
PE
85912005-10-05 Paul Eggert <eggert@cs.ucla.edu>
8592
2a4647a3
PE
8593 * data/c.m4 (yydestruct, yysymprint):
8594 Use YYUSE instead of casting to void.
8595 * data/glr.c (YYUSE): New macro.
8596 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8597 Use it instead of rolling our own.
8598 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8599 (YYCHK1):
8600 Use /*CONSTCOND*/ to suppress lint warnings.
8601 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
8602 (YY_STACK_PRINT): Use 'false' not '0'.
8603 (YYUSE): New macro.
8604 (yysymprint_, yydestruct_): Use it instead of rolling our own.
8605 * data/yacc.c (YYUSE): New macro.
8606 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
8607 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
8608 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
8609
8610
412e44aa
PE
8611 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
8612 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
8613
88c6637f
PE
86142005-10-04 Paul Eggert <eggert@cs.ucla.edu>
8615
2f4f028d
PE
8616 Undo the parts of the unlocked-I/O change that substituted
8617 putc or puts for printf. This might hurt performance a bit,
8618 but some people prefer the printf style.
8619 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
8620 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
8621 All uses replaced by YYFPRINTF and YYDPRINTF.
8622 * data/yacc.c: Likewise.
8623 * lib/bitset.c (bitset_print): Likewise.
8624 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
8625 putc and puts.
8626 * lib/lbitset.c (debug_lbitset): Likewise.
8627 * src/closure.c (print_firsts, print_fderives): Likewise.
8628 * src/gram.c (grammar_dump): Likewise.
8629 * src/lalr.c (look_ahead_tokens_print): Likewise.
8630 * src/output.c (escaped_output): Likewise.
8631 (user_actions_output): Break apart two printfs.
8632 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
8633 * src/reduce.c (reduce_print): Likewise.
8634 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
8635 * src/system.h: Include unlocked-io.h rathe than stdio.h.
8636
88c6637f
PE
8637 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
8638 Use assignments rather than casts-to-void to suppress
8639 unused-variable warnings. This pacifies 'lint'.
8640 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
8641 unused-variable warnings.
8642
fb32e373
JMG
86432005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8644
8645 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
8646
edb8f44f
PE
86472005-10-02 Paul Eggert <eggert@cs.ucla.edu>
8648
fb9c0b33
PE
8649 Use unlocked I/O for a minor performance improvement on hosts like
8650 GNU/Linux and Solaris that support unlocked I/O. The basic idea
8651 is to use the gnlib unlocked-io module, and to prefer putc and
8652 puts to printf when either will work (since the latter doesn't
8653 come in an unlocked flavor).
8654 * bootstrap (gnulib_modules): Add unlocked-io.
8655 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
8656 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
8657 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
8658 and similarly for puts and putc and printf.
8659 * data/yacc.c: Likewise.
8660 * lib/bitset.c (bitset_print): Likewise.
8661 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
8662 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
8663 to printf.
8664 * lib/lbitset.c (debug_lbitset): Likewise.
8665 * src/closure.c (print_firsts, print_fderives): Likewise.
8666 * src/gram.c (grammar_dump): Likewise.
8667 * src/lalr.c (look_ahead_tokens_print): Likewise.
8668 * src/output.c (escaped_output): Likewise.
8669 (user_actions_output): Coalesce two printfs.
2f4f028d 8670 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
8671 * src/reduce.c (reduce_print): Likewise.
8672 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 8673 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 8674
edb8f44f
PE
8675 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
8676 this confuses xgettext.
8677
b50d2359
AD
86782005-10-02 Akim Demaille <akim@epita.fr>
8679
8680 * bootstrap (gnulib_modules): Add strverscmp.
8681 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
8682 * m4/.cvsignore: Add strverscmp.m4.
8683 * src/parse-gram.y (%require): New token, new rule.
8684 (version_check): New.
8685 * src/scan-gram.l (%require): Adjust.
8686 * tests/input.at (AT_REQUIRE): New.
8687 Use it.
8688 * doc/bison.texinfo (Require Decl): New.
8689 (Calc++ Parser): Use %require.
8690
21667f64
AD
86912005-10-02 Akim Demaille <akim@epita.fr>
8692
8693 * data/location.cc: New.
8694
2b81e969
AD
86952005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
8696 Akim Demaille <akim@epita.fr>
8697
8698 Make sure -odir/foo.cc creates dir/location.hh etc.
8699 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
8700 (spec_file_prefix, spec_verbose_file, spec_graph_file)
8701 (spec_defines_file): Now const.
8702 (dir_prefix): New.
8703 (short_base_name): Remove.
8704 * src/files.c: Adjust.
8705 (dirname.h): Include.
8706 (base_name): Don't prototype it.
8707 (finput): Remove, duplicates gram_in.
8708 (full_base_name, short_base_name): Replace by...
8709 (all_but_ext, all_but_tab_ext): these.
8710 (compute_base_names): Rename as...
8711 (compute_file_name_parts): this.
8712 Update to compute the new variables, including dir_prefix.
8713 Adjust dependencies.
8714 * src/output.c (prepare): Output them.
8715 * src/reader.c: Adjust to use gram_in, not finput.
8716 * src/scan-skel.l (@dir_prefix@): New.
8717
ad6a9b97
JMG
87182005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
8719
8720 * lib/subpipe.c: New function end_of_output_subpipe() added
8721 to allow support for non-posix systems. This is a no-op function
8722 for posix systems.
8723
8724 * lib/subpipe.h: New function end_of_output_subpipe() added
8725 to allow support for non-posix systems. This is a no-op function
8726 for posix systems.
8727
8728 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
8729 handle the lack of pipe/fork functionality on non-posix systems.
8730
8731 * djgpp/Makefile.maint: DJGPP specific file.
8732
8733 * djgpp/README.in: DJGPP specific file.
8734
8735 * djgpp/config.bat: DJGPP specific configuration file.
8736
8737 * djgpp/config.sed: DJGPP specific configuration file.
8738
8739 * djgpp/config.site: DJGPP specific configuration file.
8740
8741 * djgpp/config_h.sed: DJGPP specific configuration file.
8742
8743 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
8744
8745 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
8746
fc695704
AD
87472005-10-02 Akim Demaille <akim@epita.fr>
8748
8749 * data/location.cc: New, extract from...
8750 * data/lalr1.cc: here.
8751 (location.hh): Include it after the user prologue, in case the
8752 filename type is defined by the user.
8753 Forward declation location and position before the pre-prologue.
8754 (yyresult_): Rename as...
8755 (yyresult): this, it's a local variable, not an attribute.
8756 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
8757
87582005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
8759
8760 * examples/extexi: Restore the #line generation.
8761
fb9712a9
AD
87622005-09-30 Akim Demaille <akim@epita.fr>,
8763 Alexandre Duret-Lutz <adl@gnu.org>
8764
8765 Move the token type and YYSTYPE in the parser class.
8766 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
8767 (parser::token): New, from the moved free definition of tokens.
8768 (parser::semantic_value): Now a full definition instead of an
8769 indirection to YYSTYPE.
8770 (b4_post_prologue): No longer included in the header file, but
8771 in the implementation file.
8772 * doc/bison.texi (C+ Language Interface): Update.
8773 * src/parse-gram.y: Support unary %define.
8774 * tests/actions.at: Define global_tokens_and_yystype for backward
8775 compatibility until we update the tests.
8776 * tests/calc.at: Idem.
8777 (first_line, first_column, last_line, last_column): Define for lalr1.cc
8778 to simplify the code.
8779
55f0c7b1
PE
87802005-09-29 Paul Eggert <eggert@cs.ucla.edu>
8781
8782 Port to SunOS 4.1.4, which lacks strtoul and strerror.
8783 Ah, the good old days! Problem reported by Peter Klein.
8784 * bootstrap (gnulib_modules): Add strerror, strtoul.
8785 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
8786 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
8787
fb9712a9 87882005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
8789
8790 * data/c.m4 (b4_error_verbose_if): New.
8791 * data/lalr1.cc: Use it.
8792 (YYERROR_VERBOSE_IF): Remove.
8793 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
8794 parser members, replaced by...
8795 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
8796 local variables.
8797 (yysyntax_error_): Takes the state number as argument.
8798 (yyreduce_print_): Use the argument yyrule, not the former
8799 attribute yyn_.
8800
8a6f72f3
PE
88012005-09-26 Paul Eggert <eggert@cs.ucla.edu>
8802
8803 * bootstrap (gnulib_modules): Add verify.
8804 * lib/.cvsignore: Add verify.h.
8805 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
8806 * src/system.h (verify): Remove.
8807 Include verify.h instead.
8808 * src/tables.c (tables_generate): Use new API for 'verify'.
8809
0d50976f
PE
88102005-09-21 Paul Eggert <eggert@cs.ucla.edu>
8811
ebc3737e
PE
8812 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
8813 local variables whose names begin with 'yy'.
8814 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
8815 Trivial changes from Joel E. Denny.
8816
0d50976f
PE
8817 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
8818 it itself.
8819 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
8820 don't use alloca any more.
8821
8822 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
8823 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 8824 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
8825 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
8826 to match yacc.c, to test more hosts.
8827
a05b79df
PE
88282005-09-20 Paul Eggert <eggert@cs.ucla.edu>
8829
55289366
PE
8830 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
8831 doesn't affect behavior.
8832 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
8833 Solaris, AIX, MSC.
8834 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
8835 This works a bit better with glibc, if user code has already included
8836 stdlib.h.
8837 * doc/bison.texinfo (Bison Parser): Document that users can't
8838 arbitrarily use malloc and free for other purposes. Document
8839 that <alloca.h> and <malloc.h> might be included.
8840 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
8841 user must declare alloca.
8842
a05b79df
PE
8843 * HACKING (release): Forwarn the Translation Project about
8844 stable releses.
8845
3ab2ca22
AD
88462005-09-20 Akim Demaille <akim@epita.fr>
8847
8848 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
8849
a9739e7c
PE
88502005-09-19 Paul Eggert <eggert@cs.ucla.edu>
8851
a702593e
PE
8852 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
8853 (YYSTACK_ALLOC_MAXIMUM): Use it.
8854 (yysyntax_error): New function.
8855 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
8856 multiple syntax errors are reported, and alloca is being used.
8857 Instead, reallocate buffers twice as big each time, so that
8858 we waste at most half the allocated memory. Start with a small
8859 (128-byte) buffer that will suffice in most cases anyway.
8860 Use yysyntax_error to do most of the work.
8861
8862 * doc/bison.texinfo (Error Reporting, Table of Symbols):
8863 yynerrs is the number of errors reported, not the number of
8864 errors encountered.
8865
a9739e7c
PE
8866 * tests/glr-regression.at (Duplicated user destructor for lookahead):
8867 Mark it as expected to fail.
8868 Cast result of malloc; problem reported by twlevo@xs4all.nl.
8869 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
8870 Don't start user-code symbols with "yy", to avoid name space problems.
8871
f479c6c6
AD
88722005-09-19 Akim Demaille <akim@epita.fr>
8873
8874 Remove the traits, failed experiment.
8875 It never proved useful, and anyway because of the current
8876 definition, it was not possible to have several specialization of
8877 this traits, making it useless.
8878 * data/lalr1.cc (yy:traits): Remove.
8879 Inline its definitions in the parser class.
8880
e2586f82
AD
88812005-09-19 Akim Demaille <akim@epita.fr>
8882
8883 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
8884 least Mac OSX with a /usr/local install of gettext.
8885
2e8cf949
AD
88862005-09-19 Akim Demaille <akim@epita.fr>
8887
8888 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
8889 and yytoken for similarity with the other skeletons.
8890
c7fb0b90
AD
88912005-09-19 Akim Demaille <akim@epita.fr>
8892
4e26c69e 8893 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 8894
1bd0deda
PE
88952005-09-16 Paul Eggert <eggert@cs.ucla.edu>
8896
8897 * NEWS: Version 2.1.
8898
8899 * NEWS: Remove notice of yytname change, since it was never in an
8900 official release.
8901 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
8902 diagnostic.
8903 * src/output.c (prepare): Likewise.
8904 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
8905 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
8906 is not defined. This is an awful hack, but it's enough for now.
8907 All callers changed.
8908 * tests/glr-regression-at (make_value): Args are const pointers now,
8909 to avoid GCC warning.
8910 (Duplicated user destructor for lookahead): New test. Currently
8911 skipped. It fails on my host but I'm not sure it'll always fail.
8912
89132005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
8914
8915 * src/symtab.h (struct symbol): Declare the printer and destructor
8916 as const, to avoid accidental calls to free.
8917 (symbol_destructor_set, symbol_printer_set): Adjust.
8918 * src/symtab.c: Adjust.
8919
1bd0deda 89202005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
8921
8922 * data/c.m4 (b4_token_enums): New.
8923 (b4_token_defines): Rename as...
8924 (b4_token_enums_defines): this.
8925 (b4_token_defines): New, output only the #defines.
8926 * data/yacc.c, data/glr.c: Adjust.
8927 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
8928 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
8929 as default values.
8930
dbcdae2d
AD
89312005-09-16 Akim Demaille <akim@epita.fr>
8932
8933 * data/lalr1.cc (yylex_): Remove, inline its code.
8934 (yyreport_syntax_error_): Remove, replaced by...
8935 (yysyntax_error_): this which returns a string and leaves to the
8936 caller the call to the users' error function.
8937 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
8938 Move from members of the parser object...
8939 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
8940 to local variables of the parse function.
8941
70d8f291
AD
89422005-09-16 Akim Demaille <akim@epita.fr>
8943
8944 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
8945 since it's in Bison's name space.
8946
b47dbebe
PE
89472005-09-15 Paul Eggert <eggert@cs.ucla.edu>
8948
ae199bf1
PE
8949 * data/glr.c (yyresolveValue): Add default case to pacify
8950 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
8951
b47dbebe
PE
8952 * NEWS: Document when yyparse started to return 2.
8953 * doc/bison.texinfo (Parser Function): Document when yyparse
8954 returns 2.
8955
8956 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
8957 (b4_filename_type): Renamed back from b4_file_name_type. All uses
8958 changed.
8959 (class position): file_name -> filename (reverting). All uses changed.
8960
89612005-09-14 Paul Eggert <eggert@cs.ucla.edu>
8962
8963 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
8964 do anything if $@ exists. This reverts part of the 2005-07-07
8965 patch.
8966
00292f66
PE
89672005-09-11 Paul Eggert <eggert@cs.ucla.edu>
8968
8969 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
8970 contains obsolete information and isn't worth distributing as a
8971 separate file anyway.
8972 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
8973 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
8974 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
8975 (yyparse): Abort if user code uses longjmp to throw an unexpected
8976 value.
8977
a420f962
PE
89782005-09-09 Paul Eggert <eggert@cs.ucla.edu>
8979
00292f66
PE
8980 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
8981 Suggested by twlevo@xs4all.nl.
8982
127287e9
PE
8983 * data/glr.c (YYCHK1): Do not assume YYE is in range.
8984 This avoids a diagnostic from gcc -Wswitch-enum.
8985 Problem reported by twlevo@xs4all.nl.
8986
a420f962
PE
8987 * doc/bison.texinfo: Don't use "filename", as per GNU coding
8988 standards. Use "file name" or "file" or "name", depending on
8989 the context.
8990 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
8991 not to hack/foo.tab.c.
8992 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
8993 * data/glr.c: b4_filename -> b4_file_name.
8994 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
8995 All uses changed.
8996 (class position): filename -> file_name. All uses changed.
8997 * data/yacc.c: b4_filename -> b4_file_name.
8998 * lib/bitset.h: filename -> file_name in local vars.
8999 * lib/bitset_stats.c: Likewise.
9000 * src/files.c: Likewise.
9001 * src/scan-skel.l ("@output ".*\n): Likewise.
9002 * src/files.c (file_name_split): Renamed from filename_split.
9003 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
9004
90052005-09-08 Paul Eggert <eggert@cs.ucla.edu>
9006
9007 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
9008 to accommodate latest gnulib.
9009
9010 * tests/glr-regression.at (Duplicate representation of merged trees):
9011 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
9012
9013 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
9014 needed.
9015
42a6501d
PE
90162005-08-26 Paul Eggert <eggert@cs.ucla.edu>
9017
9018 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
9019 All uses changed. Invoke user destructor after an error during a
9020 split parse (trivial change from Joel E. Denny).
9021
9022 * tests/glr-regression.at
9023 (User destructor after an error during a split parse): New test case.
9024 Problem reported by Joel E. Denny in:
9025 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
9026
ef9a1faf
PE
90272005-08-25 Paul Eggert <eggert@cs.ucla.edu>
9028
5b4aaf78
PE
9029 * README-cvs: Give URLs for recommended tools.
9030 Mention Gzip version problem, and bootstrapping issues.
9031 Remove troubleshooting section, as it's somewhat obsolete.
9032
b5240ba5
PE
9033 * bootstrap (no_cache): New var, to accommodate different wget
9034 variants. Use it instead of '-C off'. Problem reported by
9035 twlevo@xs4all.nl.
9036
ef9a1faf
PE
9037 * data/glr.c (yydestroyStackItem): New function.
9038 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
9039 debugging information. Problem reported by Joel E. Denny.
9040
e6efa9da
AD
90412005-08-25 Akim Demaille <akim@epita.fr>
9042
9043 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
9044
adc90f13
PE
90452005-08-24 Paul Eggert <eggert@cs.ucla.edu>
9046
9047 * data/glr.c (yyrecoverSyntaxError, yyreturn):
9048 Don't invoke destructor on unresolved entries.
9049 * tests/glr-regression.at
9050 (User destructor for unresolved GLR semantic value): New test case.
9051 Problem reported by Joel E. Denny in:
9052 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
9053
f9315de5
PE
90542005-08-21 Paul Eggert <eggert@cs.ucla.edu>
9055
15d29c1f
PE
9056 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
9057 Add strnlen.c.
9058 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
9059 lib-prefix.m4, po.m4.
9060
dd5f2af2
PE
9061 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
9062 in yydestruct diagnostic, since it might not be an error.
9063 Problem reported by Joel Denny near end of
9064 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 9065 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
9066 * data/yacc.c (yyreturn): Likewise.
9067 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
9068
9069 * src/files.c: Remove obsolete FIXME comment.
9070
9071 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
9072 with the other templates, and to fix bogus run-on messages such
9073 as the one reported at the end of
9074 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
9075 All callers changed to avoid the newline.
9076 (yyprocessOneStack): Output two lines rather than one, to accommodate
9077 the above change. This changes the debug output format slightly.
9078
f9315de5
PE
9079 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
9080 reported by Joel E. Denny in
9081 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
9082 (trivial change).
9083 * tests/glr-regression.at (Duplicate representation of merged trees):
9084 New test, from Joel E. Denny in:
9085 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
9086 * THANKS: Add Joel E. Denny.
9087
9088 * configure.ac (AC_INIT): Bump to 2.0c.
9089
04098407
PE
90902005-07-24 Paul Eggert <eggert@cs.ucla.edu>
9091
9092 * NEWS: Version 2.0b.
9093
ca5d2013
PE
9094 * Makefile.am (SUBDIRS): Put examples before tests, so that
9095 "make check" doesn't finish with "All 1 tests passed".
9096
3d54b576
PE
9097 * tests/regression.at (Token definitions): Don't rely on
9098 AT_PARSER_CHECK for data that contains backslashes. It currently
9099 uses 'echo', and 'echo' isn't portable if its argument contains
9100 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
9101 that the byte '\0xff' is not printable in the C locale; it is,
9102 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
9103 not printable, so use '\0x81' to test.
9104
d53ae497
PE
9105 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
9106 version of GCC, since the macro is used with non-GCC compilers.
9107
fc01665e
PE
9108 Fix core dump reported by Pablo De Napoli in
9109 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
9110 * tests/regression.at (Invalid inputs with {}): New test.
9111 * src/parse-gram.y (token_name): Translate type before using
9112 it as an index.
9113
04098407
PE
9114 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
9115 the user's name space. All uses changed to __attribute__
9116 ((__unused__)).
9117 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
9118 Add __attribute__ ((__noreturn__)).
9119
9120 * etc/clcommit: Remove. We weren't using it, and it failed
9121 "make maintainer-distcheck".
9122 * Makefile.maint: Merge from coreutils.
9123 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
9124 (syntax-check-rules): Change list of rules as described below.
9125 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
9126 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
9127 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
9128 (sc_trailing_space): New rules.
9129 (sc_xalloc_h_in_src): Remove.
9130 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
9131 (sc_space_tab, sc_error_exit_success, sc_changelog):
9132 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
9133 (makefile-check, po-check, author_mark_check):
9134 (makefile_path_separator_check, copyright-check):
9135 Use grep -n, to make it easier to find violations.
9136 Use CVS_LIST and CVS_LIST_EXCEPT.
9137 (header_regexp, h_re): Remove.
9138 (dd_c): New macro.
9139 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
9140 (my-distcheck): Use more-modern GCC flags.
9141 (signatures, %.asc): Remove.
9142 (rel-files, announcement): Remove signatures.
9143 Restore old updating code, even though we don't use it, so
9144 that we're the same as coreutils.
9145 (alpha, beta, major): Depend on news-date-check.
9146 Make the upload commands.
9147
9148 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
9149 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
9150 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
9151 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
9152 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
9153 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
9154 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
9155 * tests/sets.at: Likewise.
9156
9157 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
9158 we comment out the Autoconf version number.
9159 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
9160 it's error-prone and "make maintainer-distcheck" rejects it.
9161
9162 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
9163 Indent calls to "error" to pacify "make maintainer-distcheck",
9164 when the calls are not intended to be translated.
9165 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
9166
9167 * src/Makefile.am (DEFS): Use +=, to pacify
9168 "make maintainer-distcheck".
9169 (bison_SOURCES): Add scan-skel.h.
9170 (sc_tight_scope): New rule, from coreutils.
9171
9172 * src/files.c (src_extension, header_extension):
9173 Now static, not extern.
9174 * src/getargs.c (short_options): Likewise.
9175 * src/muscle_tab.c (muscle_table): Likewise.
9176 * src/parse-gram.y (current_class, current_type, current_prec):
9177 Likewise.
9178 * src/reader.c (grammar_end, previous_rule_end): Likewise.
9179 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
9180 * src/main.c (main): Cast bindtextdomain and textdomain calls to
9181 void, to avoid warning when NLS is disabled.
9182 * src/output.c: Include scan-skel.h.
9183 (scan_skel): Remove decl, since scan-skel.h does this.
9184 (output_skeleton):
9185 Indent calls to "error" to pacify "make maintainer-distcheck".
9186 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
9187 * src/reader.h (gram_end, gram_lineno): New decls to pacify
9188 "make maintainer-distcheck".
9189 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
9190 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
9191 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
9192 (skel_lex_destroy, scan_skel): Move these decls to...
9193 * src/scan-skel.h: New file.
9194 * src/uniqstr.c (uniqstr_assert):
9195 Indent calls to "error" to pacify "make maintainer-distcheck".
9196
9197 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
9198 not @VAR@.
9199
9200 * tests/torture.at: Revamp to avoid misuse of atoi that
9201 "make maintainer-distcheck" complained about.
9202
9203 * examples/extexi (message): Don't print a message more than once,
9204 and omit line-number decoration that makes Emacs compile think
9205 that informative messages are worth worrying about.
9206
92072005-07-22 Paul Eggert <eggert@cs.ucla.edu>
9208
9209 * configure.ac: Update version number.
9210
9211 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
9212 accidentally.
9213 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
9214 autogenerated by the maintainer.
9215 * examples/calc++/.cvsignore: Add *.yy.
9216
9217 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
9218 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9219 * lib/bitsetv.c (bitsetv_alloc): Likewise.
9220
9221 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
9222
9223 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
9224 from maintainer-distcheck about casting the argument of 'free'.
9225
9226 * NEWS: Mention recent yytname changes.
9227 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
9228
9229 * bootstrap: For translations that have not yet been upgraded to
9230 the new runtime-po domain, prime the pump by extracting the
9231 relevant strings from the obsolete translations. This code can be
9232 removed once the bison-runtime domain has been translated by each
9233 team.
9234
9235 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
9236 now that token names are already quoted.
9237
9238 Fix problem reported by Anthony Heading.
9239 * data/glr.c (YYTOKEN_TABLE): New macro.
9240 (yytname): Define if YYTOKEN_TABLE.
9241 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
9242 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
9243 (YYERROR_VERBOSE): Define the same way the other skeletons do.
9244 * src/output.c (prepare_symbols): Output token_table_flag.
9245
0ffda363
PE
92462005-07-21 Paul Eggert <eggert@cs.ucla.edu>
9247
9248 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
9249 again if the first call fails.
9250
9251 * data/glr.c (yytnamerr): New function.
9252 (yyreportSyntaxError): Use it to dequote most string literals.
9253 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
9254 with other skeletons. All uses changed.
9255 (yytnameerr_): New function.
9256 (yyreport_syntax_error): Use it to dequote most string literals.
9257 * data/yacc.c (yytnamerr): New function.
9258 (yyerrlab): Use it to decode most string literals.
9259 * doc/bison.texinfo (Decl Summary, Calling Convention):
9260 Clarify quoting convention of yytname.
9261 * src/output.c (prepare_symbols): Quote all names. This undoes
9262 the 2005-04-17 change, which is now accomplished (mostly) via
9263 changes in the parsers as described above.
9264 * tests/regression.at (Token definitions, Web2c Actions):
9265 Undo most 2005-04-17 change here, too.
9266
92672005-07-20 Paul Eggert <eggert@cs.ucla.edu>
9268
9269 Fix more problems reported by twlevo@xs4all.nl.
9270 * tests/cxx-type.at: Don't pipe output of ./types through sed to
9271 remove trailing spaces. This loses the exit status of ./types,
9272 and isn't needed since ./types shouldn't be emitting trailing
9273 spaces.
9274 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
9275 as the stack isn't valid in that case.
9276
9277 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9278 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9279 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9280 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
9281 is used.
9282 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
9283 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9284 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9285 Likewise.
9286
9287 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
9288 overly-picky compilers that reject 'char *foo = "bar";'.
9289
9290 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
9291 to FILE * parameter, not to stderr. This fixes a typo introduced
9292 in the 2005-07-12 change.
9293
9294 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
9295 warnings from GCC 4.
9296
9297 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
9298 (yyglrShiftDefer, yysplitStack):
9299 Remove unused parameters b4_pure_formals. All uses changed.
9300 (yyglrShift): Remove unused parameters b4_user_formals.
9301 All uses changed.
9302 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
9303
6100a9aa
PE
93042005-07-18 Paul Eggert <eggert@cs.ucla.edu>
9305
258b75ca
PE
9306 Destructor cleanups and regularization among the three skeletons.
9307 * NEWS: Document the behavior changes.
9308 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
9309 stack before failing, as the cleanup code will do it for us now.
9310 * data/lalr1.cc (yyerrlab): Likewise.
9311 * data/glr.c (yyparse): Pop everything off the stack before
9312 freeing it, so that destructors get called properly.
9313 * data/lalr1.cc (yyreturn): Likewise.
9314 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
9315 This is more consistent.
9316 * doc/bison.texinfo (Destructor Decl): Mention more reasons
9317 why destructors might be called. 1.875 -> 2.1.
9318 (Destructor Decl, Decl Summary, Table of Symbols):
9319 Some English-language cleanups for %destructor.
9320 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
9321 Add output line for destructor of start symbol.
9322 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
9323 because of that same extra output line.
9324
1a059451
PE
9325 * NEWS: Document minor wording changes in diagnostics of
9326 Bison-generated parsers.
9327 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
9328 Remove unused formals. All uses changed.
9329 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
9330 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
9331 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
9332 Rename yyoverflowab to yyexhaustedlab.
9333 When memory exhaustion occurs during syntax-error reporting,
9334 report it separately rather than in a single diagnostic; this
9335 eases translation.
9336 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
9337 (Memory Exhausted): Renamed from Parser Stack Overflow.
9338 Revamp wording slightly to prefer "memory exhaustion".
9339 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
9340
97460c78
PE
9341 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
9342
30757c8c
PE
9343 Add i18n support to the GLR skeleton. Partially fix the C++
9344 skeleton; a C++ expert needs to finish this. Remove debugging
9345 msgids; there's little point to having them translated, since they
9346 can be understood only by someone who can read the
9347 (English-language) source code.
9348
9349 Generate runtime-po/bison-runtime.pot automatically, so that we
9350 don't have to worry about garbage getting in that file. We'll
9351 make sure after the next official release that old msgids don't
9352 get lost. See
9353 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
9354
9355 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
9356 Now auto-generated.
9357 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
9358 Fix typos in explanations of the runtime file.
9359 * bootstrap: Change gettext keyword from YYI18N to YY_.
9360 Use standard Makefile.in.in in runtime-po, since we'll arrange
9361 for backward-compatible bison-runtime.po files in a different way.
9362 * data/glr.c (YY_): New macro, from yacc.c.
9363 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
9364 Translate messages intended for users.
9365 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
9366 the wording in the other skeletons. We don't know that the memory
9367 is virtual.
9368 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
9369 Use same method that yacc.c uses.
9370 Don't translate debugging messages.
9371 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
9372 it doesn't work (yet), and requires C++ expertise to fix.
9373 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
9374 Move defn to a more logical place, to be consistent with other
9375 skeletons.
9376 Don't translate debugging messages.
9377 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
9378 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
9379 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
9380 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
9381
ac8c5689
PE
9382 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
9383 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
9384 void, not int.
9385 * tests/glr-regression.at (Badly Collapsed GLR States):
9386 Likewise.
9387 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9388 yylex should return 0 at EOF rather than aborting.
9389
6100a9aa
PE
9390 Improve tests for stack overflow in GLR parser.
9391 Problem reported by twlevo@xs4all.nl.
9392 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
9393 All uses removed.
9394 (yyStackOverflow): Just longjmp, but with value 2 so that caller
9395 can handle the problem.
9396 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
9397 (yyparse): New local variable yyresult to record the result.
9398 Use result of setjmp to set it, rather than storing itinto
9399 struct.
9400 (yyDone): Remove label.
9401 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
9402 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
9403 if YYABORT is used).
9404 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
9405 yyparse status; put status > 1 into diagnostic.
9406 Check that status==2 works.
9407 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
9408 Use exit status 3 for failure to open (which shouldn't happen).
9409
15f40952
PE
94102005-07-17 Paul Eggert <eggert@cs.ucla.edu>
9411
67fd79c4
PE
9412 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
9413 1 on syntax error; just let yyparse do its thing.
9414 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
9415 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
9416 (Exploding the Stack Size with Alloca):
9417 (Exploding the Stack Size with Malloc):
9418 Expect exit status 2, not 1, since the parser is supposed to blow
9419 its stack. Problem reported by twlevo@xs4all.nl.
9420
15f40952
PE
9421 * data/glr.c (yyparse): Don't assume that the initial calls
9422 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
9423 Print a stack-overflow message and fail instead.
9424 Initialize the line-number information before creating the stack,
9425 so that the stack-overflow message can report line zero safely.
9426
f32c66b5
PE
94272005-07-14 Paul Eggert <eggert@cs.ucla.edu>
9428
a22ff96f 9429 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
9430 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
9431 (yyuserMerge): Provide a default case if b4_mergers is empty.
9432 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
9433 * tests/glr-regression.at
9434 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 9435 Add casts to pacify C++ compilers.
1beb0b24
PE
9436 * tests/glr-regression.at (Improper merging of GLR delayed action
9437 sets): Declare yylex before using it.
f32c66b5 9438 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
9439 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
9440 test for valgrind; valgrind is independent of g++.
9441 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
9442 for compatibility with POSIX 1003.1-2001 (if running coreutils).
9443 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
9444 Use a destructor, so that we can expand the stack. Change
9445 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 9446
d741bd1b
PE
94472005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9448
9449 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
9450 a valgrind failure. Problem reported by twlevo@xs4all.nl.
9451
0410a6e0
PE
94522005-07-13 Paul Eggert <eggert@cs.ucla.edu>
9453
9454 * PACKAGING: New file, suggested by Bruno Haible and taken from
9455 similar wording in gettext's PACKAGING file.
9456 * NEWS: Mention PACKAGING.
9457 * Makefile.am (EXTRA_DIST): Add PACKAGING.
9458
f7ab6a50
PE
94592005-07-12 Paul Eggert <eggert@cs.ucla.edu>
9460
baf785db 9461 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
9462 * bootstrap: Get runtime translations into runtime-po.
9463 Create runtime-po files automatically, if possible.
9464 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
9465 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
9466 does not infringe on the user's name space.
9467 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
9468 * doc/bison.texinfo (Internationalization): Revamp the English
9469 and Texinfo syntax a bit, to try to make it clearer.
9470 (Bison Options, Option Cross Key): Mention --print-localedir.
9471 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
9472 YYENABLE_NLS. Quote a bit more.
9473 * runtime-po/.cvsignore: New file.
9474 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
9475 * runtime-po/Rules-quot: Remove; now created by bootstrap.
9476 * runtime-po/quot.sed: Likewise.
9477 * runtime-po/boldquot.sed: Likewise.
9478 * runtime-po/en@quot.header: Likewise.
9479 * runtime-po/en@boldquot.header: Likewise.
9480 * runtime-po/insert-header.sin: Likewise.
9481 * runtime-po/remove-potcdate.sin: Likewise.
9482 * runtime-po/Makevars: Likewise.
9483 * runtime-po/LINGUAS: Likewise.
9484 * runtime-po/de.po: Likewise; we will rely on the translation project
9485 to maintain this, so "bootstrap" should get it.
0410a6e0 9486 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
9487 its value.
9488 * src/main.c (main): Bind the bison-runtime domain, too.
9489
94902005-07-12 Bruno Haible <bruno@clisp.org>
9491
9492 * data/yacc.c: Include <libintl.h> when NLS is enabled.
9493 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
9494 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
9495 * runtime-po: New directory.
9496 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
9497 $(DOMAIN).pot-update rule, so that old messages are never dropped.
9498 * runtime-po/Rules-quot: New file, copied from po/.
9499 * runtime-po/quot.sed: Likewise.
9500 * runtime-po/boldquot.sed: Likewise.
9501 * runtime-po/en@quot.header: Likewise.
9502 * runtime-po/en@boldquot.header: Likewise.
9503 * runtime-po/insert-header.sin: Likewise.
9504 * runtime-po/remove-potcdate.sin: Likewise.
9505 * runtime-po/Makevars: New file.
9506 * runtime-po/POTFILES.in: New file.
9507 * runtime-po/LINGUAS: New file.
9508 * runtime-po/bison-runtime.pot: New file.
9509 * runtime-po/de.po: New file.
9510 * m4/bison.m4: New file.
9511 * Makefile.am (SUBDIRS): Add runtime-po.
9512 (aclocaldir, aclocal_DATA): New variables.
9513 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
9514 Define aclocaldir.
9515 * src/getargs.c (usage): Document --print-localedir option.
9516 (PRINT_LOCALEDIR_OPTION): New enum item.
9517 (long_options): Add --print-localedir option.
9518 (getargs): Handle --print-localedir option.
9519 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
9520 (Internationalization): New section.
9521
22dda0f0
AD
95222005-07-12 Akim Demaille <akim@epita.fr>
9523
9524 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
9525 for consistency with the rest of the code.
9526 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
9527 Add separators.
9528
82b248ad
AD
95292005-07-12 Akim Demaille <akim@epita.fr>
9530
9531 * src/parse-gram.y: Use %printer instead of YYPRINT.
9532
fa0e9314
AD
95332005-07-12 Akim Demaille <akim@epita.fr>
9534
867a3e00
AD
9535 * src/symtab.h, src/symtab.c (symbol_print): New.
9536 * src/symlist.h, src/symlist.c (symbol_list_print): New.
9537 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
9538
95392005-07-12 Akim Demaille <akim@epita.fr>
9540
9541 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
9542 b4_at_dollar and b4_dollar_dollar.
9543
e054b190
PE
95442005-07-11 Paul Eggert <eggert@cs.ucla.edu>
9545
9546 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
9547 and Pennello's paper.
9548
34160ec4
PE
95492005-07-09 Paul Eggert <eggert@cs.ucla.edu>
9550
407d4a75
PE
9551 * data/yacc.c (yyparse): Undo previous patch. Instead,
9552 set yylsp[0] and yyvsp[0] only if the initial action
9553 sets yylloc and yylval, respectively.
9554
34160ec4
PE
9555 * data/yacc.c (yyparse): In the initial action, set
9556 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
9557 This avoids the use of undefined variables if the initial
9558 action does not set yylloc and/or yylval.
9559
c3d5a4a7
PE
95602005-07-07 Paul Eggert <eggert@cs.ucla.edu>
9561
b34d96c1
PE
9562 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
9563 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
9564 Remove from CVS. These files are automatically generated.
9565 * examples/extexi: Clarify that this file is now part of Bison,
9566 not GNU M4, and that it works with any POSIX-compatible Awk.
9567 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
9568 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
9569 so that we also get calc++-parser.yy. Geneate it.
9570 Use $(AWK), not gawk, since any conforming Awk will do.
9571 Put comment before action, since older 'make' can't handle comment
9572 in action.
9573 $(BUILT_SOURCES): List all built sources, not just some of them.
9574 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
9575 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
9576 $($(calc_sources_generated)): Remove unnecessary test for existence
9577 of target. (This had a shell syntax error anyway; a stray "x".)
9578 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
9579 calc++-parser.yy.
9580 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
9581
c3d5a4a7
PE
9582 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
9583 implied by the other modules.
9584
828c373b
AD
95852005-07-06 Akim Demaille <akim@epita.fr>
9586
9587 Bind examples/calc++ to the package.
9588 * examples/calc++/Makefile: Remove, replaced by...
9589 * examples/calc++/Makefile.am: ... this new file.
9590 * examples/calc++/test: Remove input.
9591 * examples/calc++/compile: Remove.
9592 * examples/Makefile.am: New.
9593 * configure.ac, Makefile.am: Adjust.
9594 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
9595
63cb01d6
PE
95962005-07-05 Paul Eggert <eggert@cs.ucla.edu>
9597
fd2df2ed
PE
9598 * data/glr.c (yyFail): Drastically simplify; since the format argument
9599 never had any % directives, we can simply pass it to yyerror.
9600 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
9601 be modified later, as that is the usual style in glr.c.
9602 Problems reported by Paul Hilfinger.
9603
63cb01d6
PE
9604 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
9605 and size overflow errors.
9606 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
9607 in case the user prolog sets feature-test macros like _GNU_SOURCE.
9608 (YYSIZEMAX): New macro.
9609 (yystpcpy): New function, taken from yacc.c.
9610 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
9611 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
9612 so that we don't have to maintain their signatures.
9613 (yyFail): Check for buffer overflow, by using vsnprintf rather
9614 than vsprintf. Allocate a bigger buffer if possible.
9615 Report an error if buffer allocation fails.
9616 (yyStackOverflow): New function.
9617 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
9618 the initialization was successful. It might fail if storage was
9619 exhausted.
9620 (yyexpandGLRStack): Add more checks for storage allocation failure.
9621 Use yyStackOverflow to report failures.
9622 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
9623 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
9624 Don't assume stack number fits in int.
9625 (yysplitStack): Check for storage allocation failure.
9626 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
9627 can print diagnostics on storage allocation failure. All callers
9628 changed.
9629 (yyresolveValue): Use yybool for boolean.
9630 (yyreportSyntaxError): Check for size-calculation overflow.
9631 This code is taken from yacc.c.
9632 (yyparse): Check for storage allocation errors when allocating
9633 the initial stack.
9634
1c59e0a1
AD
96352005-07-05 Akim Demaille <akim@epita.fr>
9636
9637 Extract calc++ from the documentation.
9638 * doc/bison.texinfo (Calc++): Add the extraction marks.
9639 * examples/extexi: New, from the aborted GNU Programming 2E.
9640 Separate the different paragraph of a file with empty lines.
9641 * examples/Makefile: Use it to extract the whole calc++ example.
9642
8a0adb01
AD
96432005-06-24 Akim Demaille <akim@epita.fr>
9644
9645 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
9646 class typedefs.
9647
12545799
AD
96482005-06-22 Akim Demaille <akim@epita.fr>
9649
9650 * doc/bison.texinfo (C++ Language Interface): First stab.
9651 (C++ Parsers): Remove.
9652
99be0235
AD
96532005-06-22 Akim Demaille <akim@epita.fr>
9654
9655 * data/lalr1.cc (yylex_): Honor %lex-param.
9656
0ffd4fd1
AD
96572005-06-22 Akim Demaille <akim@epita.fr>
9658
9659 Start a set of simple examples.
9660 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
9661 * examples/calc++/calc++-driver.hh,
9662 * examples/calc++/calc++-parser.yy,
9663 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
9664 * examples/calc++/compile, examples/calc++/test: New.
9665
0925ebb4
PE
96662005-06-09 Paul Eggert <eggert@cs.ucla.edu>
9667
9668 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
9669 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
9670 which stems from the 2005-05-27 patch.
9671
43d3b664
PH
96722005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9673
9674 * data/glr.c: Modify treatment of unused parameters to permit use
9675 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
9676
3062864d
PE
96772005-05-30 Paul Eggert <eggert@cs.ucla.edu>
9678
9679 Fix infringement on user name space reported by Janos Zoltan Szabo.
9680 * data/yacc.c (yyparse): strlen -> yystrlen.
9681
989b5b8e
AD
96822005-05-30 Akim Demaille <akim@epita.fr>
9683
9684 * data/lalr1.cc (_): New.
9685 Translate the various messages.
9686
bedf57f5
PE
96872005-05-27 Paul Eggert <eggert@cs.ucla.edu>
9688
9689 Fix infringement on user name space reported by Bruno Haible.
9690 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
9691 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
9692 the user's name space.
9693 (alloca): Include <stdlib.h> to get it, if it's not built in.
9694 (YYMALLOC, YYFREE): Define only if needed.
9695 (malloc, free): Declare, but only if needed, as this infringes on
9696 the user name space.
9697
4d1801f1
PE
96982005-05-25 Paul Eggert <eggert@cs.ucla.edu>
9699
9700 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
9701 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
9702 with %d format.
9703 * lib/ebitset.c (min, max): Undef before defining.
9704 * lib/vbitset.c (min, max): Likewise.
9705 * lib/subpipe.c (create_subpipe): Save local variables in case
9706 vfork clobbers them.
9707
97082005-05-24 Bruno Haible <bruno@clisp.org>
9709
9710 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
9711 error message syntax used by gcc-4.0.
9712
b94a9e1e
PE
97132005-05-23 Paul Eggert <eggert@cs.ucla.edu>
9714
85ac3861
PE
9715 * README: Mention m4 1.4.3. Remove obsolete advice about
9716 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
9717
b94a9e1e
PE
9718 * bootstrap: Remove workaround for problem I encountered with
9719 gettext 0.14.1; it seems to be fixed now.
9720
51c30d21
PE
97212005-05-22 Paul Eggert <eggert@cs.ucla.edu>
9722
009ce67d
PE
9723 * NEWS: Version 2.0a.
9724
f2a97c62
PE
9725 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
9726 the previous change.
9727
c8775f93
PE
9728 Various maintainer cleanups.
9729 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
9730 conftest*, for benefit of CVS commands run at the same time as
9731 "configure". Add build-aux, since "bootstrap" now creates it and
9732 its subfiles.
9733 * Makefile.cfg (move_if_change): Remove.
9734 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
9735 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
9736 (po_repo, do-po-update, po-update, wget_files, get-targets):
9737 (config.guess-url_prefix, config.sub-url_prefix):
9738 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
9739 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
9740 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
9741 Remove.
9742 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
9743 this is now the recommended name.
9744 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
9745 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
9746 ylwrap. These files now go into build-aux.
9747 * config/move-if-change: Remove.
9748 * config/prev-version.txt: Bump from 1.75 to 2.0.
9749
3ea5f0ec
PE
9750 * bootstrap: Add stdio-safer, unistd-safer modules.
9751 Remove m4/glibc2.m4 (introduced by latest gnulib, but
9752 we don't need it).
9753 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
9754 fopen-safer.c, stdio-safer.h, unistd-safer.h.
9755 * lib/subpipe.c: Include "unistd-safer.h".
9756 (create_subpipe): Make sure all the newly-created
9757 file descriptors are > 2, so that diagnostics don't
9758 get sent down them (which might cause Bison to hang, in theory).
9759 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
9760 * src/files.c (xfopen): Use fopen_safer, not fopen.
9761
51c30d21
PE
9762 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
9763 yesterday's yacc.c fix.
9764
cea1469d
PE
97652005-05-21 Paul Eggert <eggert@cs.ucla.edu>
9766
3ea5f0ec
PE
9767 * data/glr.c, data/lalr1.cc: Update copyright date.
9768
cea1469d
PE
9769 Fix a destructor bug reported by Wolfgang Spraul in
9770 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
9771 * data/yacc.c (yyabortlab): Don't call destructor, and
9772 don't set yychar to EMPTY.
9773 (yyoverflowlab): Don't call destructor.
9774 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
9775 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
9776 since we no longer output the message "discarding lookahead token
9777 end of input ()".
9778
5e6f62f2
PH
97792005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
9780
9781 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
9782 fix a small glitch in debugging output.
9783 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
9784 after YY_SYMBOL_PRINT where needed.
9785
9786 (struct yyGLRState): Add some comments.
9787 (struct yySemanticOption): Add some comments.
9788 (union yyGLRStackItem): Add comment.
9789
9790 (yymergeOptionSets): Correct this to properly perform the union,
9791 avoiding infinite reported by Michael Rosien.
9792 Update comment.
9793
9794 * tests/glr-regression.at: Add test for GLR merging error reported
9795 by M. Rosien.
cea1469d 9796
0fb669f9
PE
97972005-05-13 Paul Eggert <eggert@cs.ucla.edu>
9798
9799 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
9800 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
9801 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
9802 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
9803 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
9804 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
9805 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
9806 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
9807 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
9808 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
9809 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
9810 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
9811 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
9812 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
9813 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
9814 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
9815 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
9816 src/derives.h, src/files.c, src/files.h, src/getargs.c,
9817 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
9818 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
9819 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
9820 src/output.h, src/parse-gram.c, src/parse-gram.h,
9821 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
9822 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
9823 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
9824 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
9825 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
9826 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
9827 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
9828 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
9829 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
9830 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
9831 tests/reduce.at, tests/regression.at, tests/sets.at,
9832 tests/synclines.at, tests/testsuite.at, tests/torture.at:
9833 Update FSF postal mail address.
9834
51f4735e
PE
98352005-05-11 Paul Eggert <eggert@cs.ucla.edu>
9836
9837 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
9838 Problem reported by Ralf Menzel.
9839
80ce3401
PE
98402005-05-01 Paul Eggert <eggert@cs.ucla.edu>
9841
9842 * tests/actions.at: Test that stack overflow invokes destructors.
9843 From Marcus Holland-Moritz.
9844 * data/yacc.c (yyerrlab): Move the code that destroys the stack
9845 from here....
9846 (yyreturn): to here. That way, destructors are called properly
9847 even if the stack overflows, or the user calls YYACCEPT or
9848 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
9849 (yyoverflowlab): Destroy the lookahead.
9850
98512005-04-24 Paul Eggert <eggert@cs.ucla.edu>
9852
9853 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
9854
72f000b0
PE
98552005-04-17 Paul Eggert <eggert@cs.ucla.edu>
9856
9857 * NEWS: Bison-generated C parsers no longer quote literal strings
9858 associated with tokens.
9859 * src/output.c (prepare_symbols): Don't escape strings,
9860 since users don't want to see C escapes.
9861 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
9862 in diagnostics.
c19683bb 9863 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
9864 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
9865
1094323f
PE
98662005-04-16 Paul Eggert <eggert@cs.ucla.edu>
9867
9868 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
9869 the data size is known to be too small and we can't increase it.
9870 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
9871
ca407bdf
PE
98722005-04-15 Paul Eggert <eggert@cs.ucla.edu>
9873
9874 * src/parse-gram.y: Include quotearg.h.
9875 (string_as_id): Quote $1 before using it as a key, since the
9876 lexer no longer quotes it for us.
9877 (string_content): Don't strip quotes, since lexer no longer
9878 quotes it for us.
9879 * src/scan-gram.l: Include quotearg.h.
9880 ("\""): Omit quote.
9881 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
9882 a key, since the rest of the lexer doesn't quote it.
9883 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
9884 * tests/regression.at (Token definitions): Check for backslashes
9885 in token strings.
9886
9887 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
9888 (YYSIZE_T): Define to unsigned long int when using an older compiler.
9889 (yyparse): Revamp code to generate long syntax error message, to
9890 make it easier to translate, and to avoid problems with arithmetic
9891 overflow. Change "virtual memory" to "memory" in diagnostic, since
9892 we don't know whether the memory is virtual.
9893
1ce59070
PE
98942005-04-13 Paul Eggert <eggert@cs.ucla.edu>
9895
9896 * NEWS: Bison-generated C parsers now use the _ macro to
9897 translate strings.
9898 * data/yacc.c (_) [!defined _]: New macro.
9899 All English strings wrapped inside this macro.
9900 * doc/bison.texinfo (Bison Parser): Document _.
9901 * po/POTFILES.in: Include src/parse-gram.c, since it now
9902 includes translateable strings that parse-gram.y doesn't.
9903
a749a695
PE
99042005-04-12 Paul Eggert <eggert@cs.ucla.edu>
9905
9906 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
9907 reverting the 2004-10-11 change to this function.
9908 (symbol_check_alias_consistency): Don't call symbol_type_set
9909 if the type name is already correct.
9910 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
9911
8fb1053b
PE
99122005-03-25 Paul Eggert <eggert@cs.ucla.edu>
9913
9914 * tests/regression.at (Token definitions): Don't use a token named
9915 c, as that generates a "#define c ..." that runs afoul of buggy
9916 stdlib.h that uses the identifier c as a member of struct
9917 drand48_data. Problem reported by Horst Wente.
9918
ff498c4a
PE
99192005-03-21 Paul Eggert <eggert@cs.ucla.edu>
9920
9921 * bootstrap: Change translation URL from
9922 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
9923 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
9924 redirection glitches. Problem reported by twlevo@xs4all.nl.
9925
65211d70
PE
99262005-03-20 Paul Eggert <eggert@cs.ucla.edu>
9927
9928 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
9929 after operands; POSIX says this isn't portable for the c99 command.
9930
9577fb1f
PE
99312005-03-18 Paul Eggert <eggert@cs.ucla.edu>
9932
9933 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
9934 immediately if a data overrun has occurred; this may help us track
9935 down what may be a spurious failure on MacOS.
9936
78b178f7
PE
99372005-03-17 Paul Eggert <eggert@cs.ucla.edu>
9938
a2599d0f
PE
9939 Respond to problems reported by twlevo@xs4all.nl.
9940
9941 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
9942
78b178f7
PE
9943 * src/vcg.h: Comment fix.
9944 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
9945 (G_CMAX): Change to -1 instead of INT_MAX.
9946
9947 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 9948
7296e729
PE
99492005-03-15 Paul Eggert <eggert@cs.ucla.edu>
9950
9951 * src/tables.c (state_number_to_vector_number): Put it inside an
9952 "#if 0", since it's not currently used. Problem reported by
9953 Roland McGrath.
9954
05ac60f3
PE
99552005-03-06 Paul Eggert <eggert@cs.ucla.edu>
9956
9957 * src/output.c (escaped_output): Renamed from
9958 escaped_file_name_output, since we now use it for symbol tags as
9959 well. All uses changed.
9960 (symbol_destructors_output, symbol_printers_output):
9961 Escape symbol tags too.
9962 Problem reported by Matyas Forstner in
9963 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
9964
9965 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
9966 not needed.
9967 * src/output.c (user_actions_output, token_definitions_output,
9968 symbol_destructors_output, symbol_printers_output): Likewise.
9969 * src/reader.c (prologue_augment): Likewise.
9970 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
9971
9972 * src/vcg.c (output_edge): Don't quote linestyle arg.
9973 Problem reported by twlevo@xs4all.nl.
9974
7eb453ac
PE
99752005-02-28 Paul Eggert <eggert@cs.ucla.edu>
9976
9977 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
9978 example, reported by Derek M Jones. Also, make the example even
9979 more outrageous, to better illustrate how bad the problem is.
9980
4c04c52a
PE
99812005-02-24 Paul Eggert <eggert@cs.ucla.edu>
9982
9983 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
9984 putsym. Typo reported by Sebastian Piping.
9985
a61e1620
PE
99862005-02-23 Paul Eggert <eggert@cs.ucla.edu>
9987
9988 * doc/bison.texinfo (Language and Grammar): some -> same
9989 (Epilogue): int he -> in the
9990 Typos reported by Sebastian Piping via Justin Pence.
9991
9ec93868
PE
99922005-02-07 Paul Eggert <eggert@cs.ucla.edu>
9993
9994 * tests/glr-regression.at (Improper handling of embedded actions
9995 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
9996 embedded actions and $-N in GLR parsers", work around an Autoconf bug
9997 with dollar signs in test names.
9998 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
9999 for a similar reason.
10000
73ce7e7e
PE
100012005-01-28 Paul Eggert <eggert@cs.ucla.edu>
10002
10003 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
10004 wants to redefine G_VIEW.
10005
2e72b98e
PE
100062005-01-27 Paul Eggert <eggert@cs.ucla.edu>
10007
10008 * src/vcg.c (get_view_str): Remove case for normal_view.
10009 Problem reported by twlevo@xs4all.nl.
10010
e0d634e5
PE
100112005-01-24 Paul Eggert <eggert@cs.ucla.edu>
10012
ccf830a4
PE
10013 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
10014 Problem reported by twlevo@xs4all.nl.
10015
e0d634e5
PE
10016 * doc/bison.texinfo: Change @dircategory from "GNU programming
10017 tools" to "Software development". Requested by Richard Stallman
10018 via Karl Berry.
10019
7bbc8cb0
PE
100202005-01-23 Paul Eggert <eggert@cs.ucla.edu>
10021
10022 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
10023 Problem reported by twlevo@xs4all.nl.
10024
08b770bc
PE
100252005-01-21 Paul Eggert <eggert@cs.ucla.edu>
10026
10027 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
10028 keyword; it's not needed with modern compilers, and it doesn't
10029 affect correctness with older compilers. Suggested by
10030 twlevo@xs4all.nl.
10031
95f22ad2
PE
100322005-01-17 Paul Eggert <eggert@cs.ucla.edu>
10033
10034 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
10035 gcc -Wswitch-default.
10036 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
10037 * data/yacc.c (yyparse): Likewise.
10038
d229d15c
PE
100392005-01-12 Paul Eggert <eggert@cs.ucla.edu>
10040
10041 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
10042 already. Let config.h define any nonstandard values.
10043
ecadd90f
PE
100442005-01-10 Paul Eggert <eggert@cs.ucla.edu>
10045
10046 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
10047 for the benefit of slower hosts. Problem reported by
10048 Nelson H. F. Beebe.
10049
213744b5
PE
100502005-01-07 Paul Eggert <eggert@cs.ucla.edu>
10051
10052 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
10053 being defined and not used.
10054 * data/lalr1.cc (yyparse): Likewise.
10055 Use "if (false)" rather than "if (0)".
10056
249d3236
PE
100572005-01-05 Paul Eggert <eggert@cs.ucla.edu>
10058
10059 * TODO: Mention that we should allow NUL bytes in tokens.
10060
987cc1fb
PE
100612005-01-02 Paul Eggert <eggert@cs.ucla.edu>
10062
10063 * src/scan-skel.l (<<EOF>>): Don't close standard output.
10064 Problem reported by Hans Aberg.
10065
08fe02d9
PE
100662005-01-01 Paul Eggert <eggert@cs.ucla.edu>
10067
10068 * src/getargs.c (version): Happy new year; update overall
10069 program copyright date from 2004 to 2005.
10070
10071 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
10072 Problem reported by Hans Aberg.
10073 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
10074 (Output file names.): Add a test for the case when standard output
10075 is closed.
10076
010c0266
PE
100772004-12-26 Paul Eggert <eggert@cs.ucla.edu>
10078
10079 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
10080 to fix an oversight in the Bison 2.0 manual.
10081
da12206a
PE
100822004-12-25 Paul Eggert <eggert@cs.ucla.edu>
10083
10084 * NEWS: Version 2.0. Reformat the existing news items since
10085 1.875, so that related items are grouped together.
3a4734aa 10086 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
10087 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
10088
c935d934
PE
10089 * tests/torture.at (Exploding the Stack Size with Alloca): Set
10090 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
10091 otherwise, we're not testing alloca. Unfortunately there's no
10092 simple way to consult HAVE_ALLOCA here.
10093
da12206a
PE
10094 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
10095 for yymsg, too.
10096
10097 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
10098 hand. This avoids a warning about comparing int to size_t when
10099 GCC warnings are enabled.
10100
0a2c5137
PE
101012004-12-22 Paul Eggert <eggert@cs.ucla.edu>
10102
d7e14fc0
PE
10103 * NEWS: Bison-generated parsers no longer default to using the
10104 alloca function (when available) to extend the parser stack, due
10105 to widespread problems in unchecked stack-overflow detection.
10106 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
10107 responsibility to set it to a positive value. This lets the user
10108 specify a value that is not a preprocessor constant.
10109 * data/yacc.c (YYMAXDEPTH): Likewise.
10110 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
10111 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
10112 to be a compile-time constant. However, explain the constraints on it.
10113 Also, explain the constraints on YYINITDEPTH.
10114 (Table of Symbols): Explain that alloca is no longer the default.
10115 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
10116 to 1.
10117
0a2c5137
PE
10118 * doc/bison.texinfo (Location Default Action): Mention that n must
10119 be zero when k is zero. Suggested by Frank Heckenbach.
10120
e019c247
AD
101212004-12-22 Akim Demaille <akim@epita.fr>
10122
10123 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
10124 (parser::state_type, parser::semantic_type, parser::location_type):
10125 Private, not public.
10126 (parser::parse): Return ints, not bool.
10127 Returning a bool introduces a problem: 0 corresponds to false, and
10128 it seems weird to return false on success. Returning true changes
10129 the conventions for yyparse.
10130 Alternatively we could return void and send an exception.
10131 There is no clear consensus (yet?).
10132 (state_stack, semantic_stack, location_stack): Rename as...
10133 (state_stack_type, semantic_stack_type, location_stack_type): these.
10134 Private, not public.
10135 * tests/c++.at: New.
10136 * tests/testsuite.at, tests/Makefile.am: Adjust.
10137
72731bb7
AD
101382004-12-21 Akim Demaille <akim@epita.fr>
10139
10140 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
10141
9a0d8bec
AD
101422004-12-21 Akim Demaille <akim@epita.fr>
10143
10144 Don't impose std::string for filenames.
10145
10146 * data/lalr1.cc (b4_filename_type): New.
10147 (position::filename): Use it.
10148 (parser.hh): Move the inclusion of stack.hh and location.hh below
10149 the user code, so that needed headers for the filename type can be
10150 included first.
72731bb7
AD
10151 Forward declare them before the user code.
10152 * tests/Makefile.am (check-local, installcheck-local): Pass
10153 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 10154
99880de5
AD
101552004-12-20 Akim Demaille <akim@epita.fr>
10156
10157 Use more STL like names: my_class instead of MyClass.
10158
10159 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
10160 (SemanticStack, SemanticType, StateStack, StateType)
10161 (TokenNumberType, Stack, Slice, Traits, Parser::location)
10162 (Parser::value): Rename as...
10163 (location_stack, location_type, rhs_number_type, semantic_stack)
10164 (semantic_type, state_stack, state_type, token_number_type, stack)
10165 (slice, traits, parser::yylloc, parser::yylval): these.
10166
10167 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
10168
9bec482e
PE
101692004-12-19 Paul Eggert <eggert@cs.ucla.edu>
10170
10171 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
10172 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
10173
f6fbd3da
PE
101742004-12-17 Paul Eggert <eggert@cs.ucla.edu>
10175
10176 Remove uses of 'short int' and 'unsigned short int'. This raises
10177 some arbitrary limits. It uses more memory but nowadays that's
10178 not much of an issue.
10179
10180 This change does not affect the generated parsers; that's a different
10181 task, as some users will want to conserve memory there.
10182
10183 Ideally we should use size_t to represent all object counts, and
10184 something like ptrdiff_t to represent signed differences of object
10185 counts; but that will require more code-cleanup than I have the
10186 time to do right now.
10187
10188 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
10189 Use size_t, not int or short int, to count objects.
10190 * src/closure.c (nritemset, closure): Likewise.
10191 * src/closure.h (nritemset, closure): Likewise.
10192 * src/nullable.c (nullable_compute): Likewise.
10193 * src/print.c (print_core): Likewise.
10194 * src/print_graph.c (print_core): Likewise.
10195 * src/state.c (state_compare, state_hash): Likewise.
10196 * src/state.h (struct state): Likewise.
10197 * src/tables.c (default_goto, goto_actions): Likewise.
10198
10199 * src/gram.h (rule_number, rule): Use int, not short int.
10200 * src/output.c (prepare_rules): Likewise.
10201 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
10202 errs, reductions): Likewise.
10203 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
10204 Likewise.
10205 * src/tables.c (vector_number, tally, action_number,
10206 ACTION_NUMBER_MINIMUM): Likewise.
10207 * src/output.c (muscle_insert_short_int_table): Remove.
10208
efeed023
AD
102092004-12-17 Akim Demaille <akim@epita.fr>
10210
10211 * data/lalr1.cc: Extensive Doxygenation.
10212 (error_): Rename as...
10213 (error): this, since it is visible to the user.
10214 Adjust callers.
10215 (Parser::message): Now an automatic variable from...
10216 (Parser::yyreport_syntax_error_): here.
10217 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
10218 Parser::error.
10219 * tests/input.at: Escape $.
10220
bc82c5a5
PE
102212004-12-16 Paul Eggert <eggert@cs.ucla.edu>
10222
10223 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
10224 Parenthesize rhs to avoid obscure problems with mistakes like
10225 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
10226 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10227 b4_rhs_location): Likewise.
10228 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
10229 b4_rhs_location): Likewise.
10230
fd19f271
AD
102312004-12-16 Akim Demaille <akim@epita.fr>
10232
10233 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
10234 yacc.c: be sure to stay within yycheck_.
10235 * tests/actions.at: Re-enable C++ tests.
10236
10454ea4
AD
102372004-12-16 Akim Demaille <akim@epita.fr>
10238
10239 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
10240 real.
10241
c5b95ccf
AD
102422004-12-16 Akim Demaille <akim@epita.fr>
10243
10244 Use #define to handle the %name-prefix.
10245
10246 * data/glr.c, data/yacc.c: Comment changes.
10247 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
10248 so that one can refer to yylex in the parser file, and have it
10249 renamed, as is the case with other skeletons.
10250
617a8f12
AD
102512004-12-16 Akim Demaille <akim@epita.fr>
10252
10253 Move lalr1.cc internals into yy*.
10254
10255 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
10256 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
10257 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
10258 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
10259 (empty_, final_, terror_, errcode_, ntokens_)
10260 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
10261 (looka_, ilooka_, error_range_, nerrs_):
10262 Rename as...
10263 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
10264 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
10265 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
10266 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
10267 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
10268 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
10269 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
10270 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
10271 these.
10272
1e547e6e
PE
102732004-12-15 Paul Eggert <eggert@cs.ucla.edu>
10274
10275 Fix some problems reported by twlevo at xs4all.
10276 * src/symtab.c (symbol_new): Report an error if the input grammar
10277 contains too many symbols. This is better than calling abort() later.
10278 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
10279 (struct node, struct graph):
10280 Rename member expand to stretch. All uses changed.
10281 (struct graph): Remove member layoutalgorithm. All uses removed.
10282 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
10283 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
10284 All uses changed.
10285 (N_STRETCH): Rename from N_EXPAND. All uses changed.
10286
735d6bd4
AD
102872004-12-15 Akim Demaille <akim@epita.fr>
10288
10289 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
10290 Add more Doxygen comments.
10291 (symprint_, stack_print_, reduce_print_, destruct_, pop)
10292 (report_syntax_error_, translate_): Rename as...
10293 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
10294 (yypop_, yyreport_syntax_error_, yytranslate_): this.
10295
2e1f5829
AD
102962004-12-15 Akim Demaille <akim@epita.fr>
10297
10298 * data/lalr1.cc (lex_): Rename as...
10299 (yylex_): this.
10300 Move the trace here.
10301 Take the %name-prefix into account.
10302 Reported by Alexandre Duret-Lutz.
10303
a3cb6248
AD
103042004-12-15 Akim Demaille <akim@epita.fr>
10305
10306 Simplify the C++ parser constructor.
10307
10308 * data/lalr1.cc (debug_): Rename as...
10309 (yydebug_): so that the parser's internals are always in the yy*
10310 pseudo namespace.
10311 Adjust uses.
10312 (b4_parse_param_decl): Remove the leading comma as it is now only
10313 called as unique argument list.
10314 (Parser::Parser): Remove the constructor accepting a location and
10315 an initial debugging level.
10316 Remove from the other ctor the argument for the debugging level.
10317 (debug_level_type, debug_level, set_debug_level): New.
10318
10319 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
10320 constructor calls.
10321
07fed891
AD
103222004-12-15 Akim Demaille <akim@epita.fr>
10323
10324 Remove b4_root related material: failure experiment
a3cb6248 10325 (which goal was to allow to derive from a class).
07fed891
AD
10326
10327 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
10328 definitions and uses.
10329
e603eaa5
PE
103302004-12-14 Paul Eggert <eggert@cs.ucla.edu>
10331
10332 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
10333 not 2, since it's not portable to subtract 1 from the start of an
10334 array. The new item 0 is never set or used. All uses changed.
10335
10336 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
10337 the default definition of YYLLOC_DEFAULT. Problem reported
10338 by Frank Heckenbach.
10339
fafb007d
PE
103402004-12-12 Paul Eggert <eggert@cs.ucla.edu>
10341
10342 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
10343 the normal case and one for the error case. Just use the
10344 first one uniformly. Problem reported by Frank Heckenbach.
10345 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
10346 use exactly the same macro in both places.
10347 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
10348 so that the normal-case YYRHSLOC works for the error case too.
10349 All uses changed.
10350 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
10351 (YYLLOC_DEFAULT): Use the same macro as glr.c.
10352 * doc/bison.texinfo (Location Default Action): Don't claim that
10353 we have an array of locations. Use the same macro for both glr
10354 and lalr parsers. Mention YYRHSLOC. Mention what happens when
10355 the index is 0.
10356
48814dcd
PE
103572004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10358
a4e1a53b
PE
10359 * HACKING: Update email addresses to send announcements to.
10360
48814dcd
PE
10361 * configure.ac (AC_INIT): Bump version to 1.875f.
10362
337116ba
PE
103632004-12-10 Paul Eggert <eggert@cs.ucla.edu>
10364
10365 * NEWS: Version 1.875e.
10366 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
10367
10368 * src/scan-skel.l: Include "complain.h", for "fatal".
10369
10370 * src/relation.h (relation_print, relation_digraph):
10371 Relation sizes are of type relation_node, not size_t (this is
10372 merely a doc fix, since the two types are equivalent).
10373 (relation_transpose): Relation sizes are of type relation_node,
10374 not int.
10375 * src/relation.c: Likewise.
10376 (top, infinity): Now of type relation_node, not int.
10377 (traverse, relation_transpose): Use relation_node, not int.
10378
10379 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
10380 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
10381 (yyparse): Remove unused local introduced in 2004-10-25 patch.
10382
10383 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 10384 specifying whether the test should be skipped. Use it tp
337116ba 10385 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 10386 fail on some hosts, and should be skipped.
337116ba 10387
da2a7671
PE
103882004-12-08 Paul Eggert <eggert@cs.ucla.edu>
10389
10390 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
10391 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
10392 unless otherwise specified below.
10393
10394 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
10395 to allocate kernel_base, kernel_items, kernel_size, since
10396 they needn't be initialized to 0.
10397 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
10398 * src/closure.c (new_closure): Likewise, for itemset.
10399 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
10400 * src/lalr.c (set_goto_map): Likewise, for temp_map.
10401 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
10402 (build_relations): Likewise for edge, states1, includes.
10403 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
10404 * src/reader.c (packgram): Likewise, for ritem, rules.
10405 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
10406 * src/relation.c (relation_digraph): Likewise for VERTICES.
10407 (relation_transpose): Likewise for new_R, end_R.
10408 * src/symtab.c (symbols_token_translations_init): Likewise for
10409 token_translations.
10410 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
10411 (token_actions): Likewise for yydefact, actrow, conflrow,
10412 conflict_list.
10413 (save_column): Likewise for froms[symno], tos[symno].
10414 (goto_actions): Likewise for state_count.
10415 (pack_table): Likewise for base, pos, check.
10416 (tables_generate): Likewise for width.
10417
10418 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
10419 for initial core. Just have a separate core, so we needn't worry
10420 about whether kernel_size and kernel_base are initialized.
10421
10422 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
10423 kernel_size, kernel_items): Remove unnecessary initialization.
10424 * src/conflicts.c (conflicts): Likewise.
10425 * src/derives.c (derives): Likewise.
10426 * src/muscle_tablc (muscle_insert): Likewise.
10427 * src/relation.c (relation_digraph): Likewise.
10428 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
10429 conflrow, conflict_table, conflict_list, table, check):
10430 Likewise.
10431
10432 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
10433 This is because all callers pass unsigned int.
10434 * src/closure.h (new_closure): Likewise.
10435
10436 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
10437 (build_relations): Initialize includes[i] in all cases.
10438 * src/reader.c (packgram): Always initialize rules[ruleno].prec
10439 and rules[ruleno].precsym. Initialize members in order.
10440 * src/relation.c (relation_transpose): Always initialize new_R[i]
10441 and end_R[i].
10442 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
10443
10444 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
10445 conflict_list[0] was always 0, but now it isn't initialized.
10446
10447 * src/table.c (table_grow): When conflict_table grew, the grown
10448 area wasn't cleared. Fix this.
10449
10450 * lib/.cvsignore: Add strdup.c, strdup.h.
10451 * m4/.cvsignore: Add strdup.m4.
10452
00baeeac
PE
104532004-12-07 Paul Eggert <eggert@cs.ucla.edu>
10454
10455 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
10456 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
10457 GOTO_NUMBER_MAXIMUM, since we occasionally compute
10458 ngotos + 1 without checking for overflow.
10459 (build_relations): Use END_NODE, not -1, to denote end of edges.
10460 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
10461 build_relations): Use goto_number, not int, for goto numbers.
10462 * src/tables.c (save_column, default_goto): Likewise.
10463
be3d9d42
AD
104642004-11-23 Akim Demaille <akim@epita.fr>
10465
10466 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
10467 of #defining from yystype.
10468 Don't typedef yystype, C++ does not need it.
10469 This lets it possible to forward declare it as union.
10470
78e526d5
PE
104712004-11-23 Paul Eggert <eggert@cs.ucla.edu>
10472
10473 * bootstrap (gnulib_modules): Add extensions.
10474 Problem reported by Jim Meyering.
10475
afbb696d
PE
104762004-11-22 Paul Eggert <eggert@cs.ucla.edu>
10477
10478 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
10479 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
10480 src/system.h, src/tables.c: XFREE -> free, to accommodate
10481 recent change to gnulib xalloc.h.
78e526d5 10482 Problem reported by Jim Meyering.
afbb696d 10483
c1f8f16a
AD
104842004-11-17 Akim Demaille <akim@epita.fr>
10485
10486 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
10487
db7e5eb5 104882004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
10489 Alexandre Duret-Lutz <adl@gnu.org>
10490
10491 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
10492 changes.
10493 (YYCDEBUG): Adjust.
10494 Use it instead of cdebug_.
10495 (Parser::debug_stream, Parser::set_debug_stream): New.
10496 (Parser::symprint_): Define cdebug_ for temporary backward
10497 compatibility.
10498 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
10499 debug_stream ().
10500
68e11668
AD
105012004-11-17 Akim Demaille <akim@epita.fr>
10502
10503 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
10504 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
10505 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
10506 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
10507
97cbc73e
PE
105082004-10-27 Paul Eggert <eggert@cs.ucla.edu>
10509
10510 * data/glr.c (yyloc_default): Remove; not used.
10511 Problem reported by Frank Heckenbach.
10512
e342c3be
AD
105132004-10-25 Akim Demaille <akim@epita.fr>
10514
10515 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
10516 Introduce another definition to address simple location arrays.
10517 (yyGLRStack): New member: yyerror_range.
10518 (yyrecoverSyntaxError, yyparse): Update it.
10519 (yyrecoverSyntaxError): Use it when shifting the error token to
10520 have an accurate range, equivalent to the one computed by both
10521 yacc.c and lalr1.cc.
10522 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
10523 that column numbers start at column 0, as per GNU Coding
10524 Standards, the others tests, and the doc.
10525 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
10526 Adjust to the above change (first column is 0).
10527 And adjust the location of the "<error>", now covering the whole
10528 line.
10529
93602feb 105302004-10-22 Akim Demaille <akim@epita.fr>
04098407 10531 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
10532
10533 Remove some arbitrary limits on goto numbers and relations.
10534 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
10535 initial values, since they're never used.
10536 (set_goto_map): ngotos is now unsigned, so test for overflow
10537 by seeing whether it wraps around to zero.
10538 * src/lalr.h (goto_number): Now size_t, not short int.
10539 (GOTO_NUMBER_MAXIMUM): Remove.
10540 * src/relation.c (relation_print, traverse, relation_transpose):
10541 Check for END_NODE rather than looking at sign.
10542 * src/relation.h (END_NODE): New macro.
10543 (relation_node): Now size_t, not short int.
10544
dba08b04
PE
105452004-10-22 Paul Eggert <eggert@cs.ucla.edu>
10546
10547 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
10548 keyword, not an identifier. Problem reported by Baron Schwartz in
10549 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
10550
df09ef2e
AD
105512004-10-11 Akim Demaille <akim@epita.fr>
10552
10553 * src/symtab.c (symbol_check_alias_consistency): Also check
10554 type names, destructors, and printers.
10555 Reported by Alexandre Duret-Lutz.
10556 Recode the handling of associativity and precedence in terms
10557 of symbol_precedence_set.
10558 Accept no redeclaration at all, not even equal to the previous
10559 value.
10560 (redeclaration): New.
10561 Use it to factor redeclaration complaints.
10562 (symbol_make_alias): Don't set the type of the alias, let
10563 symbol_check_alias_consistency do it as for other features.
10564 * src/symtab.h (symbol): Add new member prec_location, and
10565 type_location.
10566 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
10567 * tests/input.at (Incompatible Aliases): New.
10568
146bc99d
PE
105692004-10-09 Paul Eggert <eggert@cs.ucla.edu>
10570
10571 .cvsignore fixes to accommodate gnulib changes,
10572 and the practice of naming build directories "_build".
10573 * .cvsignore: Add "_*". Sort.
10574 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
10575 * m4/.cvsignore: Add "*_gl.m4".
10576
e503aa60
AD
105772004-10-06 Akim Demaille <akim@epita.fr>
10578
10579 * src/parse-gram.y (add_param): Fix the truncation of trailing
10580 spaces.
10581
b4a20338
AD
105822004-10-05 Akim Demaille <akim@epita.fr>
10583
10584 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
10585 whether the reducion was empty or not. This leaves room to
10586 improve the use of YYLLOC_DEFAULT in such a case.
10587 lalr1.cc is still experimental, so changing this is acceptable.
10588 And finally, there are probably not many users who changed the
10589 handling of locations in GLR, so changing is admissible too.
10590
10591 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
10592 empty reduction, set @$ to an empty location ending the previously
10593 stacked symbol.
10594 Adjust uses to make sure the code is triggered on empty
10595 reductions.
10596 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
10597 expected output: empty reductions have empty locations.
10598
f85a5e6f
AD
105992004-09-29 Akim Demaille <akim@epita.fr>
10600
10601 * data/lalr1.cc: Move towards a more standard C++ coding style
10602 for templates: Class < T > -> Class<T>.
10603
b203fc2c
AD
106042004-09-29 Akim Demaille <akim@epita.fr>
10605
10606 * data/lalr1.cc: Reinstall the former ctor, for sake of
10607 compatibility, but warn it will be removed.
10608 Move towards a more standard C++ coding style (i.e., type *var ->
10609 type* var).
10610
5b7e1e73
PE
106112004-09-27 Paul Eggert <eggert@cs.ucla.edu>
10612
3fee967f
PE
10613 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
10614 since it's less likely to work if NULs are involved in the future.
5b7e1e73 10615
0dcca5c2
AD
106162004-09-27 Akim Demaille <akim@epita.fr>
10617
10618 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
10619
6dde1c82
AD
106202004-09-27 Akim Demaille <akim@epita.fr>
10621
10622 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 10623 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
10624 and argument names.
10625 (b4_cc_constructor_call): Likewise.
10626
b233d555
AD
106272004-09-24 Akim Demaille <akim@epita.fr>
10628
10629 * src/parse-gram.y (add_param): Strip the leading and trailing
10630 blanks from a formal argument declaration.
10631 (YY_LOCATION_PRINT): New.
10632
619404e3
AD
106332004-09-24 Akim Demaille <akim@epita.fr>
10634
10635 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
10636 after the location.
10637
dd8d9022
AD
106382004-09-24 Akim Demaille <akim@epita.fr>
10639
10640 * doc/bison.texinfo (Table of Symbols): Sort.
10641
0092f063
AD
106422004-09-21 Akim Demaille <akim@epita.fr>
10643
10644 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
10645 the useless parentheses.
10646 Suggested by Paul Eggert.
10647
451364ed
AD
106482004-09-20 Akim Demaille <akim@epita.fr>
10649
10650 Let the initial-action act on the look-ahead, and use it for the
10651 "initial push" (corresponding to an hypothetical beginning-of-file).
10652 And let lalr1.cc honor %initial-action.
10653
10654 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
10655 example.
10656 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
10657 (Parser::Parser): Remove the ctor that used to initialize it.
10658 (Parser::parse): Like in the other skeletons, issue the "starting
10659 parse" message before any action.
10660 Honor %initial-action.
10661 Initialize the stacks with the lookahead.
10662 * data/yacc.c: Let $$ and @$ in %initial-action designate the
10663 look-ahead.
10664 Push them in the stacks.
10665 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
10666
18d192f0
AD
106672004-09-20 Akim Demaille <akim@epita.fr>
10668
10669 * doc/bison.texinfo (Initial Action Decl): New.
10670
b8458aa5
AD
106712004-09-20 Akim Demaille <akim@epita.fr>
10672
10673 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
10674 clearer criterion to define it.
10675 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
10676 When reducing on an empty RHS, use the latest stacked location as
10677 location.
10678 yylloc is not always available.
10679 * data/glr.c: Likewise.
10680 Also, honor initial-actions.
10681
3fc16193
AD
106822004-09-20 Akim Demaille <akim@epita.fr>
10683
10684 * data/yacc.c (YY_LOCATION_PRINT): New.
10685 Define when we know YYLTYPE's structure, i.e., when the default
10686 YYLLOC_DEFAULT is used.
10687 * data/c.m4 (b4_yysymprint_generate): Use it.
10688 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
10689 value of the result.
10690 (error_start_): Replace with...
10691 (error_range_): this location array.
10692 This allows to replace code relying on the implementation of
10693 locations by portable code.
10694 * data/yacc.c (yylerrsp): Replace with...
10695 (yyerror_range): this.
10696 Every time a token is popped, update yyerror_range[0], to have an
10697 accurate location for the error token.
10698 * data/glr.c (YY_LOCATION_PRINT): New.
10699 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
10700 deference a pointer.
10701 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
10702 report the location in %printers.
10703
10704 * src/scan-skel.l: Instead of abort, report error messages to ease
10705 understanding skeleton scanning failures.
10706
ecfe33e7
AD
107072004-09-16 Akim Demaille <akim@epita.fr>
10708
10709 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
10710 (iterator, const_iterator): these, to be more in the C++ spirit.
10711 Also, return reverse iterators so that when displaying the stack
10712 we display its bottom first.
10713 (Parser::stack_print_, Parser::reduce_print_): Match the messages
10714 from yacc.c.
10715 We should probably use vector here though.
10716
1576d44d
AD
107172004-09-16 Akim Demaille <akim@epita.fr>
10718
10719 Have more complete shift traces.
10720
10721 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
10722 to report Shifts instead of ad hoc YYDPRINTF invocations,
10723 including for the error token.
10724 * data/lalr1.cc (symprint_): Output the location.
10725 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
10726 output the location within the %printer.
10727 Activate GLR tests, at least to make sure they compile properly.
10728 They still don't pass though.
10729 * tests/calc.at: Adjust expect verbose output, since now "Entering
10730 state..." is on a different line than the "Shifting" message.
10731
9c66f418
AD
107322004-09-08 Akim Demaille <akim@epita.fr>
10733
10734 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
10735 Bison directive from the Bison file to the invocation of this
10736 macro, so that these directives are passed to
10737 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
10738 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
10739 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
10740 the extra Bison directives instead of the whole series.
10741 Change the grammar so that there are recoverable errors, and
10742 unrecoverable errors. Now we can have the parser give up before
10743 consuming the whole input. As a result we now can observe that
10744 the lookahead is freed when needed.
10745 Change the parser source to parse argv[1] instead of a hard coded
10746 string.
10747 Simplify yylex, and give a value and location to EOF.
10748 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
10749 passed directives already coded in the file.
10750 Add some tests to check the location of "error".
10751 For some tests, the C++ parser is correct, and not yacc.c.
10752 For other tests, they provide different, but unsatisfying, values,
10753 so keep the C++ value so that at least one parser is "correct"
10754 according to the test suite.
10755 (Actions after errors): Remove, this is subsumed by the
10756 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
10757
52d5733f
AD
107582004-09-06 Akim Demaille <akim@epita.fr>
10759
10760 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 10761 (Parser::pop): New.
52d5733f
AD
10762 Use it.
10763
a0e68930
AD
107642004-09-06 Akim Demaille <akim@epita.fr>
10765
10766 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
10767 argument, an informative message.
10768 Call YY_SYMBOL_PRINT.
10769 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
10770 * data/lalr1.cc (destruct_): Likewise.
10771 In addition, no longer depend on b4_yysymprint_generate and
10772 b4_yydestruct_generate to generate these functions, do it "by
10773 hand".
10774
e757bb10
AD
107752004-09-03 Akim Demaille <akim@epita.fr>
10776
10777 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
10778 invoked, yydestruct the lookahead.
10779 * tests/calc.at (Calculator $1): Update the expected lengths of
10780 traces: there is an added line for the discarded lookahead.
10781 * doc/bison.texinfo (Destructor Decl): Some rewording.
10782 Define "discarded" symbols.
10783
0fe1f06d
AD
107842004-09-02 Akim Demaille <akim@epita.fr>
10785
10786 * data/lalr1.cc (translate_, destruct_): No reason to be static.
10787
284acc8b
AD
107882004-09-02 Akim Demaille <akim@epita.fr>
10789
10790 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
10791 (YYDSYMPRINTF): Rename as...
10792 (YY_SYMBOL_PRINT): this.
10793 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
10794 two.
10795 Use it instead of direct symprint_ calls.
10796 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
10797 one.
10798
a5eb1ed2
AD
107992004-09-02 Akim Demaille <akim@epita.fr>
10800
b7c72fe1
AD
10801 * data/lalr1.cc (b4_yysymprint_generate): New.
10802 (symprint_): New member function, defined when YYDEBUG.
10803 Use it consistently instead of token/nterm debugging output by
10804 hand.
a5eb1ed2
AD
10805 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
10806 %printer calls to use cdebug_ when using lalr1.cc.
10807
417141dd
AD
108082004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
10809
10810 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
10811 with #ifdef YYDEBUG.
10812
2fa09258
AD
108132004-08-26 Akim Demaille <akim@epita.fr>
10814
10815 * doc/bison.texinfo (Implementing Loops): Rename as...
10816 (Implementing Gotos/Loops): this.
10817
9378b508
PE
108182004-08-13 Paul Eggert <eggert@cs.ucla.edu>
10819
10820 Adjust to latest gnulib.
10821 * bootstrap (gnulib_modules): Add xalloc-die.
10822 Set LC_ALL=C so that file names sort consistently.
10823 Prefer the gnulib copies of gettext.m4, glibc21.m4,
10824 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
10825 uintmax_t.m4, ulonglong.m4.
10826 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
10827 po.m4 since we are now using _gl.m4 instead.
10828
87a8ad5c
PE
108292004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
10830
10831 * src/scan-action.l: Remove. Scanning of semantic actions is
10832 handled in scan-gram.l.
10833
dca81a78
PE
108342004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
10835
10836 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
10837
10838 * src/location.h (struct): The file member is a uniqstr.
10839 (equal_boundaries): Use UNIQSTR_EQ for comparison.
10840
c9cbf7c5
PE
108412004-07-22 Paul Eggert <eggert@cs.ucla.edu>
10842
10843 Fix bug with non-%union parsers that have printers or destructors,
10844 which led to a Bison core dump. Reported by Peter Fales in
10845 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 10846
c9cbf7c5
PE
10847 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
10848 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
10849 not to our own type.
10850 * src/output.c (symbol_destructors_output, symbol_printers_output):
10851 Don't assume %union.
10852 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
10853 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
10854 UNION-FLAG. All callers changed.
10855 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
10856 Use type char, not unsigned int, when declaring an array of char;
10857 this lets us remove a cast.
10858 (Printers and Destructors): Add non-%union test cases.
10859
fa7e68c3
PE
108602004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10861
10862 * doc/bison.texinfo: Minor editorial changes, mostly to the new
10863 GLR writeups. E.g., avoid frenchspacing and the future tense,
10864 change "lookahead" to "look-ahead", and change "wrt" to "with
10865 respect to".
2fa09258 10866
fa7e68c3
PE
108672004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
10868
10869 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
10870 New sections, split off from the GLR Parsers section. Put the new
10871 Simple GLR Parser near the start of the GLR section, for clarity.
10872 Rewrite connective text.
10873
99a9344e
PE
108742004-06-21 Frank Heckenbach <frank@g-n-u.de>
10875
10876 * doc/bison.texinfo (Simple GLR Parsers): New section.
10877
8dd162d3
PE
108782004-06-21 Paul Eggert <eggert@cs.ucla.edu>
10879
10880 * NEWS, TODO, doc/bison.texinfo:
10881 Use "look-ahead" instead of "lookahead", to be consistent.
10882 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
10883 while we're fixing "look-ahead".
10884 * src/conflicts.c (shift_set): Renamed from shiftset.
10885 (look_ahead_set): Renamed from lookaheadset.
10886 * src/print.c: Likewise.
10887 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
10888 name for "lookahead".
10889 (report_types, usage): Likewise.
10890 * src/getargs.h (report_look_ahead_tokens): Renamed from
10891 report_lookaheads.
10892 * src/lalr.c (compute_look_ahead_tokens): Renamed from
10893 compute_lookaheads.
10894 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
10895 (look_ahead_tokens_print): Renamed from lookaheads_print.
10896 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
10897 state_rule_lookaheads_print.
10898 * src/state.h: Likewise.
10899 (reductions.look_ahead_tokens): Renamed from lookaheads.
10900 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
10901 AT_DATA_LOOKAHEADS_GRAMMAR.
10902
57a90331
PE
109032004-06-03 Paul Eggert <eggert@cs.ucla.edu>
10904
10905 * README: Update location of patched M4 distribution.
10906
8ed3234a
PE
109072004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
10908
10909 Don't assume the C++ compiler takes the same arguments as the C compiler
10910 (trivial change).
10911 * configure.ac (O0CXXFLAGS): New var.
10912 * tests/atlocal.in (CXXFLAGS): Use it.
10913
07971983
PE
109142004-05-29 Paul Eggert <eggert@cs.ucla.edu>
10915
10916 Fix some "make check" problems with C++ reported by
10917 Albert Chin-A-Young for Tru64 C++ in this thread:
10918 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
10919
10920 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
10921 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10922 Output to a .cc file for C++, not to a .c file.
10923 * tests/calc.at (AT_CHECK_CALC): Likewise.
10924 * tests/regression.at (AT_CHECK_DANCER): Likewise.
10925 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
10926
29058652
PE
109272004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
10928
10929 * tests/calc.at, tests/actions.at: Workaround for SGI
10930 C++ compiler. (trivial change)
10931
62cb8a99
PE
109322004-05-27 Paul Eggert <eggert@cs.ucla.edu>
10933
fd418816
PE
10934 Spent a few hours checking out which prerequisite versions the
10935 current sources actually require. I went all the way back to
10936 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
10937 a seemingly endless set of combinations of versions more recent
10938 than that. The bottom line is that the current sources require
10939 fairly recent versions of the build tools, and it'll be some work
10940 to change this.
10941 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
10942 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
10943 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
10944 Add comments explaining why those particular versions are
10945 currently needed.
2fa09258 10946
62cb8a99
PE
10947 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
10948 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 10949 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
10950
10951 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
10952 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
10953
caa52c10
PE
109542004-05-26 Paul Eggert <eggert@cs.ucla.edu>
10955
10956 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
10957 0.11.5. Suggested by Bruno Haible.
10958 * bootstrap: Remove gettext version checking.
10959
10960 * doc/bison.texinfo (Decl Summary): Also mention that %union
10961 can depend on prerequisite types. Problem reported by Tim
10962 Van Holder.
10963
4bfd5e4e
PE
109642004-05-25 Paul Eggert <eggert@cs.ucla.edu>
10965
2cef3017
PE
10966 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
10967 * README-alpha: Don't tell people not to package this.
10968
b9c85d5c
PE
10969 * bootstrap: Don't assume $(...) works; use `...` instead.
10970 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
10971 gettext better.
10972
4bfd5e4e
PE
10973 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
10974 put into the -d output file, and mention what to do if YYSTYPE is
10975 defined as a macro.
10976
6a36ff94
PE
109772004-05-24 Paul Eggert <eggert@cs.ucla.edu>
10978
6712933e
PE
10979 Undo change made earlier today: it caused autopoint to not bring
10980 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
10981 autopoint's.
10982
10983 * bootstrap: Check that gettext version matches what's in
10984 configure.ac. Warn users to ignore robots.txt ERROR 404.
10985 * bootstrap: Undo today's earlier change (logged below).
10986 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 10987
6a36ff94
PE
10988 The gettext version checking is causing more trouble than it's
10989 curing; remove it. Problem reported by Paul Hilfinger.
10990
10991 * bootstrap: Issue a warning that one can expect a message
10992 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
10993 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
10994
209ea708
PE
109952004-05-23 Paul Eggert <eggert@cs.ucla.edu>
10996
10997 Ensure that the C++ compiler used for testing actually works on a
10998 simple test program; if not, skip the C++-related tests. Problem
10999 reported by Vin Shelton in:
161a71f3 11000 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
11001
11002 * m4/cxx.m4: New file.
11003 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
11004 * tests/atlocal.in (BISON_CXX_WORKS): Add.
11005 * tests/local.at (AT_COMPILE_CXX): Use it.
11006
41ca2549
PE
110072004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11008
383e69dc
PE
11009 * data/glr.c (yylloc): Output this macro even if locations are not
11010 being generated, as the GLR parser needs it even in that case.
11011 Problem reported by Troy A. Johnson
11012 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
11013
41ca2549
PE
11014 * configure.ac (AC_INIT): Update to 1.875e.
11015
e476c87d
PE
110162004-05-21 Paul Eggert <eggert@cs.ucla.edu>
11017
11018 * NEWS: Version 1.875d.
11019 * configure.ac (AC_INIT): Likewise.
11020 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
11021
11022 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
11023 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
11024 lalr1.cc runs afoul of the first, and the last two are no longer
11025 supported by GCC 3.4.0.
11026 * README: Mention GNU m4 1.4 or later; mention m4 patches.
11027 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
11028
233a88ad
PE
110292004-05-06 Paul Eggert <eggert@cs.ucla.edu>
11030
11031 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
11032 unsigned int, for compatibility with latest gnulib hash module.
11033 * src/state.c (state_hash, state_hasher): Likewise.
11034 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
11035 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 11036
12ffdd28
PE
110372004-05-03 Paul Eggert <eggert@cs.ucla.edu>
11038
11039 * NEWS: Unescaped newlines are no longer allowed in char & strings.
11040
11041 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
11042 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
11043 character and string literals.
11044 (unexpected_end): New function.
11045 (unexpected_eof): Use it.
11046 (unexpected_newline): New function.
11047 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
11048 actions.
e476c87d 11049
12ffdd28
PE
11050 * NEWS: Document %expect-rr.
11051
11052 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
11053 Fix typo by replacing $1 with $option.
11054 Remove more 'intl'-related files.
9668e2be 11055 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
11056
11057 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
11058 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
11059 strtoul.c.
11060 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
11061 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
11062 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
11063 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
11064 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
11065 * src/.cvsignore: Add *.output.
11066
11067 * src/parse-gram.y: Put copyright notice inside %{ %} so it
11068 gets copied to the output file.
e476c87d 11069
1f65350a
PE
110702004-04-28 Paul Eggert <eggert@twinsun.com>
11071
11072 Get files from the gnulib and po repositories, instead of relying
11073 on them being in our CVS. Upgrade to latest versions of gnulib
11074 and Automake.
11075
11076 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
11077 * bootstrap: Bootstrap from gnulib and po repositories.
11078 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
11079 * README-cvs: Document these changes. Remove version numbers from
11080 mentions of build tools, since they change so often. Mention Flex.
11081
11082 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
11083 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
11084 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
11085 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 11086 does this for us.
12ffdd28
PE
11087 (AC_ISC_POSIX): Remove; we no longer support this
11088 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
11089 (AC_HEADER_STDC): Remove: we now assume C89 or better.
11090 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
11091 Do not check for C89 headers, except for locale.h which is used
11092 by the Yacc library and must port to K&R hosts.
11093 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
11094 Do not check for C89 functions, except for setlocale which is
11095 used by the Yacc library.
11096 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
11097 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
11098 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
11099 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
11100 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
11101 AM_GNU_GETTEXT): Remove; now done by:
11102 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
11103 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
11104 for us.
11105
11106 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
11107 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
11108 Define to empty, as gnulib.mk will do the rest for us.
11109 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
11110 for us.
11111 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
11112 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
11113
11114 * src/files.c: Include gnulib's xstrndup.h.
11115
11116 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
11117 (REALLOC): Use xnrealloc, for likewise.
11118 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
11119 (strnlen, memrchr): Remove decls; functions no longer used.
11120 Include <stpcpy.h>.
11121
11122 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
11123 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
11124 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
11125 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
11126 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
11127 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
11128 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
11129 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
11130 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
11131 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
11132 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
11133 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
11134 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
11135 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
11136 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
11137 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
11138 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
11139 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
11140 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
11141 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
11142 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
11143 Remove, as these files are now generated automatically
11144 by bootstrap or automake.
11145
11146 * po/ChangeLog: Remove: all but one entry was a duplicate
11147 of this file, and I moved that 2000-11-02 entry here.
11148
11149 * config/.cvsignore: Add Makefile, depcomp, install-sh.
11150 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
11151 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
11152 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
11153 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
11154 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
11155 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
11156 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
11157 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
11158 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
11159 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
11160 xstrndup.h.
11161 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
11162 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
11163 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
11164 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
11165 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
11166 * src/.cvsignore: Remove *_.c.
11167
11168
11169 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
11170 support it. (The latest stable gzip doesn't.)
11171
111722004-04-27 Paul Eggert <eggert@twinsun.com>
11173
11174 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
11175 case, as stos_ is now used by destructors due to the 2004-02-09
11176 change.
11177
11178 Remove more K&R C support.
11179 * lib/libiberty.y (PARAMS): Remove. All uses removed.
11180 * lib/subpipe.c (errno): Remove decl.
11181 Include <stdlib.h> unconditionally.
11182 (EXIT_FAILURE): Remove macro.
11183 * src/complain.c (vfprintf, strerror): Remove.
11184 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
11185 unconditionally.
11186 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
11187 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
11188 (strchr, strspn, memchr): Remove decls.
11189 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
11190 unconditionally. Do not declare perror.
11191 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
11192 unconditionally.
11193
11194 * src/complain.c (_): Remove useless defn, as system.h defines this.
11195
11196 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
11197 with latest obstack.h.
11198 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
11199 to procedure types, as obstack.h now does that for us.
11200 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
11201
11202 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
11203 so that this include file can stand alone.
11204 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
11205 does this now. Include subpipe.h first after config.h, to
11206 test whether it can stand alone.
11207
11208 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
11209 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
11210 unused declaration.
11211
11212 * tests/synclines.at (%union synch line): Put a dummy member in
11213 the union, because empty unions aren't allowed in C. Caught
11214 by GCC 3.4.0.
11215
4f16766c
PE
112162004-04-13 Jim Meyering <jim@meyering.net>
11217
11218 * src/conflicts.c (conflicts_print): Correct format string typo:
11219 use `%%' to produce literal `%'. (trivial change)
11220
779e7ceb
PE
112212004-03-30 Paul Eggert <eggert@twinsun.com>
11222
11223 * src/getargs.c (version): Update copyright year to 2004.
11224
11225 * data/c.m4 (b4_int_type): Use 'short int' rather than
11226 'short', and similarly for 'long', 'unsigned', etc.
11227 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
11228 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
11229 yy_yypstack, yydumpstack): Likewise.
11230 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
11231 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
11232 Likewise.
11233 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
11234 yy_stack_print, yyparse): Likewise.
11235 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
11236 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
11237 * lib/bitset.c (bitset_print): Likewise.
11238 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
11239 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
11240 * lib/bitsetv.c (bitsetv_dump): Likewise.
11241 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
11242 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
11243 Likewise.
11244 * src/LR0.c (allocate_itemsets): Likewise.
11245 * src/gram.h (rule_number, rule): Likewise.
11246 * src/lalr.h (goto_number): Likewise.
11247 * src/nullable.c (nullable_compute): Likewise.
11248 * src/output.c (prepare_rules): Likewise.
11249 * src/relation.c (relation_print, relation_digraph): Likewise.
11250 * src/relation.h (relation_node): Likewise.
11251 * src/state.h (state_number, transitions, errs, reductions,
11252 struct state): Likewise.
11253 * src/symtab.h (symbol_number, struct symbol): Likewise.
11254 * src/tables.c (vector_number, tally, action_number,
11255 default_goto, goto_actions): Likewise.
11256 * tests/existing.at (GNU Cim Grammar): Likewise.
11257 * tests/regression.at (Web2c Actions): Likewise.
11258
11259 * src/output.c (muscle_insert_short_int_table): Renamed from
11260 muscle_insert_short_table. All uses changed.
11261
d6328241
PH
112622004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11263
11264 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
11265 (declaration): Replace expected_conflicts with expected_sr_conflicts.
11266 Add %expect-rr rule.
4f16766c 11267
d6328241
PH
11268 * src/scan-gram.l: Recognize %expect-rr.
11269
4f16766c 11270 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 11271 expected_conflicts.
4f16766c 11272 (expected_rr_conflicts): Declare.
d6328241
PH
11273
11274 * src/conflicts.c (expected_sr_conflicts): Rename from
11275 expected_conflicts.
11276 (expected_rr_conflicts): Define.
11277 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
11278 for GLR parsers.
11279 Use expected_sr_conflicts in place of expected_conflicts.
11280 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 11281
d6328241 11282 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 11283
1452af69
PE
112842004-03-08 Paul Eggert <eggert@gnu.org>
11285
11286 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 11287 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
11288
11289 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
11290 in lalr1.cc.
11291 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
11292 * src/scan-gram.l (scan_integer): New function.
11293 ({int}): Use it.
11294 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
11295 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
11296 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
11297 Say "long int", not "long", for uniformity with GNU style.
11298
006d217d
PE
112992004-02-25 Paul Eggert <eggert@twinsun.com>
11300
11301 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
11302 compilers. This fixes a problem with Intel's C++ compiler being
11303 chatty, reported by Guido Trentalancia in
161a71f3 11304 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 11305
c2729758
ADL
113062004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
11307
11308 Support %destructor and merge error locations in lalr1.cc.
11309
11310 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
11311 (Parser::stos_): Define unconditionally.
11312 (Parser::destruct_): New method. Generate its body with
11313 b4_yydestruct_generate.
11314 (Parser::error_start_): New attribute.
11315 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
11316 token which are discarded.
11317 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
11318 error_start_ when erroneous token are discarded.
11319 (Parser::parse) <yyerrlab1>: Compute the location of the error
11320 token so that it covers all the discarded tokens.
11321 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
11322 it can be called with `%skeleton "lalr1.cc"', and do that.
11323
dd0e0635
PE
113242004-02-02 Paul Eggert <eggert@twinsun.com>
11325
11326 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
11327 $(top_srcdir)/lib and ../lib. This fixes a bug reported
11328 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
11329 There's no need to mention top_builddir since Automake does that
11330 for us.
11331 (INCLUDES): Remove, as Automake says it's obsolescent.
11332 Contents migrated into AM_CPPFLAGS as described above.
11333 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
11334
113352004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11336
11337 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
11338 (yyreportSyntaxError): Handle case where lookahead token is
11339 YYEMPTY.
11340
be16239b
PH
113412004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11342
11343 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
11344 resulting parsers are compilable with C++.
11345
5fa90832
PE
113462003-12-23 Paul Eggert <eggert@twinsun.com>
11347
11348 * config/depcomp, config/install-sh: Sync with Automake 1.8.
11349 * src/output.c (output_skeleton): Rename local var.
11350 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
11351 Bison tokens, as this runs afoul of the 2003-10-07 change that
11352 disallowed NUL bytes in character constants or string literals.
11353
11354 * tests/local.at: Require Autoconf 2.59's Autotest.
11355 * tests/testsuite.at: Don't include local.at, since we now assume
11356 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
11357 including it.
11358 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
11359 multiple inclusion warnings.
dd0e0635 11360
b165c324
AD
113612003-12-02 Akim Demaille <akim@epita.fr>
11362
11363 * doc/bison.texinfo (How Can I Reset the Parser): More about start
11364 conditions.
11365 From Bruno Haible.
11366
26e06a21
ADL
113672003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
11368
11369 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
11370
92ac3705
PE
113712003-10-07 Paul Eggert <eggert@twinsun.com>
11372
6a5ecb38
PE
11373 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
11374 if testsuite doesn't exist.
11375
92ac3705
PE
11376 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
11377 literals, unfortunately.
11378 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
11379 Complain about NUL bytes in character constants or string literals.
11380
91d2c560
PE
113812003-10-05 Paul Eggert <eggert@twinsun.com>
11382
11383 * NEWS: Don't document %no-default-prec, as it's still
11384 too experimental.
11385 * doc/bison.texinfo: Document %no-default-prec only if
11386 the defaultprec flag is set. Normally it's not.
11387
0cc3da3a
PE
113882003-10-04 Paul Eggert <eggert@twinsun.com>
11389
11390 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
11391 non-modifiable lvalue, instead of a modifiable one.
11392 * doc/bison.texinfo (Actions): Document that $$ can
11393 be assigned to. Do not claim that $$ and $N are
11394 array element references: user code should not rely on this.
11395
22fccf95
PE
113962003-10-01 Paul Eggert <eggert@twinsun.com>
11397
11398 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
11399 (grammar_declaration): Use it.
11400 * src/scan-gram.l: New token %no-default-prec.
11401 * tests/conflicts.at: Revamp tests to use %no-default-prec.
11402 * NEWS, doc/bison.texinfo: Document the above.
11403
fc8f2965
AD
114042003-10-01 Akim Demaille <akim@epita.fr>
11405
11406 VCG no longer supports long_straight_phase.
11407
11408 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
11409 * src/print_graph.c (print_graph): Adjust.
11410
39a06c25
PE
114112003-09-30 Frank Heckenbach <frank@g-n-u.de>
11412 and Paul Eggert <eggert@twinsun.com>
11413
11414 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
11415 Table of Symbols): Document %default-prec.
11416 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
11417 (grammar_declaration): Set default_prec on %default-prec.
11418 * src/scan-gram.l (%default-prec): New token.
11419 * src/reader.h (default_prec): New flag.
11420 * src/reader.c: Likewise.
11421 (packgram): Handle it.
11422 * tests/conflicts.at (%default-prec without %prec,
11423 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 11424
39a06c25
PE
114252003-09-30 Paul Eggert <eggert@twinsun.com>
11426
11427 * tests/testsuite.at: Include local.at, not input.at, fixing
11428 a typo in the 2003-08-25 patch.
11429
62b6aef9
AD
114302003-08-27 Akim Demaille <akim@epita.fr>
11431
11432 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
11433 GCC warnings.
11434
89e1cc61
AD
114352003-08-26 Akim Demaille <akim@epita.fr>
11436
11437 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
11438 "<\#" to avoid magic from Gnus when posting parts of this script.
11439
a08460b0
AD
114402003-08-26 Akim Demaille <akim@epita.fr>
11441
11442 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
11443 (Parser::parse): here.
11444 Adjust: nerrs and errstatus is now replaced by...
11445 (Parser::nerrs_, Parser::errstatus_): New.
11446
603f1cfd
AD
114472003-08-25 Akim Demaille <akim@epita.fr>
11448
11449 * config/announce-gen, Makefile.cfg: New.
11450 * Makefile.am: Adjust.
11451 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
11452 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
11453
cd3684cf
AD
114542003-08-25 Akim Demaille <akim@epita.fr>
11455
11456 When reducing initial empty rules, Bison parser read an initial
11457 location that is not defined. This results in garbage, and that
11458 affects Bison's own parser. Therefore we need (i) to extend Bison
11459 to support a means to initialize this location, and (ii) to use
11460 this CVS Bison to fix CVS Bison's parser.
11461
11462 * src/reader.h, reader.c (epilogue_augment): Remove, replace
11463 with...
11464 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
11465 * src/parse-gram.y: Adjust.
11466 (%initial-action): New.
11467 (%error-verbose): Since we require CVS Bison, there is no reason
11468 not to use it.
11469 * src/scan-gram.l: Adjust.
11470 * src/Makefile.am (YACC): New, to make sure we use our own parser.
11471 * data/yacc.c (yyparse): Use b4_initial_action.
11472
4e03e201
AD
114732003-08-25 Akim Demaille <akim@epita.fr>
11474
11475 * doc/bison.texinfo: Don't promote stdout for error messages.
11476
8c182d05
AD
114772003-08-25 Akim Demaille <akim@epita.fr>
11478
11479 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
11480 From Alexandre Duret-Lutz.
11481
6a60c4cf
PE
114822003-08-25 Akim Demaille <akim@epita.fr>
11483
11484 Version 1.875c.
11485
25f66e1a
AD
114862003-08-25 Akim Demaille <akim@epita.fr>
11487
11488 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
11489 Use them.
11490
5348bfbe
AD
114912003-08-25 Akim Demaille <akim@epita.fr>
11492
11493 * data/lalr1.cc (Parser::reduce_print_): New.
11494 Use it.
11495
47301314
AD
114962003-08-25 Akim Demaille <akim@epita.fr>
11497
11498 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
11499 error recovery loops. This patch is based on
161a71f3 11500 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
11501 Also, augment the similarity between lalr1.cc and yacc.c.
11502 Note: the locations of error recovery rules are not correct yet.
11503
11504 * data/lalr1.cc: Comment changes to augment the similarity between
11505 lalr1.cc and yacc.c.
11506 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
11507 (yyerrlab1): Remove, but where it used to be (now the bottom part of
11508 yyerrlab), when hitting EOF, pop the whole stack here instead of
11509 merely falling thru the default error handling mechanism.
11510 (yyerrorlab): New label, with the old contents of YYERROR,
11511 plus the following change: pop the stack of rhs corresponding
11512 to the production that invoked YYERROR. That is how Yacc
11513 behaves (required by POSIX).
11514 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
11515 fail.
11516
1f7a61ff
AD
115172003-08-25 Akim Demaille <akim@epita.fr>
11518
11519 Tune local.at so that people can "autom4te -l autotest calc.at -o
11520 calc" for instance, to extract a sub test suite.
11521
11522 * tests/testsuite.at: Move the initialization, Autotest version
11523 requirement, and AT_TESTED invocation into...
11524 * tests/local.at: here.
11525 * tests/testsuite.at: Include it for compatibility with Autoconf
11526 2.57.
11527 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
11528 be ignore.
11529
327b5b56
PE
115302003-08-04 Paul Eggert <eggert@twinsun.com>
11531
11532 Rework code slightly to avoid gcc -Wtraditional warnings.
11533 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
11534 The returned value is now stored in *YY0. All callers changed.
11535 * src/output.c (merge_output): Adjust to the above change.
11536
0051e3ed
PE
115372003-07-26 Paul Eggert <eggert@twinsun.com>
11538
11539 * data/glr.c (YYASSERT): New macro.
11540 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
11541 yyresolveStates, yyprocessOneStack):
11542 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
11543 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 11544
137437c6
PE
115452003-07-25 Paul Eggert <eggert@twinsun.com>
11546
5b620e06
PE
11547 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
11548 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 11549 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
11550 by Frank Heckenbach, though I have omitted the structure-initialization
11551 part of his glr-knr.diff patch since I recall that the Portable
11552 C Compiler didn't require that change.
11553
137437c6
PE
11554 Let the user specify how to allocate and free memory.
11555 Derived from a suggestion by Frank Heckenbach in
161a71f3 11556 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
11557 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
11558 All uses of free, malloc, realloc changed to use these macros,
11559 and unnecessary casts removed.
11560 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
11561
ddb85ca5
PE
115622003-07-06 Matthias Mann <MatthiasMann@gmx.de>
11563
11564 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
11565 use s.empty() rather than s == "" to test for empty string; see
161a71f3 11566 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
11567 (trivial change)
11568
39910e09
AD
115692003-06-25 Akim Demaille <akim@epita.fr>
11570
11571 * config/depcomp, config/install-sh: Update from masters.
11572
0ae99356
PE
115732003-06-20 Paul Eggert <eggert@twinsun.com>
11574
11575 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
11576 and return properly parenthesized result.
11577 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
11578 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11579 Remove unnecessary parentheses from uses.
11580 * doc/bison.texinfo (Location Default Action): Describe the
11581 conventions for parentheses.
11582
cd05d13c
PE
115832003-06-19 Paul Eggert <eggert@twinsun.com>
11584
81fd08ca
PE
11585 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
11586 yyreportTree): Do not assume that size_t is the same width as int,
11587 when printing sizes. Print sizes using an unsigned format.
11588 Problem reported by Frank Heckenbach in
161a71f3 11589 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 11590
cd05d13c
PE
11591 Port to Forte Developer 7 C compiler.
11592 * data/glr.c (struct YYLTYPE): If locations are not being used,
11593 declare a single dummy member, as empty structs do not conform
11594 to the C standard.
11595 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
11596 the Forte Developer 7 C compiler complains that end-of-loop
11597 code is not reached.
11598
4dcf140b
PE
115992003-06-17 Paul Eggert <eggert@twinsun.com>
11600
11601 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
11602 avoid warnings from picky compilers about redefinition of PARAMS.
11603
8dd76bee
PE
116042003-06-17 Paul Eggert <eggert@twinsun.com>
11605
11606 Version 1.875b.
11607
11608 * NEWS: Document 1.875b.
11609
11610 * lib/bbitset.h: Do not include config.h; that's the includer's job.
11611 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
11612 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
11613 Don't use 'index' in comments, as it's a builtin fn on some hosts.
11614 * lib/bitset_stats.c: Include gettext.h unconditionally, as
11615 per recent gettext manual's suggestion.
11616 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
11617 Use prototypes, not old-style definitions.
11618 * lib/lbitset.c (lbitset_unused_clear): Likewise.
11619 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
11620 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
11621 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
11622 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
11623 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
11624 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
11625 vbitset_or_and_cmp, vbitset_copy): Likewise.
11626
11627 * lib/libiberty.h: Do not include config.h; that's the includer's job.
11628 Do not include <stdlib.h>.
11629 (PARAMS): Define unconditionally for C89.
11630 (ATTRIBUTE_NORETURN): Remove.
11631 (ATTRIBUTE_UNUSED): Define unconditionally.
11632
11633 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 11634 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
11635 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
11636 * lib/vbitset.c, lib/vbitset.h: New files.
11637 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
11638 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
11639 from libbitset.
11640
11641 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
11642 `How Can I Reset @code{yyparse}', since texinfo does not allow
11643 arbitrary @ in node names.
11644
11645 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
11646 shouldn't be needed according to the gettext 0.12.1 documentation
11647 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 11648 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 11649 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 11650 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 11651
8dd76bee
PE
11652 * lib/.cvsignore: Add stdbool.h.
11653 * m4/.cvsignore: Add nls.m4, po.m4.
11654
11655 Upgrade to CVS gnulib.
11656 * stdbool_.h: File renamed from stdbool.h.in.
11657 * configure.ac (AM_STDBOOL_H): Invoke this instead of
11658 AC_HEADER_STDBOOL.
11659 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
11660 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
11661 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
11662 (MOSTLYCLEANFILES): New var.
11663 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
11664 (stdbool.h): New rule.
11665 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
11666 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
11667 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
11668 m4/quote.m4: Upgrade to today's gnulib.
11669
11670 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
11671 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
11672 the tests right now.
11673 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
11674 yyerror are declared before use; C99 requires this.
11675
25005f6a
PH
116762003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11677
11678 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
11679 first.
11680 (yyrecoverSyntaxError): Correct the logic for setting and testing
11681 yyerrState.
11682 Correct comment on handling EOF.
11683 Allow states with only a default reduction, rather than failing
8dd76bee 11684 (I can't quite reconstruct why these were not allowed before).
25005f6a 11685
137437c6 11686 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 11687 buffer overruns, corrupting state.
8dd76bee
PE
11688
11689 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
11690 definition.
11691 * src/reader.h (max_left_semantic_context): New variable declaration.
11692 * src/scan-gram.l (max_left_semantic_context): Define.
11693 (handle_action_dollar): Update max_left_semantic_context.
11694 * data/glr.c (YYMAXLEFT): New definition.
11695 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
11696 (yyresolveAction): Ditto.
11697
11698 Fixes to problems with location handling in GLR parsers reported by
11699 Frank Heckenbach (2003/06/05).
11700
11701 * data/glr.c (YYLTYPE): Make trivial if locations not used.
11702 (YYRHSLOC): Add parentheses, and define only if locations used.
11703 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
11704 locations not used.
11705 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
11706 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 11707
25005f6a
PH
11708 * tests/cxx-type.at: Exercise location information; update tests
11709 to differentiate output with and without locations.
8dd76bee 11710 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
11711 because default YYLTYPE not yet defined.
11712 Change semantic actions to compute strings, rather than printing
11713 them directly (to test proper passing of semantics values). Change
11714 output to prefix notation and update test data and expected results.
11715 (yylex): Track locations.
11716 (stmtMerge): Return value rather than printing, and include arguments
11717 in value.
8dd76bee 11718
711f40b7
PE
117192003-06-03 Paul Eggert <eggert@twinsun.com>
11720
11721 Avoid warnings generated by GCC 2.95.4 when Bison is
11722 configured with --enable-gcc-warnings.
11723 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
11724 yy::]b4_parser_class_name[::translate_,
11725 yy::Stack::operator[] (unsigned),
11726 yy::Stack::operator[] (unsigned) const,
11727 yy::Slice::operator[] (unsigned),
11728 yy::Slice::operator[] (unsigned) const):
11729 Rename local vars to avoid warnings.
11730 * tests/glr-regression.at (Improper handling of embedded actions
11731 and $-N in GLR parsers): Remove unused local variable from yylex.
11732 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
11733 (void) as arg when not pure, since we now assume C89 when building
11734 Bison. Pacify GCC by using parameter.
11735
ac695f7d
PE
117362003-06-02 Paul Eggert <eggert@twinsun.com>
11737
11738 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
11739 yy::Location::lines, yy::Location::columns): Rename arguments
11740 to avoid shadowing; this removes a warning generated by GCC 3.3.
11741
26ec81e0
PE
117422003-06-01 Paul Eggert <eggert@twinsun.com>
11743
11744 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
11745 to g++, as GCC 3.3 complains if you do it.
11746 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
11747 everything that WARNING_CFLAGS has, except omit warnings
11748 not suitable for C++.
11749 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
11750 * tests/atlocal.in (CXXFLAGS): New var.
11751 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
11752
11753 Fix a GLR parser bug I reported in February; see
161a71f3 11754 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
11755 The problem was that GLR parsers did not conform to the C standard,
11756 because actions like { $1 = $2 + $3; } expanded to expressions
11757 that invoked YYFILL in separate subexpressions, and YYFILL assigned
11758 to a local variable. The C standard says that expressions
11759 like (var = f ()) + (var = f ()) have undefined behavior.
11760 Another problem was that GCC sometimes issues warnings that
11761 yyfill and its parameters are unused.
11762
11763 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
11764 as possibly unused.
11765 (yyfill): New function.
11766 (YYFILL): Use it.
11767 (yyuserAction): Change type of yynormal to bool, so that it matches
11768 the new yyfill signature. Mark it as possibly unused.
11769
11770
11771 Follow up on a bug I reported in February, where a Bison-generated
11772 parser can loop. Provide a test case and a fix for yacc.c. I
11773 don't have a fix for lalr1.cc or for glr.c, unfortunately.
11774 The original bug report is in:
161a71f3 11775 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
11776
11777 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
11778 macro's size was becoming unwieldy.
11779 (yyerrlab): Do not discard an empty lookahead symbol, as this
11780 might destroy garbage.
11781 (yyerrorlab): New label, with the old contents of YYERROR,
11782 plus the following change: pop the stack of rhs corresponding
11783 to the production that invoked YYERROR. That is how Yacc
11784 behaves, and POSIX requires this behavior.
11785 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
11786 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
11787 Define 'alarm' to do nothing if unistd.h is not available.
11788 Add a new rule "exp: '-' error;" to test the above change to
11789 data/yacc.c. Use 'alarm' to abort any test taking longer than
11790 10 seconds, as it's probably looping.
11791 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
11792 Also, the new yacc.c generates two fewer diagnostics for an
11793 existing test.
11794
d0829076
PE
117952003-05-24 Paul Eggert <eggert@twinsun.com>
11796
c6ae27df
PE
11797 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
11798 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
11799 This fixes a problem reported by John Bowman when the Compaq/HP
11800 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
11801 -ansi -Wall -gall).
11802 * data/yacc.c (union yyalloc): Likewise.
11803 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 11804
d0829076
PE
11805 Switch from 'int' to 'bool' where that makes sense.
11806
11807 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
11808 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
11809 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
11810 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
11811 Return or accept bool, not int. All callers changed.
11812 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
11813 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
11814 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
11815 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
11816 bitset_or_and_cmp_): Likewise.
11817 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
11818 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
11819 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
11820 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
11821 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
11822 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
11823 bitset_stats_or_and_cmp): Likewise.
11824 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
11825 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
11826 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
11827 ebitset_xor_cmp): Likewise.
11828 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
11829 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
11830 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
11831 lbitset_xor_cmp): Likewise.
11832 * lib/bbitset.h: Include <stdbool.h>.
11833 (struct bitset_vtable): The following members now return bool, not
11834 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
11835 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
11836 or_and_cmp).
11837 * src/conflicts.c (count_rr_conflicts): Likewise.
11838 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
11839 All uses changed.
11840 * lib/ebitset.c (ebitset_obstack_init): Likewise.
11841 * lib/lbitset.c (lbitset_obstack_init): Likewise.
11842 * src/getargs.c (debug_flag, defines_flag, locations_flag,
11843 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11844 graph_flag): Likewise.
11845 * src/getargs.h (debug_flag, defines_flag, locations_flag,
11846 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
11847 graph_flag): Likewise.
11848 * src/output.c (error_verbose): Likewise.
11849 * src/output.h (error_verbose): Likewise.
11850 * src/reader.c (start_flag, typed): Likewise.
11851 * src/reader.h (typed): Likewise.
11852 * src/getargs.c (LOCATIONS_OPTION): New constant.
11853 (long_options, getargs): Use it.
11854 * src/lalr.c (build_relations): Use bool, not int.
11855 * src/nullable.c (nullable_compute): Likewise.
11856 * src/print.c (print_reductions): Likewise.
11857 * src/tables.c (action_row, pack_vector): Likewise.
11858 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
11859 * src/output.c (prepare): Use it.
11860 * src/output.c (token_definitions_output,
11861 symbol_destructors_output, symbol_destructors_output): Use string,
11862 not boolean integer, to keep track of whether to output separator.
11863 * src/print_graph.c (print_core): Likewise.
11864 * src/state.c (state_rule_lookaheads_print): Likewise.
11865
11866 * config/install-sh: Sync from automake 1.7.5.
11867
6b2584b7
PE
118682003-05-14 Paul Eggert <eggert@twinsun.com>
11869
11870 * src/parse-gram.y (rules_or_grammar_declaration): Require a
11871 semicolon after a grammar declaration, in the interest of possible
11872 future changes to the Bison input language.
11873 Do not allow a stray semicolon at the start of the grammar.
11874 (rhses.1): Allow one or more semicolons after any rule, including
11875 just before "|" as required by POSIX.
11876 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
11877 grammar.
11878
caf37a36
ADL
118792003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
11880
11881 %parse-param support for lalr1.cc.
11882
11883 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
11884 b4_cc_constructor_calls, b4_cc_constructor_call,
11885 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
11886 definitions.
11887 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
11888 parse-param arguments.
11889 (yy::b4_parser_class_name): Declare instance variables to
11890 hold parse-param arguments.
11891 * tests/calc.at: s/value/semantic_value/ because value clashes
11892 with a member of yy::b4_parser_class_name. Adjust C++ code
11893 to handle %parse-param. Enable %parse-param test in C++.
11894
3ab37077
PE
118952003-05-12 Paul Eggert <eggert@twinsun.com>
11896
11897 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
11898 English a bit. Fix fclose typo. Change "const char" to "char
11899 const", and use ANSI C rather than K&R for "main". Suggest
11900 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
11901 and suggest yy_switch_to_buffer.
11902
119032003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
11904
11905 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
11906 C89. This avoids a diagnostic on compilers that define __STDC__
11907 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 11908 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 11909
e743727f
PE
119102003-05-03 Paul Eggert <eggert@twinsun.com>
11911
11912 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
11913 Do not overrun array bounds.
11914 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 11915 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 11916
916708d5
AD
119172003-04-29 Akim Demaille <akim@epita.fr>
11918
11919 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
11920 * src/getargs.c, src/getargs.h: here, as bool, not int.
11921 (nondeterministic_parser): New.
11922 * src/parse-gram.y, src/scan-gram.l: Support
11923 %nondeterministic-parser.
11924 * src/output.c (prepare): Use nondeterministic_parser instead
11925 of glr_parser where appropriate.
11926 * src/tables.c (conflict_row, action_row, save_row)
11927 (token_actions, token_actions, pack_vector): Ditto.
11928
a06ea4aa
AD
119292003-04-29 Akim Demaille <akim@epita.fr>
11930
11931 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
11932
211074ca
AD
119332003-04-29 Akim Demaille <akim@epita.fr>
11934
11935 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
11936 with %pure-parser and %locations to exercise the patch from Yakov
11937 Markovitch below.
11938
6175ffe3
PE
119392003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
11940
11941 * data/yacc.c: (b4_lex_param): Corrected for the case where
11942 %lex-param is provided and %pure-parser isn't.
11943
b1e95857
PE
119442003-04-27 Paul Eggert <eggert@twinsun.com>
11945
11946 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 11947 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
11948 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
11949 if it is not defined.
11950 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
11951
acda9df6
PE
119522003-04-26 Paul Eggert <eggert@twinsun.com>
11953
3470c57b
PE
11954 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
11955 Declare to be of type suitable for the ninf value itself, not of
11956 type suitable for the corresponding table, since the latter might
11957 be unsigned but the ninf value might be negative. This fixes a
11958 bug reported by Alexandre Duret-Lutz in
161a71f3 11959 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 11960
acda9df6
PE
11961 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
11962 invokes it. We shouldn't invoke it twice because it will attempt
11963 to put error.o in the archive twice. This fixes a glitch reported
11964 by Martin Mokrejs in
161a71f3 11965 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 11966
b5250f26
PE
119672003-04-21 Paul Eggert <eggert@twinsun.com>
11968
11969 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
11970 to gnulib.
11971
089ac0f1
PE
119722003-04-21 Yakov Markovitch <Markovitch@iso.ru>
11973
11974 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
11975 Fix obvious typo that results in uncompilable GLR parsers
11976 when both %pure-parser and %locations are used. (trivial change)
11977
5ededac6
PE
119782003-04-17 Paul Eggert <eggert@twinsun.com>
11979
1b8f2fff
PE
11980 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
11981 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
11982 Do not insert the expected token via unput, as this runs afoul
11983 of a POSIX-compatibility bug in flex 2.5.31.
11984 All uses changed to BEGIN the parent state,
11985 since we no longer insert the expected token via unput.
11986 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
11987 that is no longer emitted after the above change.
11988
5ededac6
PE
11989 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
11990 the first one. This change is from Paul Hilfinger, and it fixes
11991 regression reported by Werner Lemberg in
161a71f3 11992 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
11993
11994 (resolve_sr_conflict): Don't invoke state_errs_set
11995 unless one or more tokens have been explicitly made errors.
11996 Otherwise, the above change causes Bison to abort.
11997
11998 * tests/existing.at (GNU pic Grammar): New test case, taken from
11999 Lemberg's email.
12000
b8be9132
AD
120012003-03-31 Akim Demaille <akim@epita.fr>
12002
12003 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
12004
d423d460
AD
120052003-03-31 Akim Demaille <akim@epita.fr>
12006
12007 * src/output.c (prepare_symbols): Avoid trailing spaces in the
12008 output.
12009
c7e441b4
AD
120102003-03-31 Akim Demaille <akim@epita.fr>
12011
12012 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
12013 From Paul Hilfinger.
12014
231897ad
AD
120152003-03-29 Akim Demaille <akim@epita.fr>
12016
12017 * m4/error.m4: Do not put under dynamic conditions some code which
12018 expansion is under static control.
12019
5b066063
AD
120202003-03-29 Akim Demaille <akim@epita.fr>
12021
12022 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
12023
22a74fec
AD
120242003-03-29 Akim Demaille <akim@epita.fr>
12025
12026 * doc/bison.texinfo (Strings are Destroyed): New.
12027
0eee27e7
PE
120282003-03-13 Paul Eggert <eggert@twinsun.com>
12029
12030 * .cvsignore: Add configure.lineno.
12031 * src/.cvsignore: Add yacc.
12032 * tests/.cvsignore: Add testsuite.log.
12033 * doc/fdl.texi: Sync with latest FSF version.
12034
f61aad93
PE
120352003-03-12 Paul Eggert <eggert@twinsun.com>
12036
537636c7
PE
12037 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
12038 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
12039 cursor, instead of leaving it undefined. This fixes a bug
12040 reported by Tim Van Holder in
161a71f3 12041 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
12042 * tests/input.at (Torturing the Scanner): Test the scanner on
12043 an empty input file, which was Tim Van Holder's test case.
12044
12045 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
12046 <sys/resource.h> can be included, include sys/time.h and
12047 sys/times.h first, if available. This works around the SunOS
12048 4.1.4 porting bug reported by Bruce Becker in
161a71f3 12049 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
12050
12051 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
12052 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
12053 AC_HEADER_SYS_WAIT.
12054
f61aad93
PE
12055 Merge changes from gnulib. This was prompted because the CVS
12056 snapshot didn't build on Solaris 7 due to strnlen problems.
12057
12058 These changes need to be merged back into gnulib:
12059 * lib/hash.c: Include <stdbool.h> unconditionally.
12060 * m4/onceonly.m4 (m4_quote): New macro.
12061 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
12062 Quote AC_FOREACH variable-expansions properly.
12063 The 2003-01-03 obstack.h change also needs merging.
12064 {end of changes requiring merging}
5b066063 12065
f61aad93
PE
12066 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12067 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
12068 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
12069 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
12070 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
12071 New files, imported from gnulib.
12072 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
12073 above.
12074
12075 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
12076 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
12077 gnulib sources.
12078
12079 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
12080 Add.
12081 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
12082 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
12083 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
12084 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
12085 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
12086 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
12087 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
12088 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
12089 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
12090 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
12091 (jm_PREREQ_ARGMATCH): Remove.
12092 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
12093 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
12094
12095 * src/system.h: Include <stdbool.h> unconditionally.
12096
12097 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
12098 assuming at least C89 in the bitset code for some time now.
12099
d2ffe116
AD
121002003-03-03 Akim Demaille <akim@epita.fr>
12101
12102 * ro.po: New.
12103
052826fd
AD
121042003-03-02 Akim Demaille <akim@epita.fr>
12105
12106 * doc/bison.texinfo (Table of Symbols): Reactivate the
12107 documentation for %lex-param, and %parse-param.
12108
c4749565
AD
121092003-03-02 Akim Demaille <akim@epita.fr>
12110
12111 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
12112 generate verbose error messages.
12113 Use the number of tokens as an upper bound in yytname, as it
12114 cannot be a non terminal.
12115
d5286af1
AD
121162003-03-02 Akim Demaille <akim@epita.fr>
12117
12118 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
12119 message.
12120
22e304a6
AD
121212003-03-02 Akim Demaille <akim@epita.fr>
12122
22e304a6
AD
12123 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
12124 Use them to exercise yycheck overrun.
12125 Based on Andrew Suffield's grammar.
12126
67a25fed
AD
121272003-03-02 Akim Demaille <akim@epita.fr>
12128
12129 Create tests/local.at for Bison generic testing macros.
12130
12131 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
12132 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
12133 This new file.
12134 * tests/calc.at (AT_CHECK_CALC): Adjust.
12135 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
12136 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
12137 * tests/local.at: here.
12138 (AT_COMPILE_CXX): Tags the tests using it as c++.
12139 Ignore the test if CXX is not functional.
12140
9c2b381f
PE
121412003-03-01 Paul Eggert <eggert@twinsun.com>
12142
12143 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
12144 not loc->end, since loc->end might contain garbage and this leads
12145 to undefined behavior on some platforms.
12146 (id_loc, token_start): Use (IF_LINTed) initial values that do not
12147 depend on *loc, so that the reader doesn't give the the false
12148 impression that *loc is initialized.
12149 (<INITIAL>"%%"): Do not bother setting code_start, since its value
12150 does not survive the return.
12151
0433ba88
AD
121522003-03-01 Akim Demaille <akim@epita.fr>
12153
12154 * src/scan-gram.l (code_start): Always initialize it when entering
12155 into yylex, as SC_EPILOGUE is activated *before* the corresponding
12156 yylex invocation. An alternative would be making it static, but
12157 then it starts with the second %%'s beginning, instead of its end.
12158
b305ea69
PE
121592003-02-28 Paul Eggert <eggert@twinsun.com>
12160
12161 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
12162 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 12163 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 12164
c3d25e01
PE
121652003-02-26 Paul Eggert <eggert@twinsun.com>
12166
12167 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
12168 Remove Sequent/Pyramid discussion (nobody uses them any more).
12169 Merge VMS and MS-DOS discussion; these ports may well be dead
12170 but let's keep mentioning them for now. Put <> around email
12171 addresses. Add copyright notice.
12172
c267ffbc
PE
121732003-02-24 Paul Eggert <eggert@twinsun.com>
12174
12175 * data/glr.c (yy_reduce_print): yylineno -> yylno,
12176 to avoid collision with flex use of yylineno.
12177 Problem reported by Bruce Lilly in
161a71f3 12178 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
12179 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12180 * data/yacc.c (yy_reduce_print): Likewise.
12181
12182 * config/depcomp: Sync with Automake 1.7.3.
12183
f939fc12
AD
121842003-02-21 Akim Demaille <akim@epita.fr>
12185
12186 * data/lalr1.cc: Use temporary variables instead of casts to
12187 change integer types.
12188 Suggested by Paul Eggert.
12189
95923bd6
AD
121902003-02-21 Akim Demaille <akim@epita.fr>
12191
12192 * doc/bison.texinfo: Use "location" consistently to refer to @n,
12193 to avoid confusions with lalr1.cc's notion of Position.
12194 Suggested by Paul Eggert.
12195
2cdc240e
AD
121962003-02-20 Akim Demaille <akim@epita.fr>
12197
12198 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
12199 before initial_columns.
12200 (location.hh): Use consistent variable names when defining the
12201 operator<<.
12202 Use "last" so that we subtract from Positions, not from unsigned.
12203
5d003116
AD
122042003-02-20 Akim Demaille <akim@epita.fr>
12205
12206 * data/lalr1.cc (position.hh): New subfile, including the extended
12207 and Doxygen'ed documentation of class Position.
12208 (location.hh): Use it.
12209 Document a` la Doxygen.
ba1ecc07 12210 With the help of Benoit Perrot.
5d003116 12211
d02b25f9
AD
122122003-02-20 Akim Demaille <akim@epita.fr>
12213
12214 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
12215 AT_YACC_IF.
12216 Redefine AT_YYERROR_SEES_LOC_IF using it.
12217 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
12218 not defined.
12219 Don't use the location in yy::Parser::error_ and
12220 yy::Parser::print_ when not %locations.
12221 Activate more lalr1.cc tests.
12222
0d1c3a04
AD
122232003-02-19 Akim Demaille <akim@epita.fr>
12224
12225 * data/lalr1.cc: When displaying a line number, be sure to make it
12226 an int.
12227
60a777aa
AD
122282003-02-19 Akim Demaille <akim@epita.fr>
12229
12230 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
12231 Remove, useless.
12232 (YYABORT, YYACCEPT, YYERROR): New.
12233 * tests/calc.at: Renable the lalr1.cc test.
12234
0b86fc41
AD
122352003-02-19 Akim Demaille <akim@epita.fr>
12236
12237 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
12238 error recovery, mixing with/without pops and discarding of the
12239 lookahead.
12240 Exercise YYERROR.
12241 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
12242
da99a5dc
PE
122432003-02-17 Paul Eggert <eggert@twinsun.com>
12244
12245 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
12246 * tests/testsuite.at (AT_COMPILE): Use them.
12247 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 12248 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 12249
93b8c255
PE
122502003-02-12 Paul Eggert <eggert@twinsun.com>
12251
12252 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
12253 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 12254 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
12255 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
12256 Check for malloc failure, for consistency with yacc.c.
12257 (yytname_size): Remove, for consistency with yacc.c.
12258
12259 The bug still remains in data/lalr1.cc, as I didn't have time
12260 to fix it there.
12261
7548fed2
AD
122622003-02-06 Akim Demaille <akim@epita.fr>
12263
12264 * configure.ac (GXX): Rename as...
12265 (CXX): this, to keep the original Autoconf semantics.
12266 Require 2.57.
12267 * data/lalr1.cc: Fix b4_copyright invocations.
12268 If YYDEBUG is not defined, don't depend upon name_ being defined.
12269 (location.hh): Include string and iostream.
12270 (Position::filename): New member.
12271 (Position::Position ()): New.
12272 (operator<< (Position)): New.
12273 (operator- (Position, int)): New.
12274 (Location::first, Location::last): Rename as...
12275 (Location::begin, Location::end): these, to mock the conventional
12276 iterator names.
12277 (operator<< (Location)): New.
12278 * tests/atlocal.in (CXX): New.
12279 * tests/testsuite.at (AT_COMPILE_CXX): New.
12280 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
12281 locations in a more synthetic way.
12282 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
12283 lalr1.cc is used.
12284 Adjust the C locations to match those from Emacs: first column is
12285 column 0.
12286 Change all the expected results.
12287 Conform to the GCS: simplify the locations when applicable.
12288 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
12289 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
12290 these CPP macros with the m4 macros new defined by...
12291 (AT_CHECK_PUSHDEFS): this, i.e.:
12292 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 12293 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
12294 New macros.
12295 (AT_CHECK_POPDEFS): Undefine them.
12296 (AT_CHECK_CALC_LALR1_CC): New.
12297 Use it for the first lalr1.cc test.
12298
43a176ef
AD
122992003-02-04 Akim Demaille <akim@epita.fr>
12300
12301 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
12302 Location as is defined.
12303
fc049e9c
AD
123042003-02-04 Akim Demaille <akim@epita.fr>
12305
12306 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
12307 name_ being defined.
12308
a737b216
PE
123092003-02-03 Paul Eggert <eggert@twinsun.com>
12310
12311 * src/gram.h (start_symbol): Remove unused decl.
12312
12313 Use more-consistent naming conventions for local vars.
12314
12315 * src/derives.c (derives_compute): Change type of local var from
12316 int to rule_number.
12317 * src/gram.c (grammar_rules_partial_print): Likewise.
12318 * src/print.c (print_core): Likewise.
12319 * src/reduce.c (reduce_grammar_tables): Likewise.
12320
12321 * src/gram.c (grammar_dump): Change name of item_number *
12322 local var from r to rp.
12323 * src/nullable.c (nullable_compute): Likewise.
12324
12325 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
12326
12327 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
12328 for symbol or symbol_number var.
12329 * src/reader.c (grammar_start_symbol_set): Likewise.
12330 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
12331 Likewise.
12332 * src/state.c (transitions_to): Likewise.
12333 * src/state.h: Likewise.
12334 * src/tables.c (symbol_number_to_vector_number): Likewise.
12335
12336 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
12337 char * var.
12338
12339 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
12340 var.
12341
12342 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
12343 var.
12344
12345 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
12346 Use str, not s, for char * var. Use ch, not c, for character var.
12347 Use size for size var.
12348
12349 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
12350 char * var.
12351 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
12352 uniqstr var.
12353 * src/uniqstr.h: Likewise.
12354
12355 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
12356 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
12357 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
12358 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
12359 param to have same name as that of enum, so that we don't use
12360 "s" to stand for a non-state.
12361
68e93ad5
AD
123622003-02-02 Akim Demaille <akim@epita.fr>
12363
12364 * src/scan-skel.l: Scan more than one inert character per yylex
12365 invocation.
12366
92898986
PE
123672003-02-01 Paul Eggert <eggert@twinsun.com>
12368
12369 Version 1.875a.
12370
1d9d5d71
PE
12371 * po/LINGUAS: Add ms.
12372
0435d061
AD
123732003-01-30 Akim Demaille <akim@epita.fr>
12374
12375 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
12376
6029a57f
PH
123772003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12378
12379 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
12380 of $1.
0435d061
AD
12381
12382 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 12383 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 12384 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 12385
6029a57f
PH
12386 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
12387 (b4_rhs_location): Ditto.
0435d061 12388 (yyfill): New function to copy from stack tree into array
6029a57f 12389 incrementally.
0435d061
AD
12390 (yyuserAction): Modify to allow incremental move of semantic values
12391 to rhs array when in GLR mode.
12392 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
12393 as needed.
12394 Remove dummy use of yystack, as there is now a guaranteed use.
12395 (yydoAction): Modify to allow incremental move of semantic values
12396 to rhs array when in GLR mode.
12397 (yyresolveAction): Ditto.
12398 (yyglrShiftDefer): Update comment.
0435d061 12399 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
12400 (yyglrReduce): Ditto.
12401 (yydoAction): Ditto
0435d061 12402
6029a57f
PH
12403 * tests/glr-regr1.at: Rename to ...
12404 * tests/glr-regression.at: Add new regression test for the problems
12405 described above (adapted from S. Eken).
12406 Update copyright notice.
12407 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
12408 * tests/Makefile.am: Ditto.
12409
6cee6297
PE
124102003-01-28 Paul Eggert <eggert@twinsun.com>
12411
12412 * data/lalr1.cc: Do not use @output_header_name@ unless
12413 b4_defines_flag is set. This fixes two bugs reported by
12414 Tim Van Holder in
161a71f3
PE
12415 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
12416 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 12417
b2a836b5
PE
124182003-01-21 Paul Eggert <eggert@twinsun.com>
12419
12420 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
12421 we don't need to worry about yyerrlab1 being reported as an
12422 "unused label" by non-GCC C compilers. The downside is that if
12423 locations are used then a couple of statements are duplicated each
12424 time YYERROR is invoked, but the upside is that the warnings
12425 should vanish.
12426 (yyerrlab1): Move code to YERROR.
12427 (yyerrlab2): Remove. Change uses back to yyerrlab1.
12428 This reverts some of the 2002-12-27 change.
12429
4196b931
PE
124302003-01-17 Paul Eggert <eggert@twinsun.com>
12431
12432 * src/output.c (symbol_printers_output): Fix typo that led
12433 to core dump. Problem reported by Antonio Rus in
161a71f3 12434 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 12435
3ae831b4
AD
124362003-01-13 Akim Demaille <akim@epita.fr>,
12437 Quoc Peyrot <chojin@lrde.epita.fr>,
12438 Robert Anisko <anisko_r@lrde.epita.fr>
12439
12440 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
12441 when the stacks contain one element, as the loop would otherwise
12442 free the last state, and then use the top state (the one we just
12443 popped). This means that the initial elements will not be freed
12444 explicitly, as is the case in yacc.c; it is not a problem, as
12445 these elements have fake values.
12446
e3aa65c5
PE
124472003-01-11 Paul Eggert <eggert@twinsun.com>
12448
12449 * NEWS: %expect-violations are now just warnings, reverting
12450 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
12451 bootstrapping problem reported by Matthias Klose; see
161a71f3 12452 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
12453 * src/conflicts.c (conflicts_print): Likewise.
12454 * tests/conflicts.at (%expect not enough, %expect too much,
12455 %expect with reduce conflicts): Likewise.
12456 * doc/bison.texinfo (Expect Decl): Document this. Also mention
12457 that the warning is enabled if the number of conflicts changes
12458 (not necessarily increases).
12459
12460 * src/getargs.c (version): Update copyright year.
12461
f0057011
AD
124622003-01-09 Akim Demaille <akim@epita.fr>
12463
12464 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
12465
1ee6d2a0
PE
124662003-01-08 Paul Eggert <eggert@twinsun.com>
12467
12468 * Makefile.maint (WGETFLAGS):
12469 New macro, containing "-C off" to disable proxy caches.
12470 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
12471 (rel-check): Use $(WGET) instead of wget.
12472
d4fd77c4
PE
124732003-01-06 Paul Eggert <eggert@twinsun.com>
12474
12475 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
12476 the GLR paper of Scott, Johnstone and Hussain.
12477
464c6927
PE
124782003-01-04 Paul Eggert <eggert@twinsun.com>
12479
d600ee67
PE
12480 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
12481 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
12482 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
12483 (EXTRA_LIBRARIES): New var, for liby.a.
12484 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
12485 (EXTRA_SCRIPTS): New var, for yacc.
12486
464c6927
PE
12487 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
12488 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
12489 Problem reported by Nelson H. F. Beebe.
12490
124912003-01-03 Paul Eggert <eggert@twinsun.com>
12492
12493 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
12494 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
12495 when compiling Bison 1.875's `bitset bset = obstack_alloc
12496 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
12497
12498 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
12499 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
12500 grow to a huge size with typical invocation.
d600ee67 12501
464c6927
PE
12502 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
12503 Use the pattern recommended by Autoconf 2.57, except also protect
12504 against double-definition.
12505 * src/system.h: Likewise.
12506 Portability issues reported by Nelson H. F. Beebe.
d600ee67 12507
464c6927
PE
12508 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
12509 All uses changed. Provide a definition in both C and C++.
12510 (yytrue, yyfalse): Define even if defined (__cplusplus).
12511
12512 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
12513 Reported by Nelson H. F. Beebe.
d600ee67 12514
464c6927
PE
12515 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
12516
0f42c7d5
PE
125172003-01-02 Paul Eggert <eggert@twinsun.com>
12518
12519 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
12520 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
12521 Bug reported by Nelson H. F. Beebe.
12522
dc546b0f
PE
125232003-01-01 Paul Eggert <eggert@twinsun.com>
12524
12525 * Version 1.875.
12526
2c09b6a7
PE
125272002-12-30 Paul Eggert <eggert@twinsun.com>
12528
12529 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
12530 Moved here from...
12531 (<INITIAL>","): Here. This causes stray "," to be treated
12532 more uniformly.
12533
dc546b0f 12534 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
12535 last brace in braced code when not in Yacc mode, for compatibility
12536 with Bison 1.35. This resurrects the 2001-12-15 patch to
12537 src/reader.c.
12538
12539 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
12540 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
12541
535c0f63
PE
125422002-12-28 Paul Eggert <eggert@twinsun.com>
12543
12544 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
12545 that of SYM's type. This fixes Debian bug 168069, reported by
12546 Thomas Olsson.
d600ee67 12547
963fcc17
PE
125482002-12-28 Paul Eggert <eggert@twinsun.com>
12549
12550 Version 1.75f.
12551
12552 Switch back to the Yacc style of conflict reports, undoing some
12553 of the 2002-07-30 change.
12554 * doc/bison.texinfo (Understanding): Use Yacc style for
12555 conflict reports. Also, use new way of locating rules.
12556 * src/conflicts.c (conflict_report):
12557 Renamed from conflict_report_yacc, removing the old
12558 'conflict_report'. Translate the entire conflict report at once,
12559 so that we don't assume that "," has the same interpretation in
12560 all languages.
12561 (conflicts_output): Use Yacc-style conflict report for each state,
12562 instead of our more-complicated style.
12563 (conflicts_print): Use Yacc-style conflict report, except print
12564 the input file name when not emulating Yacc.
12565 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
12566 Conflicted Reduction, %expect not enough, %expect too much,
12567 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
12568 * tests/existing.at (GNU Cim Grammar): Likewise.
12569 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
12570
12571 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
12572 fatal): Don't invoke fflush; it's not needed and it might even be
12573 harmful for stdout, as stdout might not be open.
12574 * src/reduce.c (reduce_print): Likewise.
12575
b1efe548
PE
125762002-12-27 Paul Eggert <eggert@twinsun.com>
12577
12578 Fix a bug where error locations were not being recorded correctly.
12579 This problem was originally reported by Paul Hilfinger in
161a71f3 12580 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
12581
12582 * data/yacc.c (yyparse): New local var yylerrsp, to record the
12583 top of the location stack's error locations.
12584 (yyerrlab): Set it. When discarding a token, push its location
12585 onto yylerrsp so that we don't lose track of the error's end.
12586 (yyerrlab1): Now is only the target of YYERROR, so that we can
12587 properly record the location of the action that failed. For GCC
12588 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
12589 GCC warning about yyerrlab1 being unused if YYERROR is unused.
12590 (yyerrlab2): New label, which yyerrlab now falls through to.
12591 Compute the error's location by applying YYLLOC_DEFAULT to
12592 the locations of all the symbols that went into the error.
12593 * doc/bison.texinfo (Location Default Action): Mention that
12594 YYLLOC_DEFAULT is also invoked for syntax errors.
12595 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12596 Error locations include the locations of all the tokens that were
12597 discarded, not just the last token.
d600ee67 12598
983c5c2c
PE
125992002-12-26 Paul Eggert <eggert@twinsun.com>
12600
b1efe548
PE
12601 * src/files.c: Include quote.h.
12602 (compute_output_file_names): Warn if we detect conflicting
12603 outputs to the same file. This should catch the misunderstanding
12604 exemplified by Debian Bug 165349, reported by Bruce Stephens..
12605
12606 * src/conflicts.c (conflicts_print): If the user specifies
12607 "%expect N", report an error if there are any reduce/reduce
12608 conflicts. This is what the manual says should happen.
12609 This fixes Debian bug 130890, reported by Anthony DeRobertis.
12610 * tests/conflicts.at (%expect with reduce conflicts): New test.
12611
983c5c2c
PE
12612 Don't use m4_include on relative file names, as it doesn't work as
12613 desired if there happens to be a file with that name under ".".
d600ee67 12614
983c5c2c
PE
12615 * m4sugar/version.m4: Remove; it was included but it wasn't used.
12616 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
12617 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
12618 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
12619 * src/output.c (output_skeleton): Use full path names when
12620 specifying a file to include; don't rely on include path, as
12621 it's unreliable when the working file contains a file with
12622 that name.
d600ee67 12623
983c5c2c
PE
126242002-12-25 Paul Eggert <eggert@twinsun.com>
12625
12626 Remove obsolete references to bison.simple and bison.hairy.
12627 Problem mentioned by Aubin Mahe in
161a71f3 12628 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
12629 * data/glr.c: Comment fix.
12630 * doc/bison.1: Remove references. Also, mention "yacc".
12631
12632 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
12633 with -g option.
12634
12635 * src/parse-gram.y (declaration): Use enum "report_states" rather
12636 than its numeric value 1.
12637
12638 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
12639 opening a new one. This fixes Debian bug 165349, reported by
12640 Bruce Stephens.
12641
23f2d9dc
PE
126422002-12-24 Paul Eggert <eggert@twinsun.com>
12643
12644 Version 1.75e.
12645
12646 * Makefile.maint (cvs-update): Don't assume that the shell
12647 supports $(...), as Solaris sh doesn't.
12648
12649 * src/parse-gram.y (lloc_default): Remove test for empty
12650 nonterminals at the end, since it didn't change the result.
12651
126522002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
12653
12654 If the user does not define YYSTYPE as a macro, Bison now declares it
12655 using typedef instead of defining it as a macro. POSIX requires this.
12656 For consistency, YYLTYPE is also declared instead of defined.
12657
12658 %union directives can now have a tag before the `{', e.g., the
12659 directive `%union foo {...}' now generates the C code
12660 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
12661 The default union tag is `YYSTYPE', for compatibility with Solaris 9
12662 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
12663 instead of `yyltype'.
12664
12665 `yystype' and `yyltype' are now obsolescent macros instead of being
12666 typedefs or tags; they are no longer documented and will be
12667 withdrawn in a future release.
12668
12669 * data/glr.c (b4_location_type): Remove.
12670 (YYSTYPE): Renamed from yystype.
12671 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
12672 (struct YYLTYPE): Renamed from struct yyltype.
12673 (YYLTYPE): Renamed from yyltype.
12674 (yyltype, yystype): New (and obsolescent) macros,
12675 for backward compatibility.
12676 * data/yacc.c: Likewise.
12677
12678 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
12679 does not specify a union tag. This is for compatibility with
12680 Solaris 9 yacc.
12681
12682 * src/parse-gram.y (add_param): 2nd arg is now char * not char
12683 const *, since it is now modified by stripping surrounding { }.
12684 (current_braced_code): Remove.
12685 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
12686 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
12687 trailing " {...}". Now of type <chars>.
12688 (grammar_declaration): Adjust to bundled tokens.
12689 (code_content): Remove; stripping is now done by add_param.
12690 (print_token_value): Print contents of bundled tokens.
12691 (token_name): New function.
12692
12693 * src/reader.h (braced_code, current_braced_code): Remove.
12694 (token_name): New decl.
12695
12696 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
12697 token_type, not braced_code code_kind. All uses changed.
12698 (SC_PRE_CODE): New state, for scanning after a keyword that
12699 has (or usually has) an immediately-following braced code.
12700 (token_type): New local var, to keep track of which token type
12701 to return when scanning braced code.
12702 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 12703 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
12704 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
12705 instead of returning a token type immediately.
12706 (<INITIAL>"{"): Set token type.
12707 (<SC_BRACED_CODE>"}"): Use it.
12708 (handle_action_dollar, handle_action_at): Now returns bool
12709 indicating success. Fail if ! current_rule; this prevents a core dump.
12710 (handle_symbol_code_dollar, handle_symbol_code_at):
12711 Remove; merge body into caller.
12712 (handle_dollar, handle_at): Complain in invalid contexts.
12713
12714 * NEWS, doc/bison.texinfo: Document the above.
12715 * NEWS: Fix years and program names in copyright notice.
12716
879ca4f8
PE
127172002-12-17 Paul Eggert <eggert@twinsun.com>
12718
12719 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
12720 Reporting, Table of Symbols): Omit mentions of %lex-param and
12721 %parse-param from the documentation for now.
12722
1c5fe69d
PE
127232002-12-15 Paul Eggert <eggert@twinsun.com>
12724
12725 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
12726 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
12727 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
12728 disagreed with the Bison documentation. Bug
12729 reported by Andrew Walrond.
d600ee67 12730
1c5fe69d
PE
12731 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
12732 as the caller now does that.
12733 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
12734 (YYEMPTY): Parenthesize right hand side, since others use it.
12735 (yyparse): Don't assume that our generated code is the only code
12736 that sets yychar.
12737
d1de5372
PE
127382002-12-13 Paul Eggert <eggert@twinsun.com>
12739
12740 Version 1.75d.
12741
12742 POSIX requires a "yacc" command.
12743 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
12744 (MOSTLYCLEANFILES): Add yacc.
12745 (yacc): New rule.
1c5fe69d 12746 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
12747 as an alias for bison y.
12748
12749 * po/LINGUAS: Add da.
d600ee67 12750
d1de5372
PE
12751 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
12752 problem with latest <getopt.h>.
12753 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
12754
12755 * doc/fdl.texi: Upgrade to 1.2.
12756 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
12757 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
12758 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
12759 gnulib.
12760 * config/install-sh: Sync with autotools.
12761
12762 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 12763 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
12764 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
12765 locations are requested.
12766 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
12767 locations are requested.
12768
d0f3fe23
PE
127692002-12-12 Paul Eggert <eggert@twinsun.com>
12770
12771 Remove unportable casts and storage allocation tricks.
12772 While we're at it, remove almost all casts, since they
12773 usually aren't needed and are a sign of trouble.
12774
12775 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
12776
12777 * src/derives.c (derives_compute): Do not subtract NTOKENS from
12778 the pointer DSET returned by malloc; this isn't portable.
12779 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
12780 Similarly for DERIVES.
12781 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
12782 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
12783 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
12784
12785 * src/derives.c (derives_compute): Do not bother invoking
12786 int_of_rule_number, since rule numbers are integers.
12787
12788 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
12789 rather than XMALLOC (char, N).
12790
12791 * src/files.c (filename_split): Rewrite to avoid cast.
12792
12793 * src/gram.h (symbol_number_as_item_number,
12794 item_number_as_symbol_number, rule_number_as_item_number,
12795 item_number_as_rule_number):
12796 Now inline functions rather than macros, to avoid casts.
12797 * src/state.h (state_number_as_int): Likewise.
12798 * src/tables.c (state_number_to_vector_number,
12799 symbol_number_to_vector_number): Likewise.
12800
12801 * src/gram.h (int_of_rule_number): Remove; no longer used.
12802
12803 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
12804 since the resulting storage is always stored into.
12805
12806 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
12807 where it's needed.
12808
12809 * src/muscle_tab.c (muscle_m4_output):
12810 Now inline. Return bool, not int.
12811 * src/state.c (state_compare): Likewise.
12812 * src/symtab.c (symbol_check_defined,
12813 symbol_check_alias_consistency, symbol_pack, symbol_translation,
12814 hash_compare_symbol, hash_symbol):
12815 Likewise.
12816 * src/uniqstr.c (uniqstr_print): Likewise.
12817 * src/muscle_tab.c (muscle_m4_output_processor):
12818 New function, to avoid casts.
12819 * src/state.c (state_comparator, stage_hasher): Likewise.
12820 * src/symtab.c (symbol_check_defined_processor,
12821 symbol_check_alias_consistency_processor, symbol_pack_processor,
12822 symbol_translation_processor, hash_symbol_comparator,
12823 hash_symbol_hasher): Likewise.
12824 * src/uniqstr.c (uniqstr_print_processor): Likewise.
12825 * src/muscle_tab.c (muscles_m4_output):
12826 Use new functions instead of casting old functions unportably.
12827 * src/state.c (state_hash_new): Likewise.
12828 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
12829 symbols_token_translations_init):
12830 Likewise.
12831 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
12832
12833 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
12834 var instead of casting to long, to avoid casts.
12835 (prepare_states): Use MALLOC rather than alloca, so that we don't
12836 have to worry about alloca.
12837 * src/state.c (state_hash_lookup): Likewise.
12838
12839 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
12840 local var instead of casting to unsigned char, to avoid casts.
12841
12842 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
12843 STATE_ALLOC): Remove.
12844 (transitions_new, errs_new, reductions_new, state_new): Use malloc
12845 rather than calloc, and use offsetof to avoid allocating slightly
12846 too much storage.
12847 (state_new): Initialize all members.
12848
12849 * src/state.c (state_hash): Use unsigned accumulator, not signed.
12850
12851 * src/symtab.c (symbol_free): Remove; unused.
12852 (symbol_get): Remove cast in lhs of assignment.
12853 (symbols_do): Now static. Accept generic arguments, not
12854 hashing-related ones.
12855
12856 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
12857 (symbol_processor): Remove.
12858 (symbols_do): Remove decl; now static.
12859
12860 * src/system.h (alloca): Remove; decl no longer needed.
12861 (<stddef.h>): Include, for offsetof.
12862 (<inttypes.>, <stdint.h>): Include if available.
12863 (uintptr_t): New type, if system lacks it.
12864 (CALLOC, MALLOC, REALLOC): New macros.
12865 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
12866 new macros.
12867
12868 * src/tables.c (table_size): Now int, to pacify GCC.
12869 (table_grow, table_ninf_remap): Use signed table size.
12870 (save_row): Don't bother initializing locals when not needed.
12871 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
12872 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
12873
12874 * src/vcg.h: Correct misspellings.
12875
12876 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
12877
12878
12879 * src/getargs.c (getargs): Don't assume EOF == -1.
12880
26b4a969
PE
128812002-12-09 Paul Eggert <eggert@twinsun.com>
12882
12883 Change identifier spellings to avoid collisions with names
12884 that are reserved by POSIX.
12885
12886 Don't use names ending in _t, since POSIX reserves them.
12887 For consistency, remove _e and _s endings -- they're weren't
12888 needed to remove ambiguity. All uses changed.
12889 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
12890 turn was just renamed from struniq_t.
12891 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
12892 which in turn was just renamed from struniq_processor_t.
12893 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
12894 in turn was renamed from hash_compare_struniq_t.
12895 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
12896 (state_list): Renamed from state_list_t.
12897 * src/assoc.h (assoc): Renamed from assoc_t.
12898 * src/conflicts.c (enum conflict_resolution): Renamed from
12899 enum conflict_resolution_e.
12900 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
12901 (rule_list): Renamed from rule_list_t.
12902 * src/getargs.h (enum trace): Renamed from enum trace_e.
12903 (enum report): Renamed from enum report_e.
12904 * src/gram.h (item_number): Renamed from item_number_t.
12905 (rule_number): Renamed from rule_number_t.
12906 (struct rule_s): Remove the "rule_s" part; not used.
12907 (rule): Renamed from rule_t.
12908 (rule_filter): Renamed from rule_filter_t.
12909 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
12910 (goto_list): Renamed from goto_list_t.
12911 * src/lalr.h (goto_number): Renamed from goto_number_t.
12912 * src/location.h (location): Renamed from location_t.
12913 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
12914 and moved here from:
12915 * src/muscle_tab.h (muscle_entry_t): here.
12916 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
12917 (rule_list): Renamed from rule_list_t.
12918 * src/print_graph.c (static_graph): Renamed from graph.
12919 * src/reader.h (braced_code): Renamed from braced_code_t.
12920 Remove brace_code_e tag.
12921 * src/relation.h (relation_node): Renamed from relation_node_t.
12922 (relation_nodes): Renamed from relation_nodes_t.
12923 (relation): Renamed from relation_t.
12924 * src/state.h (state_number): Renamed from state_number_t.
12925 (struct state): Renamed from struct state_s.
12926 (state): Renamed from state_t.
12927 (transitions): Renamed from transitions_t. Unused (and
12928 misspelled) transtion_s tag removed.
12929 (errs): Renamed from errs_t. Unused errs_s tag removed.
12930 (reductions): Renamed from reductions_t. Unused tag
12931 reductions_s removed.
12932 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
12933 (struct symbol_list): Renamed from struct symbol_list_s.
12934 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
12935 (struct symbol): Renamed from struct symbol_s.
12936 (symbol): Renamed from symbol_t.
12937 * src/tables.c (vector_number): Renamed from vector_number_t.
12938 (action_number): Renamed from action_t.
12939 * src/tables.h (base_number): Renamed from base_t.
12940 * src/vcg.h (enum color): Renamed from enum color_e.
12941 (enum textmode): Renamed from enum textmode_e.
12942 (enum shape): Renamed from enum shape_e.
12943 (struct colorentry): Renamed from struct colorentry_s.
12944 (struct classname): Renamed from struct classname_s.
12945 (struct infoname): Renamed from struct infoname_s.
12946 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
12947 (enum decision): Renamed from enum decision_e.
12948 (enum orientation): Renamed from enum orientation_e.
12949 (enum alignment): Renamed from enum alignment_e.
12950 (enum arrow_mode): Renamed from enum arrow_mode_e.
12951 (enum crossing_type): Renamed from enum crossing_type_e.
12952 (enum view): Renamed from enum view_e.
12953 (struct node): Renamed from struct node_s.
12954 (node): Renamed from node_t.
12955 (enum linestyle): Renamed from enum linestyle_e.
12956 (enum arrowstyle): Renamed from enum arrowstyle_e.
12957 (struct edge): Renamed from struct edge.
12958 (edge): Renamed from edge_t.
12959 (struct graph): Renamed from struct graph_s.
12960 (graph): Renamed from graph_t.
12961 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
12962 Rename value_t -> value.
12963 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
12964 value_t_as_yystype -> value_as_yystype.
12965
12966 Don't include <errno.h> in the mainstream code, since it
12967 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
12968 * lib/get-errno.c, lib/get-errno.h: New files.
12969 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
12970 get-errno.c.
12971 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
12972 * src/output.c (output_skeleton): Likewise.
12973 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
12974 instead of errno.
12975 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
12976 Likewise.
12977 (handle_action_dollar, handle_action_at): Likewise.
12978 * src/system.h: Do not include <errno.h>.
12979 (TAB_EXT): Renamed from EXT_TAB.
12980 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
12981
12982 Avoid str[a-z]*, since <string.h> reserves that name space.
12983 Change all instances of "struniq" in names to "uniqstr", and
12984 likewise for "STRUNIQ" and "UNIQSTR".
12985 * src/uniqstr.c: Renamed from src/struniq.c.
12986 * src/uniqstr.h: Renamed from src/struniq.h.
12987 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
12988 * src/files.c (strsuffix): Remove; unused.
12989 (concat2): Renamed from stringappend. Now static.
12990 * src/files.h (strsuffix, stringappend): Remove; unused.
12991 * src/parse-gram.y (<chars>): Renamed from <string>.
12992 (<uniqstr>): Renamed from <struniq>.
12993 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
12994 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
12995 (struct graph_s.expand): Renamed from struct graph_s.stretch.
12996 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
12997 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
12998 (N_EXPAND): Renamed from N_STRETCH.
12999
13000 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
13001 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
13002 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
13003 Remove; unused.
13004 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
13005 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
13006 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
13007 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
13008 (BASE_MAXIMUM): Renamed from BASE_MAX.
13009 (BASE_MINIMUM): Renamed from BASE_MIN.
13010 (ACTION_MAX): Remove; unused.
13011 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
13012 Unnecessary casts removed from above defines.
13013
13014
13015 Fix misspelling in names.
13016 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
13017 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
13018 G_NODE_ALIGNEMENT.
13019
13020
13021 * lib/timevar.c (timevar_report): Renamed from time_report,
13022 for consistency with other names.
13023 * lib/timevar.h (timevar_report): New decl.
13024 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
13025
13026
13027 Sort include-file uses.
13028
13029 Reorder all include files under src to be in the order "system.h".
13030 then the ../lib include files in angle brackets (alphabetized),
13031 then the . include files in double-quotes (alphabetized). Fix
13032 dependency breakages encountered in this process, as follows:
13033 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
13034 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
13035 * src/state.h: Include "symtab.h".
13036
996b1c7e
PE
130372002-12-08 Paul Eggert <eggert@twinsun.com>
13038
13039 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
13040 since this causes problems when __file__ contains character
13041 sequences like "@" that are treated specially by src/scan-skel.l.
13042 Instead, just use the file's basename. This fixes the bug
13043 reported by Martin Mokrejs in
161a71f3 13044 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 13045
e19c4e5d
PE
130462002-12-06 Paul Eggert <eggert@twinsun.com>
13047
13048 Add support for rules that do not have trailing semicolons, as
13049 POSIX requires. Improve the quality of locations in Bison
13050 diagnostics.
26b4a969 13051
e19c4e5d
PE
13052 * src/location.c: Include <quotearg.h>.
13053 (empty_location): Now const.
13054 (location_print): New function. Follow the recommendation of the
13055 GNU Coding Standards for locations that span file boundaries.
13056 * src/location.h: Do not include <quotearg.h>; no longer needed.
13057 (boundary): New type.
13058 (location_t): Use it. This allows locations to span file boundaries.
13059 All member uses changed: file -> start.file or end.file (as needed),
13060 first_line -> start.line, first_column -> start.column,
13061 last_line -> end.line, last_column -> end.column.
13062 (equal_boundaries): New function.
13063 (LOCATION_RESET, LOCATION_STEP): Remove.
13064 (LOCATION_PRINT): Remove. All callers changed to use location_print.
13065 (empty_location): Now const.
13066 (location_print): New decl.
13067 * src/parse-gram.y (lloc_default): New function, which handles
13068 empty locations more accurately.
13069 (YYLLOC_DEFAULT): Use it.
13070 (%token COLON): Remove.
13071 (%token ID_COLON): New token.
26b4a969 13072 (rules): Use it.
e19c4e5d
PE
13073 (declarations, rules): Remove trailing semicolon.
13074 (declaration, rules_or_grammar_declaration):
13075 Allow empty (";") declaration.
13076 (symbol_def): Remove empty actions; no longer needed.
13077 (rules_or_grammar_declaration): Remove trailing semicolon.
13078 (semi_colon.opt): Remove.
13079 * src/reader.h: Include location.h.
13080 (scanner_cursor): New decl.
13081 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
13082 rolling our own.
13083 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
13084 of *loc.
13085 (STEP): Remove. No longer needed, now that adjust_location does
13086 the work. All uses removed.
13087 (scanner_cursor): New var.
13088 (adjust_location): Renamed from extend_location. It now sets
13089 *loc and adjusts the scanner cursor. All uses changed.
13090 Don't bother testing for CR.
13091 (handle_syncline): Remove location arg; now updates scanner cursor.
13092 All callers changed.
13093 (unexpected_end_of_file): Now accepts start boundary of token or
13094 comment, not location. All callers changed. Update scanner cursor,
13095 not the location.
13096 (SC_AFTER_IDENTIFIER): New state.
13097 (context_state): Renamed from c_context. All uses changed.
13098 (id_loc, code_start, token_start): New local vars.
13099 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
13100 processing of Yacc white space and equivalents here.
13101 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
13102 instead of returning ID immediately, since we need to search for
13103 a subsequent colon.
13104 (<INITIAL>"'", "\""): Save token_start.
13105 (<INITIAL>"%{", "{", "%%"): Save code_start.
13106 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
13107 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
13108 BEGIN context_state at end, not INITIAL.
13109 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
13110 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
13111 Return correct token start.
13112 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
13113 the start of a character, string or multiline comment is found.
13114 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
13115 Reduction): Adjust reported locations to match the more-precise
13116 results now expected.
13117 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
13118 * tests/reduce.at (Useless Rules, Reduced Automaton,
13119 Underivable Rules): Likewise.
13120 * tests/regression.at (Invalid inputs): No longer `expecting ";"
13121 or "|"' now that so many other tokens are allowed by the new grammar.
13122
13123 * src/complain.h (current_file): Remove duplicate decl;
13124 current_file is now owned by files.h.
13125 * src/complain.c, src/scan-gram.l: Include files.h.
13126
131272002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 13128
e19c4e5d
PE
13129 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
13130 promotes to int; it might be unsigned int.
13131 * data/yacc.c (yy_reduce_print): Likewise.
13132
13133 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
13134 be #defined in the prologue, not in the Bison declarations.
13135 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 13136
b64755e3
PE
131372002-12-02 Paul Eggert <eggert@twinsun.com>
13138
13139 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
13140 * lib/strtoul.c: New file, from gnulib.
13141 This fixes a porting bug reported by Peter Klein in
161a71f3 13142 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 13143
6e746484
PE
131442002-11-30 Paul Eggert <eggert@twinsun.com>
13145
b64755e3
PE
13146 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
13147 and put only a forward declaration in the prologue. This is for
13148 consistency with the other scanner helper functions.
13149
6ba55592
PE
13150 Type clashes now generate warnings, not errors, since it
13151 appears that POSIX may allow some grammars with type clashes.
13152 * src/reader.c (grammar_current_rule_check): Warn about
13153 type clashes instead of complaining.
13154 * tests/input.at (Type Clashes): Expect warnings, not complaints.
13155
6e746484
PE
13156 Add Yacc library, since POSIX requires it.
13157 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
13158 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
13159 * lib/main.c, lib/yyerror.c: New files.
13160
13161 gram_error can be static; it need not be extern.
13162 * src/reader.h (gram_error): Remove decl.
13163 * src/parse-gram.y (gram_error): Now static. Add static decl.
13164 (print_token_value): Omit parameter names from forward decl,
13165 for consistency.
13166
88510f9c
PE
131672002-11-29 Paul Eggert <eggert@twinsun.com>
13168
6e746484
PE
13169 * doc/bison.texinfo: Emphasize that yylex and yyerror must
13170 be declared before being used. E.g., one should typically
13171 declare them in the prologue. Use GNU coding style in examples.
13172 Put "const" consistently after the type it modifies. Mention
13173 that C99 supports "inline". Mention that yyerror traditionally
13174 returns "int".
13175
88510f9c
PE
13176 %parse-param and %lex-param now take just one argument, the
13177 declaration; the argument name is deduced from the declaration.
13178
13179 * doc/bison.texinfo (Parser Function, Pure Calling, Error
13180 Reporting, Table of Symbols): Document this.
13181 * src/parse-gram.y (add_param): New function.
13182 (COMMA): Remove.
13183 (declaration): Implement new rule for %parse-param and %lex-param.
13184 * src/scan-gram.l: "," now elicits a warning, rather than being
13185 a token; this is more compatible with byacc.
13186 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
13187
bb92250c
PE
131882002-11-27 Paul Eggert <eggert@twinsun.com>
13189
13190 Rename identifiers to avoid real and potential collisions.
13191
13192 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
13193 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 13194 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
13195 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
13196 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
13197 * src/parse-gram.y (print_token_value): Renamed from yyprint.
13198 All uses changed.
13199 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
13200 The name "yycontrol" violates the name space rules, and this stuff
13201 wasn't being used anyway.
13202 (input): Remove action; this stuff wasn't being used.
13203 (gram_error): Rename local variable yylloc -> loc.
13204 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
13205 (YY_DECL): Don't use "yy" at start of local variables.
13206 All uses changed, e.g., yylloc -> loc.
13207 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
13208 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
13209 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
13210 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
13211
13212 * src/parse-gram.y (gram_error): loc is now const *.
13213 * src/reader.h (gram_error): Likewise.
13214
3af4feb2
PE
132152002-11-24 Paul Eggert <eggert@twinsun.com>
13216
13217 Version 1.75c.
13218
13219 * tests/actions.at (Actions after errors): Use an output format
13220 more similar to that of the Printers and Destructors test.
13221 Test the position of the ';' token too.
13222 (Printers and Destructors): Likewise.
13223 (Printers and Destructors: %glr-parser): Remove for now, to avoid
13224 unnecessarily alarming people when the test fails.
13225
13226 * data/yacc.c (yyerrlab1): Move this label down, so that the
13227 parser does not discard the lookahead token if the user code
13228 invokes YYERROR. This change is required for POSIX conformance.
13229
13230 * lib/error.c: Sync with gnulib.
13231
132322002-11-22 Paul Eggert <eggert@twinsun.com>
13233
13234 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
13235 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
13236 * lib/xmalloc.c: Likewise.
26b4a969 13237
58004308
PE
132382002-11-20 Paul Eggert <eggert@twinsun.com>
13239
13240 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
13241
132422002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 13243
58004308
PE
13244 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
13245 should use `if (! x) abort ();' rather than `assert (x);', and
13246 anyway it's one less thing to worry about configuring.
13247
13248 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
13249 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
13250 and replace all instances of assert with abort.
13251 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
13252 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
13253
13254 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
13255 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
13256 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
13257 hash_find_entry, hash_rehash, hash_insert): Likewise.
13258 * src/conflicts.c (resolve_sr_conflict): Likewise.
13259 * src/lalr.c (set_goto_map, map_goto): Likewise.
13260 * src/nullable.c (nullable_compute): Likewise.
13261 * src/output.c (prepare_rules, token_definitions_output): Likewise.
13262 * src/reader.c (packgram, reader): Likewise.
13263 * src/state.c (state_new, state_free, state_transitions_set,
13264 state_reduction_find): Likewise.
13265 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
13266 symbol_pack): Likewise.
13267 * src/tables.c (conflict_row, pack_vector): Likewise.
13268 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13269 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13270 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
13271 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
13272
13273 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
13274 (ARGMATCH_CONSTRAINT): New macro.
13275 (ARGMATCH_ASSERT): Use it.
13276
13277 * src/system.h (verify): New macro.
13278 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
13279 rather than assert.
13280 * src/tables.c (tables_generate): Likewise.
13281
13282 * src/struniq.c (struniq_assert): Now returns void, and aborts
13283 if the assertion is false.
13284 (struniq_assert_p): Remove.
13285 * src/struniq.h: Likewise.
13286
76ae8198
PE
132872002-11-18 Paul Eggert <eggert@twinsun.com>
13288
13289 * data/glr.c (yygetLRActions): Replace `yyindex' with
13290 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
13291 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 13292 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 13293
d3c4e709
AD
132942002-11-18 Akim Demaille <akim@epita.fr>
13295
13296 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
13297 space.
13298 From Tim Van Holder.
13299
8d8a7238
PE
133002002-11-17 Paul Eggert <eggert@twinsun.com>
13301
13302 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
13303 to "SyntaxError" for consistency with my 2002-11-15 change.
13304
13305 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
13306 not define to {}, since this breaks the common use of `YYDPRINTF
13307 ((...));' if a single statement is desired (e.g. before `else').
13308 Work around GCC warnings by surrounding corresponding calls with
13309 {} if needed.
13310 (yyhasResolvedValue): Remove unused function.
13311 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
13312 loop body.
13313 (yyreportSyntaxError): Renamed from yyreportParseError.
13314 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
13315 All uses changed.
13316 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
13317 extern when possible. Remove unused initializations.
13318
b0937b22
AD
133192002-11-16 Akim Demaille <akim@epita.fr>
13320
13321 Augment the similarity between GLR and LALR traces.
13322
13323 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
13324 (YY_REDUCE_PRINT): New.
13325 (yyparse): Use them.
13326 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
13327 YYDPRINT here.
13328 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
13329 state reached after the reduction/recovery, since...
13330 (yyparse, yyprocessOneStack): Report the state we are entering in.
13331
c5e3e510
AD
133322002-11-16 Akim Demaille <akim@epita.fr>
13333
13334 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
13335 Add support for --trace=skeleton.
13336 * src/scan-skel.l: %option debug.
13337 Scan strings of non-@ or \n instead of character by character.
13338 (scan_skel): Handle trace_skeleton.
13339 (QPUTS): New.
13340 (@output_parser_name@, @output_header_name@): ``Restore'' their
13341 support (used to be M4 macros).
13342 * data/yacc.c: Quote larger chunks, a la glr.c.
13343 * data/lalr1.cc: Likewise.
13344 The header guards are no longer available, so use some other
13345 string than `YYLSP_NEEDED'.
13346
4c6cc1db
AD
133472002-11-16 Akim Demaille <akim@epita.fr>
13348
13349 Make the ``Printers and Destructors'' test more verbose, taking
13350 `yacc.c''s behavior as (possibly wrong) reference.
13351
13352 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
13353 instead of fprint on stdout.
13354 Set and report the last_line of the symbols.
13355 Consistently display values and locations.
13356
6d9e8019
PE
133572002-11-16 Paul Eggert <eggert@twinsun.com>
13358
13359 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
13360
6e649e65
PE
133612002-11-15 Paul Eggert <eggert@twinsun.com>
13362
b25d88f6
PE
13363 * tests/actions.at (Actions after errors): New test case.
13364
6e649e65
PE
13365 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
13366 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
13367 tests/action.at, tests/calc.at, tests/conflicts.at,
13368 tests/cxx-type.at, tests/regression.at:
13369 "parse error" -> "syntax error" for POSIX compatibility.
13370 "parsing stack overflow..." -> "parser stack overflow" so
13371 that code matches Bison documentation.
13372
0f39aab9
AD
133732002-11-15 Akim Demaille <akim@epita.fr>
13374
13375 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
13376 take two BRACED_CODE, not two string_content.
13377 Free the scanner's obstack when we are done.
13378 (code_content): New.
13379 * tests/calc.at: Adjust.
13380 * doc/bison.texinfo: Adjust.
13381 Also, make sure to include the `,' for these declarations.
13382
761c1926
AD
133832002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
13384
13385 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
13386 definition; avoids potential autoreconf problems.
13387
b0f98b10
AD
133882002-11-15 Akim Demaille <akim@epita.fr>
13389
13390 Always check the value returned by yyparse.
13391
13392 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
13393 returned by yyparse.
13394 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
13395 Adjust calls.
13396 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
13397 returned by yyparse.
13398
970785f1
PH
133992002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13400
13401 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
13402 on input.at test.
13403
8fcc7db1
PE
134042002-11-14 Paul Eggert <eggert@twinsun.com>
13405
7ec1b48e
PE
13406 * src/output.c (output_skeleton): Call xfopen instead of
13407 duplicating xfopen's body.
13408
cfff7583 13409 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 13410 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 13411
8fcc7db1
PE
13412 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
13413 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
13414 Group compiler. Instead, use "$CC -E bar.c". Include the .h
13415 file twice in the grammar, as an extra check.
13416
13417 * tests/input.at (Torturing the Scanner): Surround the
13418 backslash-newline tests with "#if 0", to make it less likely that
13419 we'll run into compiler bugs. Bring back solitary \ inside
13420 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 13421 test backslash-newline in C character constant.
8fcc7db1 13422
4e8d992c
AD
134232002-11-14 Akim Demaille <akim@epita.fr>
13424
13425 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
13426 status of the compiler.
f32b346d 13427 Calling `exit 1' is no longer needed.
4e8d992c
AD
13428 Reported by Nelson H. F. Beebe.
13429
9501dc6e
AD
134302002-11-14 Akim Demaille <akim@epita.fr>
13431
13432 * tests/atlocal.in (CPPFLAGS): We have config.h.
13433 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
13434 New.
13435 * tests/actions.at, tests/calc.at, tests/conflicts.at,
13436 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
13437 * tests/regression.at, tests/torture.at: Use them for all the
13438 grammars that are to be compiled.
13439 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
13440 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
13441 * doc/bison.texinfo (GLR Parsers): Document `inline'.
13442
18b519c0
AD
134432002-11-14 Akim Demaille <akim@epita.fr>
13444
13445 * doc/bison.texinfo: Various formatting changes (alignments in
13446 samples, additional @group/@end group, GCS in samples.
13447 Use @deffn instead of simple @table to define the directives,
13448 macros, variables etc.
13449
9a86cdb9
PE
134502002-11-13 Paul Eggert <eggert@twinsun.com>
13451
daa33def 13452 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 13453 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 13454
daa33def 13455 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 13456 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
13457 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
13458 * tests/headers.at (export YYLTYPE): Likewise.
13459
13460 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 13461 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 13462
9a86cdb9
PE
13463 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
13464 comments, since they're not portable. Use GNU coding style.
13465
9c1e26bd
AD
134662002-11-13 Akim Demaille <akim@epita.fr>
13467
13468 * data/yacc.c: Leave bigger chunks of quoted text.
13469 (YYDSYMPRINTF): New.
13470 Use it to report symbol activities.
13471 * data/glr.c (YYDSYMPRINTF): New.
13472 Use it.
13473
87f721cc
PE
134742002-11-12 Paul Eggert <eggert@twinsun.com>
13475
13476 Version 1.75b.
13477
13478 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
13479 (yyglrReduce): Return yyok, not 0.
13480 This should avoid the enumerated-type warnings reported
464c6927 13481 by Nelson H. F. Beebe in
161a71f3 13482 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
13483
13484 * lib/bbitset.h (BITSET_INLINE): Remove.
13485 * lib/bitset.h [! BITSET_INLINE]: Remove.
13486 (bitset_set, bitset_reset, bitset_test): Rename local vars
13487 to avoid shadowing warnings by GCC.
13488
13489 * data/glr.c (inline): Remove #define. It's the user's
13490 responsibility to #define it away, just like 'const'.
464c6927 13491 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 13492 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 13493
87f721cc
PE
13494 * Makefile.maint (po-check): Scan .l and .y files instead of the
13495 .c and the .h files that they generate. This fixes the bug
13496 reported by Tim Van Holder in:
161a71f3 13497 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
13498 Look for N_ as well as for _. Try to avoid matching #define for
13499 N_ and _.
13500 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
13501 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
13502 * src/scan-gram.l: Revamp regular expressions so that " and '
13503 do not confuse xgettext.
13504
13505 * src/struniq.h (struniq_new): Do not declare the return type
13506 to be 'const'; this violates the C standard.
13507 * src/struniq.c (struniq_new): Likewise.
13508
be14ade5
AD
135092002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
13510
13511 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
13512 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
13513 linker.
13514
05291fbc
AD
135152002-11-12 Akim Demaille <akim@epita.fr>
13516
13517 * Makefile.maint: Sync with Autoconf:
13518 (local_updates): New.
13519
1f5fd52e
AD
135202002-11-12 Akim Demaille <akim@epita.fr>
13521
13522 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
13523
283f1e64
AD
135242002-11-12 Akim Demaille <akim@epita.fr>
13525
13526 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
13527 locations.
13528
886b69d1
AD
135292002-11-12 Akim Demaille <akim@epita.fr>
13530
13531 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
13532 not yyvalue.
13533
3df37415
AD
135342002-11-12 Akim Demaille <akim@epita.fr>
13535
13536 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
13537 Use it to test the GLR parser.
13538
7bd6c77e
AD
135392002-11-12 Akim Demaille <akim@epita.fr>
13540
13541 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
13542 defines it.
13543 * data/glr.c (yystos): New.
13544 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
13545 (YYDSYMPRINT): New.
13546 (yyval): Don't define it, it is handled via M4.
13547 (yyrecoverParseError): Free verbosely the discarded symbols.
13548 * data/yacc.c (yysymprint): Remove, rather...
13549 (b4_yysymprint_generate): invoke.
13550 * data/c.m4 (b4_yysymprint_generate): New.
13551 Accept pointers as arguments, as opposed to the version from
13552 yacc.c.
13553 (b4_yydestruct_generate): Likewise.
13554 * tests/cations.at (Printers and Destructors): Use Bison directives
13555 instead of CPP macros.
13556 Don't rely on internal details.
13557
b0400cc6
AD
135582002-11-12 Akim Demaille <akim@epita.fr>
13559
13560 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
13561 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
13562 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
13563 it against YYEMPTY and so forth), work on yytoken (i.e., set
13564 it to YYEMPTY etc.).
13565 (yydestruct): Replace with a b4_yydestruct_generate invocation.
13566 (b4_symbol_actions): Remove.
13567 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
13568 for 0, end-of-input.
13569
72f889cc
AD
135702002-11-12 Akim Demaille <akim@epita.fr>
13571
13572 * doc/bison.texinfo (Destructor Decl): New.
13573
b1ae9233
AD
135742002-11-12 Akim Demaille <akim@epita.fr>
13575
13576 * src/tables.c (tables_generate): Use free for pointers that
13577 cannot be NULL, not XFREE.
13578 (pack_vector): Use assert, not fatal, for bound violations.
13579 * src/state.c (state_new): Likewise.
13580 * src/reader.c (reader): Likewise.
13581 * src/lalr.c (set_goto_map): Likewise.
72f889cc 13582 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
13583 the file name.
13584
7ec2d4cd
AD
135852002-11-12 Akim Demaille <akim@epita.fr>
13586
13587 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
13588 Restore.
13589 * src/scan-gram.l (last_string): Is global to the file, not to
13590 yylex.
13591 * src/parse-gram.y (input): Don't append the epilogue here,
13592 (epilogue.opt): do it here, and free the scanner's obstack.
13593 * src/reader.c (epilogue_set): Rename as...
13594 (epilogue_augment): this.
13595 * data/c.m4 (b4_epilogue): Defaults to empty.
13596
573a6cd3
AD
135972002-11-12 Akim Demaille <akim@epita.fr>
13598
13599 * src/getargs.c (long_options): Remove duplicates.
13600 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
13601 Remove.
13602 * doc/bison.rnh: Remove.
13603 * doc/bison.texinfo (VMS Invocation): Remove.
13604
95612cfa
AD
136052002-11-12 Akim Demaille <akim@epita.fr>
13606
13607 * src/struniq.h, src/struniq.c (struniq_t): Is const.
13608 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
13609
13610 Use struniq for symbols.
13611
13612 * src/symtab.h (symbol_t): The tag member is a struniq.
13613 (symbol_type_set): Adjust.
13614 * src/symtab.c (symbol_new): Takes a struniq.
13615 (symbol_free): Don't free the tag member.
13616 (hash_compare_symbol_t, hash_symbol_t): Rename as...
13617 (hash_compare_symbol, hash_symbol): these.
13618 Use the fact that tags as struniqs.
13619 (symbol_get): Use struniq_new.
13620 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
13621 Returns a strniq.
13622 * src/reader.h (merger_list, grammar_currentmerge_set): The name
13623 and type members are struniqs.
13624 * src/reader.c (get_merge_function)
13625 (grammar_current_rule_merge_set): Adjust.
13626 (TYPE, current_type): Are struniq.
13627
13628 Use struniq for file names.
13629
13630 * src/files.h, src/files.c (infile): Split into...
13631 (grammar_file, current_file): these.
13632 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
13633 * src/reduce.c (reduce_print): Likewise.
13634 * src/getargs.c (getargs): Likewise.
13635 * src/complain.h, src/complain.c: Likewise.
13636 * src/main.c (main): Call struniqs_new early enough to use it for
13637 file names.
13638 Don't free the input file name.
13639
3e6656f9
AD
136402002-11-12 Akim Demaille <akim@epita.fr>
13641
13642 * src/symtab.c (symbol_free): Remove dead deactivated code:
13643 type_name are properly removed.
13644 Don't use XFREE to free items that cannot be NULL.
13645 * src/struniq.h, src/struniq.c: New.
13646 * src/main.c (main): Initialize/free struniqs.
13647 * src/parse-gram.y (%union): Add astruniq member.
13648 (yyprint): Adjust.
13649 * src/scan-gram.l (<{tag}>): Return a struniq.
13650 Free the obstack bit that used to store it.
13651 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
13652
7672019c
PE
136532002-11-11 Paul Eggert <eggert@twinsun.com>
13654
13655 Revamp to fix many (but not all) of the C- and M4-related quoting
13656 problems. Among other things, this fixes the Bison bug reported
13657 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 13658 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
13659
13660 Use new @ escapes consistently. Represent brackets with @{ and @}
13661 rather than @<:@ and @:>@, since this works a bit better with dumb
13662 editors like vi. Represent @ with @@, since @ is now consistently
13663 an escape. Use @oline@ and @ofile@ rather than __oline__ and
13664 __ofile__, to avoid unexpected expansions. Similarly, use @output
13665 rather than #output.
13666
13667 * data/c.m4 (b4_copyright): Omit file name from comment, since
13668 the file name could contain "*/".
13669 (b4_synclines_flag): Don't quote the 2nd argument; it should already
13670 be quoted. All uses changed.
13671
13672 * data/glr.c: Use new @ escapes consistently.
13673 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
13674 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
13675 Remove, since they couldn't handle arbitrary characters in file
13676 names.
13677 * data/lalr1.cc: Likewise.
13678 * data/yacc.c: Likewise.
13679
13680 * src/files.c (output_infix): Remove; all uses removed.
13681 * src/files.h: Likewise.
13682
13683 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
13684 mishandled funny characters in file names, and anyway it isn't
13685 needed any more.
13686 * data/yacc.c: Likewise.
13687 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
13688
13689 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
13690 * data/yacc.c: Likewise.
13691
13692 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
13693 strings now.
13694 (muscle_init): Quote filename as a C string.
13695 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
13696 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
13697 * src/output.c (escaped_file_name_output): New function.
13698 (prepare_symbols): Quote tokens for M4.
13699 (prepare): Don't insert output_infix, output_prefix,
13700 output_parser_name, output_header_name; this is now down by scan-skel.
13701 Insert skeleton as a C string.
13702
13703 * src/output.c (user_actions_output, symbol_destructors_output,
13704 symbol_printers_output): Quote filenames for C and M4.
13705 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13706
13707 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
13708 escapes other than \\ and \'; this simplifies the code.
13709 (<SC_STRING>): Likewise, for \\ and \".
13710 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
13711 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
13712 Use new escapes @{ and @} for [ and ].
13713
13714 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
13715 them with auto vars.
13716 Switch to new escape scheme, where @ is the escape character uniformly.
13717 Abort if a stray escape character is found. Avoid unbounded input
13718 buffer when parsing non-escaped text.
13719
13720 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
13721 __oline__, #output, $@, and @{ do not have unintended meanings.
13722
acea4f3b
PE
137232002-11-09 Paul Eggert <eggert@twinsun.com>
13724
13725 Fix the test failure due to GCC warnings described in
161a71f3 13726 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
13727 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
13728 evaluate to 0 if it's impossible for NINF to be in the respective
13729 table.
13730 (yygetLRActions, yyrecoverParseError): Use them.
13731
13732 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
13733 counted in the token inserted at end of file. Now takes
13734 location_t *, not location_t, so that the location can be
13735 adjusted. All uses changed.
13736
13737 * tests/regression.at (Invalid inputs): Adjust wording in
13738 diagnostic to match the new behavior.
13739
13740 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
13741 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
13742 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
13743 abort ();'. This reduces the runtime of the "Many lookaheads"
13744 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
13745 GCC 3.2.
13746
20ef1ad5
PE
137472002-11-07 Paul Eggert <eggert@twinsun.com>
13748
13749 * src/parse-gram.y (CHARACTER): Remove unused token.
13750 All uses removed.
13751
13752 * src/scan-gram.l: Remove stack option. We no longer use the
13753 stack, since the stack was never deeper than 1; instead, use the
13754 new auto var c_context to record the stacked value.
13755
13756 Remove nounput option. At an unexpected end of file, we now unput
13757 the minimal input necessary to end cleanly; this simplifies the
13758 code.
13759
13760 Avoid unbounded token sizes where this is easy.
13761
13762 (unexpected_end_of_file): New function.
13763 Use it to systematize the error message on unexpected EOF.
13764 (last-string): Now auto, not static.
13765 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
13766 (scanner_last_string_free): Remove; not used.
13767 (percent_percent_count): Move decl to just before use.
13768 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
13769 not the (never otherwised-used) CHARACTER.
13770
93724f13
AD
137712002-11-07 Akim Demaille <akim@epita.fr>
13772
13773 Let yyerror always receive the msg as last argument, so that
13774 yyerror can be variadic.
13775
13776 * data/yacc.c (b4_yyerror_args): New.
13777 Use it when calling yyerror.
13778 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
13779 Use it when calling yyerror.
13780 * doc/bison.texinfo (Error Reporting): Adjust.
13781 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
13782 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
13783
6e40b4eb
AD
137842002-11-06 Akim Demaille <akim@epita.fr>
13785
13786 #line should have quoted strings.
13787 Ideally, this should be done by m4_quotearg.
13788
13789 * src/scan-skel.l: Include quotearg.h.
13790 Quote __ofile__.
13791 * src/output.c (symbol_printers_output)
13792 (symbol_destructors_output): Quote the file name.
13793
2dfbfc12
AD
137942002-11-06 Akim Demaille <akim@epita.fr>
13795
13796 * tests/regression.at (Invalid inputs): Adjust to the recent
13797 messages.
13798
437c2d80
AD
137992002-11-06 Akim Demaille <akim@epita.fr>
13800
13801 Restore --no-lines.
13802 Reported by Jim Kent.
13803
13804 * data/c.m4 (b4_syncline): New.
13805 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
13806 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
13807 * src/output.c (user_actions_output): Likewise.
13808 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 13809 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 13810
900c5db5
AD
138112002-11-06 Akim Demaille <akim@epita.fr>
13812
13813 * src/main.c (main): Free `infile'.
13814 * src/scan-gram.l (handle_syncline): New.
13815 Recognize `#line'.
13816 * src/output.c (user_actions_output, symbol_destructors_output)
13817 (symbol_printers_output): Use the location's file name, not
13818 infile.
13819 * src/reader.c (prologue_augment, epilogue_set): Likewise.
13820
e183b123 138212002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 13822
e183b123 13823 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 13824 either has GLR conflict entries.
e183b123 13825
193eb6b7
PE
138262002-11-05 Paul Eggert <eggert@twinsun.com>
13827
e183b123
PE
13828 * src/scan-gram.l: Use more accurate diagnostics, e.g.
13829 "integer out of range" rather than "invalid value".
13830 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
13831 accordingly.
13832
193eb6b7
PE
13833 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
13834 Also, remove one static variable in the scanner.
13835
13836 * src/scan-gram.l (braces_level): Now auto, not static.
13837 Initialize to zero if the compiler is being picky.
13838 (INITIAL): Clear braces_level instead of incrementing it.
13839 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
13840 as POSIX 1003.1-2001 requires.
13841 * src/system.h (IF_LINT): New macro, taken from coreutils.
13842 * configure.ac: Define "lint" if --enable-gcc-warnings.
13843
29c01725
AD
138442002-11-05 Akim Demaille <akim@epita.fr>
13845
13846 * src/scan-gram.l: When it starts with `%', complain about the
13847 whole directive, not just that `invalid character: %'.
13848
8aeac3ca
AD
138492002-11-04 Akim Demaille <akim@epita.fr>
13850
13851 * Makefile.maint: Update from Autoconf.
13852 (update, cvs-update, po-update, do-po-update): New.
13853
793a58bb
AD
138542002-11-04 Akim Demaille <akim@epita.fr>
13855
13856 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
13857 and yyerror.
13858 Have yyerror `use' its arguments.
13859 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
13860 returns true when location & yacc & pure & parse-param.
13861 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
13862
c4d720cd
AD
138632002-11-04 Akim Demaille <akim@epita.fr>
13864
13865 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
13866 clashes.
13867 * src/scan-gram.l: Use [\'] instead of ['] to pacify
13868 font-lock-mode.
13869 Use complain_at.
13870 Use quote, not quote_n since LOCATION_PRINT no longer uses the
13871 slot 0.
13872
613a0dc5
PE
138732002-11-03 Paul Eggert <eggert@twinsun.com>
13874
13875 * src/reader.c (get_merge_function, grammar_current_rule_check):
13876 Use consistent diagnostics for reporting type name clashes.
13877 Quote the types with <>, for consistency with Yacc.
13878 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
13879
2a8d363a
AD
138802002-11-03 Akim Demaille <akim@epita.fr>
13881
13882 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
13883 New.
13884 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
13885 (b4_parse_param): Remove.
13886 Use b4_identification.
13887 Propagate b4_pure_args where needed to pass them to yyerror.
13888 * data/glr.m4 (b4_parse_param): Remove.
13889 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
13890 (b4_lpure_formals): New.
13891 Use b4_identification.
13892 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
13893 b4_user_formals and b4_user_args.
13894 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
13895 (yyreportAmbiguity): When using a pure parser, also need
13896 the location, and the parse-params.
13897 Adjust callers.
13898 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
13899 When using a pure parser, also need the parse-params.
13900 Adjust callers.
13901 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
13902 (%pure-parser + %parse-param) LALR and GLR parsers.
13903 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
13904 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
13905 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
13906 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
13907 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
13908 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
13909 * doc/bison.texinfo: Untabify the whole file.
13910 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
13911 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
13912 (Error Reporting): Adjust to these new directives.
13913 Document %error-verbose, deprecate YYERROR_VERBOSE.
13914
9e32add8
AD
139152002-11-03 Akim Demaille <akim@epita.fr>
13916
13917 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
13918 AT_CHECK_CALC_GLR invocations to use % directives, instead of
13919 command line options.
13920 * tests/cxx-type.at: Formatting changes.
13921
b02d90a5
PE
139222002-11-03 Paul Eggert <eggert@twinsun.com>
13923
13924 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
13925 to count columns correctly, and to check for invalid inputs.
9e32add8 13926
b02d90a5
PE
13927 Use mbsnwidth to count columns correctly. Account for tabs, too.
13928 Include mbswidth.h.
13929 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
13930 (extend_location): New function.
13931 (YY_LINES): Remove.
13932
13933 Handle CRLF in C code rather than in Lex code.
13934 (YY_INPUT): New macro.
13935 (no_cr_read): New function.
13936
13937 Scan UCNs, even though we don't fully handle them yet.
13938 (convert_ucn_to_byte): New function.
13939
13940 Handle backslash-newline correctly in C code.
13941 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
13942 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
13943 all uses changed.
13944 (tag, splice): New EREs. Do not allow NUL or newline in tags.
13945 Use {splice} wherever C allows backslash-newline.
13946 YY_STEP after space, newline, vertical-tab.
13947 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 13948
b02d90a5
PE
13949 (letter, id): Don't assume ASCII; e.g., spell out a-z.
13950
13951 ({int}, handle_action_dollar, handle_action_at): Check for integer
13952 overflow.
9e32add8 13953
b02d90a5
PE
13954 (YY_STEP): Omit trailing semicolon, so that it's more like C.
13955
13956 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
13957 as well as \000. Check for UCHAR_MAX, not 255.
13958 Allow \x with an arbitrary positive number of digits, as in C.
13959 Check for overflow here.
13960 Allow \? and UCNs, for compatibility with C.
13961
13962 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
13963 with quote slot used by complain_at.
13964
13965 * tests/input.at: Add tests for backslash-newline, m4 quotes
13966 in symbols, long literals, and funny escapes in strings.
13967
13968 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
13969 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
13970 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
13971 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
13972 * m4/mbswidth.m4: New file, from GNU coreutils.
13973
13974 * doc/bison.texinfo (Grammar Outline): Document // comments.
13975 (Symbols): Document that trigraphs have no special meaning in Bison,
13976 nor is backslash-newline allowed.
13977 (Actions): Document that trigraphs have no special meaning.
13978
13979 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
13980 no longer used.
13981
139822002-11-02 Paul Eggert <eggert@twinsun.com>
13983
13984 * src/reader.c: Don't include quote.h; not needed.
13985 (get_merge_function): Reword warning to be consistent with
13986 type clash diagnostic in grammar_current_rule_check.
13987
13988 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
13989 bug in trigraph handling.
13990
13991 * src/output.c (prepare_symbols): When printing token names,
13992 escape "[" as "@<:@" and likewise for "]".
13993
13994 * src/system.h (errno): Remove declaration, as we are now
13995 assuming C89 or better, and C89 guarantees errno.
13996
762b212b
PE
139972002-10-30 Paul Eggert <eggert@twinsun.com>
13998
13999 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
14000 Check for close failures.
14001 * src/files.h (xfclose): Return void, not int, since it always
14002 returned zero.
14003 * src/files.c (xfclose): Likewise. Report I/O error if ferror
14004 indicates one.
14005 * src/output.c (output_skeleton): Use xfclose rather than fclose
14006 and ferror. xfclose now checks ferror.
14007
14008 * data/glr.c (YYLEFTMOST_STATE): Remove.
14009 (yyreportTree): Use a stack-based leftmost state. This avoids
14010 our continuing battles with bogus warnings about initializers.
14011
56100c60
AD
140122002-10-30 Akim Demaille <akim@epita.fr>
14013
14014 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
14015 #if.
14016
51b4a04c
PH
140172002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14018
14019 * tests/glr-regr1.at: New test for reported regressions.
14020 * tests/testsuite.at: Add glr-regr1.at test.
14021 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 14022
bf1ebda2
PE
140232002-10-24 Paul Eggert <eggert@twinsun.com>
14024
5c16c6b1
PE
14025 Version 1.75a.
14026
bf1ebda2
PE
14027 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
14028 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
14029 we use malloc. Don't assume 'A' through 'Z' are contiguous.
14030 Don't assume strdup exists; POSIX says its an XSI extension.
14031 Check for buffer overflow on input.
14032
b526ee61
AD
140332002-10-24 Akim Demaille <akim@epita.fr>
14034
14035 * src/output.c (output_skeleton): Don't disable M4sugar comments
14036 too soon: it results in comments being expanded.
14037 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
14038 first output.
14039
f1886bb2
AD
140402002-10-24 Akim Demaille <akim@epita.fr>
14041
14042 * data/yacc.c (m4_int_type): New.
14043 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
14044 char' as only yacc.c wants K&R portability.
14045 * data/glr.c (yysigned_char): Remove.
14046 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
14047 Reported by Quoc Peyrot.
14048
c5576256
PE
140492002-10-23 Paul Eggert <eggert@twinsun.com>
14050
14051 * src/main.c (main): With --trace=time, report times even if a
14052 non-fatal error occurs. Formerly, the times were reported in some
14053 such cases but not in others.
14054 * src/reader.c (reader): Just return if a complaint has been issued,
14055 instead of exiting, so that 'main' can report times.
14056
27b0ffea
AD
140572002-10-22 Akim Demaille <akim@epita.fr>
14058
14059 * src/system.h: Include sys/types.
14060 Reported by Bert Deknuydt.
14061
223a7883
PE
140622002-10-23 Paul Eggert <eggert@twinsun.com>
14063
14064 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
14065 Suggested by Art Haas.
14066
140672002-10-22 Paul Eggert <eggert@twinsun.com>
14068
14069 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
14070 decl; not needed any more.
14071 * src/main.c (main): Use return to exit, undoing yesterday's change.
14072 The last OS that we could find where this wouldn't work is
14073 SunOS 3.5, and that's too old to worry about now.
14074
14075 * data/glr.c (struct yyltype): Define members even when not
14076 doing locations. This is more consistent with yacc.c, and it
14077 works around the following bug reports:
161a71f3
PE
14078 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
14079 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 14080
223a7883
PE
14081 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
14082 @acronym consistently. Standardize on "Yacc" instead of "YACC",
14083 "Algol" instead of "ALGOL". Give a bit more history about BNF.
14084
8b76775a
AD
140852002-10-22 Akim Demaille <akim@epita.fr>
14086
14087 * data/README: New.
14088
6db10d14
PE
140892002-10-21 Paul Eggert <eggert@twinsun.com>
14090
14091 Be consistent about 'bool'; the old code used an enum in one
14092 module and an int in another, and this violates the C standard.
14093 * m4/stdbool.m4: New file, from coreutils 4.5.3.
14094 * configure.ac (AC_HEADER_STDBOOL): Add.
14095 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
14096 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
14097 * src/symtab.c (hash_compare_symbol_t): Likewise.
14098 * src/system.h (bool, false, true): Use a definition consistent
14099 with ../lib/hash.c. All uses changed.
14100
14101 * src/complain.c (warning_issued): Renamed from warn_message_count,
14102 so that we needn't worry about integer overflow (!).
14103 Now of type bool. All uses changed.
14104 (complaint_issued): Renamed from complain_message_count; likewise.
14105
14106 * src/main.c (main): Use exit to exit with failure.
27b0ffea 14107
6db10d14
PE
14108 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
14109 rather than 1 and 0.
14110 * src/main.c (main): Likewise.
14111 * src/getargs.c (getargs): Likewise.
14112 * src/reader.c (reader): Likewise.
14113
14114 * src/getarg.c (getargs): Remove duplicate code for
14115 "Try `bison --help'".
14116
14117 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
14118 What was that "2" for?
14119
14120 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
14121 * src/getargs.c (usage): Likewise.
14122
14123 * src/getargs.c (getargs): When there are too few operands, report
14124 the last one. When there are too many, report the first extra
14125 one. This is how diffutils does it.
14126
92a060fd
PE
141272002-10-20 Paul Eggert <eggert@twinsun.com>
14128
14129 Remove K&R vestiges.
14130 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
14131 * src/complain.c (VA_START): Remove. Assume prototypes.
14132 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
14133 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
14134 fatal): Assume prototypes.
14135 * src/complain.h: Assume prototypes.
14136 * src/system.h (PARAMS): Remove.
14137 Include <limits.h> unconditionally, since it's guaranteeed even
14138 for a freestanding C89 compiler.
14139 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
14140 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 14141
e7cb57c0
AD
141422002-10-20 Akim Demaille <akim@epita.fr>
14143
14144 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
14145 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
14146 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
14147 (yyresolveStates, yyresolveAction, yyresolveStack)
14148 (yyprocessOneStack): Use them.
14149 (yy_reduce_print): New.
14150 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
14151
0245f82d
AD
141522002-10-20 Akim Demaille <akim@epita.fr>
14153
14154 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
14155 arguments and output `void'.
14156 (b4_c_function): Rename as...
14157 (b4_c_function_def): this.
14158 (b4_c_function_decl, b4_c_ansi_function_def)
14159 (b4_c_ansi_function_decl): New.
14160 Change the interpretation of the arguments: before `int, foo', now
14161 `int foo, foo'.
14162 * data/yacc.c (yyparse): Prototype and define thanks to these.
14163 Adjust b4_c_function_def uses.
14164 * data/glr.c (yyparse): Likewise, but ANSI only.
14165
39912f52
AD
141662002-10-20 Akim Demaille <akim@epita.fr>
14167
14168 * src/output.c (prepare): Move the definition of `tokens_number',
14169 `nterms_number', `undef_token_number', `user_token_number_max'
14170 to...
14171 (prepare_tokens): Here.
14172 (prepare_tokens): Rename as...
14173 (prepare_symbols): this.
14174 (prepare): Move the definition of `rules_number' to...
14175 (prepare_rules): here.
14176 (prepare): Move the definition of `last', `final_state_number',
14177 `states_number' to...
14178 (prepare_states): here.
14179 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
14180
20c1e2ad
AD
141812002-10-20 Akim Demaille <akim@epita.fr>
14182
14183 * src/tables.h, src/tables.c, src/output.c: Comment changes.
14184
21964f43
AD
141852002-10-20 Akim Demaille <akim@epita.fr>
14186
14187 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
14188 * data/c.m4: here.
14189
66d30cd4
AD
141902002-10-20 Akim Demaille <akim@epita.fr>
14191
14192 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
14193 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
14194 `pair'.
14195 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
14196 `name' to...
14197 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
14198 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
14199 These.
14200
95f2c9fe
PE
142012002-10-19 Paul Eggert <eggert@twinsun.com>
14202
14203 Do not create a temporary file, as that involves security and
14204 cleanup headaches. Instead, use a pair of pipes.
14205 Derived from a suggestion by Florian Krohm.
14206 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
14207 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
14208 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
14209 (BISON_PREREQ_SUBPIPE): Add.
14210 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
14211 Add subpipe.h, subpipe.c.
14212 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
14213 * po/POTFILES.in: Add lib/subpipe.c.
14214 * src/output.c: Include "subpipe.h".
14215 (m4_invoke): Remove decl.
14216 (scan_skel): New decl.
14217 (output_skeleton): Use pipe rather than temporary file for m4 input.
14218 Check that m4sugar.m4 is readable, to avoid deadlock.
14219 Check for pipe I/O error.
14220 * src/scan-skel.l (readpipe): Remove decl.
14221 (scan_skel): New function, to be used in place of m4_invoke.
14222 Read from stream rather than file.
66d30cd4 14223
95f2c9fe
PE
14224 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
14225 float, as this generates a warning on Solaris 8 + GCC 3.2 with
14226 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
14227 this generates a more-accurate value anyway.
14228
14229 * lib/timevar.c (timervar_accumulate): Rename locals to
14230 avoid confusion with similarly-named more-global.
14231 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
14232
14233 * src/output.c (prepare): Use xstrdup to convert char const *
14234 to char *, to avoid GCC warning.
14235
c19988b7
AD
142362002-10-19 Akim Demaille <akim@epita.fr>
14237
14238 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
14239 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
14240 Use them to have `calc.y' ready for %pure-parser.
14241 * data/yacc.c (YYLEX): Pass a yylex return type to
14242 b4_c_function_call.
14243
ae7453f2
AD
142442002-10-19 Akim Demaille <akim@epita.fr>
14245
14246 Prototype support of %lex-param and %parse-param.
14247
14248 * src/parse-gram.y: Add the definition of the %lex-param and
14249 %parse-param tokens, plus their rules.
14250 Drop the `_' version of %glr-parser.
14251 Add the "," token.
14252 * src/scan-gram.l (INITIAL): Scan them.
14253 * src/muscle_tab.c: Comment changes.
14254 (muscle_insert, muscle_find): Rename `pair' as `probe'.
14255 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
14256 (muscle_entry_s): The `value' member is no longer const.
14257 Adjust all dependencies.
14258 * src/muscle_tab.c (muscle_init): Adjust: use
14259 MUSCLE_INSERT_STRING.
14260 Initialize the obstack earlier.
14261 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
14262 (muscle_pair_list_grow): New.
14263 * data/c.m4 (b4_c_function_call, b4_c_args): New.
14264 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
14265 * tests/calc.at: Use %locations, not --locations.
14266 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
14267
0e575721
AD
142682002-10-19 Akim Demaille <akim@epita.fr>
14269
14270 * src/getargs.c (usage): Take status as argument and exit
14271 accordingly.
14272 Report the traditional `Try ... --help' message when status != 0.
14273 (usage, version): Don't take a FILE * as arg, it is pointless.
14274 (getargs): When there is an incorrect number of arguments, make it
14275 an error, and report it GNUlically thanks to `usage ()'.
14276
724ce7f5
PE
142772002-10-18 Paul Eggert <eggert@twinsun.com>
14278
3a781eb2
PE
14279 * data/glr.c (yyreportParseError): Don't assume that sprintf
14280 yields the length of the printed string, as this is not true
14281 on SunOS 4.1.4. Reported by Peter Klein.
14282
724ce7f5
PE
14283 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
14284 * tests/conflicts.at (%nonassoc and eof): Likewise.
14285 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
14286
473d0a75
AD
142872002-10-17 Akim Demaille <akim@epita.fr>
14288
14289 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
14290 * src/getargs.c (trace_types, trace_args): Adjust.
14291 * src/reader.c (grammar_current_rule_prec_set)
14292 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
14293 Standardize error messages.
14294 And s/@prec/%prec/!
14295 (reader): Use trace_flag to enable scanner/parser debugging,
14296 instead of an adhoc scheme.
14297 * src/scan-gram.l: Remove trailing debugging code.
14298
e76d2469
PE
142992002-10-16 Paul Eggert <eggert@twinsun.com>
14300
93e2236a
PE
14301 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
14302 MUSCLE_TAB_H.
14303
e76d2469
PE
14304 * NEWS: Officially drop support for building Bison with K&R C,
14305 since it didn't work anyway and it's not worth worrying about.
14306 * Makefile.maint (wget_files): Remove ansi2knr.c.
14307 (ansi2knr.c-url_prefix): Remove.
14308 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
14309 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14310 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
14311
5bd1c419
PE
143122002-10-15 Paul Eggert <eggert@twinsun.com>
14313
14314 Stop using the "enum_" trick for K&R-style function definitions;
14315 it confused me, and I was the author! Instead, assume that people
14316 who want to use K&R C compilers (when using these modules in GCC,
14317 perhaps?) will run ansi2knr.
14318
14319 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
14320 All uses of "enum_" changed to "enum ".
14321 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14322 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 14323
5bd1c419
PE
14324 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
14325 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
14326 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
14327 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
14328 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
14329 abitset_not, abitset_ones, abitset_or, abitset_or_and,
14330 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
14331 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
14332 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
14333 Use function prototypes; this removes the need for declaring
14334 static functions simply to provide their prototypes.
14335 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
14336 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
14337 bitset_count_, bitset_create, bitset_dump, bitset_first,
14338 bitset_free, bitset_init, bitset_last, bitset_next,
14339 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
14340 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
14341 bitset_print, bitset_release_memory, bitset_toggle_,
14342 bitset_type_choose, bitset_type_get, bitset_type_name_get,
14343 debug_bitset): Likewise.
14344 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
14345 * lib/bitset_stats.c (bitset_log_histogram_print,
14346 bitset_percent_histogram_print, bitset_stats_and,
14347 bitset_stats_and_cmp, bitset_stats_and_or,
14348 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
14349 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
14350 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
14351 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
14352 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
14353 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
14354 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
14355 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
14356 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
14357 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
14358 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
14359 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
14360 bitset_stats_zero): Likewise.
14361 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14362 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14363 bitsetv_dump, debug_bitsetv): Likewise.
14364 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
14365 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
14366 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
14367 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
14368 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
14369 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
14370 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
14371 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
14372 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
14373 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
14374 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
14375 Likewise.
14376 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
14377 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
14378 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
14379 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
14380 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
14381 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
14382 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
14383 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
14384 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
14385 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
14386 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 14387
ae26e1f0
AD
143882002-10-14 Akim Demaille <akim@epita.fr>
14389
14390 Version 1.75.
14391
d43baf71
AD
143922002-10-14 Akim Demaille <akim@epita.fr>
14393
14394 * tests/Makefile.am (maintainer-check-posix): New.
14395
7ebc83e3
AD
143962002-10-14 Akim Demaille <akim@epita.fr>
14397
14398 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
14399 member.
14400
05846dae
AD
144012002-10-14 Akim Demaille <akim@epita.fr>
14402
14403 * src/tables.c (table_ninf_remap): base -> tab.
14404 Reported by Matt Rosing.
14405
1318e37d
PE
144062002-10-14 Paul Eggert <eggert@twinsun.com>
14407
447fbb17
PE
14408 * tests/action.at, tests/calc.at, tests/conflicts.at,
14409 tests/cxx-type.at, tests/headers.at, tests/input.at,
14410 tests/regression.at, tests/synclines.at, tests/torture.at:
14411 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
14412 so that the tests still work even if POSIXLY_CORRECT is set.
14413 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 14414
1318e37d
PE
14415 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
14416 for portability to K&R hosts. Fix typo: signed char is guaranteed
14417 only to 127, not to 128.
14418 * data/glr.c (yysigned_char): New type.
14419 * data/yacc.c (yysigned_char): Likewise.
14420 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
14421
cc0f0794
PE
144222002-10-13 Paul Eggert <eggert@twinsun.com>
14423
5038f418
PE
14424 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
14425 true due to limited range of data type" warning from GCC.
14426
cc0f0794
PE
14427 * data/c.m4 (b4_token_defines): Protect against double-inclusion
14428 by wrapping enum yytokentype's definition inside #ifndef
14429 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
14430
6fed0802
AD
144312002-10-13 Akim Demaille <akim@epita.fr>
14432
14433 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
14434 Un yy- yyrhs to avoid the name clash with the global YYRHS.
14435
32f0598d
AD
144362002-10-13 Akim Demaille <akim@epita.fr>
14437
14438 * Makefile.maint: Update from Autoconf 2.54.
14439 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
14440
7ea9a33f
AD
144412002-10-13 Akim Demaille <akim@epita.fr>
14442
14443 * src/print.c (print_state): Separate the list of solved conflicts
14444 from the other items.
14445 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
14446
ea99527d
AD
144472002-10-13 Akim Demaille <akim@epita.fr>
14448
14449 Let nondeterministic skeletons be usable with deterministic
14450 tables.
14451
14452 With the patch, GAWK compiled by GCC without -O2 passes its test
14453 suite using a GLR parser driven by LALR tables. It fails with -O2
14454 because `struct stat' gives two different answers on my machine:
14455 88 (definition of an auto var) and later 96 (memset on this var).
14456 Hence the stack is badly corrumpted. The headers inclusion is to
14457 blame: if I move the awk.h inclusion before GLR's system header
14458 inclusion, the two struct stat have the same size.
14459
14460 * src/tables.c (pack_table): Always create conflict_table.
14461 (token_actions): Always create conflict_list.
14462 * data/glr.c (YYFLAG): Remove, unused.
14463
f377f69f
AD
144642002-10-13 Akim Demaille <akim@epita.fr>
14465
14466 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
14467 (O0FLAGS): New.
14468 (VALGRIND, GXX): New.
14469 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
14470 * tests/bison.in: Run $PREBISON a pre-command.
14471 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
14472 (maintainer-check-g++): New.
14473 * Makefile.am (maintainer-check): New.
14474
2a1fe6ed
AD
144752002-10-13 Akim Demaille <akim@epita.fr>
14476
14477 * data/glr.c: Formatting changes.
14478 Tweak some trace messages to match yacc.c's.
14479
f50adbbd
AD
144802002-10-13 Akim Demaille <akim@epita.fr>
14481
14482 GLR parsers sometimes raise parse errors instead of performing the
14483 default reduction.
14484 Reported by Charles-Henry de Boysson.
14485
14486 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 14487 check the length of the traces when %glr.
f50adbbd
AD
14488 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
14489 GLR's traces.
14490 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
14491 Test GLR parsers.
14492 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
14493 (yyltype): Remove the yy prefix from the member names.
14494 (yytable): Complete its comment.
14495 (yygetLRActions): Map error action number from YYTABLE from
14496 YYTABLE_NINF to 0.
14497 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
14498 (which was a bug: it should have been YYTABEL_NINF, and yet it was
14499 not satisfying as we could compare an YYACTION computed from
14500 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
14501 only value for error actions.
14502 (yyreportParseError): In verbose parse error messages, don't issue
14503 `error' in the list of expected tokens.
14504 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
14505 next action to perform to match glr.c's decoding.
14506 (yytable): Complete its comment.
14507
bcbad5b9
PE
145082002-10-13 Paul Eggert <eggert@twinsun.com>
14509
14510 Fix problem reported by Henrik Grubbstroem in
161a71f3 14511 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
14512 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
14513 because the Bison parser reads the second action before reducing
14514 the first one.
14515 * src/scan-gram.l (rule_length): New static var.
14516 Use it to keep track of the rule length in the scanner, since
14517 we can't expect the parser to be in lock-step sync with the scanner.
14518 (handle_action_dollar, handle_action_at): Use this var.
14519 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 14520
14904b89
PE
145212002-10-12 Paul Eggert <eggert@twinsun.com>
14522
1fe611e5
PE
14523 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
14524 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
14525 Include <sys/time.h> when checking for clock_t and struct tms.
14526 Use same include order as source.
14527 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 14528 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 14529
1fe611e5
PE
14530 * lib/timevar.c: Update copyright date and clarify comments.
14531 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 14532
1fe611e5
PE
14533 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
14534 GCC version as of today, then merge Bison's changes.
14535 Change "GCC" to "Bison" in copyright notice. timevar.def's
14536 author is Akim, so change that too.
14537
98194095
PE
14538 * src/reader.c (grammar_current_rule_check):
14539 Don't worry about the default action if $$ is untyped.
14540 Prevents bogus warnings reported by Jim Gifford in
161a71f3 14541 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 14542
14904b89
PE
14543 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
14544 * data/glr.c, data/lalr1.cc, data/yacc.c:
14545 Output token definitions before the first part of user declarations.
14546 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 14547 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 14548
ff6dca18
PE
145492002-10-11 Paul Eggert <eggert@twinsun.com>
14550
14551 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
14552 (yyparse): here. This undoes some of the 2002-07-25 change.
14553 Compatibility problem reported by Ralf S. Engelschall with
14554 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
14555
eb714592
AD
145562002-10-11 Akim Demaille <akim@epita.fr>
14557
14558 * tests/regression.at Characters Escapes): New.
14559 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
14560 characters.
14561 Reported by Jan Nieuwenhuizen.
14562
b7195100
AD
145632002-10-11 Akim Demaille <akim@epita.fr>
14564
14565 * po/id.po: New.
14566
f28a0f2d
PE
145672002-10-10 Paul Eggert <eggert@twinsun.com>
14568
14569 Portability fixes for bitsets; this also avoids several GCC
14570 warnings.
14571
14572 * lib/abitset.c: Include <stddef.h>, for offsetof.
14573 * lib/lbitset.c: Likewise.
14574
14575 * lib/abitset.c (abitset_bytes): Return a size that is aligned
14576 properly for vectors of objects. Do not assume that adding a
14577 header size to a multiple of a word size yields a value that is
14578 properly aligned for the whole union.
14579 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14580
14581 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
14582 unique names for structures.
14583 * lib/ebitset.c (ebitset_bytes): Likewise.
14584 * lib/lbitset.c (lbitset_bytes): Likewise.
14585
14586 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
14587 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
14588 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
14589 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
14590 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
14591 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
14592 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
14593 to improve the type-checking that GCC can do.
14594 * lib/bitset.c (bitset_op4_cmp): Likewise.
14595 * lib/bitset_stats.c (bitset_stats_count,
14596 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
14597 bitset_stats_copy, bitset_stats_disjoint_p,
14598 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
14599 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
14600 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
14601 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
14602 bitset_stats_and_or_cmp, bitset_stats_andn_or,
14603 bitset_stats_andn_or_cmp, bitset_stats_or_and,
14604 bitset_stats_or_and_cmp): Likewise.
14605 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
14606 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
14607 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
14608 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
14609
14610 * lib/abitset.h: Include bitset.h, not bbitset.h.
14611 * lib/ebitset.h: Likewise.
14612 * lib/lbitset.h: Likewise.
14613
14614 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
14615 All instances of parameters of type enum bitset_opts are now of
14616 type enum_bitset_opts, to conform to the C Standard, and similarly
14617 for enum_bitset_type.
14618 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
14619 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
14620
14621 Do not use "struct bitset_struct" to mean different things in
14622 different modules. Not only is this confusing, it violates
14623 the C Standard, which requires that structure types in different
14624 modules must be compatible if one is to be passed to the other.
14625 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
14626 All instances of "struct bitset_struct *" replaced with "bitset".
14627 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
14628 (union bitset_union, struct abitset_struct, struct ebitset_struct,
14629 struct lbitset_struct, struct bitset_stats_struct): New types.
14630 All uses of struct bitset_struct changed to union bitset_union,
14631 etc.
ba0fe3c7 14632 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
14633 struct bitset_struct): Remove.
14634 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
14635 struct bitset_struct): Remove.
14636 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
14637 bitset_struct): Remove.
14638 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
14639 Likewise.
14640
14641 Do not call a function of type T using a call that assumes the
14642 function is of a different type U. Standard C requires that a
14643 function must be called with a type that is compatible with its
14644 definition.
14645 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14646 New decls.
14647 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
14648 New functions.
14649 * lib/ebitset.c (PFV): Remove.
14650 * lib/lbitset.c (PFV): Likewise.
14651 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
14652 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
14653 decls.
14654 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
14655 (ebitset_vtable): Use them.
14656 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
14657 lbitset_xor): New functions.
14658 (lbitset_vtable): Use them.
14659
14660 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
14661 Declare.
14662
14663 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
14664 GCC warning.
14665 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
14666 Use offsetof, for simplicity.
14667
6fbe4984
PE
146682002-10-06 Paul Eggert <eggert@twinsun.com>
14669
14670 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
14671 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 14672 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
14673 which was inadvertently undone by the 2002-09-30 patch.
14674 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
14675 the same width as int.
14676
420f93c8
PE
146772002-10-04 Paul Eggert <eggert@twinsun.com>
14678
14679 Version 1.50.
14680
14681 * configure.ac (AC_INIT), NEWS: Increment version number.
14682
14683 * doc/bison.texinfo: Minor spelling, grammar, and white space
14684 fixes.
14685 (Symbols): Mention that any negative value returned from yylex
14686 signifies end-of-input. Warn about negative chars. Mention
14687 the portable Standard C character set.
14688
14689 The GNU coding standard says CFLAGS and YFLAGS are reserved
14690 for the installer to set.
14691 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
14692 * src/Makefile.am (AM_CFLAGS): Likewise.
14693 (AM_YFLAGS): Renamed from YFLAGS.
14694
14695 Fix some MAX and MIN problems.
14696 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
14697 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
14698 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
14699 * src/reader.c (reader): Use it.
14700
14701 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
14702 POSIX 1003.1-2001 has removed fgrep.
14703
147042002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
14705
14706 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
14707 interpreted as signed.
14708 * lib/ebitset.c (ebitset_list): Fix bug.
14709
ff68026d
PE
147102002-10-01 Paul Eggert <eggert@twinsun.com>
14711
14712 More fixes for 64-bit hosts and large bitsets.
14713
14714 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
14715 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
14716 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
14717 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
14718 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
14719 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
14720 bitset_count_): Likewise.
14721 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
14722 bitset_first, bitset_last): Likewise.
14723 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
14724 bitset_stats_list_reverse, bitset_stats_size,
14725 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
14726 Likewise.
14727 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14728 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
14729 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
14730 bitsetv_reflexive_transitive_closure): Likewise.
14731 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
14732 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
14733 Likewise.
14734 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
14735 Likewise.
420f93c8 14736
ff68026d
PE
14737 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
14738 Use size_t, not unsigned int, to count bytes.
14739 * lib/abitset.h (abitset_bytes): Likewise.
14740 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
14741 Likewise.
14742 * lib/bitset.h (bitset_bytes): Likewise.
14743 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
14744 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
14745 * lib/bitsetv.c (bitsetv_alloc): Likewise.
14746 * lib/ebitset.c (ebitset_bytes): Likewise.
14747 * lib/ebitset.h (ebitset_bytes): Likewise.
14748 * lib/lbitset.c (lbitset_bytes): Likewise.
14749 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 14750
ff68026d
PE
14751 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
14752 abitset_subset_p, abitset_disjoint_p, abitset_and,
14753 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
14754 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
14755 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
14756 abitset_or_and, abitset_or_and_cmp):
14757 Use bitset_windex instead of unsigned int.
14758 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14759 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
14760 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
14761 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
14762 Likewise.
14763 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 14764
ff68026d
PE
14765 * lib/bitset.c (bitset_print):
14766 Use proper printf formats for widths of integer types.
14767 * lib/bitset_stats.c (bitset_percent_histogram_print,
14768 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
14769 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
14770 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
14771 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 14772
ff68026d
PE
14773 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
14774 BITSET_SIZE_MAX): New macros.
14775 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
14776 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
14777 to BITSET_WINDEX_MAX.
14778
14779 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
14780 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
14781 since we now return the bitset_bindex type (not int).
14782
14783 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
14784 when computing sizes.
14785 * lib/ebitset.c (ebitset_elts_grow): Likewise.
14786
14787 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
14788 and avoid cast to unsigned.
14789
6aa452a6
AD
147902002-09-30 Akim Demaille <akim@epita.fr>
14791
14792 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
14793 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
14794 Updates from Michael Hayes.
14795
927f7817
AD
147962002-09-30 Art Haas <ahaas@neosoft.com>
14797
14798 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
14799 invocations.
14800 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
14801 defined.
14802
9738f41e
AD
148032002-09-27 Akim Demaille <akim@epita.fr>
14804
14805 Version 1.49c.
14806
a5c75d7f
AD
148072002-09-27 Akim Demaille <akim@epita.fr>
14808
14809 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
14810 (Because of AC_LIBSOURCE).
14811
8280e179
AD
148122002-09-27 Akim Demaille <akim@epita.fr>
14813
14814 Playing with Autoscan.
14815
14816 * configure.ac: Remove the old LIBOBJ tweaks.
14817 (AC_REPLACE_FUNCS): Add strrchr and strtol.
14818 * lib/strrchr.c: New.
14819 * lib/strtol.c: New, from the Coreutils 4.5.1.
14820
ae64af35
AD
148212002-09-27 Akim Demaille <akim@epita.fr>
14822
14823 Playing with Autoscan.
14824
14825 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
14826 * lib/Makefile.am (libbison_a_SOURCES): No longer include
14827 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
14828 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
14829 Coreutils 4.5.1.
14830
d1a1114f
AD
148312002-09-24 Akim Demaille <akim@epita.fr>
14832
14833 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
14834 (Frequently Asked Questions, Parser Stack Overflow): New.
14835
b906441c
AD
148362002-09-13 Akim Demaille <akim@epita.fr>
14837
14838 Playing with autoscan.
14839
14840 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
14841 * src/files.c (skeleton_find): Remove, unused.
14842 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
14843 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
14844
bd701811
AD
148452002-09-13 Akim Demaille <akim@epita.fr>
14846
14847 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
14848 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
14849
e0a13e7b
AD
148502002-09-13 Akim Demaille <akim@epita.fr>
14851
14852 * configure.ac: Require 2.54.
14853 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
14854 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
14855 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
14856 Remove, provided by Autoconf macros.
14857
c97011bf
AD
148582002-09-12 Akim Demaille <akim@epita.fr>
14859
14860 * m4/prereq.m4: Update, from Coreutils 4.5.1.
14861
d862b1be
AD
148622002-09-12 Akim Demaille <akim@epita.fr>
14863
14864 * m4/prereq.m4: Update, from Fileutils 4.1.5.
14865 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
14866 Reported by Martin Mokrejs.
14867
3d38c03a
AD
148682002-09-10 Akim Demaille <akim@epita.fr>
14869
14870 * src/parse-gram.y: Associate a human readable string to each
14871 token type.
14872 * tests/regression.at (Invalid inputs): Adjust.
14873
b6347355
AD
148742002-09-10 Gary V. Vaughan <gary@gnu.org>
14875
14876 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
14877 with an Autoconf-2.5x style configure.ac.
14878
09ba4ab2
PE
148792002-09-06 Paul Eggert <eggert@twinsun.com>
14880
14881 * doc/bison.texinfo (Conditions): Make explicit that the GPL
14882 exception applies only to yacc.c. This is a modification of a
14883 patch originally suggested by Akim Demaille.
14884
21846f69
AD
148852002-09-06 Akim Demaille <akim@epita.fr>
14886
09ba4ab2
PE
14887 * data/c.m4 (b4_copyright): Move the GPL exception comment from
14888 here to...
14889 * data/yacc.c: here.
14890
21846f69
AD
14891 * data/lalr1.cc (struct yyltype): Don't define it, since we use
14892 LocationType.
14893 (b4_ltype): Default to yy::Location from location.hh.
14894
c0ad8bf3
AD
148952002-09-04 Jim Meyering <jim@meyering.net>
14896
14897 * data/yacc.c: Guard the declaration of yytoknum also with
14898 `#ifdef YYPRINT', so it is declared only when used.
14899
3a93251e
AD
149002002-09-04 Akim Demaille <akim@epita.fr>
14901
14902 * configure.in: Rename as...
14903 * configure.ac: this.
14904 Bump to 1.49c.
14905
427c0dda
AD
149062002-09-04 Akim Demaille <akim@epita.fr>
14907
14908 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
14909 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
14910 translate maintainer only messages.
14911
6a254321
PE
149122002-08-12 Paul Eggert <eggert@twinsun.com>
14913
645e30d1
PE
14914 Version 1.49b.
14915
6a254321
PE
14916 * Makefile.am (SUBDIRS): Remove intl.
14917 (DISTCLEANFILES): Remove.
14918 * NEWS: Mention that GNU M4 is now required. Clarify what is
14919 meant by "larger grammars". Mention the pt_BR translation.
14920 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
14921 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
14922 Bump version from 0.11.2 to 0.11.5.
14923 (BISON_PREREQ_STAGE): Remove.
14924 (AM_GNU_GETTEXT): Use external gettext.
14925 (AC_OUTPUT): Remove intl/Makefile.
14926
14927 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
14928
14929 * data/glr.c: Include string.h, for strlen.
14930 (yyreportParseError): Use size_t for yysize.
14931 (yy_yypstack): No longer nested inside yypstates, as nested
14932 functions are not portable. Do not assume size_t is the
14933 same width as int.
14934 (yypstates): Do not assume that ptrdiff_t is the same width
14935 as int, and similarly for yyposn and YYINDEX.
14936
14937 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
14938
14939 * lib/Makefile.am (INCLUDES): Do not include from the intl
14940 directory, which has been removed.
14941 * src/Makefile.am (INCLUDES): Likewise.
14942
14943 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
14944 (bitsets_sources, additional_bitsets_sources, timevars_sources):
14945 New vars.
14946
14947 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
14948 * tests/Makefile.am (EXTRA_DIST): Likewise.
14949
14950 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
14951 Do not assume that bitset_windex is the same width as unsigned.
14952
14953 * lib/abitset.c (abitset_unused_clear): Do not assume that
14954 bitset_word is the same width as int.
14955 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
14956 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
14957 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
14958 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
14959 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
14960
14961 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
14962 portability to one's complement hosts!).
14963 * lib/ebitset.c (ebitset_op1): Likewise.
14964 * lib/lbitset.c (lbitset_op1): Likewise.
14965
14966 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
14967 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
14968 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
14969 Sync with fileutils.
14970 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
14971 lib/gettext.h: Sync with diffutils.
14972
14973 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
14974 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
14975
14976 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
14977 PROTOTYPES to check for prototypes, and "defined __STDC__" to
14978 check for void *.
14979
14980 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
14981 size_t; the old version tried to do this but casted improperly.
14982 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
14983 (bitset_test): Now returns int, not unsigned long.
14984
14985 * lib/bitset_stats.c: Include "gettext.h".
14986 (_): New macro.
14987 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
14988 name locals "index", as it generates unnecessary warnings on some
14989 hosts that have an "index" function.
14990
14991 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
14992 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
14993 they need translation.
14994 * src/LR0.c (state_list_append, new_itemsets, get_state,
14995 append_states, generate_states): Likewise.
14996 * src/assoc.c (assoc_to_string): Likewise.
14997 * src/closure.c (print_closure, set_firsts, closure): Likewise.
14998 * src/gram.c (grammar_dump): Likewise.
14999 * src/injections.c (injections_compute): Likewise.
15000 * src/lalr.c (lookaheads_print): Likewise.
15001 * src/relation.c (relation_transpose): Likewise.
15002 * src/scan-gram.l: Likewise.
15003 * src/tables.c (table_grow, pack_vector): Likewise.
15004
15005 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
15006 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
15007 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
15008 * m4/mbstate_t.m4: Sync with fileutils.
15009 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
15010
15011 * po/LINGUAS: Add pt_BR.
15012 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
15013 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
15014 lib/timevar.c.
15015 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
15016 manual recommends.
15017 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
15018
15019 * src/complain.c (strerror_r): Remove decl; not needed.
15020 (strerror): Use same pattern as ../lib/error.c.
15021
15022 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
15023
15024 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
15025
15026 * src/main.c (main): Cast result of bindtextdomain and textdomain
15027 to void, to avoid a GCC warning when --disable-nls is in effect.
15028
15029 * src/scan-gram.l: Use strings rather than escapes when possible,
15030 to minimize the number of warnings from xgettext.
15031 (handle_action_dollar, handle_action_at): Don't use isdigit,
15032 as it mishandles negative chars and it may not work as expected
15033 outside the C locale.
15034
15035 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
15036 this is a GCC extension and is not portable to other compilers.
15037
15038 * src/system.h (alloca): Use same pattern as ../lib/error.c.
15039 Do not include <ctype.h>; no longer needed.
15040 Do not include <malloc.h>; no longer needed (and generates
15041 warnings on OpenBSD 3.0).
15042
15043 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
15044 it's not portable.
15045
15046 * tests/regression.at: Do not use 'cc -c input.c -o input';
15047 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
15048
15049 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
15050 exit status as failure, not just exit status 1. Sun C exits
15051 with status 2 sometimes.
15052
15053 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
15054 Use it for the two large tests.
15055
c8f002c7
AD
150562002-08-02 Akim Demaille <akim@epita.fr>
15057
15058 * src/conflicts.c (conflicts_output): Don't output rules never
15059 reduced here, since anyway that computation doesn't work.
15060 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
15061 (rule_useless_p, rule_never_reduced_p): New.
15062 (grammar_rules_partial_print): Use a filter instead of a range.
15063 Display the title only if needed.
15064 (grammar_rules_print): Adjust.
15065 (grammar_rules_never_reduced_report): New.
15066 * src/tables.c (action_row): Move the computation of rules never
15067 reduced to...
15068 (token_actions): here.
15069 * src/main.c (main): Make the parser before making the report, so
15070 that rules never reduced are computed.
15071 Call grammar_rules_never_reduced_report.
15072 * src/print.c (print_results): Report rules never reduced.
15073 * tests/conflicts.at, tests/reduce.at: Adjust.
15074
cd08e51e
AD
150752002-08-01 Akim Demaille <akim@epita.fr>
15076
15077 Instead of attaching lookaheads and duplicating the rules being
15078 reduced by a state, attach the lookaheads to the reductions.
15079
15080 * src/state.h (state_t): Remove the `lookaheads',
15081 `lookaheads_rule' member.
15082 (reductions_t): Add a `lookaheads' member.
15083 Use a regular array for the `rules'.
15084 * src/state.c (reductions_new): Initialize the lookaheads member
15085 to 0.
15086 (state_rule_lookaheads_print): Adjust.
15087 * src/state.h, src/state.c (state_reductions_find): New.
15088 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
15089 (count_rr_conflicts): Adjust.
15090 * src/lalr.c (LArule): Remove.
15091 (add_lookback_edge): Adjust.
15092 (state_lookaheads_count): New.
15093 (states_lookaheads_initialize): Merge into...
15094 (initialize_LA): this.
15095 (lalr_free): Adjust.
15096 * src/main.c (main): Don't free nullable and derives too early: it
15097 is used by --verbose.
15098 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
15099
bb0027a9
AD
151002002-08-01 Akim Demaille <akim@epita.fr>
15101
15102 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
15103 `rule_number_t**'.
15104 (set_derives, free_derives): Rename as...
15105 (derives_compute, derives_free): this.
15106 Adjust all dependencies.
15107 * src/nullable.c (set_nullable, free_nullable): Rename as...
15108 (nullable_compute, nullable_free): these.
15109 (rule_list_t): Store rule_t *, not rule_number_t.
15110 * src/state.c (state_rule_lookaheads_print): Directly compare rule
15111 pointers, instead of their numbers.
15112 * src/main.c (main): Call nullable_free, and derives_free earlier,
15113 as they were lo longer used.
15114
3325ddc4
AD
151152002-08-01 Akim Demaille <akim@epita.fr>
15116
15117 * lib/timevar.c (get_time): Include children time.
15118 * src/lalr.h (LA, LArule): Don't export them: used with the
15119 state_t.
15120 * src/lalr.c (LA, LArule): Static.
15121 * src/lalr.h, src/lalr.c (lalr_free): New.
15122 * src/main.c (main): Call it.
15123 * src/tables.c (pack_vector): Check whether loc is >= to the
15124 table_size, not >.
15125 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
15126 (tables_generate): do it, since that's also it which allocates
15127 them.
15128 Don't free LA and LArule, main does.
15129
c6f1a33c
AD
151302002-07-31 Akim Demaille <akim@epita.fr>
15131
15132 Separate parser tables computation and output.
15133
15134 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
15135 (conflict_list, conflict_list_cnt, table, check, table_ninf)
15136 (yydefgoto, yydefact, high): Move to...
15137 * src/tables.h, src/tables.c: here.
15138 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15139 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15140 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
15141 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
15142 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
15143 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
15144 (action_row, save_row, token_actions, save_column, default_goto)
15145 (goto_actions, sort_actions, matching_state, pack_vector)
15146 (table_ninf_remap, pack_table, prepare_actions): Move to...
15147 * src/tables.c: here.
15148 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
15149 * src/output.c (token_actions, output_base, output_conflicts)
15150 (output_check): Merge into...
15151 (prepare_actions): this.
15152 (actions_output): Rename as...
15153 (user_actions_output): this.
15154 * src/main.c (main): Call tables_generate and tables_free.
15155
1509d42f
AD
151562002-07-31 Akim Demaille <akim@epita.fr>
15157
15158 Steal GCC's --time-report support.
15159
15160 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
15161 stolen/adjusted from GCC.
15162 * m4/stage.m4: Remove time related checks.
15163 * m4/timevar.m4: New.
15164 * configure.in: Adjust.
15165 * src/system.h: Adjust to using timevar.h.
15166 * src/getargs.h, src/getargs.c: Support trace_time for
15167 --trace=time.
15168 * src/main.c (stage): Remove.
15169 (main): Replace `stage' invocations with timevar calls.
15170 * src/output.c: Insert pertinent timevar calls.
15171
273a74fa
AD
151722002-07-31 Akim Demaille <akim@epita.fr>
15173
15174 Let --trace have arguments.
15175
15176 * src/getargs.h (enum trace_e): New.
15177 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
15178 (long_options, short_options): --trace/-T takes an optional
15179 argument.
15180 Change all the uses of trace_flag to reflect the new flags.
15181 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
15182
15183 Strengthen `stage' portability.
15184
15185 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
15186 * configure.in: Use it.
15187 Don't check for malloc.h and sys/times.h.
15188 * src/system.h: Include them when appropriate.
15189 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
15190 times and struct tms are available.
15191
217598da
AD
151922002-07-30 Akim Demaille <akim@epita.fr>
15193
15194 In verbose parse error message, don't report `error' as an
15195 expected token.
15196 * tests/actions.at (Printers and Destructors): Adjust.
15197 * tests/calc.at (Calculator $1): Adjust.
15198 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
15199 error message, do not report the parser accepts the error token in
15200 that state.
15201
52489d44
AD
152022002-07-30 Akim Demaille <akim@epita.fr>
15203
15204 Normalize conflict related messages.
15205
15206 * src/complain.h, src/complain.c (warn, complain): New.
15207 * src/conflicts.c (conflicts_print): Use them.
15208 (conflict_report_yacc): New, extracted from...
15209 (conflicts_print): here.
15210 * tests/conflicts.at, tests/existing.at: Adjust.
15211
e8832397
AD
152122002-07-30 Akim Demaille <akim@epita.fr>
15213
15214 Report rules which are never reduced by the parser: those hidden
15215 by conflicts.
15216
15217 * src/LR0.c (save_reductions): Don't make the final state too
15218 different: save its reduction (accept) instead of having a state
15219 without any action (no shift or goto, no reduce).
15220 Note: the final state is now a ``regular'' state, i.e., the
15221 parsers now contain `reduce 0' as default reduction.
15222 Nevertheless, since they decide to `accept' when yystate =
15223 final_state, they still will not reduce rule 0.
15224 * src/print.c (print_actions, print_reduction): Adjust.
15225 * src/output.c (action_row): Track reduced rules.
15226 (token_actions): Report rules never reduced.
15227 * tests/conflicts.at, tests/regression.at: Adjust.
15228
caf23d24
AD
152292002-07-30 Akim Demaille <akim@epita.fr>
15230
15231 `stage' was accidently included in a previous patch.
15232 Initiate its autoconfiscation.
15233
15234 * configure.in: Look for malloc.h and sys/times.h.
15235 * src/main.c (stage): Adjust.
15236 Report only when trace_flag.
15237
640748ee
AD
152382002-07-29 Akim Demaille <akim@epita.fr>
15239
15240 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
15241 state_number_t.
15242 (errs_t): symbol_t*, not symbol_number_t.
15243 (reductions_t): rule_t*, not rule_number_t.
15244 (FOR_EACH_SHIFT): New.
15245 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
15246 * src/print.c, src/print_graph.c: Adjust.
15247
88bce5a2
AD
152482002-07-29 Akim Demaille <akim@epita.fr>
15249
15250 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
15251
15252 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
15253 (endtoken, accept): these.
15254 * src/reader.c (reader): Set endtoken's default tag to "$end".
15255 Set undeftoken's tag to "$undefined" instead of "$undefined.".
15256 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
15257 Adjust.
15258
1bfb97db
AD
152592002-07-29 Akim Demaille <akim@epita.fr>
15260
15261 * src/reduce.c (reduce_grammar): When the language is empty,
15262 complain about the start symbol, not the axiom.
15263 Use its location.
15264 * tests/reduce.at (Empty Language): New.
15265
fc5734fe
AD
152662002-07-26 Akim Demaille <akim@epita.fr>
15267
15268 * src/reader.h, src/reader.c (gram_error): ... can't get
15269 yycontrol without making too strong assumptions on the parser
15270 itself.
15271 * src/output.c (prepare_tokens): Use the real 0th value of
15272 token_translations instead of `0'.
15273 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
15274 visible here.
15275 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
15276 for the time being: %locations ought to provide it to yyerror.
15277
3650b4b8
AD
152782002-07-25 Akim Demaille <akim@epita.fr>
15279
15280 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
15281 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
15282 * tests/regression.at (Web2c Actions): Adjust.
15283
4b3d3a8e
AD
152842002-07-25 Akim Demaille <akim@epita.fr>
15285
15286 Stop storing rules from 1 to nrules + 1.
15287
15288 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
15289 * src/nullable.c, src/output.c, src/print.c, src/reader.c
15290 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
15291 Iterate from 0 to nrules.
15292 Use rule_number_as_item_number and item_number_as_rule_number.
15293 Adjust to `derive' now containing possibly 0.
15294 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
15295 Handle the `- 1' part in rule numbers from/to item numbers.
15296 * src/conflicts.c (log_resolution): Fix the message which reversed
15297 shift and reduce.
15298 * src/output.c (action_row): Initialize default_rule to -1.
15299 (token_actions): Adjust.
15300 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
15301 expected output.
15302 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
15303
4a2a22f4
AD
153042002-07-25 Akim Demaille <akim@epita.fr>
15305
15306 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
15307 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
15308 (b4_c_knr_arg_decl): New.
15309 * data/yacc.c: Use it to define yysymprint, yydestruct, and
15310 yyreport_parse_error.
15311
b8df3223
AD
153122002-07-25 Akim Demaille <akim@epita.fr>
15313
15314 * data/yacc.c (yyreport_parse_error): New, extracted from...
15315 (yyparse): here.
15316 (yydestruct, yysymprint): Move above yyparse.
15317 Be K&R compliant.
15318
a762e609
AD
153192002-07-25 Akim Demaille <akim@epita.fr>
15320
15321 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
15322 replace...
15323 (b4_sint_type, b4_uint_type): these.
15324 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
15325 * tests/regression.at (Web2c Actions): Adjust.
15326
12b0043a
AD
153272002-07-25 Akim Demaille <akim@epita.fr>
15328
15329 * src/gram.h (TIEM_NUMBER_MAX): New.
15330 (item_number_of_rule_number, rule_number_of_item_number): Rename
15331 as...
15332 (rule_number_as_item_number, item_number_as_rule_number): these.
15333 Adjust dependencies.
15334 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
15335 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
15336 (symbol_number_to_vector_number): New.
15337 (order): Of vector_number_t* type.
15338 (base_t, BASE_MAX, BASE_MIN): New.
15339 (froms, tos, width, pos, check): Of base_t type.
15340 (action_number_t, ACTION_MIN, ACTION_MAX): New.
15341 (actrow): Of action_number_t type.
15342 (conflrow): Of unsigned int type.
15343 (table_ninf, base_ninf): New.
15344 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
15345 (muscle_insert_int_table, muscle_insert_base_table)
15346 (muscle_insert_rule_number_table): New.
15347 (prepare_tokens): Output `toknum' as int_table.
15348 (action_row): Returns a rule_number_t.
15349 Use ACTION_MIN, not SHRT_MIN.
15350 (token_actions): yydefact is rule_number_t*.
15351 (table_ninf_remap): New.
15352 (pack_table): Use it for `base' and `table'.
15353 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
15354 replaced with...
15355 (YYPACT_NINF, YYTABLE_NINF): these.
15356 (yypact, yytable): Compute their types instead of hard-coded
15357 `short'.
15358 * tests/regression.at (Web2c Actions): Adjust.
15359
5dde258a
AD
153602002-07-19 Akim Demaille <akim@epita.fr>
15361
15362 * src/scan-gram.l (id): Can start with an underscore.
15363
a945ec39
AD
153642002-07-16 Akim Demaille <akim@epita.fr>
15365
15366 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
15367 Adjust all former `associativity' dependencies.
15368 * src/symtab.c (symbol_new): Default associativity is `undef', not
15369 `right'.
15370 (symbol_check_alias_consistence): Adjust.
15371
fae437e8
AD
153722002-07-09 Akim Demaille <akim@epita.fr>
15373
15374 * doc/bison.texinfo: Properly set the ``header'' part.
15375 Use @dircategory ``GNU programming tools'' as per Texinfo's
15376 documentation.
15377 Use @copying.
15378
1a715ef2
AD
153792002-07-09 Akim Demaille <akim@epita.fr>
15380
15381 * lib/quotearg.h: Protect against multiple inclusions.
15382 * src/location.h (location_t): Add a `file' member.
15383 (LOCATION_RESET, LOCATION_PRINT): Adjust.
15384 * src/complain.c (warn_at, complain_at, fatal_at): Drop
15385 `error_one_per_line' support.
15386
a5d50994
AD
153872002-07-09 Akim Demaille <akim@epita.fr>
15388
15389 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
15390 * src/reader.c (lineno): Remove.
15391 Adjust all dependencies.
15392 (get_merge_function): Take a location and use complain_at.
15393 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
15394 * tests/regression.at (Invalid inputs, Mixing %token styles):
15395 Adjust.
15396
b275314e
AD
153972002-07-09 Akim Demaille <akim@epita.fr>
15398
15399 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
15400 recovery rule, and forbid extensions when --yacc.
15401 (gram_error): Use complain_at.
15402 * src/reader.c (reader): Exit if there were parse errors.
15403
865b9df1
AD
154042002-07-09 Akim Demaille <akim@epita.fr>
15405
15406 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
15407 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
15408 Reported by R Blake <blakers@mac.com>.
15409
c76e14da
AD
154102002-07-09 Akim Demaille <akim@epita.fr>
15411
15412 * data/yacc.c: Output the copyright notive in the header.
15413
7db2ed2d
AD
154142002-07-03 Akim Demaille <akim@epita.fr>
15415
15416 * src/output.c (froms, tos): Are state_number_t.
15417 (save_column): sp, sp1, and sp2 are state_number_t.
15418 (prepare): Rename `final' as `final_state_number', `nnts' as
15419 `nterms_number', `nrules' as `rules_number', `nstates' as
15420 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
15421 unused.
15422 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
15423 * data/lalr1.cc (nsym_): Remove, unused.
15424
e68e0410
AD
154252002-07-03 Akim Demaille <akim@epita.fr>
15426
15427 * src/lalr.h, src/lalr.c (goto_number_t): New.
15428 * src/lalr.c (goto_list_t): New.
15429 Propagate them.
15430 * src/nullable.c (rule_list_t): New.
15431 Propagate.
15432 * src/types.h: Remove.
15433
e1a4f3a4
AD
154342002-07-03 Akim Demaille <akim@epita.fr>
15435
15436 * src/closure.c (print_fderives): Use rule_rhs_print.
15437 * src/derives.c (print_derives): Use rule_rhs_print.
15438 (rule_list_t): New, replaces `shorts'.
15439 (set_derives): Add comments.
15440 * tests/sets.at (Nullable, Firsts): Adjust.
15441
536545f3
AD
154422002-07-03 Akim Demaille <akim@epita.fr>
15443
15444 * src/output.c (prepare_actions): Free `tally' and `width'.
15445 (prepare_actions): Allocate and free `order'.
15446 * src/symtab.c (symbols_free): Free `symbols'.
15447 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
15448 * src/output.c (m4_invoke): Move to...
15449 * src/scan-skel.l: here.
15450 (<<EOF>>): Close yyout, and free its name.
15451
8b752b00
AD
154522002-07-03 Akim Demaille <akim@epita.fr>
15453
15454 Fix some memory leaks, and fix a bug: state 0 was examined twice.
15455
15456 * src/LR0.c (new_state): Merge into...
15457 (state_list_append): this.
15458 (new_states): Merge into...
15459 (generate_states): here.
15460 (set_states): Don't ensure a proper `errs' state member here, do it...
15461 * src/conflicts.c (conflicts_solve): here.
15462 * src/state.h, src/state.c: Comment changes.
15463 (state_t): Rename member `shifts' as `transitions'.
15464 Adjust all dependencies.
15465 (errs_new): For consistency, also take the values as argument.
15466 (errs_dup): Remove.
15467 (state_errs_set): New.
15468 (state_reductions_set, state_transitions_set): Assert that no
15469 previous value was assigned.
15470 (state_free): New.
15471 (states_free): Use it.
15472 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
15473 temporary storage: use `errs' and `nerrs' as elsewhere.
15474 (set_conflicts): Allocate and free this `errs'.
15475
613f5e1a
AD
154762002-07-02 Akim Demaille <akim@epita.fr>
15477
15478 * lib/libiberty.h: New.
15479 * lib: Update the bitset implementation from upstream.
15480 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
15481 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
15482 * src/main.c: Adjust bitset stats calls.
15483
26e0cadc
PE
154842002-07-01 Paul Eggert <eggert@twinsun.com>
15485
15486 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
15487 char, so that negative chars don't collide with $.
15488
1154cced
AD
154892002-06-30 Akim Demaille <akim@epita.fr>
15490
15491 Have the GLR tests be `warning' checked, and fix the warnings.
15492
15493 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
15494 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
15495 (yyremoveDeletes): `yyi' and `yyj' are size_t.
15496 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
15497 (yyaddDeferredAction): static.
15498 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
15499 (yyreportParseError): yyprefix is const.
15500 yytokenp is used only when verbose.
15501 (yy__GNUC__): Replace with __GNUC__.
15502 (yypdumpstack): yyi is size_t.
15503 (yypreference): Un-yy local variables and arguments, to avoid
15504 clashes with `yyr1'. Anyway, we are not in the user name space.
15505 (yytname_size): be an int, as is compared with ints.
15506 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
15507 Use them.
15508 * tests/cxx-gram.at: Use quotation to protect $1.
15509 Use AT_COMPILE to enable warnings hunts.
15510 Prototype yylex and yyerror.
15511 `Use' argc.
15512 Include `string.h', not `strings.h'.
15513 Produce and prototype stmtMerge only when used.
15514 yylex takes a location.
15515
97650f4e
AD
155162002-06-30 Akim Demaille <akim@epita.fr>
15517
15518 We spend a lot of time in quotearg, in particular when --verbose.
15519
15520 * src/symtab.c (symbol_get): Store a quoted version of the key.
15521 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
15522 Adjust all callers.
15523
d2576365
AD
155242002-06-30 Akim Demaille <akim@epita.fr>
15525
15526 * src/state.h (reductions_t): Rename member `nreds' as num.
15527 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
15528 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
15529
ccaf65bc
AD
155302002-06-30 Akim Demaille <akim@epita.fr>
15531
15532 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
15533 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
15534 (shifts_to): Rename as...
15535 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
15536 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
15537 (TRANSITION_IS_DISABLED, transitions_to): these.
15538
87675353
AD
155392002-06-30 Akim Demaille <akim@epita.fr>
15540
15541 * src/print.c (print_shifts, print_gotos): Merge into...
15542 (print_transitions): this.
15543 (print_transitions, print_errs, print_reductions): Align the
15544 lookaheads columns.
15545 (print_core, print_transitions, print_errs, print_state,
15546 print_grammar): Output empty lines separator before, not after.
15547 (state_default_rule_compute): Rename as...
15548 (state_default_rule): this.
15549 * tests/conflicts.at (Defaulted Conflicted Reduction),
15550 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
15551 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
15552
ce4ccb4b
AD
155532002-06-30 Akim Demaille <akim@epita.fr>
15554
15555 Display items as we display rules.
15556
15557 * src/gram.h, src/gram.c (rule_lhs_print): New.
15558 * src/gram.c (grammar_rules_partial_print): Use it.
15559 * src/print.c (print_core): Likewise.
15560 * tests/conflicts.at (Defaulted Conflicted Reduction),
15561 (Unresolved SR Conflicts): Adjust.
15562 (Unresolved SR Conflicts): Adjust and rename as...
15563 (Resolved SR Conflicts): this, as was meant.
15564 * tests/regression.at (Web2c Report): Adjust.
15565
bc933ef1
AD
155662002-06-30 Akim Demaille <akim@epita.fr>
15567
15568 * src/print.c (state_default_rule_compute): New, extracted from...
15569 (print_reductions): here.
15570 Pessimize, but clarify the code.
15571 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
15572
53d4308d
AD
155732002-06-30 Akim Demaille <akim@epita.fr>
15574
15575 * src/output.c (action_row): Let default_rule be always a rule
15576 number.
15577
574fb2d5
AD
155782002-06-30 Akim Demaille <akim@epita.fr>
15579
15580 * src/closure.c (print_firsts, print_fderives, closure):
15581 Use BITSET_EXECUTE.
15582 * src/lalr.c (lookaheads_print): Likewise.
15583 * src/state.c (state_rule_lookaheads_print): Likewise.
15584 * src/print_graph.c (print_core): Likewise.
15585 * src/print.c (print_reductions): Likewise.
15586 * src/output.c (action_row): Likewise.
15587 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
15588
05811fd7
AD
155892002-06-30 Akim Demaille <akim@epita.fr>
15590
15591 * src/print_graph.c: Use report_flag.
15592
0e4d5753
AD
155932002-06-30 Akim Demaille <akim@epita.fr>
15594
15595 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
15596 to...
15597 * src/relation.h, src/relation.c (traverse, relation_digraph)
15598 (relation_print, relation_transpose): New.
15599
24c7d800
AD
156002002-06-30 Akim Demaille <akim@epita.fr>
15601
15602 * src/state.h, src/state.c (shifts_to): New.
15603 * src/lalr.c (build_relations): Use it.
15604
9222837b
AD
156052002-06-30 Akim Demaille <akim@epita.fr>
15606
15607 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
15608 (item_number_of_rule_number, rule_number_of_item_number): New.
15609 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
15610 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15611 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
15612 Propagate their use.
15613 Much remains to be done, in particular wrt `shorts' from types.h.
15614
260008e5
AD
156152002-06-30 Akim Demaille <akim@epita.fr>
15616
15617 * src/symtab.c (symbol_new): Initialize the `printer' member.
15618
8a731ca8
AD
156192002-06-30 Akim Demaille <akim@epita.fr>
15620
15621 * src/LR0.c (save_reductions): Remove, replaced by...
15622 * src/state.h, src/state.c (state_reductions_set): New.
15623 (reductions, errs): Rename as...
15624 (reductions_t, errs_t): these.
15625 Adjust all dependencies.
15626
32e1e0a4
AD
156272002-06-30 Akim Demaille <akim@epita.fr>
15628
15629 * src/LR0.c (state_list_t, state_list_append): New.
15630 (first_state, last_state): Now symbol_list_t.
15631 (this_state): Remove.
15632 (new_itemsets, append_states, save_reductions): Take a state_t as
15633 argument.
15634 (set_states, generate_states): Adjust.
15635 (save_shifts): Remove, replaced by...
15636 * src/state.h, src/state.c (state_shifts_set): New.
15637 (shifts): Rename as...
15638 (shifts_t): this.
15639 Adjust all dependencies.
15640 * src/state.h (state_t): Remove the `next' member.
15641
e5fb6710
AD
156422002-06-30 Akim Demaille <akim@epita.fr>
15643
15644 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
15645 escaped in slot 0.
15646
c7ca99d4
AD
156472002-06-30 Akim Demaille <akim@epita.fr>
15648
15649 Use hash.h for the state hash table.
15650
15651 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
15652 (allocate_storage): Use state_hash_new.
15653 (free_storage): Use state_hash_free.
15654 (new_state, get_state): Adjust.
15655 * src/lalr.h, src/lalr.c (states): Move to...
15656 * src/states.h (state_t): Remove the `link' member, no longer
15657 used.
15658 * src/states.h, src/states.c: here.
15659 (state_hash_new, state_hash_free, state_hash_lookup)
15660 (state_hash_insert, states_free): New.
15661 * src/states.c (state_table, state_compare, state_hash): New.
15662 * src/output.c (output_actions): Do not free states now, since we
15663 still need to know the final_state number in `prepare', called
15664 afterwards. Do it...
15665 * src/main.c (main): here: call states_free after `output'.
15666
df0e7316
AD
156672002-06-30 Akim Demaille <akim@epita.fr>
15668
15669 * src/state.h, src/state.c (state_new): New, extracted from...
15670 * src/LR0.c (new_state): here.
15671 * src/state.h (STATE_ALLOC): Move to...
15672 * src/state.c: here.
15673 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
15674 * src/state.h, src/state.c: here.
15675
39f41916
AD
156762002-06-30 Akim Demaille <akim@epita.fr>
15677
15678 * src/reader.c (gensym): Rename as...
15679 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
15680 (getsym): Rename as...
15681 (symbol_get): this.
15682
d57650a5
AD
156832002-06-30 Akim Demaille <akim@epita.fr>
15684
15685 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
15686 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
15687 * src/output.c, src/print.c, src/print_graph.c: Propagate.
15688 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
15689
5a08f1ce
AD
156902002-06-30 Akim Demaille <akim@epita.fr>
15691
15692 Make the test suite pass with warnings checked.
15693
15694 * tests/actions.at (Printers and Destructors): Improve.
15695 Avoid unsigned vs. signed issues.
15696 * tests/calc.at: Don't exercise the scanner here, do it...
15697 * tests/input.at (Torturing the Scanner): here.
15698
720623af
PH
156992002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15700
88e7e941 15701 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
15702 reorganize first lines parallel to yacc.c.
15703
fb8135fa
AD
157042002-06-28 Akim Demaille <akim@epita.fr>
15705
15706 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
15707 (b4_token_enum, b4_token_defines): New, factored from...
15708 * data/lalr1.cc, data/yacc.c, glr.c: here.
15709
41442480
AD
157102002-06-28 Akim Demaille <akim@epita.fr>
15711
15712 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
15713 unused variables.
15714 * src/output.c (merger_output): static.
15715
e0e5bf84
AD
157162002-06-28 Akim Demaille <akim@epita.fr>
15717
ba0fe3c7 15718 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
15719 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
15720 pacify GCC.
15721 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 15722
676385e2
PH
157232002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15724
15725 Accumulated changelog for new GLR parsing features.
15726
6a254321 15727 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
15728 conflicts_total_count.
15729 * src/conflicts.h: Ditto.
15730 * src/output.c (token_actions): Use the new name.
15731 (output_conflicts): Change conflp => conflict_list_heads, and
15732 confl => conflict_list for better readability.
15733 * data/glr.c: Use the new names.
15734 * NEWS: Add self to GLR announcement.
e0e5bf84 15735
676385e2
PH
15736 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
15737
15738 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
15739 Akim Demaille.
15740
15741 * data/bison.glr: Change name to glr.c
15742 * data/glr.c: Renamed from bison.glr.
15743 * data/Makefile.am: Add glr.c
e0e5bf84
AD
15744
15745 * src/getargs.c:
15746
676385e2 15747 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 15748 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 15749
676385e2
PH
15750 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15751
15752 * data/bison.glr: Be sure to restore the
15753 current #line when returning to the skeleton contents after having
15754 exposed the input file's #line.
15755
15756 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15757
15758 * data/bison.glr: Bring up to date with changes to bison.simple.
15759
15760 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15761
15762 * data/bison.glr: Correct definitions that use b4_prefix.
15763 Various reformatting.
15764 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
15765 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
15766 yytokenp argument; now part of stack.
15767 (yychar): Define to behave as documented.
15768 (yyclearin): Ditto.
e0e5bf84 15769
676385e2
PH
15770 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15771
15772 * src/reader.h: Add declaration for free_merger_functions.
15773
15774 * src/reader.c (merge_functions): New variable.
15775 (get_merge_function): New function.
15776 (free_merger_functions): New function.
15777 (readgram): Check for %prec that is not followed by a symbol.
15778 Handle %dprec and %merge declarations.
15779 (packgram): Initialize dprec and merger fields in rules array.
15780
15781 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
15782 conflict_list_cnt, conflict_list_free): New variables.
15783 (table_grow): Also grow conflict_table.
e0e5bf84 15784 (prepare_rules): Output dprec and merger tables.
676385e2 15785 (conflict_row): New function.
e0e5bf84 15786 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
15787 default reduction in conflicted states for GLR parser so that there
15788 are spaces for the conflict lists.
15789 (save_row): Also save conflict information.
15790 (token_actions): Allocate conflict list.
15791 (merger_output): New function.
15792 (pack_vector): Pack conflict table, too.
15793 (output_conflicts): New function to output yyconflp and yyconfl.
15794 (output_check): Allocate conflict_tos.
15795 (output_actions): Output conflict tables, also.
15796 (output_skeleton): Output b4_mergers definition.
15797 (prepare): Output b4_max_rhs_length definition.
15798 Use 'bison.glr' as default skeleton for GLR parsers.
15799
15800 * src/gram.c (glr_parser): New flag.
15801 (grammar_free): Call free_merger_functions.
15802
15803 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
15804 all pairs of conflicting reductions, rather than just all tokens
15805 causing conflicts. Needed to size conflict tables.
e0e5bf84 15806 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
15807 interface.
15808 (conflicts_print): Ditto.
15809 (count_total_conflicts): New function.
15810
15811 * src/reader.h (merger_list): New type.
15812 (merge_functions): New variable.
15813
15814 * src/lex.h (tok_dprec, tok_merge): New token types.
15815
15816 * src/gram.h (rule_s): Add dprec and merger fields.
15817 (glr_parser): New flag.
15818
15819 * src/conflicts.h (count_total_conflicts): New function.
15820
15821 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
15822
15823 * doc/bison.texinfo (Generalized LR Parsing): New section.
15824 (GLR Parsers): New section.
15825 (Language and Grammar): Mention GLR parsing.
15826 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
15827 Correct typo ("tge" -> "the").
15828
15829 * data/bison.glr: New skeleton for GLR parsing.
15830
15831 * tests/cxx-gram.at: New tests for GLR parsing.
15832
15833 * tests/testsuite.at: Include cxx-gram.at.
15834
15835 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 15836
676385e2
PH
15837 * src/parse-gram.y:
15838
15839 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
15840
15841 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 15842
b5480d74 158432002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
15844
15845 * src/options.h, src/options.c: Remove.
15846 * src/getargs.c (short_options, long_options): New.
15847
60491a94
AD
158482002-06-27 Akim Demaille <akim@epita.fr>
15849
15850 * data/bison.simple, data/bison.c++: Rename as...
15851 * data/yacc.c, data/lalr1.cc: these.
15852 * doc/bison.texinfo (Environment Variables): Remove.
15853
9be0c25b
AD
158542002-06-25 Raja R Harinath <harinath@cs.umn.edu>
15855
15856 * src/getargs.c (report_argmatch): Initialize strtok().
15857
1ae72863
AD
158582002-06-20 Akim Demaille <akim@epita.fr>
15859
15860 * data/bison.simple (b4_symbol_actions): New, replaces...
15861 (b4_symbol_destructor, b4_symbol_printer): these.
15862 (yysymprint): Be sure to call YYPRINT only for tokens, and using
15863 user token numbers.
15864
87542d29
AD
158652002-06-20 Akim Demaille <akim@epita.fr>
15866
15867 * data/bison.simple (yydestructor): Rename as...
15868 (yydestruct): this.
15869
1a31ed21
AD
158702002-06-20 Akim Demaille <akim@epita.fr>
15871
15872 * src/symtab.h, src/symtab.c (symbol_type_set)
15873 (symbol_destructor_set, symbol_precedence_set): The location is
15874 the last argument.
15875 Adjust all callers.
15876
e776192e
AD
158772002-06-20 Akim Demaille <akim@epita.fr>
15878
15879 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
15880 internals.
15881 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
15882 Takes a location.
15883 * src/symtab.h, src/symtab.c (symbol_class_set)
15884 (symbol_user_token_number_set): Likewise.
15885 Adjust all callers.
15886 Promote complain_at.
15887 * tests/input.at (Type Clashes): Adjust.
15888
5c1180b3
AD
158892002-06-20 Akim Demaille <akim@epita.fr>
15890
15891 * data/bison.simple (YYLEX): Fix the declaration when
15892 %pure-parser.
15893
e3170060
AD
158942002-06-20 Akim Demaille <akim@epita.fr>
15895
15896 * data/bison.simple (yysymprint): Don't print the token number,
15897 just its name.
15898 * tests/actions.at (Destructors): Rename as...
15899 (Printers and Destructors): this.
15900 Also exercise %printer.
15901
253862fd
AD
159022002-06-20 Akim Demaille <akim@epita.fr>
15903
15904 * data/bison.simple (YYDSYMPRINT): New.
15905 Use it to remove many of the #if YYDEBUG/if (yydebug).
15906
366eea36
AD
159072002-06-20 Akim Demaille <akim@epita.fr>
15908
15909 * src/symtab.h, src/symtab.c (symbol_t): printer and
15910 printer_location are new members.
15911 (symbol_printer_set): New.
15912 * src/parse-gram.y (PERCENT_PRINTER): New token.
15913 Handle its associated rule.
15914 * src/scan-gram.l: Adjust.
15915 (handle_destructor_at, handle_destructor_dollar): Rename as...
15916 (handle_symbol_code_at, handle_symbol_code_dollar): these.
15917 * src/output.c (symbol_printers_output): New.
15918 (output_skeleton): Call it.
15919 * data/bison.simple (yysymprint): New. Cannot be named yyprint
15920 since there are already many grammar files with a user `yyprint'.
15921 Replace the calls to YYPRINT to calls to yysymprint.
15922 * tests/calc.at: Adjust.
15923 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
15924 taking advantage of parser very internal details (stack size!).
15925
4f25ebb0
AD
159262002-06-20 Akim Demaille <akim@epita.fr>
15927
15928 * src/scan-gram.l: Complete the scanner with the missing patterns
15929 to pacify Flex.
15930 Use `quote' and `symbol_tag_get' where appropriate.
15931
93b68a0e
AD
159322002-06-19 Akim Demaille <akim@epita.fr>
15933
15934 * tests/actions.at (Destructors): Augment to test locations.
15935 * data/bison.simple (yydestructor): Pass it the current location
15936 if locations are enabled.
15937 Prototype only when __STDC__ or C++.
15938 Change the argument names to move into the yy name space: there is
15939 user code here.
15940
58612f1d
AD
159412002-06-19 Akim Demaille <akim@epita.fr>
15942
74310291
AD
15943 * data/bison.simple (b4_pure_if): New.
15944 Use it instead of #ifdef YYPURE.
15945
159462002-06-19 Akim Demaille <akim@epita.fr>
15947
15948 * data/bison.simple (b4_location_if): New.
58612f1d
AD
15949 Use it instead of #ifdef YYLSP_NEEDED.
15950
f25bfb75
AD
159512002-06-19 Akim Demaille <akim@epita.fr>
15952
15953 Prepare @$ in %destructor, but currently don't bind it in the
15954 skeleton, as %location use is not cleaned up yet.
15955
15956 * src/scan-gram.l (handle_dollar, handle_destructor_at)
15957 (handle_action_at): New.
15958 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
15959 a braced_code_t and a location as additional arguments.
15960 (handle_destructor_dollar): Instead of requiring `b4_eval', just
15961 unquote one when outputting `b4_dollar_dollar'.
15962 Adjust callers.
15963 * data/bison.simple (b4_eval): Remove.
15964 (b4_symbol_destructor): Adjust.
15965 * tests/input.at (Invalid @n): Adjust.
15966
c732d2c6
AD
159672002-06-19 Zack Weinberg <zack@codesourcery.com>
15968
15969 * doc/bison.texinfo: Document ability to have multiple
15970 prologue sections.
15971
8c165d89
AD
159722002-06-18 Akim Demaille <akim@epita.fr>
15973
15974 * src/files.c (compute_base_names): When computing the output file
15975 names from the input file name, strip the directory part.
15976
ca98bf57
AD
159772002-06-18 Akim Demaille <akim@epita.fr>
15978
15979 * data/bison.simple.new: Comment changes.
15980 Reported by Andreas Schwab.
15981
0bfb02ff
AD
159822002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
15983
15984 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
15985 there are no `label `yyoverflowlab' defined but not used' warnings
15986 when yyoverflow is defined.
15987
24c0aad7
AD
159882002-06-18 Akim Demaille <akim@epita.fr>
15989
15990 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
15991 new member.
15992 (symbol_destructor_set): Adjust.
15993 * src/output.c (symbol_destructors_output): Output the destructor
15994 locations.
15995 Output the symbol name.
15996 * data/bison.simple (b4_symbol_destructor): Adjust.
15997
5719c109
AD
159982002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
15999 and Akim Demaille <akim@epita.fr>
16000
16001 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
16002 what's left on the stack when the error recovery hits EOF.
16003 * tests/actions.at (Destructors): Complete to exercise this case.
16004
9280d3ef
AD
160052002-06-17 Akim Demaille <akim@epita.fr>
16006
16007 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
16008 arguments is really empty, not only equal to `[]'.
16009 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
16010 member.
16011 (symbol_destructor_set): New.
16012 * src/output.c (symbol_destructors_output): New.
16013 * src/reader.h (brace_code_t, current_braced_code): New.
16014 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
16015 (handle_dollar): Rename as...
16016 (handle_action_dollar): this.
16017 (handle_destructor_dollar): New.
16018 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
16019 (grammar_declaration): Use it.
16020 * data/bison.simple (yystos): Is always defined.
16021 (yydestructor): New.
16022 * tests/actions.at (Destructors): New.
16023 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
16024
dafdc66f
AD
160252002-06-17 Akim Demaille <akim@epita.fr>
16026
16027 * src/symlist.h, src/symlist.c (symbol_list_length): New.
16028 * src/scan-gram.l (handle_dollar, handle_at): Compute the
16029 rule_length only when needed.
16030 * src/output.c (actions_output, token_definitions_output): Output
16031 the full M4 block.
16032 * src/symtab.c: Don't access directly to the symbol tag, use
16033 symbol_tag_get.
16034 * src/parse-gram.y: Use symbol_list_free.
16035
56c47203
AD
160362002-06-17 Akim Demaille <akim@epita.fr>
16037
16038 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
16039 (symbol_list_prepend, get_type_name): Move to...
16040 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
16041 (symbol_list_prepend, symbol_list_n_type_name_get): here.
16042 Adjust all callers.
16043 (symbol_list_free): New.
16044 * src/scan-gram.l (handle_dollar): Takes a location.
16045 * tests/input.at (Invalid $n): Adjust.
16046
1e0bab92
AD
160472002-06-17 Akim Demaille <akim@epita.fr>
16048
16049 * src/reader.h, src/reader.c (symbol_list_new): Export it.
16050 (symbol_list_prepend): New.
16051 * src/parse-gram.y (%union): `list' is a new member.
16052 (symbols.1): New, replaces...
16053 (terms_to_prec.1, nterms_to_type.1): these.
16054 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
16055 Take a location as additional argument.
16056 Adjust all callers.
16057
04e60654
AD
160582002-06-15 Akim Demaille <akim@epita.fr>
16059
16060 * src/parse-gram.y: Move %token in the declaration section so that
16061 we don't depend upon CVS Bison.
16062
10e5b8bd
AD
160632002-06-15 Akim Demaille <akim@epita.fr>
16064
16065 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
16066 * src/print.c (print_core): Use it.
16067
9801d40c
AD
160682002-06-15 Akim Demaille <akim@epita.fr>
16069
16070 * src/conflicts.c (log_resolution): Accept the rule involved in
16071 the sr conflicts instead of the lookahead number that points to
16072 that rule.
16073 (flush_reduce): Accept the current lookahead vector as argument,
16074 instead of the index in LA.
16075 (resolve_sr_conflict): Accept the current number of lookahead
16076 bitset to consider for the STATE, instead of the index in LA.
16077 (set_conflicts): Adjust.
16078 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
16079
c0263492
AD
160802002-06-15 Akim Demaille <akim@epita.fr>
16081
16082 * src/state.h (state_t): Replace the `lookaheadsp' member, a
16083 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
16084 Adjust all dependencies.
16085 * src/lalr.c (initialize_lookaheads): Split into...
16086 (states_lookaheads_count, states_lookaheads_initialize): these.
16087 (lalr): Adjust.
16088
9757c359
AD
160892002-06-15 Akim Demaille <akim@epita.fr>
16090
16091 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
16092 out of...
16093 (grammar_rules_print): here.
16094 * src/reduce.c (reduce_output): Use it.
16095 * tests/reduce.at (Useless Rules, Reduced Automaton)
16096 (Underivable Rules): Adjust.
16097
6b98e4b5
AD
160982002-06-15 Akim Demaille <akim@epita.fr>
16099
16100 Copy BYacc's nice way to report the grammar.
16101
16102 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
16103 New.
16104 Don't print the rules' location, it is confusing and useless.
16105 (rule_print): Use grammar_rhs_print.
16106 * src/print.c (print_grammar): Use grammar_rules_print.
16107
6b98e4b5
AD
161082002-06-15 Akim Demaille <akim@epita.fr>
16109
16110 Complete and rationalize `useless thing' warnings.
16111
16112 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
16113 (symbol_tag_print): New.
16114 Use them everywhere in place of accessing directly the tag member.
16115 * src/gram.h, src/gram.c (rule_print): New.
16116 Use it where a rule used to be printed `by hand'.
16117 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
16118 (reduce_grammar_tables): Report the useless rules.
16119 (reduce_print): Useless things are a warning, not an error.
16120 Report it as such.
16121 * tests/reduce.at (Useless Nonterminals, Useless Rules):
16122 (Reduced Automaton, Underivable Rules): Adjust.
16123 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
16124 * tests/conflicts.at (Unresolved SR Conflicts)
16125 (Solved SR Conflicts): Adjust.
16126
ee000ba4
AD
161272002-06-15 Akim Demaille <akim@epita.fr>
16128
16129 Let symbols have a location.
16130
16131 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
16132 (getsym): Adjust.
16133 Adjust all callers.
16134 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
16135 Use location_t, not int.
16136 * src/symtab.c (symbol_check_defined): Take advantage of the
16137 location.
16138 * tests/regression.at (Invalid inputs): Adjust.
16139
8efe435c
AD
161402002-06-15 Akim Demaille <akim@epita.fr>
16141
16142 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
16143 (input): Don't try to initialize yylloc here, do it in the
16144 scanner.
16145 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
16146 * src/gram.h (rule_t): Change line and action_line into location
16147 and action_location, of location_t type.
16148 Adjust all dependencies.
16149 * src/location.h, src/location.c (empty_location): New.
16150 * src/reader.h, src/reader.c (grammar_start_symbol_set)
16151 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
16152 (grammar_current_rule_symbol_append)
16153 (grammar_current_rule_action_append): Expect a location as argument.
16154 * src/reader.c (grammar_midrule_action): Adjust to attach an
16155 action's location as dummy symbol location.
16156 * src/symtab.h, src/symtab.c (startsymbol_location): New.
16157 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
16158 the line numbers.
16159
1921f1d7
AD
161602002-06-14 Akim Demaille <akim@epita.fr>
16161
16162 Grammar declarations may be found in the grammar section.
16163
16164 * src/parse-gram.y (rules_or_grammar_declaration): New.
16165 (declarations): Each declaration may end with a semicolon, not
16166 just...
16167 (grammar_declaration): `"%union"'.
16168 (grammar): Branch to rules_or_grammar_declaration.
16169
4515534c
AD
161702002-06-14 Akim Demaille <akim@epita.fr>
16171
16172 * src/main.c (main): Invoke scanner_free.
16173
f958596b
AD
161742002-06-14 Akim Demaille <akim@epita.fr>
16175
16176 * src/output.c (m4_invoke): Extracted from...
16177 (output_skeleton): here.
16178 Free tempfile.
16179
2c569025
AD
161802002-06-14 Akim Demaille <akim@epita.fr>
16181
16182 * src/parse-gram.y (directives, directive, gram)
16183 (grammar_directives, precedence_directives, precedence_directive):
16184 Rename as...
16185 (declarations, declaration, grammar, grammar_declaration)
16186 (precedence_declaration, precedence_declarator): these.
16187 (symbol_declaration): New.
16188
592e8d4d
AD
161892002-06-14 Akim Demaille <akim@epita.fr>
16190
16191 * src/files.c (action_obstack): Remove, unused.
16192 (output_obstack): Remove it, and all its dependencies, as it is no
16193 longer needed.
16194 * src/reader.c (epilogue_set): Build the epilogue in the
16195 muscle_obstack.
16196 * src/output.h, src/output.c (muscle_obstack): Move to...
16197 * src/muscle_tab.h, src/muscle_tab.h: here.
16198 (muscle_init): Initialize muscle_obstack.
16199 (muscle_free): New.
16200 * src/main.c (main): Call it.
16201
0c15323d
AD
162022002-06-14 Akim Demaille <akim@epita.fr>
16203
16204 * src/location.h: New, extracted from...
16205 * src/reader.h: here.
16206 * src/Makefile.am (noinst_HEADERS): Merge into
16207 (bison_SOURCES): this.
16208 Add location.h.
16209 * src/parse-gram.y: Use location_t instead of Bison's.
16210 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
16211 Use location_t instead of ints.
16212
e96c9728
AD
162132002-06-14 Akim Demaille <akim@epita.fr>
16214
16215 * data/bison.simple, data/bison.c++: Be sure to restore the
16216 current #line when returning to the skeleton contents after having
16217 exposed the input file's #line.
16218
75d1fe16
AD
162192002-06-12 Akim Demaille <akim@epita.fr>
16220
16221 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
16222 eager.
16223 * tests/actions.at (Exotic Dollars): New.
16224
6c35d22c
AD
162252002-06-12 Akim Demaille <akim@epita.fr>
16226
16227 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
16228 ['"/] too eagerly.
16229 * tests/input.at (Torturing the Scanner): New.
16230
1d6412ad
AD
162312002-06-11 Akim Demaille <akim@epita.fr>
16232
16233 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
16234 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
16235 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
16236 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
16237 * src/reader.c (reader): Use it.
16238
4cdb01db
AD
162392002-06-11 Akim Demaille <akim@epita.fr>
16240
16241 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
16242 Adjust all callers.
16243 (scanner_last_string_free): New.
16244
44995b2e
AD
162452002-06-11 Akim Demaille <akim@epita.fr>
16246
16247 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
16248 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
16249 (last_string, YY_OBS_FREE): New.
16250 Use them when returning an ID.
16251
e9955c83
AD
162522002-06-11 Akim Demaille <akim@epita.fr>
16253
16254 Have Bison grammars parsed by a Bison grammar.
16255
16256 * src/reader.c, src/reader.h (prologue_augment): New.
16257 * src/reader.c (copy_definition): Remove.
16258
16259 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
16260 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
16261 (grammar_current_rule_prec_set, grammar_current_rule_check)
16262 (grammar_current_rule_symbol_append)
16263 (grammar_current_rule_action_append): Export.
16264 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
16265 (symbol_list_action_append): Remove.
16266 Hook the routines from reader.
16267 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
16268 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
16269
16270 * src/reader.c (read_declarations): Remove, unused.
16271
16272 * src/parse-gram.y: Handle the epilogue.
16273 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
16274 (grammar_start_symbol_set): this.
16275 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
16276 * src/reader.c (readgram): Remove, unused.
16277 (reader): Adjust to insert eoftoken and axiom where appropriate.
16278
16279 * src/reader.c (copy_dollar): Replace with...
16280 * src/scan-gram.h (handle_dollar): this.
16281 * src/parse-gram.y: Remove `%thong'.
16282
16283 * src/reader.c (copy_at): Replace with...
16284 * src/scan-gram.h (handle_at): this.
16285
16286 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
16287 New.
16288
16289 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
16290 time being.
16291
16292 * src/reader.h, src/reader.c (grammar_rule_end): New.
16293
16294 * src/parse.y (current_type, current_class): New.
16295 Implement `%nterm', `%token' support.
16296 Merge `%term' into `%token'.
16297 (string_as_id): New.
16298 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
16299 type name.
16300
16301 * src/parse-gram.y: Be sure to handle properly the beginning of
16302 rules.
16303
16304 * src/parse-gram.y: Handle %type.
16305 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
16306
16307 * src/parse-gram.y: More directives support.
16308 * src/options.c: No longer handle source directives.
16309
16310 * src/parse-gram.y: Fix %output.
16311
16312 * src/parse-gram.y: Handle %union.
16313 Use the prologue locations.
16314 * src/reader.c (parse_union_decl): Remove.
16315
16316 * src/reader.h, src/reader.c (epilogue_set): New.
16317 * src/parse-gram.y: Use it.
16318
16319 * data/bison.simple, data/bison.c++: b4_stype is now either not
16320 defined, then default to int, or to the contents of %union,
16321 without `union' itself.
16322 Adjust.
16323 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
16324
16325 * src/output.c (actions_output): Don't output braces, as they are
16326 already handled by the scanner.
16327
16328 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
16329 characters to themselves.
16330
16331 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
16332 that the epilogue has a proper #line.
16333
16334 * src/parse-gram.y: Handle precedence/associativity.
16335
16336 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
16337 a terminal.
16338 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
16339 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
16340 at all to define terminals that cannot be emitted.
16341
16342 * src/scan-gram.l: Escape M4 characters.
16343
16344 * src/scan-gram.l: Working properly with escapes in user
16345 strings/characters.
16346
16347 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
16348 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
16349 grammar.
16350 Use more modest sizes, as for the time being the parser does not
16351 release memory, and therefore the process swallows a huge amount
16352 of memory.
16353
16354 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
16355 stricter %token grammar.
16356
16357 * src/symtab.h (associativity): Add `undef_assoc'.
16358 (symbol_precedence_set): Do nothing when passed an undef_assoc.
16359 * src/symtab.c (symbol_check_alias_consistence): Adjust.
16360
16361 * tests/regression.at (Invalid %directive): Remove, as it is now
16362 meaningless.
16363 (Invalid inputs): Adjust to the new error messages.
16364 (Token definitions): The new grammar doesn't allow too many
16365 eccentricities.
16366
16367 * src/lex.h, src/lex.c: Remove.
16368 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
16369 (copy_character, copy_string2, copy_string, copy_identifier)
16370 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
16371 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
16372 (parse_action): Remove.
16373 * po/POTFILES.in: Adjust.
16374
2e047461
AD
163752002-06-11 Akim Demaille <akim@epita.fr>
16376
cd05d13c 16377 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
16378 rule's action member: return the action as a string.
16379 Don't require `rule_length' as an argument: compute it.
16380 (grammar_current_rule_symbol_append)
16381 (grammar_current_rule_action_append): New, eved out from
16382 (readgram): here.
16383 Remove `action_flag', `rulelength', unused now.
16384
9af3fbce
AD
163852002-06-11 Akim Demaille <akim@epita.fr>
16386
16387 * src/reader.c (grammar_current_rule_prec_set).
16388 (grammar_current_rule_check): New, eved out from...
16389 (readgram): here.
16390 Remove `xaction', `first_rhs': useless.
16391 * tests/input.at (Type clashes): New.
16392 * tests/existing.at (GNU Cim Grammar): Adjust.
16393
1485e106
AD
163942002-06-11 Akim Demaille <akim@epita.fr>
16395
16396 * src/reader.c (grammar_midrule_action): New, Eved out from
16397 (readgram): here.
16398
da4160c3
AD
163992002-06-11 Akim Demaille <akim@epita.fr>
16400
16401 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
16402 New.
16403 (readgram): Use them as replacement of inlined code, crule and
16404 crule1.
16405
f6d0f937
AD
164062002-06-11 Akim Demaille <akim@epita.fr>
16407
16408 * src/reader.c (grammar_end, grammar_symbol_append): New.
16409 (readgram): Use them.
16410 Make the use of `p' as local as possible.
16411
69078d4b
AD
164122002-06-10 Akim Demaille <akim@epita.fr>
16413
16414 GCJ's parser requires the tokens to be defined before the prologue.
16415
16416 * data/bison.simple: Output the token definition before the user's
16417 prologue.
16418 * tests/regression.at (Braces parsing, Duplicate string)
16419 (Mixing %token styles): Check the output from bison.
16420 (Early token definitions): New.
16421
5e424082
AD
164222002-06-10 Akim Demaille <akim@epita.fr>
16423
16424 * src/symtab.c (symbol_user_token_number_set): Don't complain when
16425 assigning twice the same user number to a token, so that we can
16426 use it in...
16427 * src/lex.c (lex): here.
16428 Also use `symbol_class_set' instead of hand written code.
16429 * src/reader.c (parse_assoc_decl): Likewise.
16430
44536b35
AD
164312002-06-10 Akim Demaille <akim@epita.fr>
16432
16433 * src/symtab.c, src/symtab.c (symbol_class_set)
16434 (symbol_user_token_number_set): New.
16435 * src/reader.c (parse_token_decl): Use them.
16436 Use a switch instead of ifs.
16437 Use a single argument.
16438
8b9f2372
AD
164392002-06-10 Akim Demaille <akim@epita.fr>
16440
16441 Remove `%thong' support as it is undocumented, unused, duplicates
16442 `%token's job, and creates useless e-mail traffic with people who
16443 want to know what it is, why it is undocumented, unused, and
16444 duplicates `%token's job.
16445
16446 * src/reader.c (parse_thong_decl): Remove.
16447 * src/options.c (option_table): Remove "thong".
16448 * src/lex.h (tok_thong): Remove.
16449
3ae2b51f
AD
164502002-06-10 Akim Demaille <akim@epita.fr>
16451
16452 * src/symtab.c, src/symtab.c (symbol_type_set)
16453 (symbol_precedence_set): New.
16454 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
16455 (value_components_used): Remove, unused.
16456
2f1afb73
AD
164572002-06-09 Akim Demaille <akim@epita.fr>
16458
16459 Move symbols handling code out of the reader.
16460
16461 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
16462 (axiom): Move to...
16463 * src/symtab.h, src/symtab.c: here.
16464
16465 * src/gram.c (start_symbol): Remove: use startsymbol->number.
16466 * src/reader.c (startval): Rename as...
16467 * src/symtab.h, src/symtab.c (startsymbol): this.
16468 * src/reader.c: Adjust.
16469
16470 * src/reader.c (symbol_check_defined, symbol_make_alias)
16471 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
16472 (token_translations_init)
16473 Move to...
16474 * src/symtab.c: here.
16475 * src/reader.c (packsymbols): Move to...
16476 * src/symtab.h, src/symtab.c (symbols_pack): here.
16477 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
16478 argument.
16479
e9bca3ad
AD
164802002-06-03 Akim Demaille <akim@epita.fr>
16481
16482 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
16483 then statements.
16484
86eff183
AD
164852002-06-03 Akim Demaille <akim@epita.fr>
16486
16487 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
16488 structs with non literals.
16489 * src/scan-skel.l: never-interactive.
16490 * src/conflicts.c (enum conflict_resolution_e): No trailing
16491 comma.
16492 * src/getargs.c (usage): Split long literal strings.
16493 Reported by Hans Aberg.
16494
717be197
AD
164952002-05-28 Akim Demaille <akim@epita.fr>
16496
16497 * data/bison.c++: Use C++ ostreams.
16498 (cdebug_): New member.
16499
670ddffd
AD
165002002-05-28 Akim Demaille <akim@epita.fr>
16501
16502 * src/output.c (output_skeleton): Be sure to allocate enough room
16503 for `/' _and_ for `\0' in full_skeleton.
16504
769b430f
AD
165052002-05-28 Akim Demaille <akim@epita.fr>
16506
16507 * data/bison.c++: Catch up with bison.simple:
16508 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16509 and Paul Eggert <eggert@twinsun.com>: `error' handing.
16510 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
16511 and popping traces.
16512
7067cb36
PH
165132002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16514
16515 * src/output.c (output_skeleton): Put an explicit path in front of
16516 the skeleton file name, rather than relying on the -I directory,
16517 to partially alleviate effects of having a skeleton file lying around
16518 in the current directory.
769b430f 16519
4a713ec2
PH
165202002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16521
769b430f 16522 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
16523 obstack_printf should be obstack_fgrow1.
16524
b408954b
AD
165252002-05-26 Akim Demaille <akim@epita.fr>
16526
16527 * src/state.h (state_t): `solved_conflicts' is a new member.
16528 * src/LR0.c (new_state): Set it to 0.
16529 * src/conflicts.h, src/conflicts.c (print_conflicts)
16530 (free_conflicts, solve_conflicts): Rename as...
16531 (conflicts_print, conflicts_free, conflicts_solve): these.
16532 Adjust callers.
16533 * src/conflicts.c (enum conflict_resolution_e)
16534 (solved_conflicts_obstack): New, used by...
16535 (log_resolution): this.
16536 Adjust to attach the conflict resolution to each state.
16537 Complete the description with the precedence/associativity
16538 information.
16539 (resolve_sr_conflict): Adjust.
16540 * src/print.c (print_state): Output its solved_conflicts.
16541 * tests/conflicts.at (Unresolved SR Conflicts)
16542 (Solved SR Conflicts): Exercise --report=all.
16543
a49aecd5
AD
165442002-05-26 Akim Demaille <akim@epita.fr>
16545
16546 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16547 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
16548 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
16549 (token_number_t, item_number_as_token_number)
16550 (token_number_as_item_number, muscle_insert_token_number_table):
16551 Rename as...
16552 (symbol_number_t, item_number_as_symbol_number)
16553 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
16554 these, since it is more appropriate.
16555
5504898e
AD
165562002-05-26 Akim Demaille <akim@epita.fr>
16557
16558 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
16559 `Error:' lines.
16560 * data/bison.simple (yystos) [YYDEBUG]: New.
16561 (yyparse) [YYDEBUG]: Display the symbols which are popped during
16562 error recovery.
16563 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
16564
ec3bc396
AD
165652002-05-25 Akim Demaille <akim@epita.fr>
16566
16567 * doc/bison.texinfo (Debugging): Split into...
16568 (Tracing): this new section, its former contents, and...
16569 (Understanding): this new section.
16570 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
16571 by...
16572 (report_flag): this.
16573 Adjust all dependencies.
16574 (report_args, report_types, report_argmatch): New.
16575 (usage, getargs): Report/support -r, --report.
16576 * src/options.h
16577 (struct option_table_struct): Rename as..,
16578 (struct option_table_s): this.
16579 Rename the `set_flag' member to `flag' to match with getopt_long's
16580 struct.
16581 * src/options.c (option_table): Split verbose into an entry for
16582 %verbose, and another for --verbose.
16583 Support --report/-r, so remove -r from the obsolete --raw.
16584 * src/print.c: Attach full item sets and lookaheads reports to
16585 report_flag instead of trace_flag.
16586 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
16587
78df8250
PE
165882002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16589 and Paul Eggert <eggert@twinsun.com>
769b430f 16590
78df8250
PE
16591 * data/bison.simple (yyparse): Correct error handling to conform to
16592 POSIX and yacc. Specifically, after syntax error is discovered,
16593 do not reduce further before shifting the error token.
16594 Clean up the code a bit by removing the labels yyerrdefault,
16595 yyerrhandle, yyerrpop.
16596 * NEWS: Document the above.
16597
c0c9ea05
PH
165982002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16599
16600 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
16601 type; it isn't always big enough, since it doesn't necessarily
16602 include non-terminals.
769b430f 16603 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
16604 the latter can be removed.
16605 (yy_token_number_type): Remove, only one use.
16606 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
16607 don't use TokenNumberType as element type.
769b430f 16608
c0c9ea05
PH
16609 * tests/regression.at: Modify expected output to agree with change
16610 to yyr1 and yytranslate.
769b430f 16611
6390a83f
FK
166122002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
16613
16614 * src/reader.c (parse_action): Use copy_character instead of
16615 obstack_1grow.
16616
db7c8e9a
AD
166172002-05-13 Akim Demaille <akim@epita.fr>
16618
16619 * tests/regression.at (Token definitions): Prototype yylex and
16620 yyerror.
16621
fcc61800
PH
166222002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16623
158c687b 16624 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
16625 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
16626 32-bit arithmetic.
16627 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
16628
5683e9b2
AD
166292002-05-07 Akim Demaille <akim@epita.fr>
16630
16631 * tests/synclines.at: Be sure to prototype yylex and yyerror to
16632 avoid GCC warnings.
16633
0c2d3f4c
AD
166342002-05-07 Akim Demaille <akim@epita.fr>
16635
16636 Kill GCC warnings.
16637
16638 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
16639 over the RHS of each rule.
16640 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
16641 * src/state.h (state_t): Member `nitems' is unsigned short.
16642 * src/LR0.c (get_state): Adjust.
16643 * src/reader.c (packgram): Likewise.
16644 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
16645 `Type'.
16646 (muscle_insert_int_table): Remove, unused.
16647 (prepare_rules): Remove `max'.
16648
1565b720
AD
166492002-05-06 Akim Demaille <akim@epita.fr>
16650
16651 * src/closure.c (print_firsts): Display of the symbol tags.
16652 (bitmatrix_print): Move to...
16653 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
16654 here.
16655 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
16656
cfaee611
AD
166572002-05-06 Akim Demaille <akim@epita.fr>
16658
16659 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
16660 hash_do_for_each.
16661
458be8e0
AD
166622002-05-06 Akim Demaille <akim@epita.fr>
16663
16664 * src/LR0.c (new_state, get_state): Instead of using the global
16665 `kernel_size' and `kernel_base', have two new arguments:
16666 `core_size' and `core'.
16667 Adjust callers.
16668
a900a624
AD
166692002-05-06 Akim Demaille <akim@epita.fr>
16670
16671 * src/reader.c (packgram): No longer end `ritem' with a 0
16672 sentinel: it is not used.
16673
d4e7d3a1
AD
166742002-05-05 Akim Demaille <akim@epita.fr>
16675
16676 New experimental feature: display the lookaheads in the report and
16677 graph.
16678
16679 * src/print (print_core): When --trace-flag, display the rules
16680 lookaheads.
16681 * src/print_graph.c (print_core): Likewise.
16682 Swap the arguments.
16683 Adjust caller.
16684
39ceb25b
AD
166852002-05-05 Akim Demaille <akim@epita.fr>
16686
16687 * tests/torture.at (Many lookaheads): New test.
16688
5372019f
AD
166892002-05-05 Akim Demaille <akim@epita.fr>
16690
16691 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
16692 (GENERATE_MUSCLE_INSERT_TABLE): this.
16693 (output_int_table, output_unsigned_int_table, output_short_table)
16694 (output_token_number_table, output_item_number_table): Replace with...
16695 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
16696 (muscle_insert_short_table, muscle_insert_token_number_table)
16697 (muscle_insert_item_number_table): these.
16698 Adjust all callers.
16699 (prepare_tokens): Don't free `translations', since...
16700 * src/reader.h, src/reader.c (grammar_free): do it.
16701 Move to...
16702 * src/gram.h, src/gram.c (grammar_free): here.
16703 * data/bison.simple, data/bison.c++: b4_token_number_max is now
16704 b4_translate_max.
16705
5df5f6d5
AD
167062002-05-05 Akim Demaille <akim@epita.fr>
16707
16708 * src/output.c (output_unsigned_int_table): New.
16709 (prepare_rules): `i' is unsigned.
16710 `prhs', `rline', `r2' are unsigned int.
16711 Rename muscle `rhs_number_max' as `rhs_max'.
16712 Output muscles `prhs_max', `rline_max', and `r2_max'.
16713 Free rline and r1.
16714 * data/bison.simple, data/bison.c++: Adjust to use these muscles
16715 to compute types instead of constant types.
16716 * tests/regression.at (Web2c Actions): Adjust.
16717
b87f8b21
AD
167182002-05-04 Akim Demaille <akim@epita.fr>
16719
16720 * src/symtab.h (SALIAS, SUNDEF): Rename as...
16721 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
16722 Adjust dependencies.
16723 * src/output.c (token_definitions_output): Be sure not to output a
16724 `#define 'a'' when fed with `%token 'a' "a"'.
16725 * tests/regression.at (Token definitions): New.
16726
8bb936e4
PE
167272002-05-03 Paul Eggert <eggert@twinsun.com>
16728
16729 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
16730 for K&R C.
16731
167322002-05-03 gettextize <bug-gnu-gettext@gnu.org>
16733
16734 * Makefile.am (SUBDIRS): Remove intl.
16735 (EXTRA_DIST): Add config/config.rpath.
16736
53c71a12
AD
167372002-05-03 Akim Demaille <akim@epita.fr>
16738
16739 * data/bison.simple (m4_if): Don't output empty enums.
16740 And actually, output valid enum definitions :(.
16741
289dd0cf
AD
167422002-05-03 Akim Demaille <akim@epita.fr>
16743
16744 * configure.bat: Remove, completely obsolete.
16745 * Makefile.am (EXTRA_DIST): Adjust.
16746 Don't distribute config.rpath...
16747 * config/Makefile.am (EXTRA_DIST): Do it.
16748
db85e524
AD
167492002-05-03 Akim Demaille <akim@epita.fr>
16750
16751 * configure.in (GETTEXT_VERSION): New.
16752 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
16753
83ccf991
AD
167542002-05-03 Akim Demaille <akim@epita.fr>
16755
16756 * data/bison.simple (b4_token_enum): New.
16757 (b4_token_defines): Use it to output tokens both as #define and
16758 enums.
16759 Suggested by Paul Eggert.
16760 * src/output.c (token_definitions_output): Don't output spurious
16761 white spaces.
16762
1f418995
AD
167632002-05-03 Akim Demaille <akim@epita.fr>
16764
16765 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
16766
45119f04
RA
167672002-05-02 Robert Anisko <robert@lrde.epita.fr>
16768
16769 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
16770 Update the stack class, give a try to deque as the default container.
16771
b2d52318
AD
167722002-05-02 Akim Demaille <akim@epita.fr>
16773
16774 * data/bison.simple (yyparse): Do not implement @$ = @1.
16775 (YYLLOC_DEFAULT): Adjust to do it.
16776 * doc/bison.texinfo (Location Default Action): Fix.
16777
3a8b4109
AD
167782002-05-02 Akim Demaille <akim@epita.fr>
16779
16780 * src/reader.c (parse_braces): Merge into...
16781 (parse_action): this.
16782
84614e13
AD
167832002-05-02 Akim Demaille <akim@epita.fr>
16784
16785 * configure.in (ALL_LINGUAS): Remove.
16786 * po/LINGUAS, hr.po: New.
16787
fdbcd8e2
AD
167882002-05-02 Akim Demaille <akim@epita.fr>
16789
16790 Remove the so called hairy (semantic) parsers.
16791
16792 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
16793 * src/gram.h, src/gram.c (semantic_parser): Remove.
16794 (rule_t): Remove the guard and guard_line members.
16795 * src/lex.h (token_t): remove tok_guard.
16796 * src/options.c (option_table): Remove %guard and %semantic_parser
16797 support.
16798 * src/output.c, src/output.h (guards_output): Remove.
16799 (prepare): Adjust.
16800 (token_definitions_output): Don't output the `T'
16801 tokens (???).
16802 (output_skeleton): Don't output the guards.
16803 * src/files.c, src/files.c (attrsfile): Remove.
16804 * src/reader.c (symbol_list): Remove the guard and guard_line
16805 members.
16806 Adjust dependencies.
16807 (parse_guard): Remove.
16808 * data/bison.hairy: Remove.
16809 * doc/bison.texinfo (Environment Variables): Remove occurrences of
16810 BISON_HAIRY.
16811
82b6cb3f
AD
168122002-05-02 Akim Demaille <akim@epita.fr>
16813
16814 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
16815 (parse_guard): Rename the formal argument `stack_offset' as
16816 `rule_length', which is more readable.
16817 Adjust callers.
16818 (copy_at, copy_dollar): Instead of outputting the hard coded
16819 values of $$, $n and so forth, output invocation to b4_lhs_value,
16820 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
16821 Note: this patch partially drops `semantic-parser' support: it
16822 always does `rule_length - n', where semantic parsers ought to
16823 always use `-n'.
82b6cb3f
AD
16824 * data/bison.simple, data/bison.c++ (b4_lhs_value)
16825 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
16826
6cbfbcc5
AD
168272002-05-02 Akim Demaille <akim@epita.fr>
16828
16829 * configure.in (AC_INIT): Bump to 1.49b.
16830 (AM_INIT_AUTOMAKE): Short invocation.
16831
b8548114
AD
168322002-05-02 Akim Demaille <akim@epita.fr>
16833
16834 Version 1.49a.
16835
c20cd1fa
AD
168362002-05-01 Akim Demaille <akim@epita.fr>
16837
16838 * src/skeleton.h: Remove.
16839
8a9566d4
AD
168402002-05-01 Akim Demaille <akim@epita.fr>
16841
16842 * src/skeleton.h: Fix the #endif.
16843 Reported by Magnus Fromreide.
16844
8c6d399a
PE
168452002-04-26 Paul Eggert <eggert@twinsun.com>
16846
16847 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
16848 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 16849 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 16850
2b7ed18a
RA
168512002-04-25 Robert Anisko <robert@lrde.epita.fr>
16852
16853 * src/scan-skel.l: Postprocess quadrigraphs.
16854
16855 * src/reader.c (copy_character): New function, used to output
16856 single characters while replacing `[' and `]' with quadrigraphs, to
16857 avoid troubles with M4 quotes.
16858 (copy_comment): Output characters with copy_character.
16859 (read_additionnal_code): Likewise.
16860 (copy_string2): Likewise.
16861 (copy_definition): Likewise.
16862
16863 * tests/calc.at: Exercise M4 quoting.
16864
34a89c50
AD
168652002-04-25 Akim Demaille <akim@epita.fr>
16866
16867 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
16868 between `!' and the command.
16869 Reported by Paul Eggert.
16870
0dd1580a
RA
168712002-04-24 Robert Anisko <robert@lrde.epita.fr>
16872
16873 * tests/calc.at: Exercise prologue splitting.
16874
16875 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
16876 `b4_post_prologue' instead of `b4_prologue'.
16877
16878 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
16879 muscles.
16880 (output): Free pre_prologue_obstack and post_prologue_obstack.
16881 * src/files.h, src/files.c (attrs_obstack): Remove.
16882 (pre_prologue_obstack, post_prologue_obstack): New.
16883 * src/reader.c (copy_definition): Add a parameter to specify the
16884 obstack to fill, instead of using attrs_obstack unconditionally.
16885 (read_declarations): Pass pre_prologue_obstack to copy_definition if
16886 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
16887
83c1796f
PE
168882002-04-23 Paul Eggert <eggert@twinsun.com>
16889
16890 * data/bison.simple: Remove unnecessary commentary and white
16891 space differences from 1_29-branch.
16892 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
16893
16894 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
16895 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
16896 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
16897 constructors or destructors.
16898
16899 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
16900
1207eeac
AD
169012002-04-23 Akim Demaille <akim@epita.fr>
16902
16903 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
16904 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
16905 location with columns.
16906 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
16907 All reported by Paul Eggert.
16908
78ab8f67
AD
169092002-04-22 Akim Demaille <akim@epita.fr>
16910
16911 * src/reduce.c (dump_grammar): Move to...
16912 * src/gram.h, src/gram.c (grammar_dump): here.
16913 Be sure to separate long item numbers.
16914 Don't read the members of a rule's prec if its nil.
16915
133c20e2
AD
169162002-04-22 Akim Demaille <akim@epita.fr>
16917
16918 * src/output.c (table_size, table_grow): New.
16919 (MAXTABLE): Remove, replace uses with table_size.
16920 (pack_vector): Instead of dying when the table is too big, grow it.
16921
9515e8a7
AD
169222002-04-22 Akim Demaille <akim@epita.fr>
16923
16924 * data/bison.simple (yyr1): Its type is that of a token number.
16925 * data/bison.c++ (r1_): Likewise.
16926 * tests/regression.at (Web2c Actions): Adjust.
16927
23c5a174
AD
169282002-04-22 Akim Demaille <akim@epita.fr>
16929
16930 * src/reader.c (token_translations_init): 256 is now the default
16931 value for the error token, i.e., it will be assigned another
16932 number if the user assigned 256 to one of her tokens.
16933 (reader): Don't force 256 to error.
16934 * doc/bison.texinfo (Symbols): Adjust.
16935 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
16936 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
16937 etc. instead of 10, 20, 30 (which was used to `jump' over error
16938 (256) and undefined (2)).
16939
5fbb0954
AD
169402002-04-22 Akim Demaille <akim@epita.fr>
16941
16942 Propagate more token_number_t.
16943
16944 * src/gram.h (token_number_as_item_number)
16945 (item_number_as_token_number): New.
16946 * src/output.c (GENERATE_OUTPUT_TABLE): New.
16947 Use it to create output_item_number_table and
16948 output_token_number_table.
16949 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
16950 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
16951 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
16952 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
16953
4f940944
AD
169542002-04-22 Akim Demaille <akim@epita.fr>
16955
16956 * src/output.h, src/output.c (get_lines_number): Remove.
16957
3ded9a63
AD
169582002-04-19 Akim Demaille <akim@epita.fr>
16959
16960 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
16961 as Lex/Flex'.
16962 (Debugging): More details about enabling the debugging features.
16963 (Table of Symbols): Describe $$, $n, @$, and @n.
16964 Suggested by Tim Josling.
16965
e0c471a9
AD
169662002-04-19 Akim Demaille <akim@epita.fr>
16967
16968 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
16969
fecc10cd
AD
169702002-04-10 Akim Demaille <akim@epita.fr>
16971
16972 * src/system.h: Rely on HAVE_LIMITS_H.
16973 Suggested by Paul Eggert.
16974
51dec47b
AD
169752002-04-09 Akim Demaille <akim@epita.fr>
16976
16977 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
16978 full stderr, and strip it according to the bison options, instead
16979 of composing the error message from different bits.
16980 This makes it easier to check for several error messages.
16981 Adjust all the invocations.
16982 Add an invocation exercising the error token.
16983 Add an invocation demonstrating a stupid error message.
16984 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
16985 Adjust the tests.
16986 Error message are for stderr, not stdout.
16987
007a50a4
AD
169882002-04-09 Akim Demaille <akim@epita.fr>
16989
16990 * src/gram.h, src/gram.c (error_token_number): Remove, use
16991 errtoken->number.
16992 * src/reader.c (reader): Don't specify the user token number (2)
16993 for $undefined, as it uselessly prevents using it.
16994 * src/gram.h (token_number_t): Move to...
16995 * src/symtab.h: here.
16996 (state_t.number): Is a token_number_t.
16997 * src/print.c, src/reader.c: Use undeftoken->number instead of
16998 hard coded 2.
16999 (Even though this 2 is not the same as above: the number of the
17000 undeftoken remains being 2, it is its user token number which
17001 might not be 2).
17002 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
17003 `user_token_number_max'.
17004 Output `undef_token_number'.
17005 * data/bison.simple, data/bison.c++: Use them.
17006 Be sure to map invalid yylex return values to
17007 `undef_token_number'. This saves us from gratuitous SEGV.
17008
17009 * tests/conflicts.at (Solved SR Conflicts)
17010 (Unresolved SR Conflicts): Adjust.
17011 * tests/regression.at (Web2c Actions): Adjust.
17012
06446ccf
AD
170132002-04-08 Akim Demaille <akim@epita.fr>
17014
17015 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
17016 Adding #line.
17017 Remove the duplicate `typedefs'.
17018 (RhsNumberType): Fix the declaration and various other typos.
17019 Use __ofile__.
17020 * data/bison.simple: Use __ofile__.
17021 * src/scan-skel.l: Handle __ofile__.
17022
62a3e4f0
AD
170232002-04-08 Akim Demaille <akim@epita.fr>
17024
17025 * src/gram.h (item_number_t): New, the type of item numbers in
17026 RITEM. Note that it must be able to code symbol numbers as
17027 positive number, and the negation of rule numbers as negative
17028 numbers.
17029 Adjust all dependencies (pretty many).
17030 * src/reduce.c (rule): Remove this `short *' pointer: use
17031 item_number_t.
17032 * src/system.h (MINSHORT, MAXSHORT): Remove.
17033 Include `limits.h'.
17034 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
17035 (shortcpy): Remove.
17036 (MAXTABLE): Move to...
17037 * src/output.c (MAXTABLE): here.
17038 (prepare_rules): Use output_int_table to output rhs.
17039 * data/bison.simple, data/bison.c++: Adjust.
17040 * tests/torture.at (Big triangle): Move the limit from 254 to
17041 500.
17042 * tests/regression.at (Web2c Actions): Ajust.
17043
17044 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
17045 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
17046 passes, but produces negative #line number, once fixed, GCC is
17047 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
17048 C), it passes.
17049 * src/state.h (state_h): Code input lines on ints, not shorts.
17050
bb88b0fc
AD
170512002-04-08 Akim Demaille <akim@epita.fr>
17052
17053 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
17054 and then the grammar.
17055
9a636f47
AD
170562002-04-08 Akim Demaille <akim@epita.fr>
17057
17058 * src/system.h: No longer using strndup.
17059
680e8701
AD
170602002-04-07 Akim Demaille <akim@epita.fr>
17061
17062 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
17063 * src/output.c (output_table_data): Return the longest number.
17064 (prepare_tokens): Output `token_number_max').
17065 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
17066 New.
17067 Use them to define yy_token_number_type/TokenNumberType.
17068 Use this type for yytranslate.
17069 * tests/torture.at (Big triangle): Push the limit from 124 to
17070 253.
17071 * tests/regression.at (Web2c Actions): Adjust.
17072
817e9f41
AD
170732002-04-07 Akim Demaille <akim@epita.fr>
17074
17075 * tests/torture.at (Big triangle): New.
17076 (GNU AWK Grammar, GNU Cim Grammar): Move to...
17077 * tests/existing.at: here.
17078
5123689b
AD
170792002-04-07 Akim Demaille <akim@epita.fr>
17080
17081 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
17082 nritems.
17083 Adjust dependencies.
17084
f3849179
AD
170852002-04-07 Akim Demaille <akim@epita.fr>
17086
17087 * src/reader.c: Normalize increments to prefix form.
17088
bd02036a
AD
170892002-04-07 Akim Demaille <akim@epita.fr>
17090
17091 * src/reader.c, symtab.c: Remove debugging code.
17092
db8837cb
AD
170932002-04-07 Akim Demaille <akim@epita.fr>
17094
17095 Rename all the `bucket's as `symbol_t'.
17096
17097 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
17098 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
17099 * src/symtab.c, src/symtab.h (bucket): Rename as...
17100 (symbol_t): this.
17101 (symbol_list_new, bucket_check_defined, bucket_make_alias)
17102 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
17103 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17104 (buckets_new, buckets_free, buckets_do): Rename as...
17105 (symbol_list_new, symbol_check_defined, symbol_make_alias)
17106 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
17107 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
17108 (symbols_new, symbols_free, symbols_do): these.
17109
72a23c97
AD
171102002-04-07 Akim Demaille <akim@epita.fr>
17111
17112 Use lib/hash for the symbol table.
17113
17114 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
17115 EOF.
17116 * src/lex.c (lex): Set the `number' member of new terminals.
17117 * src/reader.c (bucket_check_defined, bucket_make_alias)
17118 (bucket_check_alias_consistence, bucket_translation): New.
17119 (reader, grammar_free, readgram, token_translations_init)
17120 (packsymbols): Adjust.
17121 (reader): Number the predefined tokens.
17122 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
17123 for predefined tokens.
17124 * src/symtab.h (bucket): Remove all the hash table related
17125 members.
17126 * src/symtab.c (symtab): Replace by...
17127 (bucket_table): this.
17128 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
17129 (buckets_new, buckets_do): New.
17130
280a38c3
AD
171312002-04-07 Akim Demaille <akim@epita.fr>
17132
17133 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
17134 (start_symbol, max_user_token_number, semantic_parser)
17135 (error_token_number): Initialize.
17136 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
17137 Initialize.
17138 (reader): Don't.
17139 (errtoken, eoftoken, undeftoken, axiom): Extern.
17140
03b31c0c
AD
171412002-04-07 Akim Demaille <akim@epita.fr>
17142
17143 * src/gram.h (rule_s): prec and precsym are now pointers
17144 to the bucket giving the priority/associativity.
17145 Member `associativity' removed: useless.
17146 * src/reduce.c, src/conflicts.c: Adjust.
17147
8b3df748
AD
171482002-04-07 Akim Demaille <akim@epita.fr>
17149
17150 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
17151 Properly escape the symbols' TAG when outputting them.
17152
e601aa1d
AD
171532002-04-07 Akim Demaille <akim@epita.fr>
17154
17155 * src/lalr.h (LA): Is a bitsetv, not bitset*.
17156
b0299a2e
AD
171572002-04-07 Akim Demaille <akim@epita.fr>
17158
17159 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
17160 (LArule): this, which is an array to rule_t*.
17161 * src/print.c, src/conflicts.c: Adjust.
17162
d7e1f00c
AD
171632002-04-07 Akim Demaille <akim@epita.fr>
17164
17165 * src/gram.h (rule_t): Rename `number' as `user_number'.
17166 `number' is a new member.
17167 Adjust dependencies.
17168 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
17169
cc9305dd
AD
171702002-04-07 Akim Demaille <akim@epita.fr>
17171
17172 As a result of the previous patch, it is no longer needed
17173 to reorder ritem itself.
17174
17175 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
17176
b0940840
AD
171772002-04-07 Akim Demaille <akim@epita.fr>
17178
17179 Be sure never to walk through RITEMS, but use only data related to
17180 the rules themselves. RITEMS should be banished.
17181
17182 * src/output.c (output_token_translations): Rename as...
17183 (prepare_tokens): this.
17184 In addition to `translate', prepare the muscles `tname' and
17185 `toknum', which were handled by...
17186 (output_rule_data): this.
17187 Remove, and move the remainder of its outputs into...
17188 (prepare_rules): this new routines, which also merges content from
17189 (output_gram): this.
17190 (prepare_rules): Be sure never to walk through RITEMS.
17191 (output_stos): Rename as...
17192 (prepare_stos): this.
17193 (output): Always invoke prepare_states, after all, just don't use it
17194 in the output if you don't need it.
17195
643a5994
AD
171962002-04-07 Akim Demaille <akim@epita.fr>
17197
17198 * src/LR0.c (new_state): Display `nstates' as the name of the
17199 newly created state.
17200 Adjust to initialize first_state and last_state if needed.
17201 Be sure to distinguish the initial from the final state.
17202 (new_states): Create the itemset of the initial state, and use
17203 new_state.
17204 * src/closure.c (closure): Now that the initial state has its
17205 items properly set, there is no need for a special case when
17206 creating `ruleset'.
17207
17208 As a result, now the rule 0, reducing to $axiom, is visible in the
17209 outputs. Adjust the test suite.
17210
17211 * tests/conflicts.at (Solved SR Conflicts)
17212 (Unresolved SR Conflicts): Adjust.
17213 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
17214 * tests/conflicts.at (S/R in initial): New.
17215
b4c4ccc2
AD
172162002-04-07 Akim Demaille <akim@epita.fr>
17217
17218 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
17219 the RHS of the rules.
17220 * src/output.c (output_gram): Likewise.
17221
bba97eb2
AD
172222002-04-07 Akim Demaille <akim@epita.fr>
17223
17224 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
17225 bucket.
17226 Adjust all dependencies.
17227 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
17228 `number' of the buckets too.
17229 * src/gram.h: Include `symtab.h'.
17230 (associativity): Move to...
17231 * src/symtab.h: here.
17232 No longer include `gram.h'.
17233
c3b407f4
AD
172342002-04-07 Akim Demaille <akim@epita.fr>
17235
17236 * src/gram.h, src/gram.c (rules_rhs_length): New.
17237 (ritem_longest_rhs): Use it.
17238 * src/gram.h (rule_t): `number' is a new member.
17239 * src/reader.c (packgram): Set it.
17240 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
17241 the end of `rules', and count them out of `nrules'.
17242 (reduce_output, dump_grammar): Adjust.
17243 * src/print.c (print_grammar): It is no longer needed to check for
17244 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
17245 * tests/reduce.at (Reduced Automaton): New test.
17246
11652ab3
AD
172472002-04-07 Akim Demaille <akim@epita.fr>
17248
17249 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
17250 lacking `+ 1' to nrules, Bison reported as useless a token if it
17251 was used solely to set the precedence of the last rule...
17252
26b23c1a
AD
172532002-04-07 Akim Demaille <akim@epita.fr>
17254
17255 * data/bison.c++, data/bison.simple: Don't output the current file
17256 name in #line, to avoid useless diffs between two identical
17257 outputs under different names.
17258
18bcecb0
AD
172592002-04-07 Akim Demaille <akim@epita.fr>
17260
17261 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
17262 Normalize loops to using `< nrules + 1', not `<= nrules'.
17263
fa770c86
AD
172642002-04-07 Akim Demaille <akim@epita.fr>
17265
17266 * TODO: Update.
17267
d9b739c3
AD
172682002-04-07 Akim Demaille <akim@epita.fr>
17269
17270 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
17271 bucket.value as bucket.number.
17272
99013900
AD
172732002-04-07 Akim Demaille <akim@epita.fr>
17274
17275 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
17276 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
17277 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
17278 RHS, instead of being an index in RITEMS.
17279
e966383b
PE
172802002-04-04 Paul Eggert <eggert@twinsun.com>
17281
17282 * doc/bison.texinfo: Update copyright date.
17283 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
17284 (Symbols): Warn about running Bison in one character set,
17285 but compiling and/or running in an incompatible one.
17286 Warn about character code 256, too.
17287
172882002-04-03 Paul Eggert <eggert@twinsun.com>
17289
17290 * src/bison.data (YYSTACK_ALLOC): Depend on whether
17291 YYERROR_VERBOSE is nonzero, not whether it is defined.
17292
17293 Merge changes from bison-1_29-branch.
c307773e 17294
8d6c48b9
PE
172952002-03-20 Paul Eggert <eggert@twinsun.com>
17296
17297 Merge fixes from Debian bison_1.34-1.diff.
17298
17299 * configure.in (AC_PREREQ): 2.53.
17300
e53c6322
AD
173012002-03-20 Akim Demaille <akim@epita.fr>
17302
17303 * src/conflicts.c (log_resolution): Argument `resolution' is const.
17304
9ffbeca7
PE
173052002-03-19 Paul Eggert <eggert@twinsun.com>
17306
21db0b2a
PE
17307 * src/bison.simple (YYCOPY): New macro.
17308 (YYSTACK_RELOCATE): Use it.
17309 Remove Type arg; no longer needed. All callers changed.
17310 (yymemcpy): Remove; no longer needed.
17311
9ffbeca7
PE
17312 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
17313 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
17314
642cb8f8
AD
173152002-03-19 Akim Demaille <akim@epita.fr>
17316
17317 Test and fix the #line outputs.
17318
17319 * tests/atlocal.at (GCC): New.
17320 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 17321 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
17322 (Action synch line, Epilogue synch line): New tests.
17323 * src/reader.c (parse_union_decl): Define the muscle stype_line.
17324 * data/bison.simple, data/bison.c++: Use it.
17325
3c31a486
AD
173262002-03-19 Akim Demaille <akim@epita.fr>
17327
17328 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
17329 (Solved SR Conflicts, %expect not enough, %expect right)
17330 (%expect too much): Move to...
17331 * tests/conflicts.at: this new file.
17332
0d8bed56
AD
173332002-03-19 Akim Demaille <akim@epita.fr>
17334
17335 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
17336 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
17337 that we can move to enums for instance.
17338 * src/output.c (token_definitions_output): Output a list of
17339 `token-name, token-number' instead of the #define.
17340 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
17341
9208d17f
AD
173422002-03-14 Akim Demaille <akim@epita.fr>
17343
17344 Use Gettext 0.11.1.
17345
af27eacb
RA
173462002-03-09 Robert Anisko <robert@lrde.epita.fr>
17347
17348 * data/bison.c++: Make the user able to add members to the generated
17349 parser by subclassing.
17350
9101a310
RA
173512002-03-05 Robert Anisko <robert@lrde.epita.fr>
17352
17353 * src/reader.c (read_additionnal_code): `c' should be an integer, not
17354 a character.
17355 Reported by Nicolas Tisserand and Nicolas Burrus.
17356
fff9bf0b
RA
173572002-03-04 Robert Anisko <robert@lrde.epita.fr>
17358
17359 * src/reader.c: Warn about lacking semi-colons, do not complain.
17360
64dba31e
RA
173612002-03-04 Robert Anisko <robert@lrde.epita.fr>
17362
17363 * data/bison.c++: Remove a debug line.
17364
374f5a14
RA
173652002-03-04 Robert Anisko <robert@lrde.epita.fr>
17366
17367 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
17368 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
17369 provide a default implementation.
17370
bfcf1f3a
AD
173712002-03-04 Akim Demaille <akim@epita.fr>
17372
17373 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
17374 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
17375 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
17376 * tests/semantic.at (Parsing Guards): Similarly.
17377 * src/reader.at (readgram): Complain if the last rule is not ended
17378 with a semi-colon.
17379
65ccf9fc
AD
173802002-03-04 Akim Demaille <akim@epita.fr>
17381
17382 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
17383 * src/closure.c: here.
17384 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
17385 RTC.
17386 * src/warshall.h, src/warshall.c: Remove.
17387 * tests/sets.at (Broken Closure): Adjust.
17388
d0039cbc
AD
173892002-03-04 Akim Demaille <akim@epita.fr>
17390
17391 * src/output.c (output_skeleton): tempdir is const.
17392 bytes_read is unused.
17393
345cea78
AD
173942002-03-04 Akim Demaille <akim@epita.fr>
17395
17396 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17397 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
17398 Update.
17399 From Michael Hayes.
17400
564801f7
AD
174012002-03-04 Akim Demaille <akim@epita.fr>
17402
17403 * src/closure.c (closure): `r' is unused.
17404
e5352bc7
AD
174052002-03-04 Akim Demaille <akim@epita.fr>
17406
17407 * tests/sets.at (Broken Closure): Add the ending `;'.
17408 * src/reader.at (readgram): Complain if a rule is not ended with a
17409 semi-colon.
17410
914feea9
AD
174112002-03-04 Akim Demaille <akim@epita.fr>
17412
17413 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
17414 (count_sr_conflicts): Use bitset_count.
17415 * src/reduce.c (inaccessable_symbols): Ditto.
17416 (bits_size): Remove.
17417 * src/warshall.h, src/warshall.c: Convert to bitsetv.
17418
f0250de6
AD
174192002-03-04 Akim Demaille <akim@epita.fr>
17420
17421 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
17422 * src/reduce.c: Remove the `bitset_zero's following the
17423 `bitset_create's, as now it is performed by the latter.
17424
ef017502
AD
174252002-03-04 Akim Demaille <akim@epita.fr>
17426
17427 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
17428 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
17429 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
17430 latest sources from Michael.
17431
76514394
AD
174322002-03-04 Akim Demaille <akim@epita.fr>
17433
17434 * src/output.c (output): Don't free the grammar.
17435 * src/reader.c (grammar_free): New.
17436 * src/main.c (main): Call it and don't free symtab here.
17437
55024580
AD
174382002-03-04 Akim Demaille <akim@epita.fr>
17439
17440 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
17441 before returning.
17442 Reported by Benoit Perrot.
17443
f9abaa2c
AD
174442002-03-04 Akim Demaille <akim@epita.fr>
17445
17446 Use bitset operations when possible, not loops over bits.
17447
17448 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
17449 bitset_or.
17450 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
17451 * src/reduce.c (useless_nonterminals): Formatting changes.
17452 * src/warshall.c (TC): Use bitset_or.
17453
0e721e75
AD
174542002-03-04 Akim Demaille <akim@epita.fr>
17455
17456 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
17457 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
17458 Ditto.
17459
0fb1ffb1
AD
174602002-03-04 Akim Demaille <akim@epita.fr>
17461
17462 * src/lalr.c (F): Now a bitset*.
17463 Adjust all dependencies.
17464
b86796bf
AD
174652002-03-04 Akim Demaille <akim@epita.fr>
17466
17467 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
17468 Adjust all dependencies.
17469
602bbf31
AD
174702002-03-04 Akim Demaille <akim@epita.fr>
17471
17472 * src/L0.c, src/LR0.h (nstates): Be size_t.
17473 Adjust comparisons (signed vs unsigned).
17474 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
17475 bitset*.
17476 Adjust all dependencies.
17477
d8a0245c
AD
174782002-03-04 Akim Demaille <akim@epita.fr>
17479
17480 * src/closure.c (firsts): Now, also a bitset.
17481 Adjust all dependencies.
17482 (varsetsize): Remove, now unused.
17483 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
17484
34ba9743
AD
174852002-03-04 Akim Demaille <akim@epita.fr>
17486
17487 * src/print.c: Convert to use bitset.h, not hand coded iterations
17488 over ints.
17489
ed86e78c
AD
174902002-03-04 Akim Demaille <akim@epita.fr>
17491
17492 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
17493
dfdb1797
AD
174942002-03-04 Akim Demaille <akim@epita.fr>
17495
17496 * src/closure.c (ruleset): Be a bitset.
17497 (rulesetsize): Remove.
17498
7086e707
AD
174992002-03-04 Akim Demaille <akim@epita.fr>
17500
17501 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
17502 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
17503 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
17504 * src/closure.c (fderives): Be an array of bitsets.
17505
98254360
RA
175062002-02-28 Robert Anisko <robert@lrde.epita.fr>
17507
17508 * data/bison.c++: Merge the two generated headers. Insert a copyright
17509 notice in each output file.
17510
a75c057f
AD
175112002-02-28 Akim Demaille <akim@epita.fr>
17512
17513 * data/bison.c++: Copy the prologue of bison.simple to fetch
17514 useful M4 definitions, such as b4_header_guard.
17515
06b00abc
AD
175162002-02-25 Akim Demaille <akim@epita.fr>
17517
17518 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
17519 translator friendly scheme for the bgr
17520 copyright notice.
06b00abc 17521
70e7d534
AD
175222002-02-25 Akim Demaille <akim@epita.fr>
17523
17524 * src/output.c (header_output): Remove, now handled completely via
17525 M4.
17526
abe017f6
AD
175272002-02-25 Akim Demaille <akim@epita.fr>
17528
17529 * m4/m4.m4: New, from CVS Autoconf.
17530 * configure.in: Invoke it.
17531 * src/output.c (output_skeleton): Use its result instead of the
17532 hard coded name.
17533
381fb12e
AD
175342002-02-25 Akim Demaille <akim@epita.fr>
17535
17536 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
17537 Fileutils 4.1.5.
17538 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
17539 * src/output.c (output_skeleton): Use mkstemp to create a real
17540 temporary file.
17541 Move the filling of `skeleton' and its muscle to...
17542 (prepare): here.
17543 (output): Move the definition of the prologue muscle to...
17544 (prepare): here.
17545 * src/system.h (DEFAULT_TMPDIR): New.
17546
6f38107f
PE
175472002-02-14 Paul Eggert <eggert@twinsun.com>
17548
17549 Remove the support for C++ namespace cleanliness; it was
17550 causing more problems than it was curing, since it didn't work
17551 properly on some nonstandard C++ compilers. This can wait
17552 for a proper C++ parser.
17553
17554 * NEWS: Document this.
17555 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
17556 of C++, as it's treated like C now.
17557 * src/bison.simple (YYSTD): Remove.
17558 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
17559 Treat C++ just like Standard C instead of trying to support
17560 namespace cleanliness.
17561
80cce3da
AD
175622002-02-14 Akim Demaille <akim@epita.fr>
17563
17564 * tests/regression.at (else): Adjust to Andreas' change.
17565
842e8679
AD
175662002-02-14 Akim Demaille <akim@epita.fr>
17567
17568 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
17569
4bda3f10
AD
175702002-02-13 Andreas Schwab <schwab@suse.de>
17571
17572 * src/output.c (output_rule_data): Don't output NULL, it might
17573 not be defined yet.
17574
4162fa07 175752002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 17576
4162fa07
RA
17577 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
17578 (Copyright notice): Update.
b418ecd8 17579
bd16a5dc
AD
175802002-02-11 Akim Demaille <akim@epita.fr>
17581
17582 * tests/regression.at (%nonassoc and eof): Don't include
17583 nonportable headers.
17584
8d69a1a3
RA
175852002-02-08 Robert Anisko <robert@lrde.epita.fr>
17586
17587 * data/bison.c++: Correct error recovery. Make the user able to
17588 initialize the starting location.
17589
9b2d0677
AD
175902002-02-07 Akim Demaille <akim@epita.fr>
17591
17592 * tests/input.at: New.
17593
69e2658b
RA
175942002-02-07 Robert Anisko <robert@lrde.epita.fr>
17595
17596 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 17597 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
17598 directives around tables only needed for debugging.
17599
4aacc3a7
RA
176002002-02-07 Robert Anisko <robert@lrde.epita.fr>
17601
17602 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
17603 C++ parsers.
17604 (yy::b4_name::parse): Use print_.
17605
762a801e
RA
176062002-02-07 Robert Anisko <robert@lrde.epita.fr>
17607
17608 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
17609
4bb2bc3f
RA
176102002-02-07 Robert Anisko <robert@lrde.epita.fr>
17611
17612 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
17613 C++ parsers.
17614 (yy::b4_name::parse): Build verbose error messages, and use error_.
17615
6b45a3ca
RA
176162002-02-06 Robert Anisko <robert@lrde.epita.fr>
17617
17618 * data/bison.c++: Fix m4 quoting in comments.
17619
50997c6e
RA
176202002-02-06 Robert Anisko <robert@lrde.epita.fr>
17621
17622 * data/bison.c++: Adjust the parser code. Fix some muscles that were
17623 not expanded by m4.
17624
3f3eed27
AD
176252002-02-05 Akim Demaille <akim@epita.fr>
17626
17627 * data/bison.c++: Adjust to the M4 back end.
17628 More is certainly needed.
17629
be2a1a68
AD
176302002-02-05 Akim Demaille <akim@epita.fr>
17631
17632 Give a try to M4 as a back end.
17633
17634 * lib/readpipe.c: New, from wdiff.
17635 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
17636 BISON_HAIRY.
17637 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
17638 specific values. Now it is m4 that performs the lookup.
17639 * src/parse-skel.y: Remove.
17640 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
17641 * src/output.c (actions_output, guards_output)
17642 (token_definitions_output): No longer keeps track of the output
17643 line number, hence remove the second argument.
17644 (guards_output): Check against the guard member of a rule, not the
17645 action member.
17646 Adjust callers.
17647 (output_skeleton): Don't look for the skeleton location, let m4 do
17648 that.
17649 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
17650 file will be used.
17651 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
17652 (prepare): Given that for the time being changesyntax is not
17653 usable in M4, rename the muscles using `-' to `_'.
17654 Define `defines_flag', `output_parser_name' and `output_header_name'.
17655 * src/output.h (actions_output, guards_output)
17656 (token_definitions_output): Adjust prototypes.
17657 * src/scan-skel.l: Instead of scanning the skeletons, it now
17658 processes the output of m4: `__oline__' and `#output'.
17659 * data/bison.simple: Adjust to be used by M4(sugar).
17660 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
17661 to date.
17662 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
17663 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
17664 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
17665 shamelessly stolen from CVS Autoconf.
17666
beda758b
AD
176672002-02-05 Akim Demaille <akim@epita.fr>
17668
17669 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
17670 * configure.in: Check for the declarations of free and malloc.
17671 * src/muscle_tab.c: Adjust.
17672
5ece6d43
AD
176732002-02-05 Akim Demaille <akim@epita.fr>
17674
17675 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
17676 which have no values.
17677
5bb18f9a
AD
176782002-02-05 Akim Demaille <akim@epita.fr>
17679
17680 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
17681 * data/: here.
17682
894dd62e
PE
176832002-01-29 Paul Eggert <eggert@twinsun.com>
17684
17685 * src/bison.simple (YYSIZE_T): Do not define merely because
17686 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
17687 On some platforms, <alloca.h> does not declare YYSTD (size_t).
17688
82841af7
AD
176892002-01-27 Akim Demaille <akim@epita.fr>
17690
17691 Fix `%nonassoc and eof'.
17692
17693 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
17694 which were not properly copied! Replace
17695 memcpy (res->errs, src->errs, src->nerrs);
17696 with
17697 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
17698 !!!
17699 * tests/regression.at (%nonassoc and eof): Adjust to newest
17700 Autotest: `.' is not in the PATH.
17701
318b76e9
AD
177022002-01-27 Akim Demaille <akim@epita.fr>
17703
17704 * tests/sets.at (AT_EXTRACT_SETS): New.
17705 (Nullable): Use it.
17706 (Firsts): New.
17707
30d2f3d5
AD
177082002-01-26 Akim Demaille <akim@epita.fr>
17709
17710 * tests/actions.at, tests/calc.at, tests/headers.at,
17711 * tests/torture.at: Adjust to the newest Autotest which no longer
17712 forces `.' in the PATH.
17713
30f8c395
AD
177142002-01-25 Akim Demaille <akim@epita.fr>
17715
17716 * tests/regression.at (%nonassoc and eof): New.
17717 Suggested by Robert Anisko.
17718
29ae55f1
AD
177192002-01-24 Akim Demaille <akim@epita.fr>
17720
17721 Bison dumps core when trying to complain about broken input files.
17722 Reported by Cris van Pelt.
17723
17724 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
17725 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
17726 into...
17727 (Invalid inputs): Strengthen: exercise parse_percent_token.
17728
2b548aa6
RA
177292002-01-24 Robert Anisko <robert.anisko@epita.fr>
17730
17731 * src/Makefile.am: Add bison.c++.
17732 * src/bison.c++: New skeleton.
17733
bb0146c2
AD
177342002-01-21 Paolo Bonzini <bonzini@gnu.org>
17735
17736 * po/it.po: New.
17737
bec30531
AD
177382002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
17739
17740 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
17741
fc6edc45
MA
177422002-01-20 Marc Autret <marc@gnu.org>
17743
17744 * src/files.c (compute_output_file_names): Fix
17745
5e5d5415
MA
177462002-01-20 Marc Autret <marc@gnu.org>
17747
17748 * tests/output.at: New test.
17749 * src/files.c (compute_base_names): Don't map extensions when
17750 the YACC flag is set, use defaults.
17751 Reported by Evgeny Stambulchik.
17752
44ea3fbd
MA
177532002-01-20 Marc Autret <marc@gnu.org>
17754
ba0fe3c7
PE
17755 * src/system.h: Need to define __attribute__ away for non-GCC
17756 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
17757 Suggested by Albert Chin-A-Young.
17758
338963d1
TVH
177592002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
17760
17761 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
17762 canonical definition.
17763 * src/system.h: Use the canonical definition for PARAMS (avoids
17764 a conflict with the macro from lib/hash.h).
17765
c57b2479
AD
177662002-01-11 Akim Demaille <akim@epita.fr>
17767
17768 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 17769 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 17770
b85810ae
AD
177712002-01-09 Akim Demaille <akim@epita.fr>
17772
17773 * src/files.c, src/files.h (output_infix): New.
17774 (tab_extension): Remove.
17775 (compute_base_names): Compute the former, drop the latter.
17776 * src/output.c (prepare): Insert the muscles `output-infix', and
17777 `output-suffix'.
17778 * src/parse-skel.y (string, string.1): New.
17779 (section.header): Use it.
17780 (section.yacc): Remove.
17781 (prefix): Remove too.
17782 * src/scan-skel.l: Adjust.
17783 * src/bison.simple, src/bison.hairy: Adjust.
17784
cae60122
AD
177852002-01-09 Akim Demaille <akim@epita.fr>
17786
17787 * configure.in (WERROR_CFLAGS): Compute it.
17788 * src/Makefile.am (CFLAGS): Pass it.
17789 * tests/atlocal.in (CFLAGS): Idem.
17790 * src/files.c: Fix a few warnings.
17791 (get_extension_index): Remove, unused.
17792
ae404801
AD
177932002-01-08 Akim Demaille <akim@epita.fr>
17794
17795 * src/getargs.c (AS_FILE_NAME): New.
17796 (getargs): Use it to convert DOSish file names.
17797 * src/files.c (base_name): Rename as full_base_name to avoid
17798 clashes with `base_name ()'.
17799 (filename_split): New.
17800 (compute_base_names): N-th rewrite, using filename_split.
17801
22312b71
AD
178022002-01-08 Akim Demaille <akim@epita.fr>
17803
17804 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
17805 New, stolen from the Fileutils 4.1.
17806 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
17807 * configure.in: Check for the presence of memrchr, and of its
17808 prototype.
17809
a67cef01
TVH
178102002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
17811
17812 * lib/hash.h (__P): Added definition for this macro.
17813 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
17814 BUILT_SOURCES, to ensure they are generated first.
17815 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
17816 %error-verbose to allow bootstrapping with bison 1.30x.
17817
2b25d624
AD
178182002-01-06 Akim Demaille <akim@epita.fr>
17819
17820 * src/reader.c (parse_braces): Don't fetch the next char, the
17821 convention is to fetch on entry.
17822 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
17823 'switch' without a following semicolon.
17824 * tests/regression.at (braces parsing): New.
17825
3460813b
AD
178262002-01-06 Akim Demaille <akim@epita.fr>
17827
17828 Bison is dead wrong in its RR conflict reports.
17829
17830 * tests/torture.at (GNU Cim Grammar): New.
17831 * src/conflicts.c (count_rr_conflicts): Fix.
17832
73784c64
AD
178332002-01-06 Akim Demaille <akim@epita.fr>
17834
17835 Creating package.m4 from configure.ac causes too many problems.
17836
17837 * tests/Makefile.am (package.m4): Create it by hand,
17838 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
17839
25d81090
AD
178402002-01-06 Akim Demaille <akim@epita.fr>
17841
17842 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
17843 skeleton.h.
17844
a9b8959e
PE
178452002-01-04 Paul Eggert <eggert@twinsun.com>
17846
17847 * doc/bison.texinfo (Debugging):
17848 Remove YYSTDERR; it's no longer defined or used.
17849 Also, s/cstdio.h/cstdio/.
17850
25d81090
AD
178512002-01-03 Akim Demaille <akim@epita.fr>
17852
17853 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
17854
1109455c
AD
178552002-01-03 Akim Demaille <akim@epita.fr>
17856
17857 * src/parse-skel.y (process_skeleton): Don't bind the parser's
17858 tracing code to --trace, wait for a better --trace option, with
17859 args.
17860
7ea5e977
AD
178612002-01-03 Akim Demaille <akim@epita.fr>
17862
17863 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
17864 The ISO C++ standard is extremely clear about it: stderr is
17865 considered a macro, not a regular symbol (see table 94 `Header
17866 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
17867 Therefore std:: does not apply to it. It still does with fprintf.
17868 Also, s/cstdio.h/cstdio/.
17869
fab5b110
AD
178702002-01-03 Akim Demaille <akim@epita.fr>
17871
17872 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
17873 for non system headers.
17874
aed7fd9b
AD
178752002-01-02 Akim Demaille <akim@epita.fr>
17876
17877 Equip the skeleton chain with location tracking, runtime trace,
17878 pure parser and scanner.
17879
17880 * src/parse-skel.y: Request a pure parser, locations, and prefix
17881 renaming.
17882 (%union): Having several members with the same type does not help
17883 type mismatches, simplify.
17884 (YYPRINT, yyprint): New.
17885 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
17886 (skel_error): this.
17887 Handle locations.
17888 * src/scan-skel.l: Adjust to these changes.
17889 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
17890 (LOCATION_PRINT, skel_control_t): New.
17891
24fad99e
AD
178922001-12-30 Akim Demaille <akim@epita.fr>
17893
17894 * src/parse-skel.y: Get rid of the shift/reduce conflict:
17895 replace `gb' with BLANKS.
17896 * src/scan-skel.l: Adjust.
17897
a4b36db4
AD
178982001-12-30 Akim Demaille <akim@epita.fr>
17899
17900 * src/system.h: We don't need nor want bcopy.
17901 Throw away MS-DOS crap: we don't need getpid.
17902 * configure.in: We don't need strndup. It was even causing
17903 problems: because Flex includes the headers *before* us,
17904 _GNU_SOURCE is not defined by config.h, and therefore strndup was
17905 not visible.
17906 * lib/xstrndup.c: New.
17907 * src/scan-skel.l: Use it.
17908 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
17909 * src/parse-skel.y: Use %directives instead of #defines.
17910
1239777d
AD
179112001-12-30 Akim Demaille <akim@epita.fr>
17912
17913 * src/skeleton.h: New.
17914 * src/output.c (output_parser, output_master_parser): Remove, dead
17915 code.
17916 * src/output.h (get_lines_number, actions_output, guards_output)
17917 (token_definitions_output): Prototype them.
17918 * src/parse-skel.y: Add the license notice.
17919 Include output.h and skeleton.h.
17920 (process_skeleton): Returns void, and takes a single parameter.
17921 * src/scan-skel.l: Add the license notice.
17922 Include skeleton.h.
17923 Don't use %option yylineno: it seems that then Flex imagines
17924 REJECT has been used, and therefore it won't reallocate its
17925 buffers (which makes no other sense to me than a bug). It results
17926 in warnings for `unused: yy_flex_realloc'.
17927
9b3add5b
RA
179282001-12-30 Robert Anisko <robert.anisko@epita.fr>
17929
17930 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17931 (MUSCLE_INSERT_PREFIX): ...to there.
17932 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
17933 (MUSCLE_INSERT_PREFIX): Move from here...
17934
17935 * src/bison.hairy: Add a section directive. Put braces around muscle
17936 names. This parser skeleton is still broken, but Bison should not
17937 choke on a bad muscle 'syntax'.
17938 * src/bison.simple: Add a section directive. Put braces around muscle
17939 names.
17940
17941 * src/files.h (strsuffix, stringappend): Add declarations.
17942 (tab_extension): Add declaration.
17943 (short_base_name): Add declaration.
17944
17945 * src/files.c (strsuffix, stringappend): No longer static. These
17946 functions are used in the skeleton parser.
17947 (tab_extension): New.
17948 (compute_base_names): Use the computations done in this function
fab5b110 17949 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
17950 names.
17951 (short_base_name): No longer static.
17952
17953 * src/output.c (output_skeleton): New.
17954 (output): Disable call to output_master_parser, and give a try to
17955 a new skeleton handling system.
17956 (guards_output, actions_output): No longer static.
17957 (token_definitions_output, get_lines_number): No longer static.
17958
17959 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
17960
fab5b110 17961 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
17962 parse-skel.y.
17963
17964 * src/parse-skel.y: New file.
17965 * src/scan-skel.l: New file.
17966
b5b61c61
AD
179672001-12-29 Akim Demaille <akim@epita.fr>
17968
17969 %name-prefix is broken.
17970
17971 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
17972 Adjust all dependencies.
17973 * tests/headers.at (export YYLTYPE): Strengthen this test: use
17974 %name-prefix.
17975
17976 Renaming yylval but not yylloc is not consistent. Now we do.
17977
17978 * src/bison.simple: Prefix yylloc if used.
17979 * doc/bison.texinfo (Decl Summary): Document that.
17980
8c9a50be
AD
179812001-12-29 Akim Demaille <akim@epita.fr>
17982
17983 * doc/bison.texinfo: Promote `%long-directive' over
17984 `%long_directive'.
17985 Remove all references to fixed-output-files, yacc is enough.
17986
d99361e6
AD
179872001-12-29 Akim Demaille <akim@epita.fr>
17988
17989 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
17990 user prologue. These are defaults.
17991 * tests/actions.at (Mid-rule actions): Make sure the user can
17992 define YYDEBUG and YYERROR_VERBOSE.
17993
b9cecb91
AD
179942001-12-29 Akim Demaille <akim@epita.fr>
17995
17996 * src/output.c (header_output): Don't forget to export YYLTYPE and
17997 yylloc.
17998 * tests/headers.at (export YYLTYPE): New, make sure it does.
17999 * tests/regression.at (%union and --defines, Invalid CPP headers):
18000 Move to...
18001 * tests/headers.at: here.
18002
aea13e97
AD
180032001-12-29 Akim Demaille <akim@epita.fr>
18004
18005 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
18006
931394cb
AD
180072001-12-29 Akim Demaille <akim@epita.fr>
18008
18009 * tests/actions.at (Mid-rule actions): Output on a single line
18010 instead of several.
18011
704a47c4
AD
180122001-12-29 Akim Demaille <akim@epita.fr>
18013
18014 * doc/bison.texinfo: Formatting changes.
18015
091e20bb
AD
180162001-12-29 Akim Demaille <akim@epita.fr>
18017
18018 Don't store the token defs in a muscle, just be ready to output it
18019 on command. Now possible via `symbols'. Fixes a memory leak.
18020
18021 * src/output.c (token_definitions_output): New.
18022 (output_parser, header_output): Use it.
18023 * src/reader.c (symbols_save): Remove.
18024
cce71710
AD
180252001-12-29 Akim Demaille <akim@epita.fr>
18026
18027 * src/bison.simple: Do not provide a default for YYSTYPE and
18028 YYLTYPE before the user's prologue. Otherwise it's hardly... a
18029 default.
18030
82c035a8
AD
180312001-12-29 Akim Demaille <akim@epita.fr>
18032
18033 Mid-rule actions are simply... ignored!
18034
18035 * src/reader.c (readgram): Be sure to attach mid-rule actions to
18036 the empty-rule associated to the dummy symbol, not to the host
18037 rule.
18038 * tests/actions.at (Mid-rule actions): New.
18039
8419d367
AD
180402001-12-29 Akim Demaille <akim@epita.fr>
18041
18042 Memory leak.
18043
18044 * src/reader.c (reader): Free grammar.
18045
375d5806
AD
180462001-12-29 Akim Demaille <akim@epita.fr>
18047
18048 Memory leak.
18049
18050 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
18051 since it allocates it for each state, although only one is needed.
18052 (allocate_storage): Do it here.
18053
f51cb8ff
AD
180542001-12-29 Akim Demaille <akim@epita.fr>
18055
18056 * src/options.h, src/options.c (create_long_option_table): Rename
18057 as...
18058 (long_option_table_new): this, with a clearer prototype.
18059 (percent_table): Remove, unused,
18060 * src/getargs.c (getargs): Adjust.
18061
29e88316
AD
180622001-12-29 Akim Demaille <akim@epita.fr>
18063
18064 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
18065 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
18066 as states.
18067
b9f71f19
AD
180682001-12-29 Akim Demaille <akim@epita.fr>
18069
18070 * src/lalr.c (build_relations): Rename `states' as `states1'.
18071 Sorry, I don't understand exactly what it is, no better name...
18072
1a2b5d37
AD
180732001-12-29 Akim Demaille <akim@epita.fr>
18074
18075 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
18076 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
18077 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
18078 as rules.
18079
1cca533e
AD
180802001-12-29 Akim Demaille <akim@epita.fr>
18081
18082 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
18083 ago.
18084
c03ae966
AD
180852001-12-29 Akim Demaille <akim@epita.fr>
18086
18087 * src/reader.c, src/reader.h (user_toknums): Remove.
18088 Adjust all users to use symbols[i]->user_token_number.
18089
5a670b1e
AD
180902001-12-29 Akim Demaille <akim@epita.fr>
18091
18092 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
18093 Adjust all users to use symbols[i]->prec or ->assoc.
18094
ad949da9
AD
180952001-12-29 Akim Demaille <akim@epita.fr>
18096
18097 * src/reader.c, src/reader.h (tags): Remove.
18098 Adjust all users to use symbols[i]->tag.
18099
0e78e603
AD
181002001-12-29 Akim Demaille <akim@epita.fr>
18101
18102 * src/gram.h, src/gram.c (symbols): New, similar to state_table
18103 and rule_table.
18104 * src/reader.c (packsymbols): Fill this table.
18105 Drop sprec.
18106 * src/conflicts.c (resolve_sr_conflict): Adjust.
18107 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
18108 single table.
18109 Use symbols[i]->tag instead of tags[i].
18110
213e640e
AD
181112001-12-29 Akim Demaille <akim@epita.fr>
18112
18113 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
18114 In addition, put a comment in there, to replace...
18115 * tests/regression.at (%union and C comments): Remove.
18116
e7b8bef1
AD
181172001-12-29 Akim Demaille <akim@epita.fr>
18118
18119 * tests/regression.at (Web2c Actions): Blindly move the actual
18120 output as expected output. The contents *seem* right to me, but I
18121 can't pretend reading perfectly parser tables... Nonetheless, all
18122 the other tests pass correctly, the table look OK, even though the
18123 presence of `$axiom' is to be noted: AFAICS it is useless (but
18124 harmless).
18125
b68e7744
AD
181262001-12-29 Akim Demaille <akim@epita.fr>
18127
18128 * src/reader.c (readgram): Don't add the rule 0 if there were no
18129 rules read. In other words, add it _after_ having performed
18130 grammar sanity checks.
18131 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
18132
78d5bae9
AD
181332001-12-29 Akim Demaille <akim@epita.fr>
18134
18135 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
18136 visible, and some states have now a different number.
18137
ff442794
AD
181382001-12-29 Akim Demaille <akim@epita.fr>
18139
18140 * src/reader.c (readgram): Bind the initial rule's lineno to that
18141 of the first rule.
18142 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
18143 (Solved SR Conflicts): Adjust rule 0's line number.
18144
610ab194
AD
181452001-12-29 Akim Demaille <akim@epita.fr>
18146
18147 Fix the `GAWK Grammar' failure.
18148
18149 * src/LR0.c (final_state): Initialize to -1 so that we do compute
18150 the reductions of the first state which was mistakenly confused
18151 with the final state because precisely final_state was initialized
18152 to 0.
18153 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
18154 now noticed by Bison.
18155 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
18156 have a reduction on $default.
18157
29d29c8f
AD
181582001-12-29 Akim Demaille <akim@epita.fr>
18159
18160 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
18161 rule line numbers.
18162 * src/closure.c (print_closure): Likewise.
18163 * src/derives.c (print_derives): Likewise.
18164 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
18165 now.
18166
7c6b64d0
AD
181672001-12-29 Akim Demaille <akim@epita.fr>
18168
18169 * src/lalr.c (lookaheads_print): New.
18170 (lalr): Call it when --trace-flag.
18171 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
18172 are dumped.
18173
3d4daee3
AD
181742001-12-29 Akim Demaille <akim@epita.fr>
18175
18176 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
18177 when walking through ritem, even via rule->rhs.
18178 * src/reduce.c (dump_grammar, useful_production, reduce_output)
18179 (useful_production, useless_nonterminals): Likewise.
18180 (reduce_grammar_tables): Likewise, plus update nritems.
18181 * src/nullable.c (set_nullable): Likewise.
18182 * src/lalr.c (build_relations): Likewise.
18183 * tests/sets.at (Nullable): Adjust.
18184 Fortunately, now, the $axiom is no longer nullable.
18185
9e7f6bbd
AD
181862001-12-29 Akim Demaille <akim@epita.fr>
18187
18188 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
18189 the 0-sentinel.
18190 * src/gram.c (ritem_longest_rhs): Likewise.
18191 * src/reduce.c (nonterminals_reduce): Likewise.
18192 * src/print_graph.c (print_graph): Likewise.
18193 * src/output.c (output_rule_data): Likewise.
18194 * src/nullable.c (set_nullable): Likewise.
18195
255ef638
AD
181962001-12-29 Akim Demaille <akim@epita.fr>
18197
18198 * src/output.c: Comment changes.
18199
0d8a7363
AD
182002001-12-27 Paul Eggert <eggert@twinsun.com>
18201
18202 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
18203 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
18204 Sparc, as they were causing more porting problems than the
18205 (minor) performance improvement was worth.
18206
18207 Also, catch up with 1.31's YYSTD.
18208
3db472b9
AD
182092001-12-27 Akim Demaille <akim@epita.fr>
18210
18211 * src/output.c (output_gram): Rely on nritems, not the
18212 0-sentinel. See below.
18213 Use -1 as separator, not 0.
18214 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
18215 Rely on -1 as separator in yyrhs, instead of 0.
18216 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
18217 twice `Now at end of input', therefore there are two lines less to
18218 expect.
18219
b365aa05
AD
182202001-12-27 Akim Demaille <akim@epita.fr>
18221
18222 * tests/regression.at (Unresolved SR Conflicts):
18223 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
18224 below.
18225
30171f79
AD
182262001-12-27 Akim Demaille <akim@epita.fr>
18227
18228 * src/LR0.c (new_state): Recognize the final state by the fact it
18229 is reached by eoftoken.
18230 (insert_start_shifting_state, insert_eof_shifting_state)
18231 (insert_accepting_state, augment_automaton): Remove, since now
18232 these states are automatically computed from the initial state.
18233 (generate_states): Adjust.
18234 * src/print.c: When reporting a rule number to the user, substract
18235 1, so that the axiom rule is rule 0, and the first user rule is 1.
18236 * src/reduce.c: Likewise.
18237 * src/print_graph.c (print_core): For the time being, just as for
18238 the report, depend upon --trace-flags to dump the full set of
18239 items.
18240 * src/reader.c (readgram): Once the grammar read, insert the rule
18241 0: `$axiom: START-SYMBOL $'.
18242 * tests/set.at: Adjust: rule 0 is now displayed, and since the
18243 number of the states has changed (the final state is no longer
18244 necessarily the last), catch up.
18245
75142d45
AD
182462001-12-27 Akim Demaille <akim@epita.fr>
18247
18248 Try to make the use of the eoftoken valid. Given that its value
18249 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
18250 is used instead of > 0 where appropriate, (ii), depend upon nritems
18251 instead of the 0-sentinel.
18252
18253 * src/gram.h, src/gram.c (nritems): New.
18254 Expected to be duplication of nitems, but for the time being...
18255 * src/reader.c (packgram): Assert nritems and nitems are equal.
18256 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
18257 * src/closure.c (print_closure, print_fderives): Likewise.
18258 * src/gram.c (ritem_print): Likewise.
18259 * src/print.c (print_core, print_grammar): Likewise.
18260 * src/print_graph.c: Likewise.
18261
b7c49edf
AD
182622001-12-27 Akim Demaille <akim@epita.fr>
18263
18264 * src/main.c (main): If there are complains after grammar
18265 reductions, then output the report anyway if requested, then die.
18266 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
18267 * src/reader.c (eoftoken): New.
18268 (parse_token_decl): If the token being defined has value `0', it
18269 is the eoftoken.
18270 (packsymbols): No longer hack `tags' to insert `$' by hand.
18271 Be sure to preserve the value of the eoftoken.
18272 (reader): Make sure eoftoken is defined.
18273 Initialize nsyms to 0: now eoftoken is created just like the others.
18274 * src/print.c (print_grammar): Don't special case the eof token.
18275 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
18276 lie anyway, albeit pleasant.
18277 * tests/calc.at: Exercise error messages with eoftoken.
18278 Change the grammar so that empty input is invalid.
18279 Adjust expectations.
18280 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
18281
ec2da99f
AD
182822001-12-27 Akim Demaille <akim@epita.fr>
18283
18284 * configure.in: Check the protos of strchr ans strspn.
18285 Replace strchr if needed.
18286 * src/system.h: Provide the protos of strchr, strspn and memchr if
18287 missing.
18288 * lib/strchr.c: New.
18289 * src/reader.c (symbols_save): Use strchr.
18290
8adfa272
AD
182912001-12-27 Akim Demaille <akim@epita.fr>
18292
18293 * src/print.c, src/print_graph.c (escape): New.
18294 Use it to quote the TAGS outputs.
18295 * src/print_graph.c (print_state): Now errors are in red, and
18296 reductions in green.
18297 Prefer high to wide: output the state number on a line of its own.
18298
80dac38c
AD
182992001-12-27 Akim Demaille <akim@epita.fr>
18300
18301 * src/state.h, src/state.c (reductions_new): New.
18302 * src/LR0.c (set_state_table): Let all the states have a
18303 `reductions', even if reduced to 0.
18304 (save_reductions): Adjust.
18305 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
18306 * src/print.c (print_reductions, print_actions): Adjust.
18307 * src/output.c (action_row): Adjust.
18308
2cec70b9
AD
183092001-12-27 Akim Demaille <akim@epita.fr>
18310
18311 * src/state.h, src/state.c (errs_new, errs_dup): New.
18312 * src/LR0.c (set_state_table): Let all the states have an errs,
18313 even if reduced to 0.
18314 * src/print.c (print_errs, print_reductions): Adjust.
18315 * src/output.c (output_actions, action_row): Adjust.
18316 * src/conflicts.c (resolve_sr_conflict): Adjust.
18317
13ca549a
AD
183182001-12-27 Akim Demaille <akim@epita.fr>
18319
18320 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
18321
5092aba5
AD
183222001-12-27 Akim Demaille <akim@epita.fr>
18323
18324 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
18325 * src/print.c: here.
18326 (lookaheadset, shiftset): New, used as additional storage by
18327 print_reductions.
18328 (print_results): Adjust.
18329 (print_shifts, print_gotos, print_errs): New, extracted from...
18330 (print_actions): here.
18331 * src/print_graph.c (print_actions): Remove dead code.
18332
11e2beca
AD
183332001-12-27 Akim Demaille <akim@epita.fr>
18334
18335 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
18336 `$n' and `@n'.
18337
dac3c910
AD
183382001-12-27 Akim Demaille <akim@epita.fr>
18339
18340 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
18341 (build_relations): Adjust.
18342
d0b0fefa
AD
183432001-12-27 Akim Demaille <akim@epita.fr>
18344
18345 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
18346 duplication.
18347
adc8c848
AD
183482001-12-27 Akim Demaille <akim@epita.fr>
18349
18350 * src/reader.c (packgram): Catch nitems overflows.
18351
14d293ac
AD
183522001-12-27 Akim Demaille <akim@epita.fr>
18353
18354 * src/files.c, src/files.h (guard_obstack): Remove.
18355 * src/output.c (output): Adjust.
18356 * src/reader.c (parse_braces): New, factoring...
18357 (copy_action, copy_guard): these two which are renamed as...
18358 (parse_action, parse_guard): these.
18359 As a voluntary consequence, using braces around guards is now
18360 mandatory.
18361
f499b062
AD
183622001-12-27 Akim Demaille <akim@epita.fr>
18363
18364 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
18365 * src/reader.c (symbol_list): `guard' and `guard_line' are new
18366 members.
18367 (symbol_list_new): Adjust.
18368 (copy_action): action_line is the first line, not the last.
18369 (copy_guard): Just as for actions, store the `action' only, not
18370 the switch/case/break flesh.
18371 Don't parse the user action that might follow the guard, let...
18372 (readgram): do it, i.e., now, there can be an action after a
18373 guard.
18374 In other words the guard is just explicitly optional.
18375 (packgram): Adjust.
18376 * src/output.c (guards_output): New.
18377 (output_parser): Call it when needed.
18378 (output): Also free the guard and attrs obstacks.
18379 * src/files.c, src/files.h (obstack_save): Remove.
18380 (output_files): Remove.
18381 As a result, if one needs the former `.act' file, using an
18382 appropriate skeleton which requires actions and guards is now
18383 required.
18384 * src/main.c (main): Adjust.
18385 * tests/semantic.at: New.
18386 * tests/regression.at: Use `input.y' as input file name.
18387 Avoid 8+3 problems by requiring input.c when the test needs the
18388 parser.
18389
d945f5cd
AD
183902001-12-27 Akim Demaille <akim@epita.fr>
18391
18392 * src/reader.c (symbol_list_new): Be sure to initialize all the
18393 fields.
18394
d200e455
AD
183952001-12-27 Akim Demaille <akim@epita.fr>
18396
18397 All the hacks using a final pseudo state are now useless.
18398
18399 * src/LR0.c (set_state_table): state_table holds exactly nstates.
18400 * src/lalr.c (nLA): New.
18401 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
18402 instead of lookaheadsp from the pseudo state (nstate + 1).
18403
f9507c28
AD
184042001-12-27 Akim Demaille <akim@epita.fr>
18405
18406 * src/output.c (action_row, token_actions): Use a state_t instead
18407 of a integer, and nlookaheads instead of the following state's
18408 lookaheadsp.
18409
065fbd27
AD
184102001-12-27 Akim Demaille <akim@epita.fr>
18411
18412 * src/conflicts.c (log_resolution, flush_shift)
18413 (resolve_sr_conflict, set_conflicts, solve_conflicts)
18414 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
18415 (conflicts_print, print_reductions): Use a state_t instead of an
18416 integer when referring to a state.
18417 As much as possible, depend upon nlookaheads, instead of the
18418 `lookaheadsp' member of the following state (since lookaheads of
18419 successive states are successive, the difference between state n + 1
18420 and n served as the number of lookaheads for state n).
18421 * src/lalr.c (add_lookback_edge): Likewise.
18422 * src/print.c (print_core, print_actions, print_state)
18423 (print_results): Likewise.
18424 * src/print_graph.c (print_core, print_actions, print_state)
18425 (print_graph): Likewise.
18426 * src/conflicts.h: Adjust.
18427
1b177bd7
AD
184282001-12-27 Akim Demaille <akim@epita.fr>
18429
18430 * src/bison.hairy: Formatting/comment changes.
18431 ANSIfy.
18432 Remove `register' indications.
18433 Add plenty of `static'.
18434
7742ddeb
AD
184352001-12-27 Akim Demaille <akim@epita.fr>
18436
18437 * src/output.c (prepare): Drop the muscle `ntbase' which
18438 duplicates ntokens.
18439 * src/bison.simple: Formatting/comment changes.
18440 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
18441 is an undocumented synonym.
18442
1fa14068
AD
184432001-12-22 Akim Demaille <akim@epita.fr>
18444
18445 * src/output.c (output_table_data): Change the prototype to use
18446 `int' for array ranges: some invocations do pass an int, not a
18447 short.
18448 Reported by Wayne Green.
18449
b9752825
AD
184502001-12-22 Akim Demaille <akim@epita.fr>
18451
18452 Some actions of web2c.y are improperly triggered.
18453 Reported by Mike Castle.
18454
18455 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
18456 * tests/regression.at (Web2c): Rename as...
18457 (Web2c Report): this.
18458 (Web2c Actions): New.
18459
776209d6
AD
184602001-12-22 Akim Demaille <akim@epita.fr>
18461
18462 Reductions in web2c.y are improperly reported.
18463 Reported by Mike Castle.
18464
18465 * src/conflicts.c (print_reductions): Fix.
18466 * tests/regression.at (Web2c): New.
18467
275fc3ad
AD
184682001-12-18 Akim Demaille <akim@epita.fr>
18469
18470 Some host fail on `assert (!"foo")', which expands to
18471 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
18472 Reported by Nelson Beebee.
18473
18474 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
18475 `#define it_succeeded 0' and `assert (it_succeeded)'.
18476
897668ee
MA
184772001-12-17 Marc Autret <autret_m@epita.fr>
18478
18479 * src/bison.simple: Don't hard code the skeleton line and filename.
18480 * src/output.c (output_parser): Rename 'line' as 'output_line'.
18481 New line counter 'skeleton_line' (skeleton-line muscle).
18482
ab3399e0
PE
184832001-12-17 Paul Eggert <eggert@twinsun.com>
18484
18485 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
18486 YYDEBUG must be defined to a nonzero value.
18487
18488 * src/bison.simple (yytname): Do not assume that the user defines
18489 YYDEBUG to a properly parenthesized expression.
18490
3877f72b
AD
184912001-12-17 Akim Demaille <akim@epita.fr>
18492
18493 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
18494 nlookaheads is a new member.
18495 Adjust all users.
18496 * src/lalr.h (nlookaheads): Remove this orphan declaration.
18497 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
18498 state.
776209d6 18499
331dbc1b
AD
185002001-12-17 Akim Demaille <akim@epita.fr>
18501
18502 * src/files.h, src/files.c (open_files, close_files): Remove.
18503 * src/main.c (main): Don't open/close files, nor invoke lex_free,
18504 let...
18505 * src/reader.c (reader): Do it.
776209d6 18506
be750e4c
AD
185072001-12-17 Akim Demaille <akim@epita.fr>
18508
18509 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 18510
709ae8c6
AD
185112001-12-17 Akim Demaille <akim@epita.fr>
18512
18513 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
18514 (flush_reduce): New.
18515 (resolve_sr_conflict): Adjust.
776209d6 18516
f87685c3
AD
185172001-12-17 Akim Demaille <akim@epita.fr>
18518
18519 * src/output.c (output_obstack): Be static and rename as...
18520 (format_obstack): this, to avoid any confusion with files.c's
18521 output_obstack.
18522 * src/reader.h (muscle_obstack): Move to...
18523 * src/output.h: here, since it's defined in output.c.
18524
837491d8
AD
185252001-12-17 Akim Demaille <akim@epita.fr>
18526
18527 * src/output.c (action_row, save_column, default_goto)
18528 (sort_actions, matching_state, pack_vector): Better variable
18529 locality.
18530
796d61fb
AD
185312001-12-17 Akim Demaille <akim@epita.fr>
18532
18533 * src/output.c: Various formatting changes.
776209d6 18534
64d15509
AD
185352001-12-17 Akim Demaille <akim@epita.fr>
18536
18537 * src/files.c (output_files): Free the output_obstack.
18538 * src/main.c (main): Call print and print_graph conditionally.
18539 * src/print.c (print): Work unconditionally.
18540 * src/print_graph.c (print_graph): Work unconditionally.
18541 * src/conflicts.c (log_resolution): Output only if verbose_flag.
18542
fbc8ecb7
MA
185432001-12-16 Marc Autret <autret_m@epita.fr>
18544
18545 * src/output.c (actions_output): Fix. When we use %no-lines,
18546 there is one less line per action.
18547
f0440388
MA
185482001-12-16 Marc Autret <autret_m@epita.fr>
18549
18550 * src/bison.simple: Remove a useless #line directive.
18551 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
18552 * src/output.c (get_lines_number): New.
776209d6 18553 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
18554 output muscles.
18555 Fix line numbering.
18556 (actions_output): Computes the number of lines taken by actions.
18557 (output_master_parser): Insert new skeleton which is the name of
18558 the output parser file name.
18559
a79986b8
MA
185602001-12-15 Marc Autret <autret_m@epita.fr>
18561
18562 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
18563
4ec8e00f
MA
185642001-12-15 Marc Autret <autret_m@epita.fr>
18565
18566 * src/output.c (output_gram): Keep track of the hairy one.
18567
1a4648ff
AD
185682001-12-15 Akim Demaille <akim@epita.fr>
18569
18570 Make `make distcheck' work.
18571
18572 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
18573 system.h which uses libgettext.h.
18574
9c2c67e6
AD
185752001-12-15 Akim Demaille <akim@epita.fr>
18576
18577 * src/nullable.c (set_nullable): Useless rules must be skipped,
18578 otherwise, since we range over their symbols, we might look at a
18579 nonterminal which no longer ``exists'', i.e., it is not counted in
18580 `nvars', hence we overflow our arrays.
18581
93ede233
AD
185822001-12-15 Akim Demaille <akim@epita.fr>
18583
18584 The header can also be produced directly, without any obstack!
18585 Yahoo!
18586
18587 * src/files.c, src/files.h (defines_obstack): Remove.
18588 (compute_header_macro): Global.
18589 (defines_obstack_save): Remove.
18590 * src/reader.c (parse_union_decl): No longer output to
18591 defines_obstack: its content can be found in the `stype' muscle
18592 anyway.
18593 (output_token_translations): Merge into...
18594 (symbols_output): this.
18595 Rename as...
18596 (symbols_save): this.
18597 (reader): Adjust.
18598 * src/output.c (header_output): New.
18599 (output): Call it.
18600
2666f928
AD
186012001-12-15 Akim Demaille <akim@epita.fr>
18602
18603 * src/reader.c (parse_union_decl): Instead of handling two obstack
18604 simultaneously, use one to define the `stype' muscle, and use the
18605 value of the latter to fill defines_obstack.
18606 (copy_comment): Remove.
18607 (copy_comment2): Work for a single obstack.
18608 Rename as...
18609 (copy_comment): this.
18610
428046f8
AD
186112001-12-15 Akim Demaille <akim@epita.fr>
18612
18613 * src/lex.c, src/lex.h (xgetc): No longer static.
18614 * src/reader.c (parse_union_decl): Revamp.
18615
ea52d706
AD
186162001-12-15 Akim Demaille <akim@epita.fr>
18617
18618 Still making progress in separating Bison into (i) input, (ii)
18619 process, (iii) output: now we can directly output the parser file
18620 without using table_obstack at all.
18621
18622 * src/files.c, src/files.h (table_obstack): Bye bye.
18623 (parser_file_name): New.
18624 * src/files.c (compute_output_file_names): Compute it.
18625 * src/output.c (actions_output, output_parser)
18626 (output_master_parser): To a file instead of an obstack.
18627
3f96f4dc
AD
186282001-12-15 Akim Demaille <akim@epita.fr>
18629
18630 Attach actions to rules, instead of pre-outputting them to
18631 actions_obstack.
18632
18633 * src/gram.h (rule_t): action and action_line are new members.
18634 * src/reader.c (symbol_list): Likewise.
18635 (copy_action): Save the actions within the rule.
18636 (packgram): Save them in rule_table.
18637 * src/output.c (actions_output): New.
18638 (output_parser): Use it on `%%actions'.
18639 (output_rule_data): Don't free rule_table.
18640 (output): Do it.
18641 (prepare): Don't save the `action' muscle.
18642 * src/bison.simple: s/%%action/%%actions/.
18643
51576fb3
AD
186442001-12-15 Akim Demaille <akim@epita.fr>
18645
18646 * src/reader.c (copy_action): When --yacc, don't append a `;'
18647 to the user action: let it fail if lacking.
dee049eb 18648 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 18649
2648a72d
AD
186502001-12-14 Akim Demaille <akim@epita.fr>
18651
18652 * src/lex.c (literalchar): Simply return the char you decoded, non
18653 longer mess around with obstacks and int pointers.
18654 Adjust all callers.
18655
92790e5b
AD
186562001-12-14 Akim Demaille <akim@epita.fr>
18657
18658 * src/lex.c (literalchar): Don't escape the special characters,
18659 just decode them, and keep them as char (before, eol was output as
18660 the 2 char string `\n' etc.).
18661 * src/output.c (output_rule_data): Use quotearg to output the
18662 token strings.
18663
927c1557
PE
186642001-12-13 Paul Eggert <eggert@twinsun.com>
18665
18666 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
18667 Do not infringe on the global user namespace when using C++.
18668 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
18669 All uses of `fprintf' and `stderr' changed.
18670
18671 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
18672
ed8e1f68
AD
186732001-12-13 Akim Demaille <akim@epita.fr>
18674
18675 The computation of nullable is broken: it doesn't handle empty
18676 RHS's properly.
18677
18678 * tests/torture.at (GNU AWK Grammar): New.
18679 * tests/sets.at (Nullable): New.
18680 * src/nullable.c (set_nullable): Instead of blindly looping over
18681 `ritems', loop over the rules, and then over their rhs's.
18682
18683 Work around Autotest bugs.
18684
18685 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
18686 frame, because Autotest understand lines starting with a `+' as
18687 traces from the shell. Then, they are not processed properly.
18688 Admittedly an Autotest bug, but we don't have time to wait for
18689 Autotest to catch up.
18690 * tests/regression.at (Broken Closure): Adjust to the new table
18691 frames.
18692 Move to...
18693 * tests/sets.at: here.
18694
cb581495
AD
186952001-12-13 Akim Demaille <akim@epita.fr>
18696
18697 * src/closure.c (closure): Use nrules instead of playing tricks
18698 with BITS_PER_WORD.
18699
2e729273
AD
187002001-12-13 Akim Demaille <akim@epita.fr>
18701
18702 * src/print.c (print_actions): Output the handling of `$' as the
18703 traces do: shifting the token EOF. Before EOF was treated as a
18704 nonterminal.
18705 * tests/regression.at: Adjust some tests.
18706 * src/print_graph.c (print_core): Complete the set of items via
18707 closure. The next-to-final and final states are still unsatisfying,
18708 but that's to be addressed elsewhere.
18709 No longer output the rule numbers, but do output the state number.
18710 A single loop for the shifts + gotos is enough, but picked a
18711 distinct color for each.
18712 (print_graph): Initialize and finalize closure.
18713
107f7dfb
AD
187142001-12-13 Akim Demaille <akim@epita.fr>
18715
18716 * src/reader.c (readgram): Remove dead code, an strip useless
18717 braces.
18718 (get_type): Remove, unused.
18719
9b53a24f
AD
187202001-12-12 Akim Demaille <akim@epita.fr>
18721
18722 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
18723 on that of lib/error.c.
18724
dbfb6dcd
AD
187252001-12-12 Akim Demaille <akim@epita.fr>
18726
18727 Some hosts don't like `/' in includes.
18728
18729 * src/system.h: Include libgettext.h without qualifying the path.
18730 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
18731 $(top_srcdir).
18732
c25fb648
MA
187332001-12-11 Marc Autret <autret_m@epita.fr>
18734
18735 * src/output.c (output_parser): Remove useless muscle.
18736
710ddc4f
MA
187372001-12-11 Marc Autret <autret_m@epita.fr>
18738
18739 * src/bison.simple: Remove #line just before %%epilogue. It
18740 is now handled in ...
18741 * src/reader.c (read_additionnal_code): Add the output of a
18742 #line for the epilogue.
18743
e83d80b8
MA
187442001-12-10 Marc Autret <autret_m@epita.fr>
18745
927c1557 18746 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
18747 replace precedent remove.
18748 * src/bison.simple: Remove #line before %%prologue because
18749 %%input-line is wrong at this time.
18750
971d5158
MA
187512001-12-10 Marc Autret <autret_m@epita.fr>
18752
18753 * src/reader.c (symbols_output): Clean up.
927c1557 18754 * src/output.c (output_gram, output): Clean up.
971d5158 18755
5edafffd
AD
187562001-12-10 Akim Demaille <akim@epita.fr>
18757
18758 * src/lalr.c (initialize_lookaheads): New. Extracted from...
18759 * src/LR0.c (set_state_table): here.
18760 * src/lalr.c (lalr): Call it.
18761
0279f8e9
AD
187622001-12-10 Akim Demaille <akim@epita.fr>
18763
18764 * src/state.h (shifts): Remove the `number' member: shifts are
18765 attached to state, hence no longer need to be labelled with a
18766 state number.
18767
190c4f5f
AD
187682001-12-10 Akim Demaille <akim@epita.fr>
18769
18770 Now that states have a complete set of members, the linked list of
18771 shifts is useless: just fill directly the state's shifts member.
18772
18773 * src/state.h (shifts): Remove the `next' member.
18774 * src/LR0.c (first_state, last_state): Remove.
18775 Adjust the callers.
18776 (augment_automaton): Don't look for the shifts that must be added
18777 a shift on EOF: it is those of the state we looked for! But now,
18778 since shifts are attached, it is no longer needed to looking
18779 merely by its id: its number.
18780
2a73b93d
AD
187812001-12-10 Akim Demaille <akim@epita.fr>
18782
18783 * src/LR0.c (augment_automaton): Better variable locality.
18784 Remove an impossible branch: if there is a state corresponding to
18785 the start symbol being shifted, then there is shift for the start
18786 symbol from the initial state.
18787
74392f6a
AD
187882001-12-10 Akim Demaille <akim@epita.fr>
18789
18790 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
18791 only when appropriate: when insert_start_shifting_state' is not
18792 invoked.
18793 * tests/regression.at (Rule Line Numbers): Adjust.
18794
37c82725
AD
187952001-12-10 Akim Demaille <akim@epita.fr>
18796
18797 * src/LR0.c (augment_automaton): Now that all states have shifts,
18798 merge the two cases addition shifts to the initial state.
18799
6a164e0c
AD
188002001-12-10 Akim Demaille <akim@epita.fr>
18801
18802 * src/lalr.c (set_state_table): Move to...
18803 * src/LR0.c: here.
18804 * src/lalr.c (lalr): Don't call it...
18805 * src/LR0.c (generate_states): do it.
18806 * src/LR0.h (first_state): Remove, only the table is used.
18807
7215de24
AD
188082001-12-10 Akim Demaille <akim@epita.fr>
18809
18810 * src/LR0.h (first_shift, first_reduction): Remove.
18811 * src/lalr.c: Don't use first_shift: find shifts through the
18812 states.
18813
80e25d4d
AD
188142001-12-10 Akim Demaille <akim@epita.fr>
18815
18816 * src/LR0.c: Attach shifts to states as soon as they are
18817 computed.
18818 * src/lalr.c (set_state_table): Instead of assigning shifts to
18819 state, just assert that the mapping was properly done.
18820
0ab3728b
AD
188212001-12-10 Akim Demaille <akim@epita.fr>
18822
18823 * src/LR0.c (insert_start_shift): Rename as...
18824 (insert_start_shifting_state): this.
18825 (insert_eof_shifting_state, insert_accepting_state): New.
18826 (augment_automaton): Adjust.
18827 Better locality of the variables.
18828 When looking if the start_symbol is shifted from the initial
18829 state, using `while (... symbol != start_symbol ...)' sounds
18830 better than `while (... symbol < start_symbol ...)': If fail
18831 to see how the order between symbols could be relevant!
18832
78af9bbc
AD
188332001-12-10 Akim Demaille <akim@epita.fr>
18834
18835 * src/getargs.h: Don't declare `spec_name_prefix' and
18836 `spec_file_prefix', declared by src/files.h.
18837 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
18838 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
18839 * src/output.c (prepare): Adjust.
18840 * src/reader.c (symbols_output): Likewise.
18841 * src/vmsgetargs.c: Vaguely adjust, but who cares?
18842
bdef2a41
AD
188432001-12-10 Akim Demaille <akim@epita.fr>
18844
18845 * src/muscle_tab.c (muscle_init): NULL is a better default than
18846 `"0"'.
18847
3735969c
AD
188482001-12-10 Akim Demaille <akim@epita.fr>
18849
18850 * src/reader.c (reader): Calling symbols_output once is enough.
18851
49701457
AD
188522001-12-10 Akim Demaille <akim@epita.fr>
18853
18854 Now that states have a complete set of members, the linked list of
18855 reductions is useless: just fill directly the state's reductions
18856 member.
18857
18858 * src/state.h (struct reductions): Remove member `number' and
18859 `next'.
18860 * src/LR0.c (first_reduction, last_reduction): Remove.
18861 (save_reductions): Don't link the new reductions, store them in
18862 this_state.
18863 * src/lalr.c (set_state_table): No need to attach reductions to
18864 states, it's already done.
18865 * src/output.c (output_actions): No longer free the shifts, then
18866 the reductions, then the states: free all the states and their
18867 members.
18868
0edad749
AD
188692001-12-10 Akim Demaille <akim@epita.fr>
18870
18871 * src/options.c (OPTN, DRTV, BOTH): New.
18872 (option_table): Use them.
18873
0edad749
AD
18874 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
18875 the job of system.h.
18876 * src/options.c: Don't include stdio.h and xalloc.h for the same
18877 reasons.
18878
5449dd0f
AD
188792001-12-10 Akim Demaille <akim@epita.fr>
18880
18881 * src/output.c (output, prepare): Make sure the values of the
18882 muscles `action' and `prologue' are 0-terminated.
18883
a870c567
AD
188842001-12-10 Akim Demaille <akim@epita.fr>
18885
18886 Clean up GCC warnings.
18887
18888 * src/reader.c (copy_action): `buf' is not used.
18889 (parse_skel_decl): Be static.
18890 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
18891 * src/options.h (create_long_option_table): Have a real prototype.
18892 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
18893 (hash_delete_at): Return const void *.
18894 Adjust casts to preserve the const.
18895
80df8768
AD
188962001-12-10 Akim Demaille <akim@epita.fr>
18897
18898 * configure.in: Require 2.52g.
18899 M4 is not needed, but AUTOM4TE is.
18900 * m4/m4.m4: Remove.
18901 * tests/Makefile.am: Adjust.
18902
f693ad14
AD
189032001-12-10 Akim Demaille <akim@epita.fr>
18904
18905 One structure for states is enough, even though theoretically
18906 there are LR(0) states and LALR(1) states.
18907
18908 * src/lalr.h (state_t): Remove.
18909 (state_table): Be state_t **, not state_t *.
18910 * src/state.h (core, CORE_ALLOC): Rename as...
18911 (state_t, STATE_ALLOC): this.
18912 Add the LALR(1) members: shifts, reductions, errs.
18913 * src/LR0.c (state_table): Rename as...
18914 (state_hash): this, to avoid name clashes with the global
18915 `state_table'.
18916 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
18917 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
18918
74ffbcb6
AD
189192001-12-10 Akim Demaille <akim@epita.fr>
18920
18921 Bison dumps core on bash.y.
18922 Reported by Pascal Bart.
18923
18924 * src/warshall.c (bitmatrix_print): New.
18925 (TC): Use it.
ba0fe3c7 18926 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
18927 j must be the outer loop.
18928 * tests/regression.at (Broken Closure): New.
18929
07708e19
AD
189302001-12-05 Akim Demaille <akim@epita.fr>
18931
18932 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
18933 its argument.
ba1ecc07 18934 Reported by Peter Hamorsky.
07708e19 18935
92b16366
AD
189362001-12-05 Akim Demaille <akim@epita.fr>
18937
18938 * src/conflicts.c (err_table): Remove.
18939 (resolve_sr_conflict): Adjust.
18940 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
18941 Rename as...
18942 (state_t.reductions, state_t.shifts): this.
18943
076ab033
AD
189442001-12-05 Akim Demaille <akim@epita.fr>
18945
18946 * src/reduce.c (reduce_grammar_tables): No longer disable the
18947 removal of useless rules via CPP but via `if (0)', so that the
18948 compiler still check the code is valid.
18949 For instance, it should have noticed `rline' no longer exists: use
18950 the `line' member of rule_t.
18951 * src/gram.c (dummy, rline): Remove, unused.
18952
3843c413
AD
189532001-12-05 Akim Demaille <akim@epita.fr>
18954
18955 * src/output.c (pack_vector): Use assert, not berror.
18956 * src/main.c (berror): Remove, unused.
18957
43168960
AD
189582001-12-05 Akim Demaille <akim@epita.fr>
18959
18960 New experimental feature: if --verbose --trace output all the
18961 items of a state, not only its kernel.
18962
18963 * src/print.c (print_core): If `trace_flag', then invoke closure
18964 before outputting the items of the state (print_core is no longer
18965 a correct name them).
18966 (print_results): Invoke new_closure/free_closure if needed.
18967
b2872512
AD
189682001-12-05 Akim Demaille <akim@epita.fr>
18969
18970 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
18971 * src/closure.c, src/closure.h (itemsetsize): Rename as...
18972 (nitemset): for consistency with the rest of the project.
18973
23cbcc6c
AD
189742001-12-05 Akim Demaille <akim@epita.fr>
18975
18976 * src/closure.c (print_closure): Improve.
18977 (closure): Use it for printing input and output.
18978
03ec521c
AD
189792001-12-05 Akim Demaille <akim@epita.fr>
18980
18981 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
18982 indexed by nonterminals.
18983
3a7456dd
AD
189842001-12-05 Akim Demaille <akim@epita.fr>
18985
18986 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
18987 what it was!).
18988 * src/warshall.h: Remove accidental duplication of the content.
18989
1cbcf2e7
AD
189902001-12-05 Akim Demaille <akim@epita.fr>
18991
18992 * src/closure.c (set_fderives): De-obfuscate.
18993
84182270
AD
189942001-12-05 Akim Demaille <akim@epita.fr>
18995
18996 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
18997
3f6f053c
AD
189982001-12-05 Akim Demaille <akim@epita.fr>
18999
19000 * src/closure.c (set_firsts): De-obfuscate.
19001
7a5350ba
AD
190022001-12-05 Akim Demaille <akim@epita.fr>
19003
19004 * src/output.c (action_row): De-obfuscate
19005 using the good o' techniques: arrays not pointers, variable
19006 locality, BITISSET, RESETBIT etc.
19007
d954473d
AD
190082001-12-05 Akim Demaille <akim@epita.fr>
19009
19010 Pessimize the code to simplify it: from now on, all the states
19011 have a valid SHIFTS, which NSHIFTS is possibly 0.
19012
19013 * src/LR0.c (shifts_new): Be global and move to..
19014 * src/state.c, src/state.h: here.
19015 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
19016 * src/print_graph: Adjust.
19017
9839bbe5
AD
190182001-12-05 Akim Demaille <akim@epita.fr>
19019
19020 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
19021 * src/conflicts.c: Use it.
19022 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
19023 incorrectly ``simplified''.
19024
9f136c07
AD
190252001-12-05 Akim Demaille <akim@epita.fr>
19026
19027 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
19028 using the good o' techniques: arrays not pointers, variable
19029 locality, BITISSET, RESETBIT etc.
19030
b608206e
AD
190312001-12-05 Akim Demaille <akim@epita.fr>
19032
19033 * src/state.h (SHIFT_SYMBOL): New.
19034 * src/conflicts.c: Use it to deobfuscate.
19035
52afa962
AD
190362001-12-05 Akim Demaille <akim@epita.fr>
19037
19038 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
19039 (print_reductions): De-obfuscate using the good o' techniques:
19040 arrays not pointers, variable locality, BITISSET.
19041
e74dc321
AD
190422001-12-05 Akim Demaille <akim@epita.fr>
19043
19044 * src/conflicts.c (print_reductions): Arrays, not pointers.
19045 Use BITISSET.
19046
768fca83
AD
190472001-12-05 Akim Demaille <akim@epita.fr>
19048
19049 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19050
a17e599f
AD
190512001-12-05 Akim Demaille <akim@epita.fr>
19052
19053 * src/conflicts.c (print_reductions): Improve variable locality.
19054
a04bc341
AD
190552001-12-05 Akim Demaille <akim@epita.fr>
19056
19057 * src/conflicts.c (print_reductions): Pessimize, but clarify.
19058
c8ea038e
AD
190592001-12-05 Akim Demaille <akim@epita.fr>
19060
19061 * src/conflicts.c (print_reductions): Improve variable locality.
19062
aa2aab3c
AD
190632001-12-05 Akim Demaille <akim@epita.fr>
19064
19065 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
19066 * src/lalr.c: Use them.
19067
b178c8cc
AD
190682001-12-05 Akim Demaille <akim@epita.fr>
19069
19070 * src/LR0.c (augment_automaton): Formatting changes.
19071 Better variable locality.
19072
f67d13aa
AD
190732001-12-05 Akim Demaille <akim@epita.fr>
19074
19075 * src/lalr.c (matrix_print): New.
19076 (transpose): Use it.
19077 Use arrays instead of pointers.
19078
c2713865
AD
190792001-12-05 Akim Demaille <akim@epita.fr>
19080
19081 * src/lalr.c (maxrhs): Move to...
19082 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
19083 * src/lalr.c (build_relations): Adjust.
19084
9887c18a
AD
190852001-12-05 Akim Demaille <akim@epita.fr>
19086
19087 * src/lalr.c (transpose): Free the memory allocated to the
19088 argument, as it is replaced by the results by the unique caller.
19089 (build_relations): Merely invoke transpose: it handles the memory
19090 deallocation.
19091 Improve variable locality.
19092 Avoid variables used as mere abbreviations.
19093 (compute_lookaheads): Use arrays instead of pointers.
19094
4d4f699c
AD
190952001-12-05 Akim Demaille <akim@epita.fr>
19096
19097 * src/lalr.c (initialize_F): Improve variable locality.
19098 Avoid variables used as mere abbreviations.
19099
80a69750
AD
191002001-12-05 Akim Demaille <akim@epita.fr>
19101
19102 * src/derives.c (print_derives): Display the ruleno.
19103 * src/lalr.c (initialize_F, transpose): Better variable locality
19104 to improve readability.
19105 Avoid variables used as mere abbreviations.
19106
fe961097
AD
191072001-12-05 Akim Demaille <akim@epita.fr>
19108
19109 * src/lalr.c (traverse): Use arrays instead of pointers.
19110
e3e4e814
AD
191112001-12-05 Akim Demaille <akim@epita.fr>
19112
19113 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
19114 the handling of squeue.
19115 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19116
630e182b
AD
191172001-12-05 Akim Demaille <akim@epita.fr>
19118
19119 Because useless nonterminals are now kept alive (instead of being
19120 `destroyed'), we now sometimes examine them, and store information
19121 related to them. Hence we need to know their number, and adjust
19122 memory allocations.
19123
19124 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
19125 static.
19126 * src/LR0.c (allocate_itemsets): The memory allocated to
19127 `symbol_count' was used for two different purpose: once to count
19128 the number of occurrences of each symbol, and later reassigned to
19129 `shift_symbol', containing the symbol that can be shifted from a
19130 given state.
19131 Deobfuscate, i.e., allocate, use and free `symbol_count' here
19132 only, and...
19133 (new_itemsets): Allocate `shift_symbol' here.
19134 (allocate_itemsets): symbol_count includes useless nonterminals.
19135 Make room for them.
19136 (free_storage): Use `free', not `XFREE', for pointers that cannot
19137 be null.
19138
81b51460
AD
191392001-12-05 Akim Demaille <akim@epita.fr>
19140
19141 * src/nullable.c (set_nullable): Deobfuscate the handling of
19142 ritem.
19143 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
19144
3067fbef
AD
191452001-12-05 Akim Demaille <akim@epita.fr>
19146
19147 * src/gram.c, src/gram.h (ritem_print): New.
19148 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
19149 (This useless function was defined only to work around VMS linkers
19150 that can't handle compilation units with variables only).
19151 * src/reduce.c (dump_grammar): Use it to trace the construction of
19152 ritem.
19153
c2bea5f9
PE
191542001-12-04 Paul Eggert <eggert@twinsun.com>
19155
7d27c823
PE
19156 * src/bison.simple (union yyalloc): Change member names
19157 to be the same as the stack names.
19158 (yyparse): yyptr is now union yyalloc *, not char *.
19159 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
19160 and may generate better code on some machines.
c2bea5f9
PE
19161 (yystpcpy): Use prototype if __STDC__ is defined, not just
19162 if __cplusplus is defined.
35687a9d 19163
2c8a9dfa
AD
191642001-11-30 Akim Demaille <akim@epita.fr>
19165
19166 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
19167 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
19168 Gettext doesn't compile cleanly, and dies with -Werror.
19169 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
19170 Include WARNING_CFLAGS here.
19171 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
19172 before being defined.
19173
f4e421e6
AD
191742001-11-27 Paul Eggert <eggert@twinsun.com>
19175
19176 * lib/quotearg.h (quotearg_n, quotearg_n_style):
19177 First arg is int, not unsigned.
19178 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
19179 (SIZE_MAX, UINT_MAX): New macros.
19180 (quotearg_n_options): Abort if N is negative.
19181 Avoid overflow check on hosts where size_t is 64 bits and int
19182 is 32 bits, as overflow is impossible there.
19183 Fix off-by-one typo that caused unnecessary reallocation.
19184
7093d0f5
AD
191852001-11-29 Paul Eggert <eggert@twinsun.com>
19186
19187 Name space cleanup in generated parser.
19188
19189 * doc/bison.texinfo (Bison Parser): Discuss system headers
19190 and their effect on the user name space.
19191
19192 * src/bison.simple:
19193 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
19194 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
19195 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
19196
19197 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
19198 on user names when possible.
19199
19200 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
19201 Simplify test for whather <alloca.h> exists.
19202
19203 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
19204
19205 (<stdio.h>): Include if YYDEBUG.
19206
19207 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
19208 ! defined (yyoverflow) && ! defined (yymemcpy).
19209
19210 (yymemcpy, yyparse): Rename local variables as needed so that
19211 they all begin with 'yy'.
19212
19213 (yystrlen, yystpcpy): New functions.
19214
19215 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
19216 All uses changed.
19217
19218 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
19219 instead of relying on string.h functions. Use YYSTACK_ALLOC
19220 and YYSTACK_FREE instead of malloc and free.
19221
fd51e5ff
AD
192222001-11-30 Akim Demaille <akim@epita.fr>
19223
19224 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
19225 before their first uses.
19226 (YYBISON, YYPURE): Move to the top of the output.
19227
7d13ff5f
AD
192282001-11-30 Akim Demaille <akim@epita.fr>
19229
19230 * tests/reduce.at (Useless Nonterminals): Fix.
19231
892a3995
AD
192322001-11-30 Akim Demaille <akim@epita.fr>
19233
19234 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
19235 if body instead of `;' to pacify GCC's warnings.
19236
68f1e3ed
AD
192372001-11-30 Akim Demaille <akim@epita.fr>
19238
19239 Instead of mapping the LHS of unused rules to -1, keep the LHS
19240 valid, but flag the rules as invalid.
19241
19242 * src/gram.h (rule_t): `useful' is a new member.
19243 * src/print.c (print_grammar): Adjust.
19244 * src/derives.c (set_derives): Likewise.
19245 * src/reader.c (packgram, reduce_output): Likewise.
19246 * src/reduce.c (reduce_grammar_tables): Likewise.
19247 * tests/reduce.at (Underivable Rules, Useless Rules): New.
19248
d2d1b42b
AD
192492001-11-30 Akim Demaille <akim@epita.fr>
19250
19251 * src/reduce.c (reduce_output): Formatting changes.
19252 * src/print.c (print_results, print_grammar): Likewise.
19253 * tests/regression.at (Rule Line Numbers)
19254 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
19255
760b53a8
AD
192562001-11-30 Akim Demaille <akim@epita.fr>
19257
19258 * src/reduce.c (nonterminals_reduce): Instead of throwing away
19259 useless nonterminals, move them at the end of the symbol arrays.
19260 (reduce_output): Adjust.
19261 * tests/reduce.at (Useless Nonterminals): Adjust.
19262
00238958
AD
192632001-11-30 Akim Demaille <akim@epita.fr>
19264
19265 * src/reduce.c: Various comment/formatting changes.
19266 (nonterminals_reduce): New, extracted from...
19267 (reduce_grammar_tables): here.
19268 (reduce_grammar): Call nonterminals_reduce.
19269
396452de
PE
192702001-11-29 Paul Eggert <eggert@twinsun.com>
19271
19272 * src/bison.simple (YYSTACK_REALLOC): Remove.
19273 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
19274 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
19275 New macros.
19276 (union yyalloc): New type.
19277 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
19278 an arbitrary restriction on hosts where size_t is wider than int.
19279
19280 (yyparse): Don't dump core if alloca or malloc fails; instead, report
19281 a parser stack overflow. Allocate just one block of memory for all
19282 three stacks, instead of allocating three blocks; this typically is
19283 faster and reduces fragmentation.
19284
19285 Do not limit the number of items in the stack to a value that fits
19286 in 'int', as this is an arbitrary limit on hosts with 64-bit
19287 size_t and 32-bit int.
19288
147e184c
MA
192892001-11-29 Marc Autret <autret_m@epita.fr>
19290
19291 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
19292 of defining YYERROR_VERBOSE.
19293 [AT_DATA]: $4 is now out of C declarations in the prologue.
19294
426cf563
MA
192952001-11-28 Marc Autret <autret_m@epita.fr>
19296
19297 * src/reader.c (parse_dquoted_param): New.
19298 (parse_skel_decl): Use it.
19299 * src/lex.h: Add its prototype.
19300 * src/lex.c (literalchar): Become not static.
19301
c7925b99
MA
193022001-11-28 Marc Autret <autret_m@epita.fr>
19303
19304 * src/output.h: And put its extern declaration here.
19305 * src/output.c (error_verbose): Define here.
19306 (prepare): Echo name modification.
19307 * src/getargs.h: Clean its extern declaration.
19308 * src/getargs.c (error_verbose_flag): Remove.
19309 (getargs): Remove case 'e'.
19310 * src/options.c (option_table): 'error-verbose' is now seen as simple
19311 percent option.
19312 Include output.h.
19313
19314 * src/reader.c (read_declarations): Remove case tok_include.
19315 (parse_include_decl): Remove.
19316 * src/lex.h (token_t): Remove tok_include.
19317 * src/options.c (option_table): 'include' is now a simple command line
19318 option.
19319
5b5d1929
MA
193202001-11-28 Marc Autret <autret_m@epita.fr>
19321
19322 * src/bison.simple: Adjust muscle names.
19323 * src/muscle_tab.c (muscle_init): Also rename the muscles.
19324 * src/output.c (prepare): s/_/-/ for the muscles names.
19325 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
19326
8850be4b
MA
193272001-11-28 Marc Autret <autret_m@epita.fr>
19328
19329 * src/bison.simple: Fix debug.
19330 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
19331
4a38e613
AD
193322001-11-28 Akim Demaille <akim@epita.fr>
19333
19334 * src/LR0.c (shifts_new): New.
19335 (save_shifts, insert_start_shift, augment_automaton): Use it.
19336
4b35e1c1
AD
193372001-11-28 Akim Demaille <akim@epita.fr>
19338
19339 * src/closure.c (closure): `b' and `ruleno' denote the same value:
19340 keep ruleno only.
19341
d2b04478
AD
193422001-11-28 Akim Demaille <akim@epita.fr>
19343
19344 * src/closure.c (closure): Instead of looping over word in array
19345 then bits in words, loop over bits in array.
19346
2c4c30aa
AD
193472001-11-28 Akim Demaille <akim@epita.fr>
19348
19349 * src/closure.c (closure): No longer optimize the special case
19350 where all the bits of `ruleset[r]' are set to 0, to make the code
19351 clearer.
19352
576890b7
AD
193532001-11-28 Akim Demaille <akim@epita.fr>
19354
19355 * src/closure.c (closure): `r' and `c' are new variables, used to
19356 de-obfuscate accesses to RULESET and CORE.
19357
cb487d7d
AD
193582001-11-28 Akim Demaille <akim@epita.fr>
19359
19360 * src/reduce.c (reduce_print): Use ngettext.
19361 (dump_grammar): Improve the trace accuracy.
19362
6013d43f
AD
193632001-11-28 Akim Demaille <akim@epita.fr>
19364
19365 * src/reduce.c (dump_grammar): Don't translate trace messages.
19366
cb4956ee
AD
193672001-11-28 Akim Demaille <akim@epita.fr>
19368
19369 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
19370 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
19371 as all tags are free'ed afterwards.
19372 From Enrico Scholz.
19373
648185ab
PE
193742001-11-27 Paul Eggert <eggert@twinsun.com>
19375
19376 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
19377 use alloca when we didn't want to, and vice versa.
19378
68254a03
MA
193792001-11-27 Marc Autret <autret_m@epita.fr>
19380
9113b58f
AD
19381 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
19382 initialization.
68254a03
MA
19383 * src/output.c (prepare): Remove its update.
19384
04d843a2
MA
193852001-11-27 Marc Autret <autret_m@epita.fr>
19386
19387 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
19388 Use %error-verbose.
19389
d2079671 193902001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
19391
19392 * src/bison.simple: Remove YYERROR_VERBOSE using.
19393 Use %%error_verbose.
19394 (yyparse): Likewise.
19395 * src/output.c (prepare): Give its final value.
19396 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
19397 * src/getargs.h: Add its extern declaration.
19398 * src/getargs.c (error_verbose_flag): New int.
19399 (getargs): Update to catch new case.
19400 * src/options.c (option_table): 'error-verbose' is a new option.
19401 (shortopts): Update.
19402
e0327bc8
AD
194032001-11-27 Akim Demaille <akim@epita.fr>
19404
19405 * src/system.h: Use intl/libgettext.h.
19406 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
19407
000f1a3c
AD
194082001-11-27 Akim Demaille <akim@epita.fr>
19409
19410 * tests/torture.at (Exploding the Stack Size with Malloc):
19411 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
19412
26cfe0be
AD
194132001-11-27 Akim Demaille <akim@epita.fr>
19414
19415 * src/files.c: Include error.h.
19416 Reported by Hans Aberg.
19417
f6bd5427
MA
194182001-11-26 Marc Autret <autret_m@epita.fr>
19419
d2079671 19420 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
19421 (read_declarations): Add case tok_include.
19422 * src/getargs.h (include): Add its extern definition.
19423 * src/getargs.c (include): New const char *.
19424 (getargs): Add case '-I'.
19425 * src/options.c (option_table): Add include as command line and
19426 percent option.
19427 * src/lex.h (token_t): Add tok_include.
19428
2ca209c1
AD
194292001-11-26 Akim Demaille <akim@epita.fr>
19430
19431 * src/reader.c (readgram): Make sure rules for mid-rule actions
19432 have a lineno equal to that of their host rule.
19433 Reported by Hans Aberg.
19434 * tests/regression.at (Rule Line Numbers): New.
19435
0e41b407
AD
194362001-11-26 Akim Demaille <akim@epita.fr>
19437
19438 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
19439 size_ts.
19440
194412001-11-26 Akim Demaille <akim@epita.fr>
19442
19443 * src/complain.c, src/complain.h (error): Remove, provided by
19444 lib/error.[ch].
19445
e0c40012
AD
194462001-11-26 Akim Demaille <akim@epita.fr>
19447
19448 * src/reader.c (read_declarations): Don't abort on tok_illegal,
19449 issue an error message.
19450 * tests/regression.at (Invalid %directive): New.
19451 Reported by Hans Aberg.
19452
5e147124
AD
194532001-11-26 Akim Demaille <akim@epita.fr>
19454
19455 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
19456 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19457
a034c8b8
AD
194582001-11-26 Akim Demaille <akim@epita.fr>
19459
19460 * src/conflicts.c (conflicts_print): Don't complain at all when
19461 there are no reduce/reduce conflicts, and as many shift/reduce
19462 conflicts as expected.
19463 * tests/regression.at (%expect right): Adjust.
19464
c64a20f3
AD
194652001-11-23 Akim Demaille <akim@epita.fr>
19466
19467 * lib/alloca.c: Update, from fileutils.
19468
5b0d29bb
AD
194692001-11-23 Akim Demaille <akim@epita.fr>
19470
19471 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
19472
722c4bfe
AD
194732001-11-23 Akim Demaille <akim@epita.fr>
19474
19475 * src/system.h: Include alloca.h.
19476 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
19477
6255b435
AD
194782001-11-23 Akim Demaille <akim@epita.fr>
19479
19480 * src/print_graph.c (print_actions): Remove `rule', unused.
19481 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
19482 pacify GCC's signed < unsigned warnings.
19483 * src/closure.c (itemsetsize): Likewise.
19484 * src/reader.c (symbol_list_new): Static.
19485
b29b2ed5
AD
194862001-11-23 Akim Demaille <akim@epita.fr>
19487
19488 Attaching lineno to buckets is stupid, since only one copy of each
19489 symbol is kept, only the line of the first occurrence is kept too.
19490
19491 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
19492 * src/reader.c (rline_allocated): Remove, unused.
19493 (symbol_list): Have a `line' member.
19494 (symbol_list_new): New.
19495 (readgram): Use it.
19496 * src/print.c (print_grammar): Output the rule line numbers.
19497 * tests/regression.at (Solved SR Conflicts)
19498 (Unresolved SR Conflicts): Adjust.
19499 Reported by Hans Aberg.
19500
a81b1d4a
MA
195012001-11-22 Marc Autret <autret_m@epita.fr>
19502
19503 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
19504
c1ecb3c1
MA
195052001-11-22 Marc Autret <autret_m@epita.fr>
19506
19507 * src/muscle_tab.c (muscle_init): Remove initialization of
19508 skeleton muscle.
19509 * src/output.c (output_master_parser): Do it here.
19510
fbe01355
AD
195112001-11-20 Akim Demaille <akim@epita.fr>
19512
19513 * po/sv.po: New.
19514 * configure.in (ALL_LINGUAS): Adjust.
19515 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
19516 longer contains strings to translate.
19517
81e895c0
AD
195182001-11-19 Akim Demaille <akim@epita.fr>
19519
19520 * src/conflicts.c (conflicts_print): Add a missing \n.
19521
6bb1878b
AD
195222001-11-19 Akim Demaille <akim@epita.fr>
19523
19524 * src/nullable.c (nullable_print): New.
19525 (set_nullable): Call it when tracing.
19526 Better locality of variables.
19527
d9ec2d07
AD
195282001-11-19 Akim Demaille <akim@epita.fr>
19529
19530 * src/print.c (print_actions): Better locality of variables.
19531
720e5c1b
AD
195322001-11-19 Akim Demaille <akim@epita.fr>
19533
19534 * src/derives.c (print_derives): Fix and enrich.
19535 * src/closure.c (print_fderives): Likewise.
19536
fb908786
AD
195372001-11-19 Akim Demaille <akim@epita.fr>
19538
19539 * src/closure.c (itemsetend): Remove, replaced with...
19540 (itemsetsize): new.
19541
125ecb56
AD
195422001-11-19 Akim Demaille <akim@epita.fr>
19543
19544 * src/LR0.c (kernel_end): Remove, replaced with...
19545 (kernel_size): new.
19546
d8cf039f
AD
195472001-11-19 Akim Demaille <akim@epita.fr>
19548
19549 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
19550 to clarify.
19551
7bec0760
AD
195522001-11-19 Akim Demaille <akim@epita.fr>
19553
19554 * src/closure.c (closure): Use arrays instead of pointers to clarify.
19555
c87d4863
AD
195562001-11-19 Akim Demaille <akim@epita.fr>
19557
19558 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
19559 trace messages.
19560 * src/LR0.c: Likewise.
19561 (allocate_itemsets): Use arrays instead of pointers to clarify.
19562
9bfe901c
AD
195632001-11-19 Akim Demaille <akim@epita.fr>
19564
19565 * src/getargs.c (statistics_flag): Replace with...
19566 (trace_flag): New.
19567 (longopts): Accept --trace instead of --statistics.
19568 * src/getargs.h, src/options.c: Adjust.
19569 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
19570 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
19571
97db7bd4
AD
195722001-11-19 Akim Demaille <akim@epita.fr>
19573
cc72668c 19574 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
19575 pointers to clarify the code.
19576 (save_reductions, save_shifts): Factor common parts of alternatives.
19577
2c5f66ed
AD
195782001-11-19 Akim Demaille <akim@epita.fr>
19579
19580 * src/LR0.c (new_state, get_state): Complete TRACE code.
19581 * src/closure.c: Include `reader.h' to get `tags', needed by the
19582 trace code.
19583 Rename the conditional DEBUG as TRACE.
19584 Output consistently TRACEs to stderr, not stdout.
19585 * src/derives.c: Likewise.
19586 * src/reduce.c: (inaccessable_symbols): Using if is better style
19587 than goto.
19588 Use `#if TRACE' instead of `#if 0' for tracing code.
19589
300f275f
AD
195902001-11-19 Akim Demaille <akim@epita.fr>
19591
19592 * src/system.h (LIST_FREE, shortcpy): New.
19593 * src/LR0.c: Use them.
19594 * src/output.c (free_itemsets, free_reductions, free_shifts):
19595 Remove, replaced by LIST_FREE.
19596
f59c437a
AD
195972001-11-19 Akim Demaille <akim@epita.fr>
19598
19599 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
19600 (REDUCTIONS_ALLOC): New.
19601 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
19602 allocation.
19603
6986fd9e
AD
196042001-11-19 Akim Demaille <akim@epita.fr>
19605
19606 * src/LR0.c (new_state): Complete trace code.
19607 * src/nullable.c (set_nullable): Don't translate traces.
19608
4bc30f78
AD
196092001-11-19 Akim Demaille <akim@epita.fr>
19610
19611 * src/print_graph.c (print_core): Better locality of variables.
19612 * src/print.c (print_core): Likewise.
19613
08a946e0
AD
196142001-11-19 Akim Demaille <akim@epita.fr>
19615
19616 * src/vcg.c: You do the output, so you are responsible of the
19617 handling of VCG syntax, in particular: use quotearg.
19618 * src/print_graph.c: Don't.
19619 (print_actions): Don't output the actions as part of the nodes,
19620 since that's the job of the edges.
19621 (print_state): Don't output by hand: fill the node description,
9bfe901c 19622 and ask for its output.
08a946e0 19623
f0473484
AD
196242001-11-19 Akim Demaille <akim@epita.fr>
19625
cc72668c
AD
19626 * src/bison.simple (yyparse): When verbosely reporting an error,
19627 no longer put additional quotes around token names.
f0473484
AD
19628 * tests/calc.at: Adjust.
19629
e41dc700
AD
196302001-11-19 Akim Demaille <akim@epita.fr>
19631
19632 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
19633 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
19634 * src/output.c: Adjust.
19635
652a871c
AD
196362001-11-19 Akim Demaille <akim@epita.fr>
19637
19638 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
19639 (rule_t): this.
19640 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
19641
b2ed6e58
AD
196422001-11-19 Akim Demaille <akim@epita.fr>
19643
19644 * src/gram.h (rule_t): New.
19645 (rule_table): New.
19646 (rrhs, rlhs): Remove, part of state_t.
19647 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
19648 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
19649 * src/reader.c, src/reduce.c: Adjust.
19650
edad7067
AD
196512001-11-19 Akim Demaille <akim@epita.fr>
19652
19653 * src/reader.c (symbols_output): New, extracted from...
19654 (packsymbols): Here.
19655 (reader): Call it.
19656
3feec034
AD
196572001-11-19 Akim Demaille <akim@epita.fr>
19658
19659 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
19660 (maxrhs): this new function.
19661
ddcd5fdf
AD
196622001-11-19 Akim Demaille <akim@epita.fr>
19663
cc72668c 19664 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
19665 Adjust.
19666
bb527fc2
AD
196672001-11-19 Akim Demaille <akim@epita.fr>
19668
cc72668c 19669 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
19670 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19671 * src/lalr.c: Adjust.
19672
a845a697
AD
196732001-11-19 Akim Demaille <akim@epita.fr>
19674
19675 * src/lalr.c (initialize_LA): Only initialize LA. Let...
19676 (set_state_table): handle the `lookaheads' members.
19677
f004bf6a
AD
196782001-11-19 Akim Demaille <akim@epita.fr>
19679
cc72668c
AD
19680 * src/lalr.h (lookaheads): Removed array, whose contents is now
19681 a member of...
f004bf6a
AD
19682 (state_t): this structure.
19683 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19684 Adjust.
19685
de326cc0
AD
196862001-11-19 Akim Demaille <akim@epita.fr>
19687
cc72668c
AD
19688 * src/lalr.h (consistent): Removed array, whose contents is now
19689 a member of...
de326cc0
AD
19690 (state_t): this structure.
19691 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19692 Adjust.
19693
90b4416b
AD
196942001-11-19 Akim Demaille <akim@epita.fr>
19695
cc72668c
AD
19696 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
19697 contents are now members of...
90b4416b
AD
19698 (state_t): this structure.
19699 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
19700 Adjust.
19701
9703cc49
AD
197022001-11-19 Akim Demaille <akim@epita.fr>
19703
19704 * src/lalr.h (state_t): New.
19705 (state_table): Be a state_t * instead of a core **.
19706 (accessing_symbol): Remove, part of state_t.
19707 * src/lalr.c: Adjust.
19708 (set_accessing_symbol): Merge into...
19709 (set_state_table): this.
19710 * src/print_graph.c, src/conflicts.c: Adjust.
19711
d803322e
AD
197122001-11-14 Akim Demaille <akim@epita.fr>
19713
19714 * tests/calc.at, tests/output.at, tests/regression.at,
19715 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
19716 now the tests are run in private dirs, therefore AC_CLEANUP and
19717 family can be simplified to 0-ary.
19718 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
19719 use abs. path to find config.h.
19720 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
19721 stderr, there can be way too much random noise.
19722 Instead pass -Werror to GCC and rely on the exit status.
19723 Reported by Wolfram Wagner.
19724
3d76b07d
AD
197252001-11-14 Akim Demaille <akim@epita.fr>
19726
19727 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
19728 defined only if yyoverflow is defined, to avoid `warning: unused
19729 variable `yyvs1''.
19730 Reported by The Test Suite.
19731
09b503c8
AD
197322001-11-14 Akim Demaille <akim@epita.fr>
19733
19734 * src/print.c: Include reduce.h.
19735 Reported by Hans Aberg.
19736
197372001-11-14 Akim Demaille <akim@epita.fr>
19738
19739 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
19740 Revert a previous patch: these are really const.
19741 * src/conflicts.c (conflict_report): Additional useless pair of
19742 braces to pacify GCC's warnings for `if () if () {} else {}'.
19743 * src/lex.c (parse_percent_token): Replace equal_offset with
19744 arg_offset.
19745 arg is const.
19746 Be sure to strdup `arg' when used, since there is no reason for
19747 token_buffer not to change.
19748
0f37a994
AD
197492001-11-14 Akim Demaille <akim@epita.fr>
19750
19751 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
19752 definition.
19753 * src/main.c (main): Use them.
19754 Suggested by Hans Aberg.
19755
d39d93b8
AD
197562001-11-12 Akim Demaille <akim@epita.fr>
19757
19758 * src/system.h (ngettext): Now that we use ngettext, be sure to
19759 provide a default definition when NLS are not used.
19760
9edcd895
AD
197612001-11-12 Akim Demaille <akim@epita.fr>
19762
19763 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
19764 Use @kbd to denote user input.
19765 (Language and Grammar): ANSIfy the example.
19766 Adjust its layout for info/notinfo.
19767 (Location Tracking Calc): Output error messages to stderr.
19768 Output locations in a more GNUtically correct way.
19769 Fix a couple of Englishos.
19770 Adjust @group/@end group pairs.
19771
7da99ede
AD
197722001-11-12 Akim Demaille <akim@epita.fr>
19773
e3aa65c5 19774 %expect was not functioning at all.
7da99ede
AD
19775
19776 * src/conflicts.c (expected_conflicts): Set to -1.
19777 (conflict_report): Use ngettext.
19778 (conflicts_print): Check %expect and make its violation an error.
19779 * doc/bison.texinfo (Expect Decl): Adjust.
19780 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
19781 * tests/regression.at (%expect not enough, %expect right)
19782 (%expect too much): New.
19783
ba9dda1a
AD
197842001-11-12 Akim Demaille <akim@epita.fr>
19785
19786 * tests/regression.at (Conflicts): Rename as...
19787 (Unresolved SR Conflicts): this.
19788 (Solved SR Conflicts): New.
19789
337c5bd1
AD
197902001-11-12 Akim Demaille <akim@epita.fr>
19791
19792 * src/reduce.c (print_results): Rename as...
19793 (reduce_output): This.
19794 Output to OUT, passed as argument, instead of output_obstack.
19795 (dump_grammar): Likewise.
19796 (reduce_free): New.
19797 Also free V1.
19798 (reduce_grammar): No longer call reduce_output, since...
19799 * src/print.c (print_results): do it.
19800 * src/main.c (main): Call reduce_free;
19801
c73a41af
AD
198022001-11-12 Akim Demaille <akim@epita.fr>
19803
19804 * src/conflicts.c (print_reductions): Accept OUT as argument.
19805 Output to it, not to output_obstack.
19806 * src/print.c (print_actions): Adjust.
19807
0df87bb6
AD
198082001-11-12 Akim Demaille <akim@epita.fr>
19809
19810 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
19811 the result instead of using...
19812 (src_total, rrc_total, src_count, rrc_count): Remove.
19813 (any_conflicts): Remove.
19814 (print_conflicts): Split into...
19815 (conflicts_print, conflicts_output): New.
19816 * src/conflicts.h: Adjust.
19817 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 19818 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
19819 * tests/regression.at (Conflicts): New.
19820 Reported by Tom Lane.
19821
e4d3d4de
AD
198222001-11-12 Akim Demaille <akim@epita.fr>
19823
19824 * tests/regression.at (Invalid input): Remove, duplicate with
19825 ``Invalid input: 1''.
19826
6d7d248e
AD
198272001-11-12 Akim Demaille <akim@epita.fr>
19828
19829 * tests/torture.at (AT_DATA_STACK_TORTURE)
19830 (Exploding the Stack Size with Alloca)
19831 (Exploding the Stack Size with Malloc): New.
19832
e9e4c321
AD
198332001-11-12 Akim Demaille <akim@epita.fr>
19834
19835 * src/bison.simple (YYSTACK_REALLOC): New.
19836 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 19837 Reported by Per Allansson.
e9e4c321 19838
5f7e0832
AD
198392001-11-12 Pascal Bart <pascal.bart@epita.fr>
19840
19841 * src/bison.simple: Define type yystype instead of YYSTYPE, and
19842 define CPP macro, which substitute YYSTYPE by yystype.
19843 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
19844 with yyltype/YYLTYPE. This allows inclusion of the generated
19845 header within the parser if the compiler, such as GGC, accepts
19846 multiple equivalent #defines.
19847 From Akim.
19848
e3f1699f
AD
198492001-11-05 Akim Demaille <akim@epita.fr>
19850
19851 * src/reader.c (symbols_output): New, extracted from...
19852 (packsymbols): here.
19853 (reader): Adjust.
19854
65be0866
AD
198552001-11-05 Akim Demaille <akim@epita.fr>
19856
19857 * src/lex.c (parse_percent_token): s/quotearg/quote/.
19858
e4d910bf
AD
198592001-11-05 Akim Demaille <akim@epita.fr>
19860
19861 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
19862 pattern.
19863
951366c1
AD
198642001-11-05 Akim Demaille <akim@epita.fr>
19865
19866 * src/options.h (struct option_table_struct): set_flags is void*.
19867 * src/options.c (longopts): Support `--output' and `%output'.
19868 (usage): Adjust.
19869 * src/lex.h (tok_setopt): Remove, replaced with...
19870 (tok_intopt, tok_stropt): these new guys.
19871 * src/lex.c (getopt.h): Not needed.
19872 (token_buffer, unlexed_token_buffer): Not const.
19873 (percent_table): Promote `-' over `_' in directive names.
19874 Active `%name-prefix', `file-prefix', and `output'.
19875 (parse_percent_token): Accept possible arguments to directives.
19876 Promote `-' over `_' in directive names.
19877
d8988b2f
AD
198782001-11-04 Akim Demaille <akim@epita.fr>
19879
19880 * doc/bison.texinfo (Decl Summary): Split the list into
19881 `directives for grammars' and `directives for bison'.
19882 Sort'em.
19883 Add description of `%name-prefix', `file-prefix', and `output'.
19884 Promote `-' over `_' in directive names.
19885 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
19886 Simplify the description of `--name-prefix'.
19887 Promote `-' over `_' in directive names.
19888 Promote `--output' over `--output-file'.
19889 Fix the description of `--defines'.
19890 * tests/output.at: Exercise %file-prefix and %output.
19891
6468d18e
AD
198922001-11-02 Akim Demaille <akim@epita.fr>
19893
19894 * doc/refcard.tex: Update.
19895
6b7e85b9
AD
198962001-11-02 Akim Demaille <akim@epita.fr>
19897
19898 * src/symtab.h (SUNDEF): New.
19899 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
19900 stand for `uninitialized', instead of 0.
19901 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
19902 * src/lex.c (lex): Adjust.
19903
19904 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
19905 Number it 0.
19906 Let yylex return it instead of a plain 0.
19907 Reported by Dick Streefland.
19908
cd5aafcf
AD
199092001-11-02 Akim Demaille <akim@epita.fr>
19910
19911 * tests/regression.at (Mixing %token styles): New test.
19912
037ca2f1
AD
199132001-11-02 Akim Demaille <akim@epita.fr>
19914
19915 * src/reader.c (parse_thong_decl): Formatting changes.
19916 (token_translations_init): New, extracted from...
19917 (packsymbols): Here.
19918 Adjust.
19919
270a173c
AD
199202001-11-01 Akim Demaille <akim@epita.fr>
19921
19922 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
19923 Check that `9foo.y' produces correct cpp guards.
19924 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
19925 guards.
19926 Reported by Wwp.
19927
561f9a30
AD
199282001-11-01 Akim Demaille <akim@epita.fr>
19929
19930 * tests/regression.at (Invalid input: 2): New.
19931 * src/lex.c (unlexed_token_buffer): New.
19932 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
19933 too.
19934 Reported by Wwp.
19935
f987e9d2
AD
199362001-11-01 Akim Demaille <akim@epita.fr>
19937
19938 * tests/calc.at: Catch up with 1.30.
19939 * configure.in: Bump to 1.49a.
19940 Adjust to newer Autotest.
19941
0846f581
PB
199422001-10-19 Pascal Bart <pascal.bart@epita.fr>
19943
19944 * src/conflicts.c: Move global variables rrc_total and src_total ...
19945 (print_conflicts): here.
19946 * src/output.c (output): Free global variable user_toknums.
19947 * src/lex.c (token_obstack): Become static.
19948
3c1a79b3
AD
199492001-10-18 Akim Demaille <akim@epita.fr>
19950
19951 * tests/atlocal.in (GCC): Add.
19952 * tests/calc.at: s/m4_match/m4_bmatch/.
19953 s/m4_patsubst/m4_bpatsubst/.
19954 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
19955 * configure.in: AC_SUBST(GCC).
19956
5d52e7d0
MA
199572001-10-14 Marc Autret <autret_m@epita.fr>
19958
19959 * src/options.c (create_long_option_table): Fix.
19960
631aa1d3
AD
199612001-10-10 Akim Demaille <akim@epita.fr>
19962
19963 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
19964
f6ec6d13
AD
199652001-10-04 Akim Demaille <akim@epita.fr>
19966
19967 * src/reader.c (parse_union_decl): Push the caracters in
19968 union_obstack, not attrs_obstack.
19969
342b8b6e
AD
199702001-10-04 Akim Demaille <akim@epita.fr>
19971
19972 Merge in the branch 1.29.
19973
19974 * src/reader.c (packsymbols): Use a temporary obstack for
19975 `%%tokendef', since output_stack is already used elsewhere.
19976
19977 2001-10-02 Akim Demaille <akim@epita.fr>
19978
19979 Bump 1.29d.
19980
19981 2001-10-02 Akim Demaille <akim@epita.fr>
19982
19983 Version 1.29c.
19984
19985 2001-10-02 Akim Demaille <akim@epita.fr>
19986
19987 * tests/regression.at (Invalid CPP headers): New.
19988 From Alexander Belopolsky.
19989 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
19990
19991 2001-10-02 Akim Demaille <akim@epita.fr>
19992
19993 * tests/regression.at (Invalid input): New.
19994 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
19995 Reported by Shura.
19996
19997 2001-10-02 Akim Demaille <akim@epita.fr>
19998
19999 * tests/calc.at: Now that --debug works, the tests must be adjusted.
20000
20001 2001-10-02 Akim Demaille <akim@epita.fr>
20002
20003 * src/output.c (output_parser): Assert `skeleton'.
20004 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
20005 systems.
20006 From Shura.
20007
20008 2001-10-01 Marc Autret <autret_m@epita.fr>
20009
20010 * src/lex.h: Echo modifications.
20011 * src/lex.c (unlex): Parameter is now token_t.
20012 From Hans Aberg.
20013
20014 2001-10-01 Marc Autret <autret_m@epita.fr>
20015
20016 * src/main.c: Include lex.h.
20017 From Hans Aberg.
20018
20019 2001-09-29 Akim Demaille <akim@epita.fr>
20020
20021 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
20022
20023 2001-09-28 Akim Demaille <akim@epita.fr>
20024
20025 * tests/testsuite.at: Update to newer Autotest.
20026 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
20027
20028 2001-09-27 Akim Demaille <akim@epita.fr>
20029
20030 Position independent wrapper.
20031
20032 * tests/bison: Remove.
20033 * tests/bison.in: New.
20034 * configure.in: Adjust.
20035
20036 2001-09-27 Paul Eggert <eggert@twinsun.com>
20037
20038 Port quotearg fixes from tar 1.13.24.
20039
20040 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
20041 tm to be declared.
20042 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
20043 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
20044
20045 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
20046 * m4/mbrtowc.m4: New file.
20047 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
20048 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
20049
20050 2001-09-27 Akim Demaille <akim@epita.fr>
20051
20052 Bump to 1.29c.
20053
20054 2001-09-27 Akim Demaille <akim@epita.fr>
20055
20056 Version 1.29b.
20057
20058 2001-09-25 Akim Demaille <akim@epita.fr>
20059
20060 * src/system.h: Include `xalloc.h'.
20061 Remove it from the C files.
20062 * src/files.c (output_files): Free the obstacks.
20063 * src/lex.c (init_lex): Rename as...
20064 (lex_init): this.
20065 (lex_free): New.
20066 * src/main.c (main): Use it.
20067
20068 2001-09-24 Marc Autret <autret_m@epita.fr>
20069
20070 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
20071 to output informations in fout (FILE*).
20072 (open_graph, close_graph): Likewise.
20073 (output_graph, output_edge, output_node): Likewise.
20074 * src/vcg.h: Update function prototypes.
20075 * src/print_graph.c (print_graph): Open output graph file.
20076 (print_actions): Adjust.
20077 * src/files.h: Remove extern declaration.
20078 * src/files.c: Remove graph_obstack declaration.
20079 (open_files): Remove graph_obstack initialization.
20080 (output_files): Remove graph_obstack saving.
20081
20082 2001-09-24 Marc Autret <autret_m@epita.fr>
20083
20084 * src/files.c (compute_output_file_names): Fix.
20085
20086 2001-09-24 Marc Autret <autret_m@epita.fr>,
20087 Akim Demaille <akim@epita.fr>
20088
20089 * src/reader.c (reader): Remove call to free_symtab ().
20090 * src/main.c (main): Call it here.
20091 Include symtab.h.
20092 * src/conflicts.c (initialize_conflicts): Rename as...
20093 (solve_conflicts): this.
20094 * src/print.c (print_core, print_actions, print_state)
20095 (print_grammar): Dump to a file instead a `output_obstack'.
20096 (print_results): Dump `output_obstack', and then proceed with the
20097 FILE *.
20098 * src/files.c (compute_output_file_names, close_files): New.
20099 (output_files): Adjust.
20100 * src/main.c (main): Adjust.
20101
20102 2001-09-23 Marc Autret <autret_m@epita.fr>
20103
20104 * src/files.c (compute_header_macro): Computes header macro name
20105 from spec_defines_file when given.
20106
20107 2001-09-23 Marc Autret <autret_m@epita.fr>
20108
20109 * src/files.c (output_files): Add default extensions.
20110
20111 2001-09-22 Akim Demaille <akim@epita.fr>
20112
20113 * src/conflicts.c (finalize_conflicts): Rename as...
20114 (free_conflicts): this.
20115
20116 2001-09-22 Akim Demaille <akim@epita.fr>
20117
20118 * src/gram.c (gram_free): Rename back as...
20119 (dummy): this.
20120 (output_token_translations): Free `token_translations'.
20121 * src/symtab.c (free_symtab): Free the tag field.
20122
20123 2001-09-22 Akim Demaille <akim@epita.fr>
20124
20125 Remove `translations' as it is always set to true.
20126
20127 * src/gram.h: Adjust.
20128 * src/reader.c (packsymbols, parse_token_decl): Adjust
20129 * src/print.c (print_grammar): Adjust.
20130 * src/output.c (output_token_translations): Adjust.
20131 * src/lex.c (lex): Adjust.
20132 * src/gram.c: Be sure the set pointers to NULL.
20133 (dummy): Rename as...
20134 (gram_free): this.
20135
20136 2001-09-22 Akim Demaille <akim@epita.fr>
20137
20138 * configure.in: Invoke AM_LIB_DMALLOC.
20139 * src/system.h: Use dmalloc.
20140 * src/LR0.c: Be sure to have pointers initialized to NULL.
20141 (allocate_itemsets): Allocate kernel_items only if needed.
20142
20143 2001-09-22 Akim Demaille <akim@epita.fr>
20144
20145 * configure.in: Bump to 1.29b.
20146 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
20147 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
20148 need xmalloc.c in calc.y.
20149 From Pascal Bart.
20150
20151 2001-09-21 Akim Demaille <akim@epita.fr>
20152
20153 Version 1.29a.
20154 * Makefile.maint, config/config.guess, config/config.sub,
20155 * config/missing: Update from masters.
20156 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
20157 upon package.m4.
20158 * configure.in (ALL_LINGUAS): Add `tr'.
20159
20160 2001-09-21 Akim Demaille <akim@epita.fr>
20161
20162 * tests/Makefile.am (package.m4): Move to...
20163 ($(srcdir)/$(TESTSUITE)): here.
20164
20165 2001-09-20 Akim Demaille <akim@epita.fr>
20166
20167 * src/complain.c: No longer try to be standalone: use system.h.
20168 Don't assume __STDC__ is defined to 1. Just test if it is defined.
20169 * src/complain.h: Likewise.
20170 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
20171 Remove the unused variable `n'.
20172 From Albert Chin-A-Young.
20173
20174 2001-09-18 Marc Autret <autret_m@epita.fr>
20175
20176 * doc/bison.1: Update.
20177 * doc/bison.texinfo (Bison Options): Update --defines and --graph
20178 descriptions.
20179 (Option Cross Key): Update.
20180 Add --graph.
20181
20182 2001-09-18 Marc Autret <autret_m@epita.fr>
20183
20184 * tests/regression.at: New test (comment in %union).
20185
20186 2001-09-18 Marc Autret <autret_m@epita.fr>
20187
20188 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
20189 do that.
20190 Reported by Keith Browne.
20191
20192 2001-09-18 Marc Autret <autret_m@epita.fr>
20193
20194 * tests/output.at: Add tests for --defines and --graph.
20195
20196 2001-09-18 Marc Autret <autret_m@epita.fr>
20197
20198 * tests/output.at: Removes tests of %{header,src}_extension features.
20199
20200 2001-09-18 Akim Demaille <akim@epita.fr>
20201
20202 * tests/Makefile.am (package.m4): New.
20203 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
20204 (_AT_CHECK_CALC_ERROR): Likewise.
20205 Factor the `, ' part of verbose error messages.
20206
20207 2001-09-18 Marc Autret <autret_m@epita.fr>
20208
20209 * src/getargs.c (longopts): Declare --defines and --graph as options
20210 with optional arguments.
20211 * src/files.h: Add extern declarations.
20212 * src/files.c (spec_graph_file, spec_defines_file): New.
20213 (output_files): Update.
20214 Remove CPP-outed code.
20215
20216 2001-09-18 Marc Autret <autret_m@epita.fr>
20217
20218 Turn off %{source,header}_extension feature.
20219
20220 * src/files.c (compute_exts_from_gf): Update.
20221 (compute_exts_from_src): Update.
20222 (output_files): CPP-out useless code.
20223 * src/files.h: Remove {header,source}_extension extern declarations.
20224 * src/reader.c (parse_dquoted_param): CPP-out.
20225 (parse_header_extension_decl): Remove.
20226 (parse_source_extension_decl): Remove.
20227 (read_declarations): Remove cases tok_{hdrext,srcext}.
20228 * src/lex.c (percent_table): Remove {header,source}_extension entries.
20229 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
20230
20231 2001-09-10 Akim Demaille <akim@epita.fr>
20232
20233 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
20234 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
20235 (AT_CHECK_OUTPUT): this.
20236 Merely check ls' exit status, its output is useless.
20237
20238 2001-09-10 Akim Demaille <akim@epita.fr>
20239
20240 * tests/calc.at: Use m4_match.
20241 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
20242
20243 2001-09-10 Marc Autret <autret_m@epita.fr>,
20244 Akim Demaille <akim@epita.fr>
20245
20246 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
20247 enum color_e.
20248 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
20249 to `normal'.
20250 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
20251 * src/lex.h: Adjust prototype.
20252 (token_t): Add `tok_undef'.
20253 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
20254 (parse_percent_token): Now returns token_t.
20255 Add default statement in switch.
20256 (lex): Separate `c' as an input variable, from the token_t result
20257 part.
20258 (unlexed): Is a token_t.
20259
20260 2001-09-10 Akim Demaille <akim@epita.fr>
20261
20262 * configure.in: Bump to 1.29a.
20263
20264 2001-09-07 Akim Demaille <akim@epita.fr>
20265
20266 Version 1.29.
20267
20268 2001-08-30 Akim Demaille <akim@epita.fr>
20269
20270 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
20271 * m4/atconfig.m4: Remove.
20272 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
20273 * tests/bison: New.
20274 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
20275 m4_if, m4_patsubst, and m4_regexp.
20276 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
20277 `input' file instead of echo.
20278
20279 2001-08-29 Akim Demaille <akim@epita.fr>
20280
20281 Bump to 1.28e.
20282
20283 2001-08-29 Akim Demaille <akim@epita.fr>
20284
20285 Version 1.28d.
20286
20287 2001-08-29 Paul Eggert <eggert@twinsun.com>
20288
20289 * src/bison.simple (yyparse): Don't take the address of an
20290 item before the start of an array, as that doesn't conform to
20291 the C Standard.
20292
20293 2001-08-29 Robert Anisko <anisko_r@epita.fr>
20294
20295 * doc/bison.texinfo (Location Tracking Calc): New node.
20296
20297 2001-08-29 Paul Eggert <eggert@twinsun.com>
20298
20299 * src/output.c (output): Do not define const, as this now
20300 causes more problems than it cures.
20301
20302 2001-08-29 Akim Demaille <akim@epita.fr>
20303
20304 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
20305 the nodes.
20306 Be sure to tag the `detailmenu'.
20307
20308 2001-08-29 Akim Demaille <akim@epita.fr>
20309
20310 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
20311 download in a tmp dir.
20312
20313 2001-08-28 Marc Autret <autret_m@epita.fr>
20314
20315 * config/depcomp: New file.
20316
20317 2001-08-28 Marc Autret <autret_m@epita.fr>
20318
20319 * doc/bison.1 (mandoc): Adjust.
20320 From Juan Manuel Guerrero.
20321
20322 2001-08-28 Marc Autret <autret_m@epita.fr>
20323
20324 * src/print_graph.c (print_state): Fix.
20325
20326 2001-08-27 Marc Autret <autret_m@epita.fr>
20327
20328 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
20329 char * members.
20330 Echo modifications to the functions prototypes.
20331 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
20332
20333 2001-08-27 Marc Autret <autret_m@epita.fr>
20334
20335 * src/vcg.c: Include `xalloc.h'.
20336 (add_colorentry): New.
20337 (add_classname): New.
20338 (add_infoname): New.
20339 * src/vcg.h: Add new prototypes.
20340
20341 2001-08-27 Akim Demaille <akim@epita.fr>
20342
20343 * Makefile.maint: Sync. again with CVS Autoconf.
20344
20345 2001-08-27 Akim Demaille <akim@epita.fr>
20346
20347 * Makefile.maint: Formatting changes.
20348 (po-update, cvs-update, update): New targets.
20349 (AMTAR): Remove.
20350
20351 2001-08-27 Akim Demaille <akim@epita.fr>
20352
20353 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20354 * Makefile.maint: Sync. with CVS Autoconf.
20355
20356 2001-08-27 Marc Autret <autret_m@epita.fr>
20357
20358 * src/vcg.h (struct infoname_s): New.
20359 (struct colorentry_s): New.
20360 (graph_s): New fields {vertical,horizontal}_order in structure.
20361 Add `infoname' field.
20362 Add `colorentry' field;
20363 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
20364 (G_HORIZONTAL_ORDER): New.
20365 (G_INFONAME): New.
20366 (G_COLORENTRY): New.
20367 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
20368 Add output of `infoname'.
20369 Add output of `colorentry'.
20370
20371 2001-08-27 Marc Autret <autret_m@epita.fr>
20372
20373 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
20374 This one shadowed a global parameter.
20375
20376 2001-08-24 Marc Autret <autret_m@epita.fr>
20377
20378 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
20379 instead of `unsigned'.
20380 (print_state): Do not call obstack_object_size () in obstack_grow ()
20381 to avoid macro variables shadowing.
20382
20383 2001-08-23 Marc Autret <autret_m@epita.fr>
20384
20385 * src/lex.c (percent_table): Typo: s/naem/name/.
20386 Add graph option.
20387 Normalize new options declarations.
20388
20389 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
20390
20391 * tests/suite.at: Exercise %header_extension and %source_extension.
20392
20393 2001-08-16 Marc Autret <autret_m@epita.fr>
20394
20395 * src/reader.c (parse_dquoted_param): New.
20396 (parse_header_extension_decl): Use it.
20397 (parse_source_extension_decl): Likewise.
20398
20399 2001-08-16 Marc Autret <autret_m@epita.fr>
20400
20401 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
20402 (get_xxxx_str): Use assert () instead of complain ().
20403 Remove return invokations in default cases.
20404 (get_decision_str): Modify default behaviour. Remove second argument.
20405 Echo modifications on calls.
20406 (output_graph): Fix.
20407
20408 2001-08-16 Marc Autret <autret_m@epita.fr>
20409
20410 * src/getargs.c (usage): Update with ``-g, --graph''.
20411
20412 2001-08-16 Marc Autret <autret_m@epita.fr>
20413
20414 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
20415 (Option Cross Key): Likewise.
20416 * doc/bison.1: Update.
20417
1c8c2190
PB
204182001-09-25 Pascal Bart <pascal.bart@epita.fr>
20419
20420 * src/output.c (output_master_parser): Don't finish action_obstack.
20421 (output_parser): Don't care about the muscle action, here.
20422 (prepare): Copy the action_obstack in the action muscle.
20423 (output): Free action_obstack.
20424
180d45ba
PB
204252001-09-23 Pascal Bart <pascal.bart@epita.fr>
20426
20427 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
20428 will contain `%union' declaration.
20429 (parse_union_decl): Delete #line directive output.
20430 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
20431 informations about %union.
20432 (parse_union_decl): Copy the union_obstack in the muscle stype.
20433 * src/bison.simple: Add new #line directive.
20434 Add typdef %%stype YYSTYPE.
20435
c51d1a19
PB
204362001-09-23 Pascal Bart <pascal.bart@epita.fr>
20437
20438 * src/bison.simple: Add new `#line' directive.
20439
6f9344da
PB
204402001-09-22 Pascal Bart <pascal.bart@epita.fr>
20441
20442 * src/bison.simple: New `#line' directive.
20443 * src/output.c (output_parser): Support new dynamic muscle input_line.
20444
652def80
MA
204452001-09-22 Marc Autret <autret_m@epita.fr>
20446
20447 * src/output.c (output_master_parser): New.
20448 (output_parser): Be more re-entrant.
20449
25b222fa
MA
204502001-09-21 Marc Autret <autret_m@epita.fr>
20451
20452 * src/reader.c (copy_definition, parse_union_decl): Update and use
20453 `linef' muscle.
20454 (copy_action): Likewise.
20455 Use obstack_1grow ().
20456 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
20457
6bc35ae5
MA
204582001-09-21 Marc Autret <autret_m@epita.fr>
20459
20460 * src/options.c (option_table): Adjust.
20461 * src/lex.c (parse_percent_token): Fix.
20462
c0629aa1
PB
204632001-09-20 Pascal Bart <pascal.bart@epita.fr>
20464
20465 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 20466
82b6d266
PB
204672001-09-20 Pascal Bart <pascal.bart@epita.fr>
20468
20469 * src/lex.c (parse_percent_token): Change type of variable `tx', which
20470 is now an option_table_struct*.
20471 (option_strcmp): New function option_strcmp.
20472 (parse_percent_token): Call option_strcmp.
20473 * src/getargs.c (xalloc.h, options.h): Include it.
20474 (getargs): Call create_long_option_table.
20475 (getargs): Free longopts at the end of the function.
20476 (shortopts): Move in options.c.
20477 * src/options.c (create_long_option_table): New function. Convert
20478 information from option_table to option structure.
20479 * src/reader.c (options.h): Include it.
20480
20481 * src/Makefile.am: Adjust.
20482 * src/options.c (option_table): Create from longopts and percent_table.
20483 * src/getargs.c (longopts): Delete.
20484 * src/lex.c (struct percent_table_struct): Delete.
20485 (percent_table): Delete.
20486 (options.h): Include it.
20487 * src/options.c: Create.
20488 * src/options.h: Create.
20489 Declare enum opt_access_e.
20490 Define struct option_table_struct.
20491
75f5aaea
MA
204922001-09-20 Marc Autret <autret_m@epita.fr>
20493
20494 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
20495 sections of Bison.
20496
f508cb0a
PB
204972001-09-19 Pascal Bart <pascal.bart@epita.fr>
20498
20499 * src/bison.simple: s/%%filename/%%skeleton.
20500 * src/muscle_tab.c (getargs.h): Include it.
20501 (muscle_init): Insert new muscle skeleton.
20502
13105fc1
PB
205032001-09-18 Pascal Bart <pascal.bart@epita.fr>
20504
20505 * src/output.c (output_parser): Delete unused variable actions_dumped.
20506
b0c4483e
PB
205072001-09-07 Pascal Bart <pascal.bart@epita.fr>
20508
20509 * src/output.c (output): Delete call to reader_output_yylsp.
20510 * src/reader.c (reader): Likewise.
ba0fe3c7 20511 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 20512
11d82f03
MA
205132001-09-02 Marc Autret <autret_m@epita.fr>
20514
20515 * src/reader.c: Include muscle_tab.h.
20516 (parse_union_decl): Update.
20517 (parse_macro_decl): Rename parse_muscle_decl.
20518 Update to use renamed functions and variable.
20519 (read_declarations, copy_action, read_additionnal_code, : Updated
20520 with correct variables and functions names.
20521 (packsymbols, reader): Likewise.
342b8b6e 20522
11d82f03 20523 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 20524
11d82f03
MA
20525 * src/output.c: Include muscle_tab.h
20526 In all functions using macro_insert, change by using muscle_insert ().
20527 (macro_obstack): Rename muscle_obstack.
20528 Echo modifications in the whole file.
20529 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
20530 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
20531 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
20532
20533 * src/muscle_tab.h: Update double inclusion macros.
20534 (macro_entry_s): Rename muscle_entry_s.
20535 Update prototypes.
342b8b6e 20536
11d82f03
MA
20537 * src/muscle_tab.c: Include muscle_tab.h.
20538 Rename macro_tabble to muscle_table.
20539 (mhash1, mhash2, mcmp): Use muscle_entry.
20540 (macro_init): Rename muscle_init. Update.
20541 (macro_insert): Rename muscle_insert. Update.
20542 (macro_find): Rename muscle_find. Update.
20543
20544 * src/main.c: Include muscle_tab.h.
20545 (main): Call muscle_init ().
20546 * src/Makefile.am (bison_SOURCES): Echo modifications.
20547
93a37297
MA
205482001-09-02 Marc Autret <autret_m@epita.fr>
20549
f753cd62 20550 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 20551
f753cd62
MA
20552 * src/muscle_tab.c, src/muscle_tab.h: Add files.
20553
205542001-09-02 Marc Autret <autret_m@epita.fr>
20555
20556 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 20557
682d48cd
PB
205582001-09-01 Pascal Bart <pascal.bart@epita.fr>
20559
342b8b6e 20560 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
20561 filename.
20562
087c8fda
MA
205632001-09-01 Marc Autret <autret_m@epita.fr>
20564
20565 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
20566 to an explicit value to activate the feature. We do it here.
20567
dda680cb
PB
205682001-08-31 Pascal Bart <pascal.bart@epita.fr>
20569
20570 * src/output.c (prepare): Delete the `filename' muscule insertion.
20571 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
20572 (parse_union_decl): Likewise.
20573 * src/macrotab.c (macro_init): Initialize filename by infile.
20574
9e644e64
MA
205752001-08-31 Marc Autret <autret_m@epita.fr>
20576
20577 * src/bison.simple (YYLSP_NEEDED): New definition.
20578 * src/output.c (prepare): Add macro insertion of `locations_flag'
20579
17da6427
PB
205802001-08-31 Pascal Bart <pascal.bart@epita.fr>
20581
20582 * src/output.c (prepare): Delete insertion of previous muscles,
20583 and insert the `prefix' muscles.
20584 * src/macrotab.c (macro_init): Likewise.
20585 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 20586 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
20587 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
20588 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 20589 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
20590 name_prefix.
20591
e8cb70b9
PB
205922001-08-31 Pascal Bart <pascal.bart@epita.fr>
20593
20594 * src/main.c (main): Standardize.
20595 * src/output.c (output_table_data, output_parser): Likewise.
20596 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
20597
63c2d5de
MA
205982001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
20599
342b8b6e 20600 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
20601 %%epilogue.
20602 * src/output.c (output): Rename %%declarations to %%prologue.
20603 * src/bison.simple: Echo modifications.
342b8b6e 20604
d8cb5183
MA
206052001-08-31 Marc Autret <autret_m@epita.fr>
20606
20607 * src/reader.c (readgram): CleanUp.
20608 (output_token_defines): Likewise.
20609 (packsymbols): Likewise.
20610 (reader): Likewise.
20611 * src/output.c (output): CPP-out useless code.
20612
6c686258
PB
206132001-08-31 Pascal Bart <pascal.bart@epita.fr>
20614
342b8b6e 20615 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
20616 output_trailers and output_headers.
20617 * src/output.h: Remove obsolete functions prototypes of output_headers
20618 and output_trailers.
20619
8f451ef7
PB
206202001-08-30 Pascal Bart <pascal.bart@epita.fr>
20621
20622 * src/main.c: Include macrotab.h.
342b8b6e 20623 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
20624 Adjust functions prototypes.
20625 * src/macrotab.c (macro_insert): Constify key and value.
20626 (macro_find): Constify key.
20627 (macro_insert): Include 'xalloc.h'
20628 (macro_insert): Use XMALLOC.
20629 (macro_find): Constify return value.
20630 * src/output.c (output_table_data): Rename table to table_data.
20631 (output_parser): Constify macro_key, macro_value.
20632
997b6fd0 206332001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
20634
20635 * src/reader.c (parse_skel_decl): New.
342b8b6e 20636 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
20637 * src/lex.h (token_t): New token `tok_skel'.
20638 * src/lex.c (percent_table): Add skeleton option entry.
20639 Standardize.
20640
ff48177d
MA
206412001-08-29 Marc Autret <autret_m@epita.fr>
20642
20643 * src/bison.simple: Add %%user_code directive at the end.
20644 * src/reader.c (read_additionnal_code): New.
20645 (reader): Use it.
20646 * src/output.c (output_program): Remove.
20647 (output): Update.
20648
b33160bf
MA
206492001-08-28 Marc Autret <autret_m@epita.fr>
20650
20651 * src/output.c (output_actions): Clean up.
4e5caae2 20652 (output_gram): CPP-out useless code.
b33160bf
MA
20653 * src/reader.c (reader): Clean up, CPP-out useless code.
20654
d1a2daf7
PB
206552001-08-28 Pascal Bart <pascal.bart@epita.fr>
20656
342b8b6e 20657 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 20658 directive.
d1a2daf7
PB
20659 * src/bison.simple: Add `%%definitions'.
20660
2b763dfe
MA
206612001-08-28 Marc Autret <autret_m@epita.fr>
20662
20663 * config/depcomp: New file.
20664
f1a87ef6
PE
206652001-08-27 Paul Eggert <eggert@twinsun.com>
20666
20667 * src/bison.simple (yyparse): Don't take the address of an
20668 item before the start of an array, as that doesn't conform to
20669 the C Standard.
20670
82e236e2
RA
206712001-08-27 Robert Anisko <robert.anisko@epita.fr>
20672
f1a87ef6 20673 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
20674 obstack. It was done too late here.
20675
20676 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
20677 completely wrong.
20678 (reader): Initialize the macro obstack here, since we need it to grow
20679 '%define' directives.
20680
20681 * src/reader.h: Declare the macro obstack as extern.
20682
b0cfa28a
RA
206832001-08-27 Robert Anisko <robert.anisko@epita.fr>
20684
20685 * src/output.c (output_parser): Fix. Store single '%' characters in
20686 the output obstack instead of throwing them away.
20687
6fc74234
AD
206882001-08-27 Akim Demaille <akim@epita.fr>
20689
20690 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
20691
9c76d118
RA
206922001-08-25 Robert Anisko <robert.anisko@epita.fr>
20693
20694 * lib/Makefile.am: Adjust.
20695
a8289c62
RA
206962001-08-25 Robert Anisko <robert.anisko@epita.fr>
20697
20698 * src/bison.simple: Update and add '%%' directives.
20699
b6610515
RA
207002001-08-25 Robert Anisko <robert.anisko@epita.fr>
20701
20702 * src/reader.c (reader): Remove calls to 'output_headers' and
20703 'output_trailers'. Remove some C output.
20704 (readgram): Disable a piece of code that was writing a default
20705 definition for 'YYSTYPE'.
20706 (reader_output_yylsp): Remove.
20707 (packsymbols): Output token defintions to a macro.
20708 (copy_definition): Disable C output.
6fc74234 20709
b6610515
RA
20710 * src/reader.c (parse_macro_decl): New function used to parse macro
20711 declarations.
20712 (copy_string2): Put the body of copy_string into this new function.
20713 Add a parameter to let the caller choose whether he wants to copy the
20714 string delimiters or not.
20715 (copy_string): Be a simple call to copy_string2 with the last argument
20716 bound to true.
20717 (read_declarations): Add case for macro definition.
20718 (copy_identifier): New.
6fc74234 20719 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
20720 rather than lex.
20721
26f609ff
RA
207222001-08-25 Robert Anisko <robert.anisko@epita.fr>
20723
20724 * src/output.c (prepare): Add prefixed names.
20725 (output_parser): Output semantic actions.
20726 (output_parser): Fix bug on '%%line' directives.
6fc74234 20727
26f609ff
RA
20728 * src/output.c (output_headers): Remove. The C code printed by this
20729 function should now be in the skeletons.
20730 (output_trailers): Remove.
20731 (output): Disable call to 'reader_output_yylsp'.
20732 (output_rule_data): Do not output tables to the table obstack.
20733
20734 * src/output.c: Remove some C dedicated output.
20735 Improve the use of macro and output obstacks.
20736 (output_defines): Remove.
6fc74234 20737
26f609ff
RA
20738 * src/output.c (output_token_translations): Associate 'translate'
20739 table with a macro. No output to the table obstack.
20740 (output_gram): Same for 'rhs' and 'prhs'.
20741 (output_stos): Same for 'stos'.
20742 (output_rule_data): Same for 'r1' and 'r2'.
20743 (token_actions): Same for 'defact'.
20744 (goto_actions): Same for 'defgoto'.
20745 (output_base): Same for 'pact' and 'pgoto'.
20746 (output_table): Same for 'table'.
20747 (output_check): Same for 'check'.
6fc74234 20748
26f609ff
RA
20749 * src/output.c (output_table_data): New function.
20750 (output_short_table): Remove.
20751 (output_short_or_char_table): Remove.
6fc74234 20752
26f609ff
RA
20753 * src/output.c (output_parser): Replace most of the skeleton copy code
20754 with something new. Skeletons are now processed character by character
20755 rather than line by line, and Bison looks for '%%' macros. This is the
20756 first step in making Bison's output process (a lot) more flexible.
20757 (output_parser): Use the macro table.
20758
6f43b113
RA
207592001-08-25 Robert Anisko <robert.anisko@epita.fr>
20760
20761 * src/main.c (main): Initialize the macro table.
20762
dd3127cf
RA
207632001-08-25 Robert Anisko <robert.anisko@epita.fr>
20764
20765 * src/lex.c (percent_table): Add tok_define.
20766 * src/lex.h: Add tok_define.
20767
aa321494
RA
207682001-08-25 Robert Anisko <robert.anisko@epita.fr>
20769
20770 * src/macrotab.c: New file.
20771 * src/macrotab.h: New file.
20772 * src/Makefile.am: Update.
20773
68bd3b6b
RA
207742001-08-25 Robert Anisko <robert.anisko@epita.fr>
20775
20776 * lib/hash.c: New file.
20777 * lib/hash.h: New file.
20778 * lib/Makefile.am: Update.
20779
45f8dd1e
AD
207802001-08-15 Akim Demaille <akim@epita.fr>
20781
20782 Version 1.28c.
20783
40a64a7a 207842001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
20785
20786 * src/reader.c (readgram): Indent output macro YYSTYPE.
20787 (packsymbols): Likewise.
20788 (output_token_defines): Likewise.
20789 * src/files.c: Standardize.
20790 (compute_header_macro): New.
20791 (defines_obstack_save): New. Use compute_header_macro.
20792 (output_files): Update. Use defines_obstack_save.
20793
f9a8293a
AD
207942001-08-15 Akim Demaille <akim@epita.fr>
20795
20796 * doc/bison.texinfo (Table of Symbols): Document
20797 YYSTACK_USE_ALLOCA.
20798
150ca7a7
AD
207992001-08-15 Akim Demaille <akim@epita.fr>
20800
20801 * missing: Update from CVS Automake.
20802 * config/config.guess, config/config.sub, config/texinfo.tex:
20803 Update from gnu.org.
20804
69b5cec4
AD
208052001-08-15 Akim Demaille <akim@epita.fr>
20806
20807 * Makefile.maint: Sync with CVS Autoconf.
20808
f2b5126e
PB
208092001-08-14 Pascal Bart <pascal.bart@epita.fr>
20810
69b5cec4 20811 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
20812 `fdl.texi'.
20813 * doc/fdl.texi: Add to package.
20814
4ecbf796
MA
208152001-08-14 Marc Autret <autret_m@epita.fr>
20816
20817 Turn on %{source,header}_extension features.
20818
69b5cec4 20819 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
20820 source_extension.
20821 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 20822 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
20823 between options.
20824
95fb5662
MA
208252001-08-14 Marc Autret <autret_m@epita.fr>
20826
20827 * src/files.c (compute_base_names): Add extensions computing when
20828 `--file-prefix' used.
20829 Standardize function calls.
20830
78d09da9
MA
208312001-08-13 Marc Autret <autret_m@epita.fr>
20832
69b5cec4 20833 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
20834 defining it (defined but null disables alloca).
20835
5a009f2c
MA
208362001-08-13 Marc Autret <autret_m@epita.fr>
20837
20838 * src/bison.simple (_yy_memcpy): CPP reformat.
20839
1e41465a
PB
208402001-08-13 Pascal Bart <pascal.bart@epita.fr>
20841
20842 * tests/atconfig.in (CPPFLAGS): Fix.
20843
c67a198d
PB
208442001-08-10 Pascal Bart <pascal.bart@epita.fr>
20845
79282c6c 20846 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
20847 `gpl.texi'.
20848 * doc/gpl.texi: Add to package.
20849
09a6de7e
MA
208502001-08-10 Marc Autret <autret_m@epita.fr>
20851
20852 * src/print_graph.h: Fix.
20853 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
20854
b77b9ee0
AD
208552001-08-10 Akim Demaille <akim@epita.fr>
20856
20857 * src/system.h: Provide default declarations for stpcpy, strndup,
20858 and strnlen.
20859
3e259915
MA
208602001-08-10 Robert Anisko <anisko_r@epita.fr>
20861
20862 * doc/bison.texinfo (Locations): Update @$ stuff.
20863
ca96bc2d
MA
208642001-08-09 Robert Anisko <anisko_r@epita.fr>
20865
20866 * src/bison.simple (YYLLOC_DEFAULT): Update.
20867 (yyparse): Adjust.
20868
fdc6758b
MA
208692001-08-08 Marc Autret <autret_m@epita.fr>
20870
b77b9ee0 20871 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
20872 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
20873 Reported by Fabrice Bauzac.
957d4dbf 20874
600cad3b
MA
208752001-08-08 Marc Autret <autret_m@epita.fr>
20876
20877 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
20878 * src/vcg.c (output_node): Fix.
20879 * src/vcg.h: Cleanup.
20880 * src/print_graph.c: Add comments.
b77b9ee0 20881 (node_output_size): New global variable. Simplify the formatting of
600cad3b 20882 the VCG graph output.
b77b9ee0 20883 (print_actions): Unused code is now used. It notifies the final state
600cad3b 20884 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 20885 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
20886 blue.
20887 Get the current node name and node_obstack by argument.
20888 (node_obstack): New variable.
20889 (print_state): Manage node_obstack.
20890 (print_core): Use node_obstack given by argument.
20891 A node is not only computed here but in print_actions also.
20892 (print_graph): CPP out useless code instead of commenting it.
20893
976e528f
AD
208942001-08-07 Pascal Bart <pascal.bart@epita.fr>
20895
20896 * tests/atconfig.in (CPPFLAGS): Fix.
20897
20e8e5ca
AD
208982001-08-07 Akim Demaille <akim@epita.fr>
20899
20900 * src/print_graph.c (quote): New.
20901 (print_core): Use it.
20902
957d4dbf 209032001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 20904
3e3da797
AD
20905 * src/vcg.c (complain.h): Include it.
20906 Unepitaize `return' invocations.
c4b66126 20907 [NDEBUG] (main): Remove.
79282c6c 20908 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
20909 * src/files.c (open_files): Initialize graph_obstack.
20910 * src/print_graph.c (print_actions): CPP out useless code.
20911 (print_core): Don't output the last `\n' in labels.
20912 Use `quote'.
20913 * src/files.c (output_files): Output the VCG file.
20914 * src/main.c (main): Invoke print_graph ();
3e3da797 20915
957d4dbf 209162001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
20917
20918 Automaton VCG graph output.
20919 Using option ``-g'' or long option ``--graph'', you can generate
20920 a gram_filename.vcg file containing a VCG description of the LALR (1)
20921 automaton of your grammar.
20922
20923 * src/main.c: Call to print_graph() function.
20924 * src/getargs.h: Update.
20925 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
20926 (graph_flag): New flag.
20927 (longopts): Update.
20928 (getargs): Add case `g'.
20929 * src/files.c (graph_obstack): New obstack struct.
20930 (open_files): Initialize new obstack.
20931 (output_files): Saves graph_obstack if required.
20932 * src/files.h (graph_obstack): New extern declaration.
20933 * src/Makefile.am: Add new source files.
20934
927c1557 209352001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
20936
20937 * src/print_graph.c, src/print_graph.h (graph): New.
20938 * src/vcg.h: New file.
20939 * src/vcg.c: New file, VCG graph handling.
20940
7333d403
AD
209412001-08-06 Marc Autret <autret_m@epita.fr>
20942
20943 Add of %source_extension and %header_extension which specify
20944 the source or/and the header output file extension.
20945
20946 * src/files.c (compute_base_names): Remove initialisation of
20947 src_extension and header_extension.
20948 (compute_exts_from_gf): Update.
20949 (compute_exts_from_src): Update.
20950 (output_files): Update.
20951 * src/reader.c (parse_header_extension_decl): New.
20952 (parse_source_extension_decl): New.
20953 (read_declarations): New case statements for the new tokens.
20954 * src/lex.c (percent_table): Add entries for %source_extension
20955 and %header_extension.
20956 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
20957
84163231
AD
209582001-08-06 Marc Autret <autret_m@epita.fr>
20959
20960 * configure.in: Bump to 1.28c.
20961 * doc/bison.texinfo: Texinfo thingies.
20962
8303fc42
AD
209632001-08-04 Pascal Bart <pascal.bart@epita.fr>
20964
20965 * tests/atconfig.in (CPPFLAGS): Add.
20966 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
20967
70a84437
AD
209682001-08-03 Akim Demaille <akim@epita.fr>
20969
20970 Version 1.28b.
20971
2ce10144
AD
209722001-08-03 Akim Demaille <akim@epita.fr>
20973
20974 * tests/Makefile.am (check-local): Ship testsuite.
20975 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
20976 Include `string.h'.
20977
1e3e4bc1
AD
209782001-08-03 Akim Demaille <akim@epita.fr>
20979
20980 * configure.in: Try using -Wformat when compiling.
20981
42b45b7f
AD
209822001-08-03 Akim Demaille <akim@epita.fr>
20983
20984 * configure.in: Bump to 1.28b.
20985
8f13fe33
AD
209862001-08-03 Akim Demaille <akim@epita.fr>
20987
20988 * src/complain.c: Adjust strerror_r portability issues.
20989
b37ba92c
AD
209902001-08-03 Akim Demaille <akim@epita.fr>
20991
20992 Version 1.28a.
20993
b0ce6046
AD
209942001-08-03 Akim Demaille <akim@epita.fr>
20995
20996 * src/getargs.c, src/getarg.h (skeleton)): Constify.
20997 * src/lex.c (literalchar): Avoid name clashes on `buf'.
20998 * src/getargs.c: Include complain.h.
20999 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
21000 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
21001
d01c415b
AD
210022001-08-03 Akim Demaille <akim@epita.fr>
21003
21004 * src/reader.c (readgram): Display hidden chars in error messages.
21005
459dd1a6
AD
210062001-08-03 Akim Demaille <akim@epita.fr>
21007
21008 Update to gettext 0.10.39.
21009
53b74c0c
AD
210102001-08-03 Akim Demaille <akim@epita.fr>
21011
21012 * lib/strspn.c: New.
21013
234a3be3
AD
210142001-08-01 Marc Autret <autret_m@epita.fr>
21015
21016 * doc/bison.texinfo: Update.
21017 * doc/bison.1 (mandoc): Update.
21018 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
21019 * src/files.c: Support output files extensions computing.
21020 (src_extension): New static variable.
21021 (header_extension): New static variable.
21022 (tr): New function.
21023 (get_extension_index): New function, gets the index of an extension
21024 filename in a string.
21025 (compute_exts_from_gf): New function, computes extensions from the
21026 grammar file extension.
21027 (compute_exts_from_src): New functions, computes extensions from the
21028 C source file extension, file given by ``-o'' option.
21029 (compute_base_names): Update.
21030 (output_files): Update.
21031
847bf1f5
AD
210322001-08-01 Robert Anisko <anisko_r@epita.fr>
21033
d995fee7 21034 * doc/bison.texi: Document @$.
847bf1f5
AD
21035 (Locations): New section.
21036
d074a105
AD
210372001-07-18 Akim Demaille <akim@epita.fr>
21038
21039 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
21040 * config/prev-version.txt, config/move-if-change: New.
21041 * Makefile.am: Adjust.
21042
3419715d
AD
210432001-07-08 Pascal Bart <pascal.bart@epita.fr>
21044
21045 * src/bison.simple (yyparse): Suppress warning `comparaison
21046 between signed and unsigned'.
21047
62ab6972
AD
210482001-07-05 Pascal Bart <pascal.bart@epita.fr>
21049
21050 * src/getargs.h (raw_flag): Remove.
21051 * src/getargs.c: Die on `-r'/`--raw'.
21052 * src/lex.c (parse_percent_token): Die on `%raw'.
21053 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
21054 * tests/calc.at: Suppress test with option `--raw'.
21055
1e24cc5b
AD
210562001-07-14 Akim Demaille <akim@epita.fr>
21057
21058 * config/: New.
21059 * configure.in: Require Autoconf 2.50.
21060 Update to gettext 0.10.38.
21061
32dfccf8
AD
210622001-03-16 Akim Demaille <akim@epita.fr>
21063
21064 * doc/bison.texinfo: ANSIfy the examples.
21065
cd5bd6ac
AD
210662001-03-16 Akim Demaille <akim@epita.fr>
21067
21068 * getargs.c (skeleton): New variable.
21069 (longopts): --skeleton is a new option.
21070 (shortopts, getargs): -S is a new option.
21071 * getargs.h: Declare skeleton.
21072 * output.c (output_parser): Use it.
21073
5141b016
AD
210742001-03-16 Akim Demaille <akim@epita.fr>
21075
21076 * m4/strerror_r.m4: New.
21077 * m4/error.m4: Run AC_FUNC_STRERROR_R.
21078 * lib/error.h, lib/error.c: Update.
21079
447992b9
AD
210802001-03-16 Akim Demaille <akim@epita.fr>
21081
21082 * src/getargs.c (longopts): Clean up.
21083
274d42ce
AD
210842001-02-21 Akim Demaille <akim@epita.fr>
21085
21086 * src/reader.c (gensym): `gensym_count' is your own.
21087 Use a static buf to create the symbol name, as token_buffer is no
21088 longer a buffer.
21089
22c821f3
AD
210902001-02-08 Akim Demaille <akim@epita.fr>
21091
21092 * src/conflicts.c (conflict_report): Be sure not to append to res
21093 between two calls, which could happen if both first sprintf were
21094 skipped, but not the first cp += strlen.
21095
18569462
AD
210962001-02-08 Akim Demaille <akim@epita.fr>
21097
21098 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
21099 New, from fileutils 4.0.37.
21100 * configure.in: Require Autoconf 2.49c. I took some time before
21101 making this decision. This is the only way out for portability
21102 issues in Bison, it would mean way too much duplicate effort to
21103 import in Bison features implemented in 2.49c since 2.13.
21104 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
21105
0d8f3c8a
AD
211062001-02-02 Akim Demaille <akim@epita.fr>
21107
21108 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 21109 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 21110
f17bcd1f
AD
211112001-01-19 Akim Demaille <akim@epita.fr>
21112
21113 Get rid of the ad hoc handling of token_buffer in the scanner: use
21114 the obstacks.
21115
21116 * src/lex.c (token_obstack): New.
21117 (init_lex): Initialize it. No longer call...
21118 (grow_token_buffer): this. Remove it.
21119 Adjust all the places which used it to use the obstack.
21120
511e79b3
AD
211212001-01-19 Akim Demaille <akim@epita.fr>
21122
21123 * src/lex.h: Rename all the tokens:
21124 s/\bENDFILE\b/tok_eof/g;
21125 s/\bIDENTIFIER\b/tok_identifier/g;
21126 etc.
21127 Let them be enums, not #define, to ease debugging.
21128 Adjust all the code.
21129
0d6508ef
AD
211302001-01-18 Akim Demaille <akim@epita.fr>
21131
21132 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
21133 * src/lex.c (maxtoken, grow_token_buffer): Static.
21134
6deb4447
AD
211352001-01-18 Akim Demaille <akim@epita.fr>
21136
21137 Since we now use obstacks, more % directives can be enabled.
21138
21139 * src/lex.c (percent_table): Also accept `%yacc',
21140 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
21141 `%debug'.
21142 Handle the actions for `%semantic_parser' and `%pure_parser' here,
21143 instead of returning a token.
21144 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
21145 * src/reader.c (read_declarations): Adjust.
21146 * src/files.c (open_files): Don't call `compute_base_names', don't
21147 compute `attrsfile' since they depend upon data which might be
21148 *in* the input file now.
21149 (output_files): Do it here.
21150 * src/output.c (output_headers): Document the fact that this patch
21151 introduces a guaranteed SEGV for semantic parsers.
21152 * doc/bison.texinfo: Document them.
21153 * tests/suite.at: Exercise these %options.
21154
ff4423cc
AD
211552000-12-20 Akim Demaille <akim@epita.fr>
21156
21157 Also handle the output file (--verbose) with obstacks.
21158
21159 * files.c (foutput): Remove.
21160 (output_obstack): New.
21161 Adjust all dependencies.
21162 * src/conflicts.c: Return a string.
21163 * src/system.h (obstack_grow_string): Rename as...
21164 (obstack_sgrow): this. Be ready to work with non literals.
21165 (obstack_fgrow4): New.
21166
956dba3a
AD
211672000-12-20 Akim Demaille <akim@epita.fr>
21168
21169 * src/files.c (open_files): Fix the computation of short_base_name
21170 in the case of `-o foo.tab.c'.
21171
337bab46
AD
211722000-12-20 Akim Demaille <akim@epita.fr>
21173
21174 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
21175 (copy_dollar): Now that everything uses obstacks, get rid of the
21176 FILE * parameters.
21177
5d3214b8
AD
211782000-12-20 Akim Demaille <akim@epita.fr>
21179
21180 * src/files.c (open_files): Actually the `.output' file is based
21181 on the short_base_name, not base_name.
21182 * tests/suite.at (Checking output file names): Adjust.
21183
29092a57
AD
211842000-12-20 Akim Demaille <akim@epita.fr>
21185
21186 * src/bison.s1: Remove, we now use directly...
21187 * src/bison.simple: this.
21188 * src/Makefile.am: Use pkgdata instead of data.
21189
ea5607fd
AD
211902000-12-20 Akim Demaille <akim@epita.fr>
21191
21192 * src/files.c (guard_obstack): New.
21193 (open_files): Initialize it.
21194 (output_files): Dump it...
21195 * src/files.h: Export it.
21196 * src/reader.c (copy_guard): Use it.
21197
27110317
AD
211982000-12-19 Akim Demaille <akim@epita.fr>
21199
21200 * src/files.c (outfile, defsfile, actfile): Removed as global
21201 vars.
21202 (open_files): Don't compute them.
21203 (output_files): Adjust.
21204 (base_name, short_base_name): Be global.
21205 Adjust dependencies.
21206
19c50364
AD
212072000-12-19 Akim Demaille <akim@epita.fr>
21208
21209 * src/files.c (strsuffix): New.
21210 (stringappend): Be just like strcat but allocate.
21211 (base_names): Eve out from open_files.
21212 Try to simplify the rather hairy computation of base_name and
21213 short_base_name.
21214 (open_files): Use it.
21215 * tests/suite.at (Checking output file names): New test.
21216
573c1d9f
AD
212172000-12-19 Akim Demaille <akim@epita.fr>
21218
21219 * src/system.h (obstack_grow_literal_string): Rename as...
21220 (obstack_grow_string): this.
21221 * src/output.c (output_parser): Recognize `%% actions' instead of
21222 `$'.
21223 * src/bison.s1: s/$/%% actions/.
21224 * src/bison.hairy: Likewise.
21225
ef7ddedd
AD
212262000-12-19 Akim Demaille <akim@epita.fr>
21227
21228 * src/output.c (output_parser): Compute the `#line' lines when
21229 there are.
21230 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
21231 Suggested by Hans Aberg.
21232
ff61dabd
AD
212332000-12-19 Akim Demaille <akim@epita.fr>
21234
21235 Let the handling of the skeleton files be local to the procedures
21236 that use it.
21237
21238 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
21239 longer static.
21240 (fparser, open_extra_files): Remove.
21241 (open_files, output_files): Don't take care of fparser.
21242 * src/files.h: Adjust.
21243 * src/output.c (output_parser): Open and close the file to the
21244 skeleton.
21245 * src/reader.c (read_declarations): When %semantic_parser, open
21246 fguard.
21247
55b96341
AD
212482000-12-19 Akim Demaille <akim@epita.fr>
21249
21250 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
21251 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
21252
358c15b7
AD
212532000-12-19 Akim Demaille <akim@epita.fr>
21254
21255 * src/files.c (open_files): Yipee! We no longer need all the code
21256 looking for `/tmp' since we have no tmp file.
21257
7de3329e
AD
212582000-12-19 Akim Demaille <akim@epita.fr>
21259
21260 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
21261 New macros.
21262 * src/files.c (open_files): Less dependency on MSDOS etc.
21263
3abcd459
AD
212642000-12-14 Akim Demaille <akim@epita.fr>
21265
21266 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
21267 Provide a default definition.
21268 Use it when executing the default @ action.
21269 * src/reader.c (reader_output_yylsp): No longer include
21270 `timestamp' and `text' in the default YYLTYPE.
21271
2a91a95e
AD
212722000-12-12 Akim Demaille <akim@epita.fr>
21273
21274 * src/reader.c (copy_definition, parse_union_decl, copy_action)
21275 (copy_guard): Quote the file names.
21276 Reported by Laurent Mascherpa.
21277
14d3eb9b
AD
212782000-12-12 Akim Demaille <akim@epita.fr>
21279
21280 * src/output.c (output_headers, output_program, output): Be sure
21281 to escape special characters when outputting filenames.
21282 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
21283 (output_headers): Don't depend on them, Use ACTSTR.
21284
d7045ec6
AD
212852000-11-17 Akim Demaille <akim@epita.fr>
21286
21287 * lib/obstack.h: Formatting changes.
21288 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
21289 prevents type checking.
21290 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
21291 cast the value to (void *): assigning a `foo *' to a `void *'
21292 variable is valid.
21293 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
21294 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
21295 append characters.
21296
6fd54b73
AD
212972000-11-17 Akim Demaille <akim@epita.fr>
21298
21299 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
21300 as...
21301 (suite.m4, regression.m4, calc.m4): these.
21302 * tests/atgeneral.m4: Update from CVS Autoconf.
21303
4c50eae6
AD
213042000-11-17 Akim Demaille <akim@epita.fr>
21305
21306 * tests/regression.m4 (%union and --defines): New test,
21307 demonstrating a current bug in the obstack implementation.
21308
a35f64ea
AD
213092000-11-17 Akim Demaille <akim@epita.fr>
21310
21311 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
21312 macros.
21313 Use them to declare the variables which are global or local to
21314 `yyparse'.
21315
7de23534
AD
213162000-11-17 Akim Demaille <akim@epita.fr>
21317
21318 * acconfig.h: Remove, no longer used.
21319
aa7815f5
AD
213202000-11-07 Akim Demaille <akim@epita.fr>
21321
21322 * src: s/Copyright (C)/Copyright/g.
21323
5af1f549
AD
213242000-11-07 Akim Demaille <akim@epita.fr>
21325
21326 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
21327 defining.
21328 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
21329
553e2b22
AD
213302000-11-07 Akim Demaille <akim@epita.fr>
21331
21332 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
21333 Merge in a single CPP if/else.
21334
8a4f41d6
AD
213352000-11-07 Akim Demaille <akim@epita.fr>
21336
21337 * src/output.c (output): Remove useless variables.
21338 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
21339 argument `data' for consistency with the prototypes.
21340 Qualify it `const'.
21341 (obstack_copy, obstack_copy0): Rename the second argument as
21342 `address' for consistency. Qualify it `const'.
21343 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
21344 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
21345 `const' their input argument (`data' or `address').
21346 Adjust the corresponding macros to include `const' in casts.
21347
095a3fb5
AD
213482000-11-03 Akim Demaille <akim@epita.fr>
21349
21350 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
21351 s/PFILE1/BISON_HAIRY/.
21352 Adjust dependencies.
21353
d1cdce7c
AD
213542000-11-03 Akim Demaille <akim@epita.fr>
21355
090c5ebf 21356 For some reason, this was not applied.
d1cdce7c
AD
21357
21358 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21359 `unlink': it's no longer used.
21360
9311529b
AD
213612000-11-03 Akim Demaille <akim@epita.fr>
21362
21363 * src/files.c (skeleton_find): New function, eved out of...
21364 (open_files, open_extra_files): here.
21365
d8880f69
AD
213662000-11-03 Akim Demaille <akim@epita.fr>
21367
21368 Don't use `atexit'.
21369
21370 * src/files.c (obstack_save): New function.
21371 (done): Rename as...
21372 (output_files): this.
21373 Use `obstack_save'.
21374 * src/main.c (main): Don't use `atexit' to register `done', since
21375 it no longer has to remove tmp files, just call `output_files'
21376 when there are no errors.
21377
0dbb648e
AD
213782000-11-02 Akim Demaille <akim@epita.fr>
21379
21380 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
21381 `unlink': it's no longer used.
21382 * src/files.h: Formatting changes.
21383
896fe5c1
AD
213842000-11-02 Akim Demaille <akim@epita.fr>
21385
21386 Remove the last uses of mktemp and unlink/delete.
21387
21388 * src/files.c (fdefines, ftable): Removed.
21389 (defines_ostack, table_obstack): New.
21390 Adjust dependencies of the former into uses of the latter.
21391 * src/output.c (output_short_or_char_table, output_short_table):
21392 Convert to using obstacks.
21393 * src/reader.c (copy_comment2): Accept one FILE * and two
21394 obstacks.
21395 (output_token_defines, reader_output_yylsp): Use obstacks.
21396 * src/system.h (obstack_fgrow3): New.
1f65350a 21397 * po/POTFILES.in: Adjust.
896fe5c1 21398
dd60faec
AD
213992000-11-01 Akim Demaille <akim@epita.fr>
21400
21401 Change each use of `fattrs' into a use of `attrs_obstack'.
21402
21403 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
21404 * src/files.c (fattrs): Remove.
21405 (attrs_obstack): New.
21406 Adjust all dependencies.
21407 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
21408
8c7ebe49
AD
214092000-11-01 Akim Demaille <akim@epita.fr>
21410
21411 Introduce obstacks.
21412 Change each use of `faction' into a use of `action_obstack'.
21413
21414 * lib/obstack.h, lib/obstack.c: New files.
21415 * src/files.c (faction): Remove.
21416 (action_obstack): New.
21417 Adjust all dependencies.
21418
77aee789
AD
214192000-10-20 Akim Demaille <akim@epita.fr>
21420
21421 * lib/quote.h (PARAMS): New macro. Use it.
21422
43591cec
AD
214232000-10-16 Akim Demaille <akim@epita.fr>
21424
21425 * src/output.c (output_short_or_char_table): New function.
21426 (output_short_table, output_token_translations): Use it.
21427 (goto_actions): Use output_short_table.
21428
1e9798d5
AD
214292000-10-16 Akim Demaille <akim@epita.fr>
21430
21431 * src/symtab.c (bucket_new): New function.
21432 (getsym): Use it.
21433
21434 * src/output.c (output_short_table): New argument to display the
21435 comment associated with the table.
21436 Adjust dependencies.
21437 (output_gram): Use it.
21438 (output_rule_data): Nicer output layout for YYTNAME.
21439
f282676b
AD
214402000-10-16 Akim Demaille <akim@epita.fr>
21441
21442 * src/lex.c (read_typename): New function.
21443 (lex): Use it.
21444 * src/reader.c (copy_dollar): Likewise.
21445
550a72a3
AD
214462000-10-16 Akim Demaille <akim@epita.fr>
21447
21448 * src/reader.c (copy_comment2): Expect the input stream to be on
21449 the `/' which is suspected to open a comment, instead of being
21450 called after `//' or `/*' was read.
21451 (copy_comment, copy_definition, parse_union_decl, copy_action)
21452 (copy_guard): Adjust.
21453
131e2fef
AD
214542000-10-16 Akim Demaille <akim@epita.fr>
21455
21456 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
21457 `read_signed_integer'.
21458
79282c5a
AD
214592000-10-16 Akim Demaille <akim@epita.fr>
21460
21461 * src/reader.c (copy_dollar): New function.
21462 (copy_guard, copy_action): Use it.
21463
ff4a34be
AD
214642000-10-16 Akim Demaille <akim@epita.fr>
21465
21466 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
21467 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
21468 New files, from Fileutils 4.0.27.
21469 * src/main.c (printable_version): Remove.
21470 * src/lex.c, src/reader.c: Use `quote'.
21471
214722000-10-04 Akim Demaille <akim@epita.fr>
21473
21474 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
21475
14ded682
AD
214762000-10-04 Akim Demaille <akim@epita.fr>
21477
21478 * doc/bison.texinfo: Various typos spotted by Neil Booth.
21479
8e03724b
AD
214802000-10-04 Akim Demaille <akim@epita.fr>
21481
21482 When a literal string is used to define two different tokens,
21483 `bison -v' segfaults.
21484 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
21485
21486 * tests/regression.m4: New file.
21487 Include the core of the sample provided by Piotr Gackiewicz.
21488 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
21489 properly.
21490
a9e64249
AD
214912000-10-04 Akim Demaille <akim@epita.fr>
21492
21493 * src/reader.c (parse_expect_decl): Keep `count' within the size
21494 of `buffer'.
21495 From Neil Booth.
21496
da9abf43
AD
214972000-10-02 Paul Eggert <eggert@twinsun.com>
21498
21499 * bison.s1 (yyparse): Assign the default value
21500 unconditionally, to avoid a GCC warning and make the parser a
21501 tad smaller.
21502
c33638bb
AD
215032000-10-02 Akim Demaille <akim@epita.fr>
21504
21505 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
21506 options.
21507
444c570a
AD
215082000-10-02 Akim Demaille <akim@epita.fr>
21509
21510 * src/derives.c, src/print.c, src/reduce.c: To ease the
21511 translation, move some `\n' out of the translated strings.
21512
89cab50d
AD
215132000-10-02 Akim Demaille <akim@epita.fr>
21514
21515 The location tracking mechanism is precious for parse error
21516 messages. Nevertheless, it is enabled only when `@n' is used in
21517 the grammar, which is a different issue (you can use it in error
21518 message, but not in the grammar per se). Therefore, there should
21519 be another means to enable it.
21520
21521 * src/getargs.c (getargs): Support `--locations'.
21522 (usage): Report it.
21523 * src/getargs.h (locationsflag): Export it.
21524 * src/lex.c (percent_table): Support `%locations'.
21525 * src/reader.c (yylsp_needed): Remove this variable, now replaced
21526 with `locationsflag'.
21527 * doc/bison.texinfo: Document `--locations' and `%locations'.
21528 Sort the options.
21529 * tests/calc.m4: Test it.
21530
21531 For regularity of the names, replace each
21532 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
21533 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
21534 In addition replace each `flag' with `_flag'.
21535
d6c2cba0
AD
215362000-10-02 Akim Demaille <akim@epita.fr>
21537
21538 Also test parse error messages, including with YYERROR_VERBOSE.
21539
21540 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
21541 associative).
21542 Use it to check the computations.
21543 Use it to check `nonassoc' is honored.
21544 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
21545 `--yyerror-verbose'.
21546 (_AT_CHECK_CALC): Adjust to this option.
21547 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
21548
5a35a6cb
AD
215492000-10-02 Akim Demaille <akim@epita.fr>
21550
21551 Test also `--verbose', `--defines' and `--name-prefix'. Testing
21552 the latter demonstrates a flaw in the handling of non debugging
21553 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
21554 was used in order to simplify:
21555
21556 #if YYDEBUG
21557 if (yydebug)
21558 {
21559 ...
21560 }
21561 #endif
21562
21563 into
21564
21565 if (yydebug)
21566 {
21567 ...
21568 }
21569
21570 unfortunately this leads to a CPP conflict when
21571 `--name-prefix=foo' is used since it produces `#define yydebug
21572 foodebug'.
21573
21574 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
21575 (YYDPRINTF): New macro.
21576 Spread its use.
21577 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
21578 the bison options.
21579 Also test `--verbose', `--defines' and `--name-prefix'.
21580
71da9eea
AD
215812000-10-02 Akim Demaille <akim@epita.fr>
21582
21583 Improve the readability of the produced parsers.
21584
21585 * src/bison.s1: Formatting changes.
21586 Improve the comment related to the `$' mark.
21587 (yydefault): Don't fall through to `yyresume': `goto' there.
21588 * src/output.c (output_parser): When the `$' is met, skip the end
21589 of its line.
21590 New variable, `number_of_dollar_signs', to check there's exactly
21591 one `$' in the parser skeleton.
21592
95e36146
AD
215932000-10-02 Akim Demaille <akim@epita.fr>
21594
21595 * lib/xstrdup.c: New file, from the fileutils.
21596 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
21597 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
21598 instead of strlen + xmalloc + strcpy.
21599 * src/symtab.c (copys): Remove, use xstrdup instead.
21600
d7020c20
AD
216012000-10-02 Akim Demaille <akim@epita.fr>
21602
21603 * src/gram.h (associativity): New enum type which replaces the
21604 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
21605 `right_assoc', `left_assoc' and `non_assoc'.
21606 Adjust all dependencies.
21607 * src/reader.c: Formatting changes.
21608 (LTYPESTR): Don't define it, use it as a literal in
21609 `reader_output_yylsp'.
21610 * src/symtab.h (symbol_class): New enum type which replaces the
21611 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
21612 `sunknown', `stoken and `snterm'.
21613
1916f98e
AD
216142000-10-02 Akim Demaille <akim@epita.fr>
21615
21616 * src/getargs.c (fixed_outfiles): Rename as...
21617 (yaccflag): for consistency and accuracy.
21618 Adjust dependencies.
21619
d7913476
AD
216202000-10-02 Akim Demaille <akim@epita.fr>
21621
21622 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
21623 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
21624 difficult and introduced a lot of core dump. It turns out that
21625 Bison used an implementation of `xmalloc' based on `calloc', and
21626 at various places it does depend upon the initialization to 0. I
21627 have not tried to isolate the pertinent places, and all the former
21628 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
21629 someone should address this issue.
21630
21631 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
21632 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
21633 files.
21634 Adjust dependencies.
21635 * src/warshall.h: New file.
21636 Propagate.
21637
340ef489
AD
216382000-10-02 Akim Demaille <akim@epita.fr>
21639
21640 Various anti-`extern in *.c' changes.
21641
21642 * src/system.h: Include `assert.h'.
21643
b2ca4022
AD
216442000-10-02 Akim Demaille <akim@epita.fr>
21645
21646 * src/state.h (nstates, final_state, first_state, first_shift)
21647 (first_reduction): Move their exportation from here...
21648 * src/LR0.h: to here.
21649 Adjust dependencies.
21650 * src/getargs.c (statisticsflag): New variable.
21651 Add support for `--statistics'.
21652 Adjust dependencies.
21653
21654 Remove a lot of now useless `extern' statements in most files.
21655
403b315b
AD
216562000-10-02 Akim Demaille <akim@epita.fr>
21657
21658 * src/LR0.h: New file.
21659 Propagate its use.
21660
07a58c13
AD
216612000-10-02 Akim Demaille <akim@epita.fr>
21662
21663 * src/print.h: New file.
21664 Propagate its use.
21665 * src/print.c: Formatting and ordering changes.
21666 (verbose, terse): Replace with...
21667 (print_results): this new function.
21668 Adjust dependencies.
21669
0619caf0
AD
216702000-10-02 Akim Demaille <akim@epita.fr>
21671
21672 * src/conflicts.c (conflict_report): New function.
21673 (conflict_log, verbose_conflict_log): Replace with...
21674 (print_conflicts): this function.
21675 Adjust dependencies.
21676 * src/conflicts.h: New file.
21677 Propagate its inclusion.
21678
3519ec76
AD
216792000-10-02 Akim Demaille <akim@epita.fr>
21680
21681 * src/nullable.h: New file.
21682 Propagate its inclusion.
21683 * src/nullable.c: Formatting changes.
21684
015acc48
AD
216852000-10-02 Akim Demaille <akim@epita.fr>
21686
21687 * src/reduce.h: New file.
21688 Propagate its inclusion.
21689 * src/reduce.c: Topological sort and other formatting changes.
21690 (bool, TRUE, FALSE): Move their definition to...
21691 * src/system.h: here.
21692
8963a27b
AD
216932000-10-02 Akim Demaille <akim@epita.fr>
21694
21695 * src/files.c: Formatting changes.
21696 (tryopen, tryclose, openfiles): Rename as...
21697 (xfopen, xfclose, open_files): this.
21698 (stringappend): static.
21699 * src/files.h: Complete the list of exported symbols.
21700 Propagate its use.
21701
a70083a3
AD
217022000-10-02 Akim Demaille <akim@epita.fr>
21703
21704 * src/reader.h: New file.
21705 Propagate its use instead of tedious list of `extern' and
21706 prototypes.
21707 * src/reader.c: Formatting changes, topological sort,
21708 s/register//.
21709
abadc117
AD
217102000-10-02 Akim Demaille <akim@epita.fr>
21711
21712 * src/lex.h: Prototype `lex.c' exported functions.
21713 * src/reader.c: Adjust.
21714 * src/lex.c: Formatting changes.
21715 (safegetc): Rename as...
21716 (xgetc): this.
21717
720d742f
AD
217182000-10-02 Akim Demaille <akim@epita.fr>
21719
21720 * src/lalr.h: New file.
21721 Propagate its inclusion instead of prototypes and `extern'.
21722 * src/lalr.c: Formatting changes, topological sorting etc.
21723
f2acea59
AD
217242000-10-02 Akim Demaille <akim@epita.fr>
21725
21726 * src/output.c (token_actions): Introduce a temporary array,
21727 YYDEFACT, that makes it possible for this function to use
21728 output_short_table.
21729
d019d655
AD
217302000-10-02 Akim Demaille <akim@epita.fr>
21731
21732 `user_toknums' is output as a `short[]' in `output.c', while it is
21733 defined as a `int[]' in `reader.c'. For consistency with the
21734 other output tables, `user_toknums' is now defined as a table of
21735 shorts.
21736
21737 * src/reader.c (user_toknums): Be a short table instead of an int
21738 table.
21739 Adjust dependencies.
21740
21741 Factor the short table outputs.
21742
21743 * src/output.c (output_short_table): New function.
21744 * src/output.c (output_gram, output_stos, output_rule_data)
21745 (output_base, output_table, output_check): Use it.
21746
6c89f1c1
AD
217472000-10-02 Akim Demaille <akim@epita.fr>
21748
21749 * src/output.c (output): Topological sort of the functions, in
21750 order to get rid of the `static' prototypes.
21751 No longer use `register'.
21752 * src/output.h: New file.
21753 Propagate its inclusion in files explicitly prototyping functions
21754 from output.c.
21755
d9efd181
AD
217562000-09-21 Akim Demaille <akim@epita.fr>
21757
21758 * src/atgeneral.m4: Update from Autoconf.
21759
c29240e7 217602000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
21761
21762 * src/closure.h: New file.
21763 * src/closure.c: Formatting changes, topological sort over the
21764 functions, use of closure.h.
21765 (initialize_closure, finalize_closure): Rename as...
21766 (new_closure, free_closure): these. Adjust dependencies.
21767 * src/LR0.c: Formatting changes, topological sort, use of
21768 cloture.h.
21769 (initialize_states): Rename as...
21770 (new_states): this.
21771 * src/Makefile.am (noinst_HEADERS): Adjust.
21772
499daa50
AD
217732000-09-20 Akim Demaille <akim@epita.fr>
21774
21775 * src/acconfig.h: Don't protect config.h against multiple
21776 inclusion.
21777 Don't define PARAMS.
21778 * src/system.h: Define PARAMS.
21779 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
21780 purpose of config.h. system.h must not try to fix wrong
21781 definitions in config.h.
21782
cc84fd5d
AD
217832000-09-20 Akim Demaille <akim@epita.fr>
21784
21785 * src/derives.h: New file.
21786 * src/main.c, src/derives.h: Use it.
21787 Formatting changes.
21788 * src/Makefile.am (noinst_HEADERS): Adjust.
21789
db5b3a89
AD
217902000-09-20 Akim Demaille <akim@epita.fr>
21791
21792 * tests/atgeneral.m4: Update from Autoconf.
21793 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
21794 (AT_CHECK_CALC): New macros.
21795 Use these macros to test bison with options `', `--raw',
21796 `--debug', `--yacc', `--yacc --debug'.
21797
ceed8467
AD
217982000-09-19 Akim Demaille <akim@epita.fr>
21799
21800 * src/output.c: Formatting changes.
21801 * src/machine.h: Remove, leaving its contents in...
21802 * src/system.h: here.
21803 Include stdio.h.
21804 Adjust all dependencies on stdio.h and machine.h.
21805 * src/getargs.h: New file.
21806 Let all `extern' declarations about getargs.c be replaced with
21807 inclusion of `getargs.h'.
21808 * src/Makefile.am (noinst_HEADERS): Adjust.
21809
21810 * tests/calc.m4 (yyin): Be initialized in main, not on the global
21811 scope.
21812 (yyerror): Returns void, not int.
21813 * doc/bison.texinfo: Formatting changes.
21814
05a1d24b
AD
218152000-09-19 Akim Demaille <akim@epita.fr>
21816
21817 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
21818 portable.
21819
cbd25751
AD
218202000-09-18 Akim Demaille <akim@epita.fr>
21821
21822 * configure.in: Append WARNING_CFLAGS to CFLAGS.
21823 * src/Makefile.am (INCLUDES): Don't.
21824 Be ready to fetch headers in lib/.
21825
13863333
AD
218262000-09-18 Akim Demaille <akim@epita.fr>
21827
21828 * doc/bison.texinfo: Update the copyright.
21829 ANSIfy and GNUify the examples.
21830 Remove the old menu.
21831
0d533154
AD
218322000-09-18 Akim Demaille <akim@epita.fr>
21833
21834 First set of tests: use the `calc' example from the documentation.
21835
21836 * src/bison.s1 (yyparse): Condition the code using `yytname' which
21837 is defined only when YYDEBUG is.
21838 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
21839 * src/files.c (tryopen, tryclose): Formatting changes.
21840 Move to the top and be static.
21841 * src/reader.c (read_signed_integer): Likewise.
21842 * tests/calc.m4: New file.
21843 * Makefile.am, suite.m4: Adjust.
21844 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
21845
e79137ac
AD
218462000-09-18 Akim Demaille <akim@epita.fr>
21847
21848 Add support for an Autotest test suite for Bison.
21849
21850 * m4/m4.m4, m4/atconfig.m4: New files.
21851 * m4/Makefile.am (EXTRA_DIST): Adjust.
21852 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
21853 files.
21854 * src/getargs.c: Display a more standard --version message.
21855 * src/reader.c (reader): Formatting changes.
21856 No longer depend upon VERSION_STRING.
21857 * configure.in: No longer use `dnl'.
21858 Set up the test suite and the new directory `tests/.
21859 (VERSION_STRING): Remove.
21860
27821bff
AD
218612000-04-14 Akim Demaille <akim@epita.fr>
21862
21863 * src/reader.c (copy_comment2): New function, same as former
21864 `copy_comment', but outputs into two FILE *.
21865 (copy_comment): Use it.
21866 (parse_union_decl): Use it.
21867 (get_type, parse_start_decl): Use the same `invalid' message.
21868 (parse_start_decl, parse_union_decl): Use the same `multiple'
21869 message.
21870 (parse_union_decl, copy_guard, copy_action): Use the same
21871 `unmatched' message.
21872 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
21873
cfe5fbc0
AD
218742000-03-31 Akim Demaille <akim@epita.fr>
21875
21876 * src/files.c (tryopen, tryclose): Move to the top.
21877 Be static.
21878
cb7db13e
AD
218792000-03-31 Akim Demaille <akim@epita.fr>
21880
21881 * src/main.c (main): Don't call `done', exit does it.
21882
a0f6b076
AD
218832000-03-31 Akim Demaille <akim@epita.fr>
21884
36281465
AD
21885 * allocate.c: s/return (foo)/return foo/.
21886 * lalr.c: Likewise.
21887 * LR0.c: Likewise.
21888 * output.c: Likewise.
21889 * reader.c: Likewise.
21890 * symtab.c: Likewise.
21891 * vmsgetargs.c: Likewise.
21892
218932000-03-31 Akim Demaille <akim@epita.fr>
21894
21895 Clean up the error reporting functions.
a0f6b076
AD
21896
21897 * src/report.c: New file.
21898 * src/report.h: Likewise.
21899 * src/Makefile.am: Adjust.
21900 * m4/error.m4: New file.
21901 * m4/Makefile.am: Adjust.
21902 * configure.in (jm_PREREQ_ERROR): Call it.
21903 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
21904 Remove.
21905 (fatal, fatals): Remove. All callers use complain.c::fatal.
21906 (warn, warni, warns, warnss, warnss): Remove. All callers use
21907 complain.c::complain.
21908 (toomany): Remove, use fatal instead.
21909 * src/files.c (done): No argument, use complain_message_count.
21910 * src/main.c (main): Register `done' to `atexit'.
21911
21912 * src/getargs.c (usage): More `fputs', less `fprintf'.
21913
18539825
AD
219142000-03-28 Akim Demaille <akim@epita.fr>
21915
21916 * lib/: New directory.
21917 * Makefile.am (SUBDIRS): Adjust.
21918 * configure.in: Adjust.
21919 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
21920 useless.
21921 * src/alloca.c: Moved to lib/.
21922 * src/getopt.c: Likewise.
21923 * src/getopt1.c: Likewise.
21924 * src/getopt.h: Likewise.
21925 * src/ansi2knr.c: Likewise.
21926 * src/ansi2knr.1: Likewise.
21927 * src/Makefile.am: Adjust.
21928 * lib/Makefile.am: New file.
21929
9f306f2a
AD
219302000-03-28 Akim Demaille <akim@epita.fr>
21931
21932 * src/getargs.c (usage): Refresh the help message.
21933
0ba347b6
AD
219342000-03-17 Akim Demaille <akim@epita.fr>
21935
21936 * src/getopt1.c: Updated from textutils 2.0e
21937 * src/getopt.c: Likewise.
21938 * src/getopt.h: Likewise.
21939
dbe7f271
AD
219402000-03-17 Akim Demaille <akim@epita.fr>
21941
21942 * src/Makefile.am (bison.simple): Fix the awk program: quote only
21943 the file name, not the whole `#line LINE FILE'.
21944
75bbe78d
AD
219452000-03-17 Akim Demaille <akim@epita.fr>
21946
21947 On syntax errors, report the token on which we choked.
21948
aa5fd0ee
AD
21949 * src/bison.s1 (yyparse): In the label yyerrlab, when
21950 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 21951
7b306f52
AD
219522000-03-17 Akim Demaille <akim@epita.fr>
21953
aa5fd0ee 21954 * src/reader.c (copy_at): New function.
7b306f52
AD
21955 (copy_guard): Use it.
21956 (copy_action): Use it.
21957
e87b5700
AD
219582000-03-17 Akim Demaille <akim@epita.fr>
21959
21960 Be kind to translators, save some useless translations.
21961
aa5fd0ee 21962 * src/main.c (banner): New function.
e87b5700
AD
21963 (fatal_banner): Use it.
21964 (warn_banner): Use it.
21965
ae3c3164
AD
219662000-03-17 Akim Demaille <akim@epita.fr>
21967
aa5fd0ee
AD
21968 * src/reader.c (copy_definition): Use copy_string and
21969 copy_comment. Removed now unused `match', `ended',
21970 `cplus_comment'.
ae3c3164
AD
21971 (copy_comment, copy_string): Moved, to be visible from
21972 copy_definition.
21973
4dc58e7c
AD
219742000-03-17 Akim Demaille <akim@epita.fr>
21975
aa5fd0ee
AD
21976 * src/reader.c (copy_string): Declare `static inline'. No
21977 problems with inline, since it is checked by configure.
4dc58e7c
AD
21978 (copy_comment): Likewise.
21979
0a6384c4
AD
219802000-03-17 Akim Demaille <akim@epita.fr>
21981
aa5fd0ee 21982 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 21983
3cef001a
AD
219842000-03-17 Akim Demaille <akim@epita.fr>
21985
aa5fd0ee 21986 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
21987 (copy_action): Use it. Removed now unused `match', `ended',
21988 `cplus_comment'.
21989 (copy_guard): Likewise.
21990
ca36d2ef
AD
219912000-03-17 Akim Demaille <akim@epita.fr>
21992
aa5fd0ee 21993 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
21994 (copy_action): Use it.
21995 (copy_guard): Likewise.
21996
6666f98f
AD
219972000-03-17 Akim Demaille <akim@epita.fr>
21998
21999 Change the handling of @s so that they behave exactly like $s.
22000 There is now a pseudo variable @$ (readble and writable), location
22001 of the lhs of the rule (by default ranging from the location of
22002 the first symbol of the rhs, to the location of the last symbol,
22003 or, if the rhs is empty, YYLLOC).
22004
22005 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
22006 yyval.
22007 (yyparse): When providing a default semantic action, provide a
22008 default location action.
22009 (after the $): No longer change `*YYLSP', just stack YYLOC the
22010 same way you stack YYVAL.
22011 * src/reader.c (read_declarations): Use warns.
22012 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
22013 (copy_action, case '@'): Likewise.
22014 Use a standard error message, to save useless work from
22015 translators.
22016
41aca2e0
AD
220172000-03-17 Akim Demaille <akim@epita.fr>
22018
aa5fd0ee
AD
22019 * src/bison.s1: Formatting and cosmetics changes.
22020 * src/reader.c: Likewise.
41aca2e0
AD
22021 Update the Copyright notice.
22022
dc08c1d5
AD
220232000-03-17 Akim Demaille <akim@epita.fr>
22024
aa5fd0ee
AD
22025 * src/bison.s1 (#line): All set to `#line' only, since the
22026 Makefile now handles them.
dc08c1d5 22027
9ee3c97b
AD
220282000-03-16 Akim Demaille <akim@epita.fr>
22029
22030 * src/output.c (output_rule_data): Output the documentation of
22031 some of the tables.
22032 (Copyright notice): Update.
22033 Formatting changes.
22034
0de741ca
AD
220352000-03-16 Akim Demaille <akim@epita.fr>
22036
22037 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
22038 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
22039 One `#if YYDEBUG' remains, since it uses variables which are
22040 defined only if `YYDEBUG != 0'.
22041
bb10be54
AD
220422000-03-16 Akim Demaille <akim@epita.fr>
22043
22044 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
22045 and related variables so that the similarities are highlighted.
22046
b07b484a
AD
220472000-03-16 Akim Demaille <akim@epita.fr>
22048
22049 * src/bison.s1: Properly indent CPP directives.
22050
361f60b3
AD
220512000-03-16 Akim Demaille <akim@epita.fr>
22052
22053 * src/bison.s1: Properly indent the `alloca' CPP section.
22054
8c44d3ec
AD
220552000-03-16 Akim Demaille <akim@epita.fr>
22056
22057 Do not hard code values of directories in `configure.in'.
22058 Update the `configure' tool chain.
22059
22060 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
22061 src/makefile.am.
22062 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
22063 (AC_OUTPUT): Add m4/Makefile.
22064 Bump to bison 1.28a, 1.29 has never been released.
22065 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
22066 handled via src/Makefile.am.
22067 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
22068 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
22069 autoheader.
22070 * Makefile.am (SUBDIRS): Add m4.
22071 (ACLOCAL_AM_FLAGS): New variable.
22072 (AUTOMAKE_OPTIONS): Add check-news.
22073 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
22074 the proper line number and file name.
22075 (DEFS): Propagate the location of bison library files and of the
22076 locale files.
22077 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
22078 builddir.
22079 * acinclude.m4: Remove, replaced by the directory m4.
22080 * m4/Makefile.am (EXTRA_DIST): New variable.
22081 * m4/gettext.m4: New file, from the fileutils.
22082 * m4/lcmessage.m4: Likewise
22083 * m4/progtest.m4: Likewise.
22084 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
22085
f95997e7
AD
220862000-03-10 Akim Demaille <akim@epita.fr>
22087
22088 * src/closure.c:
22089 Formatting changes of various comments.
22090 Respect the GNU coding standards at various places.
22091 Don't use `_()' when no translation is needed.
22092
220931999-12-13 Jesse Thilo <jthilo@gnu.org>
22094
22095 * src/files.c:
22096 OS/2 honors TMPDIR environment variable.
22097
220981999-12-13 Jesse Thilo <jthilo@gnu.org>
22099
22100 * doc/bison.texinfo: Tweaked spelling and grammar.
22101 Updated ISBN.
22102 Removed reference to price of printed copy.
22103 Mention BISON_SIMPLE and BISON_HAIRY.
22104
221051999-12-13 Jesse Thilo <jthilo@gnu.org>
22106
22107 * configure.in, NEWS:
22108 Bison 1.29 released.
22109
221101999-10-27 Jesse Thilo <jthilo@gnu.org>
22111
22112 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
22113 Added reference card.
22114
221151999-07-26 Jesse Thilo <jthilo@gnu.org>
22116
22117 * po/ru.po: Added Russian translation.
22118
221191999-07-26 Jesse Thilo <jthilo@gnu.org>
22120
22121 * configure.in: Added Russian translation.
22122
221231999-07-06 Jesse Thilo <jthilo@gnu.org>
22124
22125 * configure.in, NEWS, README:
22126 Released version 1.28.
22127
221281999-06-14 Jesse Thilo <jthilo@gnu.org>
22129
22130 * src/system.h:
22131 Squashed redefinition warning on some systems.
22132
22133 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
22134 Have configure build version string instead of relying on ANSI string
22135 concatentation.
22136
221371999-06-14 Jesse Thilo <jthilo@gnu.org>
22138
22139 * po/POTFILES.in: Got rid of version.c.
22140
221411999-06-14 Jesse Thilo <jthilo@gnu.org>
22142
22143 * acconfig.h, configure.in:
22144 Have configure build version string instead of relying on ANSI string
22145 concatentation.
22146
221471999-06-08 Jesse Thilo <jthilo@gnu.org>
22148
22149 * doc/bison.1:
22150 Dropped mention of `+' for long-named options.
22151
221521999-05-30 Jesse Thilo <jthilo@gnu.org>
22153
22154 * src/files.c: Added <unistd.h> for unlink().
22155
22156 * src/Makefile.am, src/system.h:
22157 I18n fixes.
22158
221591999-05-30 Jesse Thilo <jthilo@gnu.org>
22160
22161 * README: Added a FAQ list.
22162
22163 * configure.in, acconfig.h:
22164 I18n fixes.
22165
221661999-05-30 Jesse Thilo <jthilo@gnu.org>
22167
22168 * doc/FAQ, doc/Makefile.am:
22169 Added a FAQ list.
22170
221711999-05-19 Jesse Thilo <jthilo@gnu.org>
22172
22173 * src/alloc.h, src/symtab.h, src/version.c:
22174 Protected inclusion of "config.h" with HAVE_CONFIG_H.
22175
221761999-04-18 Jesse Thilo <jthilo@gnu.org>
22177
22178 * src/.cvsignore, src/Makefile.am:
22179 Reorganized: sources in `src', documentation in `doc'.
22180
22181 * src/lex.c (literalchar):
22182 fixed the code for escaping double quotes (thanks
22183 Jonathan Czisny.)
22184
221851999-04-18 Jesse Thilo <jthilo@gnu.org>
22186
22187 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
22188 Adjusted paths to reflect directory reorganization.
22189
221901999-04-18 Jesse Thilo <jthilo@gnu.org>
22191
22192 * doc/.cvsignore, doc/Makefile.am:
22193 Reorganized: sources in `src', documentation in `doc'.
22194
221951999-04-18 Jesse Thilo <jthilo@gnu.org>
22196
22197 * configure.in:
22198 Updated AC_INIT file to reflect directory reorganization.
22199
22200 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
22201 Reorganized: sources in `src', documentation in `doc'.
22202
222031999-04-13 Jesse Thilo <jthilo@gnu.org>
22204
22205 * src/allocate.c:
22206 Don't declare calloc() and realloc() if not necessary.
22207
222081999-04-13 Jesse Thilo <jthilo@gnu.org>
22209
22210 * configure.in, acconfig.h, acinclude.m4:
22211 Don't declare calloc() and realloc() if not necessary.
22212
222131999-03-23 Jesse Thilo <jthilo@gnu.org>
22214
22215 * po/.cvsignore: Added i18n support.
22216
222171999-03-23 Jesse Thilo <jthilo@gnu.org>
22218
22219 * acconfig.h, configure.in, Makefile.am:
22220 Added i18n support.
22221
222221999-03-22 Jesse Thilo <jthilo@gnu.org>
22223
22224 * src/bison.s1: Fixed #line numbers.
22225
222261999-03-15 Jesse Thilo <jthilo@gnu.org>
22227
22228 * po/es.po, po/fr.po, po/nl.po, po/de.po:
22229 Added PO files from Translation Project.
22230
222311999-03-03 Jesse Thilo <jthilo@gnu.org>
22232
22233 * Makefile.am:
22234 Added support for non-ANSI compilers (ansi2knr).
22235
222361999-02-16 Jesse Thilo <jthilo@gnu.org>
22237
22238 * configure.in: Bumped version number to 1.27.
22239
22240 * Makefile.am:
22241 Added `bison.simple' to list of files removed by `make distclean'.
22242
222431999-02-12 Jesse Thilo <jthilo@gnu.org>
22244
22245 * src/files.c, src/files.h:
22246 Defined locations of parser files in config.h instead of Makefile.
22247
222481999-02-12 Jesse Thilo <jthilo@gnu.org>
22249
22250 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
22251 Defined locations of parser files in config.h instead of Makefile.
22252
222531999-02-09 Jesse Thilo <jthilo@gnu.org>
22254
22255 * Makefile.am:
22256 Removed inappropriate use of $< macro.
22257
222581999-02-05 Jesse Thilo <jthilo@gnu.org>
22259
22260 * po/Makefile.in.in, po/POTFILES.in:
22261 Add `po' directory skeleton.
22262
222631999-01-27 Jesse Thilo <jthilo@gnu.org>
22264
22265 * README: Document help-bison list.
22266
22267 * configure.in: Add check for mkstemp().
22268
222691999-01-20 Jesse Thilo <jthilo@gnu.org>
22270
22271 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
22272 Hush a few compiler warnings.
22273
22274 * src/files.c:
22275 Add tryclose(), which verifies that fclose was successful.
22276 Hush a couple of compiler warnings.
22277
222781999-01-20 Jesse Thilo <jthilo@gnu.org>
22279
22280 * Makefile.am, OChangeLog:
22281 ChangeLog is now automatically generated. Include the old version as
22282 OChangeLog.
22283
222841999-01-14 Jesse Thilo <jthilo@gnu.org>
22285
22286 * 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:
22287 Update FSF address.
22288
222891999-01-14 Jesse Thilo <jthilo@gnu.org>
22290
22291 * doc/bison.texinfo: Fix formatting glitch.
22292
22293 * doc/bison.texinfo: Update FSF address.
22294
222951999-01-14 Jesse Thilo <jthilo@gnu.org>
22296
22297 * acconfig.h: Update FSF address.
22298
222991999-01-08 Jesse Thilo <jthilo@gnu.org>
22300
22301 * src/system.h:
22302 Don't define PACKAGE here, since config.h defines it.
22303
223041998-12-30 Jesse Thilo <jthilo@gnu.org>
22305
22306 * src/reader.c: Update copyright date.
22307
22308 * src/main.c:
22309 Ditch sprintf to statically-sized buffers in fatal/warn functions in
22310 favor of output directly to stderr (avoids buffer overruns).
22311
22312 * src/reader.c: Some checks for premature EOF.
22313
22314 * 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:
22315 Use prototypes if the compiler understands them.
22316
22317 * src/files.c: Honor TMPDIR on Unix hosts.
22318 Use prototypes if the compiler understands them.
22319
22320 * src/reader.c:
22321 Fix a couple of buffer overrun bugs.
22322 Use prototypes if the compiler understands them.
22323
22324 * src/system.h: Include unistd.h and ctype.h.
22325 Use #ifdef instead of #if for NLS symbols.
22326
223271998-12-30 Jesse Thilo <jthilo@gnu.org>
22328
22329 * doc/bison.texinfo:
22330 Delete comment "consider using @set for edition number, etc..." since
22331 we now are doing so.
22332
223331998-12-30 Jesse Thilo <jthilo@gnu.org>
22334
22335 * configure.in:
22336 Use prototypes if the compiler understands them.
22337
22338 * NEWS: Document 1.26 highlights.
22339
22340 * Makefile.am: Require Automake 1.3 or later.
22341
22342 * acconfig.h:
22343 Use prototypes if the compiler understands them.
22344
223451998-12-29 Jesse Thilo <jthilo@gnu.org>
22346
22347 * src/version.c:
22348 Use VERSION symbol from automake for version number.
22349
223501998-12-29 Jesse Thilo <jthilo@gnu.org>
22351
22352 * acconfig.h, configure.in, version.cin:
22353 Use VERSION symbol from automake for version number.
22354
223551998-11-28 Jesse Thilo <jthilo@gnu.org>
22356
22357 * Makefile.am:
22358 Distribute original version of simple parser (bison.s1), not built
22359 version (bison.simple).
22360
223611998-11-28 Jesse Thilo <jthilo@gnu.org>
22362
22363 * doc/bison.texinfo: Add info dir entry.
22364
22365 * doc/bison.texinfo:
22366 Let automake put version number into documentation.
22367
223681998-11-26 Jesse Thilo <jthilo@gnu.org>
22369
22370 * src/bison.cld, src/build.com, src/vmshlp.mar:
22371 Add non-RCS files from /gd/gnu/bison.
22372
223731998-11-26 Jesse Thilo <jthilo@gnu.org>
22374
22375 * doc/bison.1:
22376 Document the BISON_HAIRY and BISON_SIMPLE variables.
22377
223781998-11-25 Jesse Thilo <jthilo@gnu.org>
22379
22380 * src/version.c: Build version.c automatically.
22381
22382 * src/reader.c:
22383 Fix token numbering (used to start at 258, not 257).
22384
22385 * src/system.h: Include config.h.
22386
22387 * src/getargs.c: Update bug report address.
22388
22389 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
22390 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
22391
223921998-11-25 Jesse Thilo <jthilo@gnu.org>
22393
22394 * Makefile.am:
22395 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22396
22397 * configure.in, version.cin:
22398 Build version.c automatically.
22399
22400 * AUTHORS: Add AUTHORS file.
22401
22402 * README: Update bug report address.
22403
22404 * bison.simple:
22405 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
22406
22407 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
22408 Add automake stuff.
22409
224101998-11-25 Jesse Thilo <jthilo@gnu.org>
22411
22412 * doc/bison.texinfo: Clean up some formatting.
22413
224141998-05-05 Richard Stallman <rms@gnu.org>
22415
22416 * doc/bison.texinfo:
22417 Explain better why to make a pure parser.
22418
224191998-01-05 Richard Stallman <rms@gnu.org>
22420
22421 * src/files.c (openfiles):
22422 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
22423 find a temporary directory, if possible. Do not unlink files while
22424 they are open.
22425
224261997-08-25 Richard Stallman <rms@gnu.org>
22427
22428 * src/reader.c (stack_offset;):
22429 Change some warni to warns.
22430
22431 * src/lex.c (literalchar): Use warns, not warni.
22432
224331997-06-28 Richard Stallman <rms@gnu.org>
22434
22435 * src/bison.s1: Add a Bison version comment.
22436
22437 * src/main.c (fatal, warn, berror):
22438 Use program_name.
22439
224401997-06-28 Richard Stallman <rms@gnu.org>
22441
22442 * Makefile.in (bison_version): New variable.
22443 (dist): Use that variable.
22444 (bison.s1): Substitute the Bison version into bison.simple.
22445
22446 * bison.simple: Add a Bison version comment.
22447
224481997-06-18 Richard Stallman <rms@gnu.org>
22449
22450 * src/main.c (fatal, warn, berror):
22451 Make error messages standard.
22452 (toomany): Improve error message text.
22453
22454 * 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:
22455 new.h renamed to alloc.h.
22456
224571997-06-18 Richard Stallman <rms@gnu.org>
22458
22459 * Makefile.in: new.h renamed to alloc.h.
22460
224611997-05-24 Richard Stallman <rms@gnu.org>
22462
22463 * src/lex.c (literalchar):
22464 Fix the code for escaping \, " and '.
22465
22466 (lex): Avoid trouble when there are many chars
22467 to discard in a char literal with just several chars in it.
22468
224691997-05-17 Richard Stallman <rms@gnu.org>
22470
22471 * src/bison.s1:
22472 Use malloc, if using alloca is troublesome.
22473 (YYSTACK_USE_ALLOCA): New flag macro.
22474 Define it for some systems and compilers.
22475 (YYSTACK_ALLOC): New macro.
22476 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22477 If it was malloc'd, free it.
22478
224791997-05-17 Richard Stallman <rms@gnu.org>
22480
22481 * bison.simple:
22482 Use malloc, if using alloca is troublesome.
22483 (YYSTACK_USE_ALLOCA): New flag macro.
22484 Define it for some systems and compilers.
22485 (YYSTACK_ALLOC): New macro.
22486 (yyparse): Use YYSTACK_ALLOC to allocate stack.
22487 If it was malloc'd, free it.
22488
224891997-04-23 Richard Stallman <rms@gnu.org>
22490
22491 * src/bison.s1:
22492 (alloca) [__hpux]: Always define as __builtin_alloca.
22493
224941997-04-23 Richard Stallman <rms@gnu.org>
22495
22496 * bison.simple:
22497 (alloca) [__hpux]: Always define as __builtin_alloca.
22498
224991997-04-22 Richard Stallman <rms@gnu.org>
22500
22501 * src/bison.s1:
22502 [__hpux]: Include alloca.h (right for HPUX 10)
22503 instead of declaring alloca (right for HPUX 9).
22504
22505 * src/bison.s1 (__yy_memcpy):
22506 Declare arg `count' as unsigned int.
22507 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22508
225091997-04-22 Richard Stallman <rms@gnu.org>
22510
22511 * bison.simple:
22512 [__hpux]: Include alloca.h (right for HPUX 10)
22513 instead of declaring alloca (right for HPUX 9).
22514
22515 * bison.simple (__yy_memcpy):
22516 Declare arg `count' as unsigned int.
22517 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
22518
225191997-01-03 Richard Stallman <rms@gnu.org>
22520
22521 * src/allocate.c: [__STDC__ or _MSC_VER]:
22522 Declare calloc and realloc to return void *.
22523
225241997-01-02 Richard Stallman <rms@gnu.org>
22525
22526 * src/system.h:
22527 [_MSC_VER]: Include stdlib.h and process.h.
22528 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
22529
22530 * src/main.c (main): Return FAILURE as a value.
22531 (printable_version): Declare arg as int, not char.
22532
225331997-01-02 Richard Stallman <rms@gnu.org>
22534
22535 * Makefile.in (dist):
22536 Explicitly check for symlinks, and copy them.
22537
225381996-12-19 Richard Stallman <rms@gnu.org>
22539
22540 * src/files.c:
22541 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
22542
225431996-12-18 Paul Eggert <eggert@gnu.org>
22544
22545 * src/bison.s1 (yyparse):
22546 If __GNUC__ and YYPARSE_PARAM are both defined,
22547 declare yyparse to have a void * argument.
22548
225491996-12-18 Paul Eggert <eggert@gnu.org>
22550
22551 * bison.simple (yyparse):
22552 If __GNUC__ and YYPARSE_PARAM are both defined,
22553 declare yyparse to have a void * argument.
22554
225551996-12-17 Richard Stallman <rms@gnu.org>
22556
22557 * src/reduce.c (nbits): Add some casts.
22558
225591996-08-12 Richard Stallman <rms@gnu.org>
22560
22561 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
22562
225631996-08-12 Richard Stallman <rms@gnu.org>
22564
22565 * bison.simple: Test _MSDOS as well as _MSDOS_.
22566
225671996-07-31 Richard Stallman <rms@gnu.org>
22568
22569 * src/bison.s1:
22570 [__sun && __i386]: Include alloca.h.
22571
225721996-07-31 Richard Stallman <rms@gnu.org>
22573
22574 * bison.simple:
22575 [__sun && __i386]: Include alloca.h.
22576
225771996-07-30 Richard Stallman <rms@gnu.org>
22578
22579 * src/bison.s1: Comment change.
22580
22581 * src/bison.s1: Test _MSDOS_, not MSDOS.
22582
225831996-07-30 Richard Stallman <rms@gnu.org>
22584
22585 * bison.simple: Comment change.
22586
22587 * bison.simple: Test _MSDOS_, not MSDOS.
22588
225891996-06-01 Richard Stallman <rms@gnu.org>
22590
22591 * 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:
22592 Insert `_' macro around many string constants.
22593
22594 * src/main.c:
22595 Insert `_' macro around many string constants.
22596
22597 (main): Call setlocale, bindtextdomain and textdomain.
22598
22599 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
22600 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
22601 [ENABLE_NLS]: Include libintl.h.
22602 [ENABLE_NLS] (gettext): Define.
22603 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
22604 (N_, PACKAGE, LOCALEDIR): New macros.
22605
226061996-06-01 Richard Stallman <rms@gnu.org>
22607
22608 * POTFILES.in: New file.
22609
22610 * Makefile.in (allocate.o):
22611 Define target explicitly.
22612
22613 * Makefile.in (CFLAGS): Set to @CFLAGS@.
22614 (LDFLAGS): Set to @LDFLAGS@.
22615 (configure): Run autoconf only if preceding `cd' succeeds.
22616 (bison.s1): Redirect output to temporary file then move the
22617 temporary to the target, rather than redirecting directly to bison.s1.
22618 (clean): Remove config.status and config.log.
22619 (distclean): Don't remove config.status here.
22620
226211996-05-12 Richard Stallman <rms@gnu.org>
22622
22623 * src/bison.s1:
22624 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22625
226261996-05-12 Richard Stallman <rms@gnu.org>
22627
22628 * bison.simple:
22629 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
22630
226311996-05-11 Richard Stallman <rms@gnu.org>
22632
22633 * src/bison.s1 (__yy_memcpy):
22634 Really reorder the args, as was supposedly done on Feb 14 1995.
22635 (yyparse): Calls changed accordingly.
22636
226371996-05-11 Richard Stallman <rms@gnu.org>
22638
22639 * Makefile.in (dist): Don't use $(srcdir).
22640
22641 * bison.simple (__yy_memcpy):
22642 Really reorder the args, as was supposedly done on Feb 14 1995.
22643 (yyparse): Calls changed accordingly.
22644
226451996-01-27 Richard Stallman <rms@gnu.org>
22646
22647 * src/output.c (output_rule_data):
22648 Test YYERROR_VERBOSE in the conditional
22649 around the definition of ttyname.
22650
226511995-12-29 Richard Stallman <rms@gnu.org>
22652
22653 * src/bison.s1:
22654 Fix line numbers in #line commands.
22655
226561995-12-29 Richard Stallman <rms@gnu.org>
22657
22658 * bison.simple:
22659 Fix line numbers in #line commands.
22660
226611995-12-27 Richard Stallman <rms@gnu.org>
22662
22663 * src/bison.s1 (YYPARSE_PARAM_DECL):
22664 In C++, make it always null.
22665 (YYPARSE_PARAM_ARG): New macro.
22666 (yyparse): Use YYPARSE_PARAM_ARG.
22667
226681995-12-27 Richard Stallman <rms@gnu.org>
22669
22670 * bison.simple (YYPARSE_PARAM_DECL):
22671 In C++, make it always null.
22672 (YYPARSE_PARAM_ARG): New macro.
22673 (yyparse): Use YYPARSE_PARAM_ARG.
22674
226751995-11-29 Richard Stallman <rms@gnu.org>
22676
22677 * doc/bison.texinfo:
22678 Describe literal string tokens, %raw, %no_lines, %token_table.
22679
226801995-11-29 Daniel Hagerty <hag@gnu.org>
22681
22682 * doc/bison.texinfo: Fixed update date
22683
226841995-10-16 Richard Stallman <rms@gnu.org>
22685
22686 * src/version.c: Version 1.25.
22687
226881995-10-16 Richard Stallman <rms@gnu.org>
22689
22690 * NEWS: *** empty log message ***
22691
226921995-10-16 Richard Stallman <rms@gnu.org>
22693
22694 * doc/bison.1, doc/bison.rnh:
22695 Add new options.
22696
226971995-10-15 Richard Stallman <rms@gnu.org>
22698
22699 * src/vmsgetargs.c, src/getargs.c:
22700 Added -n, -k, and -raw switches.
22701 (noparserflag, toknumflag, rawtoknumflag): New variables.
22702
22703 * src/symtab.h (SALIAS):
22704 New #define for adding aliases to %token.
22705 (struct bucket): Added `alias' field.
22706
22707 * src/reduce.c (reduce_grammar):
22708 Revise error message.
22709 (print_notices): Remove final `.' from error message.
22710
22711 * src/reader.c (reader_output_yylsp):
22712 New function.
22713 (readgram): Use `#if 0' around code that accepted %command
22714 inside grammar rules: The documentation doesn't allow it,
22715 and it will fail since the %command processors scan for the next %.
22716 (parse_token_decl): Extended the %token
22717 declaration to allow a multi-character symbol as an alias.
22718 (parse_thong_decl): New function.
22719 (read_declarations): Added %thong declarations.
22720 (read_declarations): Handle NOOP to deal with allowing
22721 % declarations as another means to specify the flags.
22722 (readgram): Allow %prec prior to semantics embedded in a rule.
22723 (skip_to_char, read_declarations, copy_definition)
22724 (parse_token_decl, parse_start_decl, parse_type_decl)
22725 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
22726 (get_type_name, copy_guard, copy_action, readgram)
22727 (get_type, packsymbols): Revised most error messages.
22728 Changed `fatal' to `warnxxx' to avoid aborting for error.
22729 Revised and use multiple warnxxx functions to avoid using VARARGS1.
22730 (read_declarations): Improve the error message for
22731 an invalid character. Do not abort.
22732 (read_declarations, copy_guard, copy_action): Use
22733 printable_version to avoid unprintable characters in printed output.
22734 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
22735 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
22736 Allow the type of a non-terminal can be given
22737 more than once, as long as all specifications give the same type.
22738
22739 * src/output.c:
22740 (output_headers, output_trailers, output, output_gram)
22741 (output_rule_data): Implement noparserflag variable.
22742 Implement toknumflag variable.
22743 (output): Call reader_output_yylsp to output LTYPESTR.
22744
22745 * src/main.c (main):
22746 If reader sees an error, don't process the grammar.
22747 (fatals): Updated to not use VARARGS1.
22748 (printable_version, int_to_string, warn, warni, warns, warnss)
22749 (warnsss): New error reporting functions. Avoid abort for error.
22750
22751 * src/lex.h:
22752 Added THONG and NOOP for alias processing.
22753 Added SETOPT for the new code that allows setting options with %flags.
22754
22755 * src/lex.c:
22756 Include getopt.h. Add some extern decls.
22757 (safegetc): New function to deal with EOF gracefully.
22758 (literalchar); new function to deal with reading \ escapes.
22759 (lex): Use literalchar.
22760 (lex): Implemented "..." tokens.
22761 (literalchar, lex, parse_percent_token): Made tokenbuffer
22762 always contain the token. This includes growing the token
22763 buffer while reading an integer.
22764 (parse_percent_token): Replaced if-else statement with percent_table.
22765 (parse_percent_token): Added % declarations as another
22766 way to specify the flags -n, -l, and -r. Also added hooks for
22767 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
22768 major changes to files.c.
22769 (lex) Retain in the incoming stream a character following
22770 an incorrect '/'.
22771 (skip_white_space, lex): Revised most error messages
22772 and changed fatal to warn to avoid aborting.
22773 (percent_table): Added %thong declarations.
22774
22775 * src/gram.h: Comment changes.
22776
22777 * src/files.c (openfiles, open_extra_files, done):
22778 Add faction flag
22779 and actfile file. Handle noparserflag. Both for -n switch.
22780
22781 * src/conflicts.c (resolve_sr_conflict):
22782 Remove use of alloca.
22783
227841995-06-01 Jim Meyering <meyering@gnu.org>
22785
22786 * doc/bison.texinfo: *** empty log message ***
22787
227881995-05-06 Richard Stallman <rms@gnu.org>
22789
22790 * src/bison.s1: Comment change.
22791
227921995-05-06 Richard Stallman <rms@gnu.org>
22793
22794 * bison.simple: Comment change.
22795
227961995-05-03 Richard Stallman <rms@gnu.org>
22797
22798 * src/version.c: Version now 1.24.
22799
22800 * src/bison.s1: Change distribution terms.
22801
22802 * src/version.c: Version now 1.23.
22803
228041995-05-03 Richard Stallman <rms@gnu.org>
22805
22806 * doc/bison.texinfo:
22807 Rewrite "Conditions for Using Bison".
22808 Update version to 1.24.
22809
228101995-05-03 Richard Stallman <rms@gnu.org>
22811
22812 * bison.simple: Change distribution terms.
22813
228141995-02-23 Richard Stallman <rms@gnu.org>
22815
22816 * src/files.c: Test __VMS_POSIX as well as VMS.
22817
228181995-02-14 Jim Meyering <meyering@gnu.org>
22819
22820 * src/bison.s1 (__yy_memcpy):
22821 Renamed from __yy_bcopy to avoid
22822 confusion. Reverse FROM and TO arguments to be consistent with
22823 those of memcpy.
22824
228251995-02-14 Jim Meyering <meyering@gnu.org>
22826
22827 * bison.simple (__yy_memcpy):
22828 Renamed from __yy_bcopy to avoid
22829 confusion. Reverse FROM and TO arguments to be consistent with
22830 those of memcpy.
22831
228321994-11-10 David J. MacKenzie <djm@gnu.org>
22833
22834 * NEWS: reformat
22835
22836 * NEWS: New file.
22837
22838 * Makefile.in (DISTFILES): Include NEWS.
22839
22840 * Makefile.in (DISTFILES):
22841 Include install-sh, not install.sh.
22842
22843 * configure.in: Update to Autoconf v2 macro names.
22844
228451994-10-05 David J. MacKenzie <djm@gnu.org>
22846
22847 * Makefile.in: fix typo
22848
22849 * Makefile.in (prefix, exec_prefix):
22850 Let configure set them.
22851
228521994-09-28 David J. MacKenzie <djm@gnu.org>
22853
22854 * Makefile.in: Set datadir to $(prefix)/share.
22855
228561994-09-15 Richard Stallman <rms@gnu.org>
22857
22858 * src/bison.s1:
22859 Update copyright notice and GPL version.
22860
228611994-09-15 Richard Stallman <rms@gnu.org>
22862
22863 * bison.simple:
22864 Update copyright notice and GPL version.
22865
228661994-07-12 Richard Stallman <rms@gnu.org>
22867
22868 * src/reduce.c, src/reader.c:
22869 entered into RCS
22870
228711994-05-05 David J. MacKenzie <djm@gnu.org>
22872
22873 * Makefile.in: entered into RCS
22874
228751994-03-26 Richard Stallman <rms@gnu.org>
22876
22877 * src/bison.s1: entered into RCS
22878
228791994-03-26 Richard Stallman <rms@gnu.org>
22880
22881 * bison.simple: entered into RCS
22882
228831994-03-25 Richard Stallman <rms@gnu.org>
22884
22885 * src/main.c: entered into RCS
22886
228871994-03-24 Richard Stallman <rms@gnu.org>
22888
22889 * src/conflicts.c: entered into RCS
22890
228911994-01-02 Richard Stallman <rms@gnu.org>
22892
22893 * Makefile.in: *** empty log message ***
22894
228951993-11-21 Richard Stallman <rms@gnu.org>
22896
22897 * src/bison.s1: *** empty log message ***
22898
228991993-11-21 Richard Stallman <rms@gnu.org>
22900
22901 * doc/bison.texinfo: entered into RCS
22902
22903 * doc/bison.texinfo: *** empty log message ***
22904
229051993-11-21 Richard Stallman <rms@gnu.org>
22906
22907 * bison.simple: *** empty log message ***
22908
229091993-10-25 David J. MacKenzie <djm@gnu.org>
22910
22911 * doc/bison.texinfo: *** empty log message ***
22912
229131993-10-19 Richard Stallman <rms@gnu.org>
22914
22915 * src/bison.s1: *** empty log message ***
22916
229171993-10-19 Richard Stallman <rms@gnu.org>
22918
22919 * bison.simple: *** empty log message ***
22920
229211993-10-14 Richard Stallman <rms@gnu.org>
22922
22923 * src/bison.s1: *** empty log message ***
22924
229251993-10-14 Richard Stallman <rms@gnu.org>
22926
22927 * bison.simple: *** empty log message ***
22928
229291993-09-14 David J. MacKenzie <djm@gnu.org>
22930
22931 * doc/bison.texinfo: *** empty log message ***
22932
229331993-09-13 Noah Friedman <friedman@gnu.org>
22934
22935 * Makefile.in: *** empty log message ***
22936
229371993-09-10 Richard Stallman <rms@gnu.org>
22938
22939 * src/conflicts.c: *** empty log message ***
22940
22941 * src/system.h: entered into RCS
22942
229431993-09-10 Richard Stallman <rms@gnu.org>
22944
22945 * doc/bison.1: entered into RCS
22946
229471993-09-06 Noah Friedman <friedman@gnu.org>
22948
22949 * src/version.c: entered into RCS
22950
229511993-09-06 Noah Friedman <friedman@gnu.org>
22952
22953 * Makefile.in: *** empty log message ***
22954
229551993-07-30 David J. MacKenzie <djm@gnu.org>
22956
22957 * Makefile.in: *** empty log message ***
22958
229591993-07-24 Richard Stallman <rms@gnu.org>
22960
22961 * src/bison.s1: *** empty log message ***
22962
229631993-07-24 Richard Stallman <rms@gnu.org>
22964
22965 * bison.simple: *** empty log message ***
22966
229671993-07-08 David J. MacKenzie <djm@gnu.org>
22968
22969 * Makefile.in: *** empty log message ***
22970
229711993-07-04 Richard Stallman <rms@gnu.org>
22972
22973 * src/bison.s1: *** empty log message ***
22974
229751993-07-04 Richard Stallman <rms@gnu.org>
22976
22977 * bison.simple: *** empty log message ***
22978
229791993-06-26 David J. MacKenzie <djm@gnu.org>
22980
22981 * src/getargs.c: entered into RCS
22982
229831993-06-26 David J. MacKenzie <djm@gnu.org>
22984
22985 * doc/bison.texinfo: *** empty log message ***
22986
22987 * doc/bison.1: New file.
22988
229891993-06-25 Richard Stallman <rms@gnu.org>
22990
22991 * src/getargs.c: New file.
22992
229931993-06-16 Richard Stallman <rms@gnu.org>
22994
22995 * src/bison.s1: *** empty log message ***
22996
229971993-06-16 Richard Stallman <rms@gnu.org>
22998
22999 * bison.simple: *** empty log message ***
23000
230011993-06-03 Richard Stallman <rms@gnu.org>
23002
23003 * src/bison.s1: New file.
23004
230051993-06-03 Richard Stallman <rms@gnu.org>
23006
23007 * doc/bison.texinfo: *** empty log message ***
23008
230091993-06-03 Richard Stallman <rms@gnu.org>
23010
23011 * bison.simple: New file.
23012
230131993-05-19 Richard Stallman <rms@gnu.org>
23014
23015 * doc/bison.texinfo: New file.
23016
230171993-05-07 Noah Friedman <friedman@gnu.org>
23018
23019 * Makefile.in: *** empty log message ***
23020
230211993-04-28 Noah Friedman <friedman@gnu.org>
23022
23023 * src/reader.c: *** empty log message ***
23024
230251993-04-23 Noah Friedman <friedman@gnu.org>
23026
23027 * src/alloc.h: entered into RCS
23028
230291993-04-20 David J. MacKenzie <djm@gnu.org>
23030
23031 * src/version.c: *** empty log message ***
23032
23033 * src/files.c, src/allocate.c:
23034 entered into RCS
23035
23036 * src/reader.c: *** empty log message ***
23037
23038 * src/lex.c: entered into RCS
23039
23040 * src/conflicts.c: New file.
23041
23042 * src/symtab.c: entered into RCS
23043
23044 * src/alloc.h: New file.
23045
23046 * src/LR0.c: entered into RCS
23047
230481993-04-18 Noah Friedman <friedman@gnu.org>
23049
23050 * src/reader.c: New file.
23051
23052 * src/version.c: *** empty log message ***
23053
230541993-04-18 Noah Friedman <friedman@gnu.org>
23055
23056 * Makefile.in: *** empty log message ***
23057
230581993-04-17 Noah Friedman <friedman@gnu.org>
23059
23060 * Makefile.in: *** empty log message ***
23061
230621993-04-15 Richard Stallman <rms@gnu.org>
23063
23064 * src/main.c, src/files.c:
23065 New file.
23066
230671993-04-15 Noah Friedman <friedman@gnu.org>
23068
23069 * configure.in: entered into RCS
23070
23071 * configure.in: *** empty log message ***
23072
23073 * configure.in: New file.
23074
230751993-04-14 Richard Stallman <rms@gnu.org>
23076
23077 * Makefile.in: New file.
23078
230791993-04-13 Richard Stallman <rms@gnu.org>
23080
23081 * src/version.c: New file.
23082
230831993-03-25 Richard Stallman <rms@gnu.org>
23084
23085 * src/output.c: entered into RCS
23086
230871992-09-25 Richard Stallman <rms@gnu.org>
23088
23089 * configure.bat: entered into RCS
23090
230911992-06-22 Richard Stallman <rms@gnu.org>
23092
23093 * src/vmsgetargs.c: entered into RCS
23094
230951992-06-22 Richard Stallman <rms@gnu.org>
23096
23097 * doc/bison.rnh: entered into RCS
23098
230991992-04-20 David J. MacKenzie <djm@gnu.org>
23100
23101 * README: entered into RCS
23102
231031992-01-22 Richard Stallman <rms@gnu.org>
23104
23105 * src/machine.h: entered into RCS
23106
231071991-12-21 Richard Stallman <rms@gnu.org>
23108
23109 * src/lalr.c, src/closure.c:
23110 entered into RCS
23111
231121991-12-20 Richard Stallman <rms@gnu.org>
23113
23114 * src/state.h: entered into RCS
23115
231161991-12-18 Richard Stallman <rms@gnu.org>
23117
23118 * src/print.c, src/nullable.c, src/derives.c:
23119 entered into RCS
23120
231211991-11-03 David J. MacKenzie <djm@gnu.org>
23122
23123 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
23124 entered into RCS
23125
231261988-09-09 Richard Stallman <rms@gnu.org>
23127
23128 * src/bison.hairy: entered into RCS
23129
231301987-12-16 Richard Stallman <rms@gnu.org>
23131
23132 * REFERENCES: entered into RCS
dc546b0f 23133
f294a2c2 23134
04098407 23135 -----
f294a2c2 23136
04098407 23137 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
9126263e 23138 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
95021767 23139 Free Software Foundation, Inc.
f294a2c2 23140
04098407
PE
23141 Copying and distribution of this file, with or without
23142 modification, are permitted provided the copyright notice and this
23143 notice are preserved.