]> git.saurik.com Git - bison.git/blame - ChangeLog
build: require Automake 1.11.1 to avoid a security flaw.
[bison.git] / ChangeLog
CommitLineData
e30c0477
JD
12010-01-19 Joel E. Denny <jdenny@clemson.edu>
2
3 build: require Automake 1.11.1 to avoid a security flaw.
4 * HACKING (Release Procedure): Don't document Automake security
5 flaw here.
6 * configure.ac (AM_INIT_AUTOMAKE): Require 1.11.1, and explain
7 why here.
8
a538eeb1
JD
92010-01-19 Joel E. Denny <jdenny@clemson.edu>
10
11 gnulib: update to latest.
12
d6bdb90a
JD
132010-01-19 Joel E. Denny <jdenny@clemson.edu>
14
15 ChangeLog (2006-09-15): add Odd Arild Olsen's role for push.c.
16
326e5cf8
JD
172010-01-15 Joel E. Denny <jdenny@clemson.edu>
18
19 Thank the developer of the initial push parser implementation.
20 This unfortunate oversight is several years old.
21 * THANKS (Odd Arild Olsen): Add.
22
fca9c5ef
JD
232010-01-04 Joel E. Denny <jdenny@clemson.edu>
24
25 Fix some comments concerning LR(0) versus LALR(1).
26
27 Stop equating LR(0) with nondeterminism and LALR(1) with
28 determinism. That is, if all states are consistent, then LR(0)
29 tables are deterministic. On the other hand, LALR(1) tables
30 might be nondeterministic before conflict resolution, and GLR
31 permits LALR(1) tables to remain nondeterministic.
32 * src/LR0.c, src/LR0.h: Here.
33 * src/lalr.c, src/lalr.h: Here.
34 * src/main.c (main): Here.
35 * src/state.c, src/state.h: Here.
36
37 * src/ielr.h (ielr): In preconditions, expect LR(0) not LALR(1)
38 parser tables.
39
e141f4d4
JD
402010-01-04 Joel E. Denny <jdenny@clemson.edu>
41
42 maint: run "make update-copyright"
43
882be728
JD
442009-12-30 Joel E. Denny <jdenny@clemson.edu>
45
46 POSIX: complain if %prec's token was not defined.
47 * NEWS (2.5): Document.
48 * src/reader.c (grammar_rule_check): Convert warning to
49 complaint.
50 * tests/input.at (%prec's token must be defined): Update.
51
8bb3a2e7
JD
522009-12-30 Joel E. Denny <jdenny@clemson.edu>
53
54 POSIX: warn if %prec's token was not defined.
55 Reported by Florian Krohm at
56 <http://lists.gnu.org/archive/html/bug-bison/2009-12/msg00005.html>.
57 * NEWS (2.4.2): Document.
58 * src/reader.c (grammar_rule_check): Implement.
59 (grammar_current_rule_prec_set): Add comments explaining that we
60 here assume a %prec identifier is a token, but we still manage
61 to support POSIX.
62 * tests/input.at (%prec's token must be defined): New test
63 group.
64
505e1551
JD
652009-12-31 Joel E. Denny <jdenny@clemson.edu>
66
67 * HACKING (Release Procedure): Recommend a secure automake.
68
b8d19cf8
JD
692009-12-29 Joel E. Denny <jdenny@clemson.edu>
70
71 portability: `<' and `>' are not always defined on addresses.
72 Specifically, don't sort objects by their memory addresses when
73 they're not allocated in the same array or other object. Though
74 I haven't found a test case where that fails on my platform, C
75 says the behavior is undefined.
76 * src/AnnotationList.c (AnnotationList__insertInto): Remove
77 FIXME. Use new id field of InadequacyList nodes rather than
78 their memory addresses when sorting.
79 (AnnotationList__compute_from_inadequacies): Add
80 inadequacy_list_node_count argument to pass to
81 InadequacyList__new_conflict.
82 * src/AnnotationList.h
83 (AnnotationList__compute_from_inadequacies): Update prototype
84 and documentation for new argument.
85 * src/InadequacyList.c (InadequacyList__new_conflict): Add
86 node_count argument and use it to assign a unique ID.
87 * src/InadequacyList.h (InadequacyListNodeCount): New typedef.
88 (InadequacyList): Add id field.
89 (InadequacyList__new_conflict): Update prototype and
90 documentation for new argument.
91 * src/ielr.c (ielr_compute_annotation_lists): Update
92 AnnotationList__compute_from_inadequacies invocation.
93
df222dfa
JD
942009-12-20 Joel E. Denny <jdenny@clemson.edu>
95
96 Fix handling of yychar manipulation in user semantic actions.
97 The problem was that yacc.c didn't always update the yychar
98 translation afterwards. However, other skeletons appear to be
99 fine. glr.c appears to already translate yychar before every
100 use. lalr1.cc does not define yychar and does not document its
101 replacement, yyla, for users. It does provide yyclearin, but
102 that does not manipulate yyla and thus requires no translation
103 update. In lalr1.java, yychar is out of scope during semantic
104 actions.
105 * NEWS (2.5): Document.
106 * data/yacc.c (YYBACKUP): Don't bother translating yychar into
107 yytoken here.
108 (yyparse, yypush_parse): Instead, translate before every use of
109 yytoken, and add comments explaining this approach.
110 * tests/actions.at (Destroying lookahead assigned by semantic
111 action): New test group checking that translation happens before
112 lookahead destructor calls at parser return. Previously,
113 incorrect destructors were called.
114 * tests/conflicts.at (parse.error=verbose and consistent
115 errors): New test group checking that translation happens at
116 syntax error detection before the associated verbose error
117 message and the associated lookahead destructor calls. While
118 the destructor call is fixed by this patch, the verbose error
119 message is currently incorrect due to another bug (see
120 comments in test group), so this is an expected failure for now.
121
4395a9ff
JD
1222009-12-21 Joel E. Denny <jdenny@clemson.edu>
123
124 YYFAIL: warn about uses and remove from lalr1.java.
125 * NEWS (2.5): Document.
126 * data/lalr1.java (parser::YYStack::YYFAIL): Rename to YYERRLAB,
127 and make it private. Update all uses.
128 * src/scan-code.l (SC_RULE_ACTION): Implement warning.
129
1625df5b
JD
1302009-12-21 Joel E. Denny <jdenny@clemson.edu>
131
132 YYFAIL: deprecate.
133 * NEWS (2.4.2): Document deprecation and the phase-out plan.
134 * data/lalr1.java (parser::YYStack::YYFAIL): Add comment about
135 deprecation.
136 * data/yacc.c (YYFAIL): Likewise, and suppress warnings about
137 YYFAIL from GCC cpp's -Wunused-macros.
138 * doc/bison.texinfo (Java Action Features): Remove YYFAIL
139 documentation.
140 (LocalWords): Remove YYFAIL.
141
5335b65a
JD
1422009-12-20 Joel E. Denny <jdenny@clemson.edu>
143
144 tests: cleanup.
145 * tests/c++.at (Syntax error discarding no lookahead): Don't
146 ignore stderr. Instead, eliminate remaining warnings.
147
d59beda0
JD
1482009-12-18 Joel E. Denny <jdenny@clemson.edu>
149
150 lalr1.cc: don't discard non-existent lookahead on syntax error.
151 * data/lalr1.cc (parser::parse): Check yyempty first.
152 * tests/c++.at (Syntax error discarding no lookahead): New test
153 group.
154
387b4d50
JD
1552009-12-17 Joel E. Denny <jdenny@clemson.edu>
156
157 Code cleanup.
158 * src/symtab.c, src/symtab.h (symbol_class_get_string): Remove
159 function, which is no longer used.
160
a603c6e0
JD
1612009-12-16 Joel E. Denny <jdenny@clemson.edu>
162
163 Add gcc's -Wundef to test suite and fix another warning from it.
164 * NEWS (2.4.2): Update description of -Wundef fix.
165 * configure.ac (WARN_CXXFLAGS_TEST): New substitution.
166 (WARN_CFLAGS_TEST): New substitution.
167 * data/glr.c: Avoid warning about __STRICT_ANSI__.
168 * tests/atlocal.in (CFLAGS): Use WARN_CFLAGS_TEST instead of
169 WARN_CFLAGS.
170 (NO_WERROR_CFLAGS): Likewise.
171 (CXXFLAGS): Use WARN_CXXFLAGS_TEST instead of WARN_CXXFLAGS.
172
19750d31
JD
1732009-12-16 Joel E. Denny <jdenny@clemson.edu>
174
175 * data/yacc.c: Reformat m4 a little.
176
c938d650
JD
1772009-12-16 Joel E. Denny <jdenny@clemson.edu>
178
179 Document gcc -Wundef fix.
180 * NEWS (2.4.2): Here.
181 * THANKS (Jonathan Nieder): Add.
182
fcd32abd
JN
1832009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
184
185 Simplify y.tab.c when location tracking is disabled.
186 * data/yacc.c: Do not check YYLTYPE_IS_TRIVIAL if location
187 tracking is not enabled. Instead, unconditionally define
188 YY_LOCATION_PRINT as a no-op for backward compatibility.
189
ae93128c
JN
1902009-12-15 Jonathan Nieder <jrnieder@gmail.com> (tiny change)
191
192 Avoid warnings from gcc -Wundef y.tab.c.
193 * data/glr.c: Check if YYENABLE_NLS and YYLTYPE_IS_TRIVIAL are
194 defined before using them.
195 * data/lalr1.cc: Likewise.
196 * data/yacc.c: Likewise.
197
c843aaab
JD
1982009-12-15 Joel E. Denny <jdenny@clemson.edu>
199
200 autoconf: update to latest for fix of M4 detection.
201 Reported by Eric Blake.
202 * submodules/autoconf: Update.
203
5c99151a
JD
2042009-12-15 Joel E. Denny <jdenny@clemson.edu>
205
206 portability: use -DGNULIB_POSIXCHECK.
207 Reported by Eric Blake. See discussions at
208 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00008.html>
209 and
210 <http://lists.gnu.org/archive/html/bug-gnulib/2009-10/msg00108.html>.
211 * HACKING (Release checks): Suggest -DGNULIB_POSIXCHECK.
212 * bootstrap.conf (gnulib_modules): Add all the printf modules
213 suggested by -DGNULIB_POSIXCHECK. Add realloc-posix as
214 suggested by -DGNULIB_POSIXCHECK for gnulib's own vasnprintf.c.
215 (excluded_files): Remove m4/printf-posix.m4.
216 * tests/atlocal.in (LIBS): As for LDADD in src/local.mk, add
217 lib/libbison.a so gnulib libraries can be linked.
218
75f94c6d
JD
2192009-12-15 Joel E. Denny <jdenny@clemson.edu>
220
221 gnulib: update for fix of fprintf-posix, which we'll use soon.
222 * etc/prefix-gnulib-mk (prefix): Adjust regex for make file
223 targets so that gnulib's new arg-nonnull.h and link-warning.h
224 are matched.
225 * gnulib: Update.
226
ca01f454
JD
2272009-12-14 Joel E. Denny <jdenny@clemson.edu>
228
229 Enable assertion output and --disable-assert for configure.
230 * bootstrap.conf (gnulib_modules): Add assert module.
231 * src/system.h (aver): Define as assert, and summarize the
232 discussion on this issue.
233
9dc3ee6d
JD
2342009-12-14 Joel E. Denny <jdenny@clemson.edu>
235
236 Expand GLR acronym in summary of Bison.
237 Based on discussion with Akim Demaille starting at
238 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00087.html>.
239 * doc/bison.texinfo (Introduction): Here.
240 * src/getargs.c (usage): Here.
241
d013372c
AR
2422009-10-03 Alex Rozenman <rozenman@gmail.com>
243
244 Document named references.
245 * doc/bison.texinfo (Actions): Add new example and xref to
246 Using Named References node.
247 (Using Named References): New node.
248
5297ebb3
JD
2492009-10-16 Joel E. Denny <jdenny@clemson.edu>
250
251 cleanup.
252 * src/Sbitset.c (Sbitset__new_on_obstack): Use Sbitset instead
253 of char*.
254 (Sbitset__isEmpty): Use Sbitset instead of char*.
255 * src/Sbitset.h (Sbitset): Make it a pointer to unsigned char
256 instead of char. This helps to avoid casting errors.
257 (Sbitset__or): Use Sbitset instead of char*.
258
175620d3
JD
2592009-10-16 Joel E. Denny <jdenny@clemson.edu>
260
261 portability: don't assume 8-bit bytes.
262 That is, use CHAR_BIT and UCHAR_MAX instead of 8 and 0xff.
263 * src/Sbitset.h (Sbitset__nbytes): Here.
264 (Sbitset__byteAddress): Here.
265 (Sbitset__bit_mask): Here.
266 (Sbitset__last_byte_mask): Here.
267 (Sbitset__ones): Here.
268 (SBITSET__FOR_EACH): Here.
269
786578e3
JD
2702009-10-11 Joel E. Denny <jdenny@clemson.edu>
271
272 portability: use va_start and va_end in the same function.
273 * src/complain.c (error_message): Move va_end from here...
274 (ERROR_MESSAGE): ... to here.
275
416a9da6
JD
2762009-10-08 Joel E. Denny <jdenny@clemson.edu>
277
278 * data/bison.m4: Update comments for rename to muscle-tab.h.
279
10659d0e
JD
2802009-10-07 Joel E. Denny <jdenny@clemson.edu>
281
282 Minor code cleanup.
283 * src/muscle-tab.c (MUSCLE_USER_NAME_CONVERT): Remove macro and
284 replace all uses with UNIQSTR_CONCAT.
285 * src/uniqstr.c (uniqstr_vsprintf): New function.
286 * src/uniqstr.h (uniqstr_vsprintf): Add prototype.
287 (UNIQSTR_CONCAT, UNIQSTR_GEN_FORMAT, UNIQSTR_GEN_FORMAT_): New
288 macros.
289
3c5362b8
JD
2902009-10-06 Joel E. Denny <jdenny@clemson.edu>
291
292 * TODO (Complaint submessage indentation): New.
293
b143f404
JD
2942009-10-04 Joel E. Denny <jdenny@clemson.edu>
295
296 Minor code cleanup.
297 * src/parse-gram.y: Clean up sorting of declarations.
298 Use types to simplify %printer declarations where possible.
299 Provide %printer for BRACKETED_ID and symbol.prec.
300 * src/symtab.c: Whitespace change.
301
7439c5c0
JD
3022009-10-04 Joel E. Denny <jdenny@clemson.edu>
303
304 tests: skip tests of file names that platform does not support.
305 Reported by Michael Raskin at
306 <http://lists.gnu.org/archive/html/bug-bison/2009-09/msg00001.html>.
307 * THANKS (Michael Raskin): Add.
308 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Fix. Cygwin used
309 to fail at least for file names containing ":" or "\".
310
45319f13
JD
3112009-09-23 Joel E. Denny <jdenny@clemson.edu>
312
313 yysyntax_error: avoid duplicate lookahead collection.
314 Except when memory reallocation is required, this change
315 eliminates the need to invoke yysyntax_error twice and thus to
316 repeat the collection of lookaheads. It also prepares for
317 future extensions that will make those repetitions more
318 expensive and that will require additional memory management in
319 yysyntax_error. Finally, it fixes an obscure bug already
320 exercised in the test suite.
321 * data/yacc.c (yysyntax_error): Add arguments for message
322 buffer variables stored in the parser. Instead of size, return
323 status similar to yyparse status but indicating success of
324 message creation. Other than the actual reallocation of the
325 message buffer, import and clean up memory management code
326 from...
327 (yyparse, yypush_parse): ... here.
328 * tests/regression.at (parse.error=verbose overflow): No longer
329 an expected failure.
330
52cea04a
JD
3312009-09-23 Joel E. Denny <jdenny@clemson.edu>
332
333 yysyntax_error: test memory management more.
334 * tests/atlocal.in (NO_WERROR_CFLAGS): New cpp macro.
335 * tests/regression.at (parse.error=verbose and
336 YYSTACK_USE_ALLOCA): New test group.
337 (parse.error=verbose overflow): New test group that reveals an
338 obscure bug. Expected fail for now.
339
37318e2f
JD
3402009-10-04 Joel E. Denny <jdenny@clemson.edu>
341
342 benchmarks: use %debug consistently among grammars.
343 * etc/bench.pl.in (generate_grammar_triangular): Do not activate
344 %debug by default. It can affect the timings even if yydebug=0.
345 (generate_grammar_calc): For consistency with other grammars,
346 use YYDEBUG environment variable to set yydebug.
347
f74d6d25
JD
3482009-10-03 Joel E. Denny <jdenny@clemson.edu>
349
350 Remove dead code.
351 * src/symtab.c (symbol_pack): Here because every symbol's number
352 is always defined by this time.
353
5b1ff423
AR
3542009-10-03 Alex Rozenman <rozenman@gmail.com>
355
356 Add additional space after periods in NEWS.
357 * NEWS (2.5): here.
358
47eced30
JD
3592009-09-29 Joel E. Denny <jdenny@clemson.edu>
360
361 Use the correct conversion specifier for size_t.
362 Reported by Jim Meyering.
363 * src/Sbitset.h (SBITSET__INDEX__CONVERSION_SPEC): New, "zu"
364 because Sbitset__Index is size_t.
365 * src/Sbitset.c (Sbitset__fprint): Use it instead of %d.
366
d8f68fc2
JD
3672009-09-27 Joel E. Denny <jdenny@clemson.edu>
368
369 tests: don't abuse AT_BISON_CHECK.
370 * tests/regression.at (parse-gram.y: LALR = IELR): Move
371 additional shell commands outside of AT_BISON_CHECK.
372
43aabb70
JD
3732009-09-26 Joel E. Denny <jdenny@clemson.edu>
374
375 tests: check that parse-gram.y's IELR and LALR are identical.
376 * tests/atlocal.in (abs_top_srcdir): New shell variable.
377 * tests/regression.at (parse-gram.y: LALR = IELR): New test
378 group.
379
66381412
AR
3802009-09-19 Alex Rozenman <rozenman@gmail.com>
381
382 Keep sub-messages aligned. Fix strings for translation.
5b1ff423
AR
383 * src/location.h (location_print): Add return value.
384 * src/location.c (location_print): Return number of printed
66381412 385 characters.
5b1ff423
AR
386 * src/complain.h (complain_at_indent, warn_at_indent): Prototype
387 new functions.
388 * src/complain.cpp (indent_ptr): New static variable.
389 (error_message, complain_at_indent, warn_at_indent): Implement
390 the alignment mechanism.
391 * src/scan-code.l (parse_ref, show_sub_messages): Fix strings
392 for translations. Use new alignment mechanism.
393 * tests/named-ref.at: Adjust test-cases.
66381412
AR
394 * NEWS (2.5): Add an announcement about named references.
395
a6ca4ce2
AD
3962009-09-17 Akim Demaille <demaille@gostai.com>
397
398 doc: fixes.
399 * doc/bison.texinfo: here.
400 Reported by Alex Rozenman.
401
3cdc21cf
AD
4022009-09-16 Akim Demaille <demaille@gostai.com>
403
404 doc: lalr1.cc and variants.
405 * doc/bison.texinfo (Decl Summary): Document the "lex_symbol" and
406 "variant" %define variables.
407 (C++ Semantic Values): Split into...
408 (C++ Unions, C++ Variants): these.
409 The latter is new.
410 (C++ Parser Interface): Fix type names.
411 Document parser::syntax_error.
412 Document the fact that locations are not mandatory.
413 (C++ Scanner Interface): Split into...
414 (Split Symbols, Complete Symbols): these.
415 The later is new.
416 (Calc++ Parsing Driver): Use variants.
417 Add more comments.
418 Adjust style.
419 (Calc++ Parser): Declare all the tokens, no
420 longer accept raw characters.
421 Remove %union.
422 Adjust types and printers.
423 Remove destructors.
424 (Calc++ Scanner): Use make_<SYMBOL> functions.
425 Use strerror in error message.
426
f50bfcd6
AD
4272009-09-16 Akim Demaille <demaille@gostai.com>
428
429 doc: spell checking.
430 * doc/bison.texinfo: here.
431
6b5a0de9
AD
4322009-09-16 Akim Demaille <demaille@gostai.com>
433
434 doc: comment changes.
435 * doc/bison.texinfo: Comment changes.
436
2b08bceb
AD
4372009-09-16 Akim Demaille <demaille@gostai.com>
438
439 lalr1.cc: factor the yytranslate_ invocation in make_SYMBOLS.
440 * data/c++.m4, data/lalr1.cc (parser::symbol_type): Change the
441 constructor to take a token_type instead of the (internal) symbol
442 number.
443 Call yytranslate_.
444 * data/variant.hh (b4_symbol_constructor_define_): Therefore,
445 don't call yytranslate_ here.
446
c981ce9b
AD
4472009-09-16 Akim Demaille <demaille@gostai.com>
448
449 TODO: statistics.
450 * TODO (Figures): New.
451
00d80a9c
JD
4522009-09-13 Joel E. Denny <jdenny@clemson.edu>
453
454 tests: clean up push.at test group titles.
455 * tests/push.at: Remove "Push Parsing: " from test group titles
456 because these are already under the banner "Push Parsing Tests".
457
f64e406b
AR
4582009-09-12 Alex Rozenman <rozenman@gmail.com>
459
460 Provide an additional sub-message for clarity.
461 Add "symbol not found in production" error message when
462 an "invalid reference" is detected in named references
463 resolution.
464 * src/scan-code.l: Update "invalid reference" case.
465 * tests/named-ref.at: Adjust test-cases.
466
bb31eb56
JD
4672009-09-10 Joel E. Denny <jdenny@clemson.edu>
468
469 Clean up yacc.c a little.
470 * data/yacc.c: Clean up M4 for readability, and make output
471 whitespace more consistent. For the main parse function
472 comment, instead of saying "yyparse or yypush_parse", say either
473 "yyparse" or "yypush_parse" depending on which it actually is.
474
2d399888
JD
4752009-09-10 Joel E. Denny <jdenny@clemson.edu>
476
477 Fix --enable-gcc-warnings.
478 * src/parse-gram.y (%printer <param>): Handle param_none.
479
ff601366
AD
4802009-09-09 Akim Demaille <demaille@gostai.com>
481
482 lalr1.cc: syntax_error as exceptions.
483 It is common to use sort of factories in the user actions. These
484 factories may check some "syntactic" constraints that are not
485 enforced by the grammar itself. This is possible using YYERROR
486 within the action itself. Provide the user with a means to throw
487 a syntax_error exception.
488
489 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
490 Declare and define yy::parser::syntax_error.
491 * data/lalr1.cc: Include stdexcept.
492 (yy::parser::parse): Wrap the user action within a try/catch.
493 * data/glr.cc: Include stdexcept.
494
29660062
AD
4952009-09-09 Akim Demaille <demaille@gostai.com>
496
497 lalr1.cc: add missing "inline".
498 * data/c++.m4 (b4_public_types_define): Add missing inline to
499 implementations provided in headers.
500
2055a44e
AD
5012009-09-09 Akim Demaille <demaille@gostai.com>
502
503 %param: documentation.
504 * NEWS (2.6): Document %param, %lex-param, and %parse-param
505 changes.
506 * doc/bison.texinfo: Document that %lex-param and %parse-param
507 are n-ary.
508 Changes some examples to demonstrate it.
509 (Calc++ Parser): Use %param.
510
dd875058
AD
5112009-09-09 Akim Demaille <demaille@gostai.com>
512
513 Regen.
514
f71db70b
AD
5152009-09-09 Akim Demaille <demaille@gostai.com>
516
517 style changes.
518 * src/parse-gram.y (add_param): Scope changes.
519
eaca4c11
AD
5202009-09-09 Akim Demaille <demaille@gostai.com>
521
522 %parse: support several arguments.
523 * src/parse-gram.y (current_param): New.
524 (param_type): Add param_none.
525 (params): New nonterminal.
526 Use it.
527
b18cdd91
AD
5282009-09-09 Akim Demaille <demaille@gostai.com>
529
530 Regen.
531
a7706735
AD
5322009-09-09 Akim Demaille <demaille@gostai.com>
533
534 %param.
535 Provide a means to factor lex-param and parse-param common
536 declarations.
537
538 * src/parse-gram.y (param_type): New.
539 Define a %printer for it.
540 (add_param): Use it.
541 (%parse-param, %lex-param): Merge into...
542 (%parse): this new token.
543 Adjust the grammar to use it.
544 * src/scan-gram.l (RETURN_VALUE): New.
545 (RETURN_PERCENT_FLAG): Use it.
546 (RETURN_PERCENT_PARAM): New.
547 Use it to support %parse-param, %lex-param and %param.
548
9789acf0
JD
5492009-09-03 Joel E. Denny <jdenny@clemson.edu>
550
551 Use aver not assert.
552 * src/output.c: Don't include assert.h.
553 (output_skeleton): Use aver not assert.
554 * src/system.h (aver): In documentation of why, add links to
555 Paul Eggert's explanations in the mailing lists.
556
61bc57e5
AR
5572009-09-05 Alex Rozenman <rozenman@gmail.com>
558
559 Use "Unresolved reference" error message when no symbols were found
560 in a symbolic reference resolution. Remove .expr and -expr from
561 the shown reference when the reference is unresolved.
562 * src/scan-code.l: Change the error message, adjust location columns,
563 rename variable "exact_mode" to "explicit_bracketing".
564 * tests/named-ref.at: Adjust existing tests and add a new one.
565
f4c75eaf
AD
5662009-09-04 Akim Demaille <demaille@gostai.com>
567
568 Adjust synclines in src/parse-gram.[ch].
569 * tests/bison.in: Do some magic (including working around issues
570 with ylwrap) when this wrapper is used to compile
571 src/parse-gram.y.
572
c6abeab1
JD
5732009-09-03 Joel E. Denny <jdenny@clemson.edu>
574
575 Complain about unused %define variables and %code qualifiers.
576 * NEWS (2.5): Document.
577 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
578 * doc/bison.texinfo (Decl Summary): Document complaint, and
579 improve %define documentation a little otherwise.
580 * tests/input.at (Reject unused %code qualifiers): Update.
581 (%define errors): Update.
582 (%define, --define, --force-define): Update.
583 (%define backward compatibility): Update.
584 (Unused %define api.pure): Update.
585 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
586
82db7cdb
JD
5872009-09-03 Joel E. Denny <jdenny@clemson.edu>
588
589 Don't suppress warnings about unused parse.error.
590 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
591 %define variable parse.error unless b4_error_verbose_flag is
592 actually expanded in a skeleton.
593
2755de8f
AD
5942009-09-03 Akim Demaille <demaille@gostai.com>
595
596 * NEWS (2.4.2): Add "Internationalization" item.
597
1deef26d
AD
5982009-09-03 Akim Demaille <demaille@gostai.com>
599
600 bootstrap: fix/improve find_tool.
601 * bootstrap (find_tool): Improve error messages.
602 Fix typo about find_tool_names.
603
2646cd54
JD
6042009-08-29 Joel E. Denny <jdenny@clemson.edu>
605
606 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
607 See
608 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
609 * src/scan-code.h (code_props_rule_action_init): Rename
610 named_ref arg to name so it doesn't shadow named_ref type. This
611 makes it consistent with the function definition in scan-code.l
612 anyway.
613
cf499cff
JD
6142009-08-28 Joel E. Denny <jdenny@clemson.edu>
615
616 %define: accept unquoted values.
617 * NEWS (2.5): Group all %define changes together, and document
618 this one. Remove quotes in IELR and canonical LR entry.
619 * doc/bison.texinfo: Remove quotes in most examples throughout.
620 (Decl Summary): Update %define documentation.
621 (Table of Symbols): Likewise.
622 * src/ielr.c (LrType): Update documentation.
623 * src/parse-gram.y (content.opt): Add production for ID.
624 * tests/actions.at: Remove quotes in most tests.
625 * tests/calc.at: Likewise.
626 * tests/existing.at: Likewise.
627 * tests/input.at: Likewise.
628 * tests/local.at: Likewise.
629 * tests/push.at: Likewise.
630 * tests/reduce.at: Likewise.
631 * tests/torture.at: Likewise.
632
6ba96404
JD
6332009-08-28 Joel E. Denny <jdenny@clemson.edu>
634
635 %define lr.type: make values lowercase IDs.
636 That is, "LALR" => "lalr", "IELR" => "ielr", and
637 "canonical LR" => "canonical-lr".
638 * NEWS (2.5): Update documentation.
639 * doc/bison.texinfo (Decl Summary): Likewise.
640 * src/ielr.c (ielr): Use new values.
641 * src/ielr.h (ielr): Update documentation.
642 * src/reader.c (prepare_percent_define_front_end_variables): Use
643 and validate new values.
644 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
645 grammars.
646 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
647
4413bbd3
EB
6482009-08-27 Eric Blake <ebb9@byu.net>
649
650 scan-gram: avoid portability trap with ctype usage.
651 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
652 Avoid compiler warning.
653
b70c7fb4
JD
6542009-08-27 Joel E. Denny <jdenny@clemson.edu>
655
656 tests: use perl for printing special sequences to files.
657 And skip tests if perl is not available. This is better than
658 playing tricks with shell portability. Suggested by Akim
659 Demaille.
660 * tests/input.at (Bad character literals): Use it here for
661 omitting final newlines.
662 (Bad escapes in literals): Use it here for special characters.
663
d1cc31c5
JD
6642009-08-26 Joel E. Denny <jdenny@clemson.edu>
665
666 tests: show a use of %define lr.default-reductions "consistent"
667 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
668 prevents the omission of expected tokens for %error-verbose.
669
3bed3a75
AD
6702009-08-26 Akim Demaille <demaille@gostai.com>
671
672 tests: portability fix.
673 * tests/input.at (Bad escapes in literals): Don't expect "echo
674 '\0'" to output \ then 0.
675
aa0cb40d
JD
6762009-08-26 Joel E. Denny <jdenny@clemson.edu>
677
678 Actually handle the yytable zero value correctly this time.
679 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
680 zero values in the YYTABLE comments.
681 * data/glr.c (yytable_value_is_error): Don't check for zero
682 value.
683 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
684 * data/yacc.c (yytable_value_is_error): Likewise.
685 * data/lalr1.java (yy_table_value_is_error_): Likewise.
686 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
687 * src/tables.h: In header comments, explain why it's useless to
688 check for a zero value in yytable.
689
f2b30bdf
JD
6902009-08-25 Joel E. Denny <jdenny@clemson.edu>
691
692 More fixes related to last two patches.
693 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
694 comments: zero indicates syntax error not default action.
695 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
696 defined.
697 * data/glr.c (yyis_pact_ninf): Rename to...
698 (yypact_value_is_default): ... this.
699 (yyisDefaultedState): Update for rename.
700 (yyis_table_ninf): Rename to...
701 (yytable_value_is_error): ... this, and check for value zero
702 besides just YYTABLE_NINF.
703 (yygetLRActions): Check for default value from yypact. It
704 appears that this check is always performed before this function
705 is invoked, and so adding the check here is probably redundant.
706 However, the code may evolve after this subtlety is forgotten.
707 Also, update for rename to yytable_value_is_error. Because that
708 macro now checks for zero, a different but equivalent branch of
709 the if-then-else here is evaluated.
710 (yyreportSyntaxError): Update for rename to
711 yytable_value_is_error. The zero condition was mishandled
712 before.
713 (yyrecoverSyntaxError): Update for renames. No behavioral
714 changes.
715 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
716 New function.
717 (yy_table_value_is_error_): New function.
718 (parse): Use new functions where possible. No behavioral
719 changes.
720 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
721 The zero condition was mishandled before.
722 * data/yacc.c (yyis_pact_ninf): Rename to...
723 (yypact_value_is_default): ... this.
724 (yyis_table_ninf): Rename to...
725 (yytable_value_is_error): ... this, and check for value zero
726 besides just YYTABLE_NINF.
727 (yysyntax_error): Update for rename to yytable_value_is_error.
728 The zero condition was mishandled before.
729 (yyparse): Update for renames. No behavioral changes.
730 * src/tables.h: Improve comments about yypact, yytable, etc.
731 more. Most importantly, say yytable value of zero means syntax
732 error not default action.
733
53f036ce
JD
7342009-08-25 Joel E. Denny <jdenny@clemson.edu>
735
736 Fix %error-verbose for conflicts resolved by %nonassoc.
737 * NEWS (2.5): Document.
738 * data/glr.c (yyreportSyntaxError): Fix this by checking
739 yyis_table_ninf.
740 * data/yacc.c (yysyntax_error): Likewise.
741 * data/lalr1.cc (yysyntax_error_): Fix this by checking
742 yytable_ninf_.
743 * data/lalr1.java (yysyntax_error): Likewise.
744 * tests/conflicts.at (%nonassoc and eof): Update expected output
745 and remove FIXME.
746
87412882
JD
7472009-08-25 Joel E. Denny <jdenny@clemson.edu>
748
749 Some code and documentation improvements.
750 * data/c.m4 (b4_table_value_equals): New macro to capture
751 some repeated code.
752 * data/glr.c (yyis_pact_ninf): Use it here.
753 (yyis_table_ninf): Likewise.
754 (yyreportSyntaxError): Improve internal comments.
755 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
756 Use it everywhere possible.
757 (yyis_table_ninf): Likewise.
758 (yysyntax_error): Improve internal comments.
759 * data/lalr1.cc (yysyntax_error_): Likewise.
760 * data/lalr1.java (yysyntax_error): Likewise.
761 * src/tables.h: Improve comments about yypact, yytable, etc.
762
e6c849d8
JD
7632009-08-21 Joel E. Denny <jdenny@clemson.edu>
764
765 Use locale when quoting.
766 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
767 quote rather than implementing quoting here.
768
d8911864
EB
7692009-08-20 Eric Blake <ebb9@byu.net>
770
b0778bdd
EB
771 Make previous patch more robust.
772 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
773 argmatch.h.
774 (output_skeleton): Use it.
775 Suggested by Akim Demaille.
776
d8911864
EB
777 Import latest m4/m4.m4.
778 * submodules/autoconf: Update to autoconf 2.64.
779 * configure.ac (M4_GNU_OPTION): New define.
780 * src/output.c (output_skeleton): Use it to resolve FIXME.
781 * NEWS: Mention this.
782
c2724603
JD
7832009-08-19 Joel E. Denny <jdenny@clemson.edu>
784
785 Fix complaints about escape sequences.
786 Discussed starting at
787 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
788 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
789 For a \0 and similar escape sequences meaning the null
790 character, report an invalid escape sequence instead of an
791 invalid null character because the latter does not actually
792 appear in the user's input.
793 In all escape sequence complaints, don't escape the initial
794 backslash, and don't quote when the sequence appears at the end
795 of the complaint line unless there's whitespace that quotearg
796 won't escape.
797 Consistently say "invalid" not "unrecognized".
798 Consistently prefer "empty character literal" over "extra
799 characters in character literal" warning for invalid escape
800 sequences; that is, consistently discard those sequences.
801 * tests/input.at (Bad escapes in literals): New.
802
17aed602
AD
8032009-08-19 Akim Demaille <demaille@gostai.com>
804
805 doc: fixes.
806 * doc/bison.texinfo: Fix minor Texinfo errors.
807
9142239a
AD
8082009-08-19 Akim Demaille <demaille@gostai.com>
809
810 tests: distcc compliance.
811 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
812 error messages from the output.
813
171ad99d
AD
8142009-08-19 Akim Demaille <demaille@gostai.com>
815
816 variables: simplify the upgrade of namespace into api.namespace.
817
818 This patch simplifies "variables: rename namespace as
819 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
820 Suggested by Joel E. Denny in
821 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
822
823 * src/muscle-tab.c (muscle_percent_variable_update): New.
824 (muscle_percent_define_insert): Use it in replacement of the
825 previous tr invocation.
826 Remove variable_tr, no longer needed.
827 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
828 Remove.
829 * data/c++.m4: No longer handle namespace -> api.namespace.
830 * tests/input.at (%define backward compatibility): Check that
831 namespace is treated as api.namespace.
832
d59e456d
AD
8332009-08-19 Akim Demaille <demaille@gostai.com>
834
835 doc: %initial-action to initialize yylloc.
836 Reported by Bill Allombert.
837 * doc/bison.texinfo: Set fill-column to 76.
838 (Location Type): Document the use of %initial-action to initialize
839 yylloc.
840
ceb8b8e6
AD
8412009-08-19 Akim Demaille <demaille@gostai.com>
842
843 lalr1.cc: use state_type.
844 * data/lalr1.cc (yysyntax_error_): Use state_type.
845 Move argument names into yy*.
846
7580c379
AD
8472009-08-19 Akim Demaille <demaille@gostai.com>
848
849 lalr1.cc: get rid of yyparse's yystate.
850 yystate and yystack_[0].state are equal, keep only the latter.
851 The former was also used as a temporary variable to compute the
852 post-reduction state. Move this computation into an auxiliary
853 function.
854
855 * data/glr.c (yyLRgotoState): Fuse variable definition and first
856 assignment.
857 * data/lalr1.cc (yy_lr_goto_state_): New.
858 (yyparse): Use it.
859 Replace remaining uses of yystate by yystate_[0].state.
860 Remove the former.
861
c4dc4c46
AD
8622009-08-19 Akim Demaille <demaille@gostai.com>
863
864 lalr1.cc: destroy $$ when YYERROR is called.
865 * data/lalr1.cc (yyreduce): Compute the resulting state before
866 running the user action so that yylhs is a valid symbol.
867 (yyerrorlab): Since yylhs is complete (it knows its type), we can
868 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
869 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
870
c67e466f
JD
8712009-08-18 Joel E. Denny <jdenny@clemson.edu>
872
873 maint: update for gnulib's recent update-copyright changes
874 * gnulib: Update.
875 * .x-update-copyright (COPYING): Add as it's no longer implied
876 when .x-update-copyright is present.
877 * cfg.mk (update-copyright-local): Remove, now ignored.
878 (update-copyright): Declare update-b4-copyright as a dependency.
879
af6d2358
AD
8802009-08-17 Akim Demaille <demaille@gostai.com>
881
882 build: require gettext 0.17.
883
884 Suggested by Bruno Haible.
885 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
886 * configure.ac: require gettext 0.17 to ensure compatibility with
887 gnulib.
888
91a2b9b1
AD
8892009-08-17 Akim Demaille <demaille@gostai.com>
890
891 build: lower gettext requirements.
892
893 Bison was uselessly requiring the formatstring macros from
894 gettext, which resulted in mo files not being installed on systems
895 that perfectly supported Bison mo files. Lower the requirement.
896 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
897
b0778bdd
EB
898 * configure.ac: Require need-ngettext instead of
899 need-formatstring-macros.
900 Reported by Martin Jabocs.
901 Suggested by Bruno Haible.
902 * INSTALL: Restructure.
903 (Internationalization): New.
91a2b9b1 904
585935e8
JD
9052009-08-14 Joel E. Denny <jdenny@clemson.edu>
906
907 maint: fix use of copyright year intervals.
908 * gnulib: Update.
909 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
910 as now recommended in gnulib/NEWS.
911 * build-aux/update-b4-copyright: Fix.
912 * cfg.mk (update-copyright-env): Configure update-copyright.
913
83b60c97
JD
9142009-08-13 Joel E. Denny <jdenny@clemson.edu>
915
916 Make it easier to write deterministic tests.
917 Continues Akim's work from his 2009-06-10 commits.
918 * src/reader.c (check_and_convert_grammar): Don't add any
919 symbols after the first symbols_do invocation.
920 * src/symtab.c (symbols_sorted): New static global.
921 (user_token_number_redeclaration): Update comments.
922 (symbol_from_uniqstr): If a new symbol is being created, assert
923 that symbols_sorted hasn't been allocated yet.
924 (symbols_free): Free symbols_sorted.
925 (symbols_cmp, symbols_cmp_qsort): New functions.
926 (symbols_do): Sort symbol_table into symbols_sorted on first
927 invocation.
928 * tests/input.at (Numbered tokens): Recombine tests now that the
929 output should be deterministic across multiple numbers.
930
28169bab
AD
9312009-08-12 Akim Demaille <demaille@gostai.com>
932
933 tests: GCC 4.5 compliance.
934 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
935 messages about #error.
936
9f14e187
AD
9372009-08-12 Akim Demaille <demaille@gostai.com>
938
939 build: fix the generation of the documentation.
940 Some of our targets use "bison --help", but they can't depend on
941 "bison" itself (to avoid additional requirements on the user), so
942 they used to call "make src/bison" in the commands. Then
943 concurrent builds may fail: one make might be aiming one of its
944 jobs at compiling src/bison, and another job at generating the man
945 page. If the latter is faster than the former, then we have two
946 makes that concurrently try to compile src/bison.
947
948 This might also be a more convincing explanation for the failure
949 described in the patch "build: fix paths".
950
951 * Makefile.am (SUFFIXES): Initialize.
952 * build-aux/move-if-change: New, symlink to gnulib's.
953 * build-aux/local.mk: Ship it.
954 * doc/common.x: Remove, merged into...
955 * doc/bison.x: here.
956 * doc/local.mk (doc/bison.help): New.
957 ($(CROSS_OPTIONS_TEXI)): Depend on it.
958 Use src/bison.
959 (.x.1): Replace with...
960 (doc/bison.1): this explicit, simpler, target.
961 (common_dep): Remove, inlined where appropriate.
962 (SUFFIXES, PREPATH): Remove, unused.
963
d1b55e81
AD
9642009-08-12 Akim Demaille <demaille@gostai.com>
965
966 gnulib: improve prefixing.
967 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
968 change the value of...
969 (gl_LIBOBJS): this.
970 Adjust more variables.
971 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
972 gl_LIBOBJS.
973 (prefix): Also transform rules whose targets have slashes.
974 Use $prefix liberally.
975 Map @MKDIR_P@ to $(MKDIR_P).
976 Prefix directories that are mkdir'd.
977
838205d5
AD
9782009-08-12 Akim Demaille <demaille@gostai.com>
979
980 build: fix paths.
981 When using $(top_builddir) inconsistently, Make (including GNU
982 Make) is sometimes confused. As a result it may want to build
983 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
984 file, different names) concurrently, which, amusingly enough,
985 might end with:
986
987 ranlib lib/libbison.a
988 ranlib lib/libbison.a
989 make[2]: *** [lib/libbison.a] Segmentation fault
990
991 on OS X.
992
993 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
994 needed.
995
67af7198
AD
9962009-08-12 Akim Demaille <demaille@gostai.com>
997
998 distcheck: fix.
999
b0778bdd 1000 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
67af7198 1001
c467dc42
JD
10022009-08-10 Joel E. Denny <jdenny@clemson.edu>
1003
1004 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
1005
dfaa4860
JD
10062009-08-10 Joel E. Denny <jdenny@clemson.edu>
1007
1008 Miscellaneous code readability improvements.
1009
1010 * src/reader.c (reader): Move %define front-end variable
1011 defaults and checking into...
1012 (prepare_percent_define_front_end_variables): ... this new
1013 function.
1014
1015 * src/scan-gram.l (INITIAL): For consistency with string
1016 literals, don't store open quote on character literal. It's
1017 discarded before returning anyway.
1018 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
1019 Make length test more readable, and make the character stored
1020 for an empty literal more obvious while consistent with the
1021 previous behavior.
1022
1023 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
1024 USER_NUMBER_HAS_STRING_ALIAS throughout.
1025 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
1026 that is repeated in symtab.h. Improve argument names to make it
1027 clear which side of the symbol-string alias pair is which.
1028 (symbol_check_alias_consistency): Improve local variable names
1029 for the same purpose.
1030 * src/symtab.h (struct symbol): Make comments about aliases
1031 clearer.
1032 (symbol_make_alias): Improve comments and argument name.
1033 * src/output.c (token_definitions_output): Update for rename to
1034 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
1035
ce268795
AR
10362009-08-08 Alex Rozenman <rozenman@gmail.com>
1037
1038 Convert "misleading reference" messages to warnings.
1039 * src/scan-code.l: New function 'show_sub_messages', more
1040 factoring.
1041 * tests/named-ref.at: Adjust tests.
1042
401b73af
JD
10432009-08-06 Joel E. Denny <jdenny@clemson.edu>
1044
1045 maint: run "make update-copyright"
1046
a1a9422d
JD
10472009-08-06 Joel E. Denny <jdenny@clemson.edu>
1048
1049 maint: make update-b4-copyright easier to use
1050 * build-aux/update-b4-copyright: In warnings, report line
1051 numbers rather than character positions.
1052 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
1053 that update-copyright runs it.
1054 * gnulib: Update.
1055
0b61a8ec
JD
10562009-08-05 Joel E. Denny <jdenny@clemson.edu>
1057
1058 maint: clean up update-b4-copyright code
1059 * build-aux/update-b4-copyright: Do not accept 2-digit
1060 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
1061 Don't accept a `[' in a b4_copyright argument.
1062 Format code more consistently.
1063 Don't assume b4*copyright never occurs.
1064
269e222e
JD
10652009-08-04 Joel E. Denny <jdenny@clemson.edu>
1066
1067 maint: automate b4_copyright updates.
1068 * Makefile.am (update-b4-copyright): New target rule.
1069 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
1070 * build-aux/update-b4-copyright: New.
1071 * data/yacc.c: Remove stray characters around b4_copyright
1072 invocations.
1073
35905f2b
JD
10742009-08-04 Joel E. Denny <jdenny@clemson.edu>
1075
1076 maint: automate annual package-wide copyright-year update.
1077 * .x-update-copyright: New.
1078 * Makefile.am (EXTRA_DIST): Remove maint.mk.
1079 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
1080 update-copyright. Remove gnumakefile, which is implied by
1081 maintainer-makefile.
1082 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
1083 * gnulib: Update.
1084 * maint.mk: Remove, now copied from gnulib.
1085 * examples/extexi: Add missing "(C)" in copyright statement so
1086 update-copyright can recognize it.
1087 * src/LR0.h: Likewise.
1088 * src/print.h: Likewise.
1089 * src/print_graph.h: Likewise.
1090 * src/gram.c: Add missing comma in copyright statement.
1091 * src/gram.h: Likewise.
1092
b30e18dc
JD
10932009-08-04 Joel E. Denny <jdenny@clemson.edu>
1094
1095 Fix "make distcheck".
1096 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
1097 of just calc.stamp.
1098
8d90395d
JD
10992009-08-01 Joel E. Denny <jdenny@clemson.edu>
1100
1101 Pacify "gcc -Wunused" for the input function from Flex.
1102 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
1103 and later.
1104 * src/scan-code.l: Add "%option noinput", which I cannot find in
1105 the Flex manual, but which Flex has supported since at least as
1106 far back as 2.5.4. However, if any of our developers still use
1107 Flex 2.5.4, they'll need to stop configuring with
1108 --enable-gcc-warnings because "%option noinput" didn't work
1109 correctly until Flex 2.5.6.
1110 * src/scan-gram.l: Likewise.
1111 * src/scan-skel.l: Likewise.
1112
ba4184ec
AR
11132009-07-31 Alex Rozenman <rozenman@gmail.com>
1114
1115 Fix --enable-gcc-warnings problems.
1116 * src/reader.c: Adjust variable names.
1117 * src/scan-code.l: Fix prototypes and adjust names.
1118 * src/named-ref.c: Remove redundant "if".
1119
91a2af97
JD
11202009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
1121
1122 Fix a --enable-gcc-warnings problem.
1123 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
1124 variable.
1125
3208e3f4
JD
11262009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1127
1128 Warn about character literals not of length one.
1129 * NEWS (2.5): Document.
1130 * src/scan-gram.l (INITIAL): Remove comment that we don't check
1131 the length.
1132 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
1133 * tests/input.at (Bad character literals): New test group.
1134
5add20ab 11352009-07-24 Alex Rozenman <rozenman@gmail.com>
13cdf208
AR
1136
1137 Fix some memory leaks.
1138 * src/named-ref.c: Add a pointer check (named_ref_free).
1139 * src/scan-code.l: New function (variant_table_free). Called in
1140 code_scanner_free.
1141 * src/symlist.c: Call to named_ref_free (symbol_list_free).
1142
e459fb0e
JD
11432009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
1144
1145 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
1146
c4be5517
JD
11472009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
1148
1149 Some M4 cleanup in the testsuite.
1150 Suggested by Eric Blake at
1151 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
1152 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
1153 complicate the code by distinguishing between a missing value
1154 and an empty string value for an optional argument. This fix is
1155 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
1156 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
1157 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
1158 arguments are not needed because of the following changes.
1159 Fix stale comments.
1160 Bison developers should use GNU M4 and should not use
1161 POSIXLY_CORRECT when building the test suite, so do not
1162 complicate the code by avoiding $10 and above.
1163 Do not quote an empty string value for an optional argument, and
1164 do not distinguish between a missing value and an empty string
1165 value.
1166
feeb56cd
JD
11672009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
1168
1169 Revert unnecessary column realignment in --help output.
1170 Reported by Akim Demaille at
1171 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
1172 * src/getargs.c (usage): Here.
1173
5add20ab 11742009-07-04 Alex Rozenman <rozenman@gmail.com>
629e4def
AR
1175
1176 Alphabetical order in src/local.mk.
1177 * src/local.mk: Adjust.
1178
5add20ab 11792009-07-04 Alex Rozenman <rozenman@gmail.com>
872b52bc
AR
1180
1181 Style changes and factoring.
1182 * src/named-ref.h: Add comments.
1183 * src/parse-gram.y: Readability and style changes.
1184 * src/reader.c: Factoring: assign_named_ref function.
1185 * src/scan-code.l: Factoring and style changes. Rename
1186 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
1187 Use "unsigned" type for variant index. Improve readablity.
1188 * src/scan-gram.l: Change error messages and add comments.
1189 * src/symlist.h: symbol_list_null: New function decl.
1190 * src/symlist.c: symbol_list_null: Implement here.
1191 * tests/named-refs.at: Adjust for new error messages.
1192
83ea2423
EB
11932009-06-29 Eric Blake <ebb9@byu.net>
1194
1195 scan-code: avoid compiler warnings
1196 * src/scan-code.l (parse_named_ref): Use correct specifiers.
1197
5ece73ea
AD
11982009-06-29 Akim Demaille <demaille@gostai.com>
1199
1200 build: avoid concurrent extraction of calc++.
1201 * examples/calc++/Makefile.am (calc.stamp): New.
1202 Depend on it to create the sources of calc++ so that concurrent
1203 builds don't launch several "extexi" in parallel.
1204 Not only this is inefficient, this also builds incorrect sources
1205 with several extractions mixed together.
1206
ad597a78
AD
12072009-06-29 Akim Demaille <demaille@gostai.com>
1208
1209 parse.error: fix.
1210 * data/bison.m4: Move code related to specific variables after the
1211 definition of the variable-maintaining macros so that we don't
1212 "invoke" b4_percent_define_check_values before it is defined.
1213
31b850d2
AD
12142009-06-29 Akim Demaille <demaille@gostai.com>
1215
1216 variables: parse.error
1217
1218 Implement, document, and test the replacement of %error-verbose
1219 by %define parse.error "verbose".
1220 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
1221 values of the parse.error variable.
1222 Make "simple" its default value.
1223 Check the valid values.
1224 * src/parse-gram.y: Use %define parse.error.
1225 (PERCENT_ERROR_VERBOSE): New token.
1226 Support it.
1227 * src/scan-gram.l: Support %error-verbose.
1228
1229 * doc/bison.texinfo (Decl Summary): Replace the documentation of
1230 %define error-verbose by that of %define parse.error.
1231 * NEWS: Document it.
1232
1233 * tests/actions.at, tests/calc.at: Use parse.error instead of
1234 %error-verbose.
1235
b9f1d9a4
AR
12362009-06-27 Alex Rozenman <rozenman@gmail.com>
1237
1238 Implement support for named symbol references.
1239 * src/parse-gram.y: Add new syntax (named_ref.opt).
1240 * src/reader.c: Store named refs in symbol lists.
1241 * src/reader.h: New argument for symbol_append and
1242 action_append functions.
1243 * src/scan-code.h: Add new field (named_ref) into
1244 code_props data structure. Keeps named ref of midrule
1245 actions.
1246 * src/scan-code.l: Support for named refs in semantic
1247 action code. New function 'parse_named_ref'.
1248 * src/scan-gram.l: Support bracketed id.
1249 * src/symlist.c: Store named refs in symbol lists.
1250 * src/symlist.h: New field in symbol list: named_ref.
1251 * src/named-ref.h: New file, a struct for named_ref.
1252 * src/named-ref.cp: New file, named_ref_new function.
1253 * src/local.mk: Add two new files.
1254 * tests/testsuite.at: Include new test group:
1255 * tests/named-refs.at: this new file.
1256
b5c212b6
AD
12572009-06-25 Akim Demaille <demaille@gostai.com>
1258
1259 hash: check insertion for memory exhaustion.
1260 * src/uniqstr.c (uniqstr_new): New.
1261
67501061
AD
12622009-06-24 Akim Demaille <demaille@gostai.com>
1263
1264 variables: rename namespace as api.namespace.
1265 Discussed in
1266 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
1267
1268 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
1269 New.
1270 (b4_percent_define_use): New.
1271 Use it where applicable.
1272 * data/c++.m4: Replace uses of the variable "namespace" by
1273 "api.namespace".
1274 Default the latter to the former.
1275 * doc/bison.texinfo (Decl Summary): Document "namespace" as
1276 obsolete.
1277 Document api.namespace.
1278 Use @samp to document %define uses, keep @code for identifiers.
1279 * NEWS: Likewise.
1280 * tests/c++.at, tests/input.at: Test api.namespace instead of
1281 namespace. (The tests passed with namespace.)
1282
41976786
AD
12832009-06-11 Akim Demaille <demaille@gostai.com>
1284
1285 style changes.
1286 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
1287 * src/print-xml.c: Style changes.
1288 * tests/conflicts.at: Comment changes.
1289
44bb9084
AD
12902009-06-11 Akim Demaille <demaille@gostai.com>
1291
1292 xml: beware of user strings used to give a %prec to rules.
1293 * tests/conflicts.at (%prec with user strings): New.
1294 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
1295 XML output.
1296
04d1e39d
AD
12972009-06-11 Akim Demaille <demaille@gostai.com>
1298
1299 hash: check insertion for memory exhaustion.
1300 * src/muscle-tab.c (muscle_insert, muscle_grow)
1301 * src/state.c (state_hash_insert): Check the return value of
1302 hash_insert.
1303
a8873669
AD
13042009-06-11 Akim Demaille <demaille@gostai.com>
1305
1306 tests: honor TESTSUITEFLAGS in every check target.
1307 * tests/local.mk (RUN_TESTSUITE): New.
1308 (check-local, installcheck-local, maintainer-check-g++)
1309 (maintainer-check-posix, maintainer-check-valgrind): Use it.
1310
8893145a
AD
13112009-06-10 Akim Demaille <demaille@gostai.com>
1312
1313 deterministic test suite.
1314 Some consistency checks on symbols are performed after all the
1315 symbols were read, by an iteration over the symbol table. This
1316 traversal is nondeterministic, which can be a problem for test
1317 cases.
1318 Avoid this.
1319 Addresses another form of nondeterminism reported by Joel E. Denny.
1320 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1321
1322 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
1323 test in two.
1324 Use different file names for the three tests to make the
1325 maintenance easier.
1326
92d7a23a
AD
13272009-06-10 Akim Demaille <demaille@gostai.com>
1328
1329 gnulib: update.
b0778bdd
EB
1330 * gnulib: Update to latest.
1331 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
1332 * m4/.gitignore: Regen.
1333 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
1334 Call xalloc_die on hash_insert failures.
1335 Requested by the new __warn_unused_result__ attribute of
1336 hash_insert.
92d7a23a 1337
12cf133f
AD
13382009-06-10 Akim Demaille <demaille@gostai.com>
1339
1340 deterministic user-token-number redeclaration errors.
1341 Address nondeterminism reported by Joel E. Denny.
1342 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
1343
1344 * src/uniqstr.h: Comment changes.
1345 * src/location.h (boundary_cmp, location_cmp): New.
1346 * src/symtab.c (user_token_number_redeclaration): New.
1347 (symbol_translation): Use it.
1348 * tests/input.at (Numbered tokens): Adjust the expected output.
1349
796a2b0a
AD
13502009-05-25 Akim Demaille <demaille@gostai.com>
1351
1352 build: avoid ignored errors.
1353 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
1354 errors, they pollute the output.
1355
0b6d43c5
JD
13562009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1357
1358 Convert multiple variable definition warnings to complaints.
1359 * NEWS (2.5): Add a new entry for that change.
1360 * doc/bison.texinfo (Decl Summary): Update %define entry.
1361 (Bison Options): Update -D/--define/-F/--force-define entry.
1362 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
1363 * src/muscle-tab.h (muscle_percent_define_insert): Update
1364 comments.
1365 * tests/input.at (`%define errors'): Update.
1366 (`%define, --define, --force-define'): Update.
1367
de5ab940
JD
13682009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1369
1370 -F/--force-define and relative %define/-D/--define priorities.
1371 * NEWS (2.5): Add documentation to -D/--define entry.
1372 * build-aux/cross-options.pl: Hard-code association of
1373 --force-define with %define.
1374 * doc/bison.texinfo (Decl Summary): In %define entry,
1375 cross-reference command-line options.
1376 (Bison Options): Add documentation to -D/--define entry.
1377 (Option Cross Key): Widen column for --force-define row.
1378 * src/getargs.c (usage): Document -F/--force-define. Realign
1379 options in output.
1380 (short_options, long_options, getargs): Parse -F/--force-define,
1381 and update muscle_percent_define_insert invocations.
1382 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
1383 (muscle_percent_define_insert): Add argument with that type.
1384 * src/muscle-tab.c (muscle_percent_define_insert): Implement
1385 -F/--force-define behavior and priorities.
1386 (muscle_percent_define_ensure): Update
1387 muscle_percent_define_insert invocation.
1388 * src/parse-gram.y (prologue_declaration): Update
1389 muscle_percent_define_insert invocations.
1390 * tests/input.at (`%define, --define'): Rename to...
1391 (`%define, --define, --force-define'): ... this and extend.
1392
f8e7258f
JD
13932009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
1394
1395 Update some comments to make sense for -D.
1396 * data/bison.m4 (b4_check_user_names): In header comments, say
1397 "user occurrence" instead of "grammar occurrence".
1398 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
1399 (muscle_percent_code_grow): Likewise just for consistency.
1400
b987342b
JD
14012009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
1402
1403 * data/c++.m4 (b4_namespace_close): Simplify slightly.
1404
4977e0a7
JD
14052009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
1406
1407 Handle a trailing `:' in a user-supplied C++ namespace better.
1408 * data/c++.m4 (b4_namespace_close): Don't let it be printed
1409 among the closing braces here. This fix might make the
1410 generated code easier to debug, but otherwise it should be
1411 insignificant because a trailing `:' is a C++ error already.
1412
9b04dad7
AD
14132009-05-19 Akim Demaille <demaille@gostai.com>
1414
1415 remove useless variable.
1416 * src/getargs.c (skeleton_arg): Remove now useless variable.
1417 Should help the compiler see that this printf-like call is sane.
1418
4c6622c2
AD
14192009-05-15 Akim Demaille <demaille@gostai.com>
1420
1421 Rename token.prefix as api.tokens.prefix.
1422 Discussed here.
1423 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
1424
1425 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
1426 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
1427 (token.prefix): Rename as...
1428 (api.tokens.prefix): this.
1429
3c248d70
AD
14302009-05-11 Akim Demaille <demaille@gostai.com>
1431
1432 doc: use C++ headers.
1433 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
1434 headers.
1435
99c08fb6
AD
14362009-05-11 Akim Demaille <demaille@gostai.com>
1437
1438 doc: token.prefix
1439 * doc/bison.simple (Decl Summary): Document token.prefix.
1440 (Calc++ Parser): Various fixes.
1441 Formatting changes.
1442 Use token.prefix.
1443 Introduce a macro TOKEN to shorten the code and make it more
1444 readable.
1445 (Calc++ Scanner): Adjust.
1446 * NEWS (Variable token.prefix): New.
1447
84a1cb5a
AD
14482009-05-04 Akim Demaille <demaille@gostai.com>
1449
1450 bison: catch bad symbol names.
1451 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
1452 * tests/input.at: Adjust.
1453
cdf3f113
AD
14542009-05-04 Akim Demaille <demaille@gostai.com>
1455
1456 identifiers: dashes are letters.
1457 Dashes can now start identifiers (symbols and directives).
84a1cb5a 1458
cdf3f113
AD
1459 * src/scan-gram.l ({letter}): Add dash.
1460 ({id}): Remove it.
1461 * tests/input.at (Symbols): Adjust.
1462 Remove stray comment.
1463 * tests/regression.at (Invalid inputs): Adjust error message.
1464 * doc/bison.texinfo (Symbols): Update.
1465
98a345a2
JD
14662009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
1467
1468 Declare %code to be a permanent feature.
1469 * NEWS (2.4.2): Here.
1470 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
1471 experimental.
1472 (Decl Summary): Likewise.
1473
67212941
JD
14742009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1475
1476 Convert underscores to dashes in some %define variable names.
1477 For now, just api.push-pull and lr.keep-unreachable-states.
1478 Maintain old names for backward compatibility.
1479 * NEWS (2.5): Document.
1480 * data/c.m4 (b4_identification): Update comment.
1481 * data/yacc.c: Update access.
1482 * doc/bison.texinfo: Update.
1483 * etc/bench.pl.in (bench_push_parser): Update use.
1484 * src/files.c (tr): Move to...
1485 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1486 think of a better place to expose it. My logic is that, for all
1487 uses of tr so far, command-line arguments can be involved, and
1488 getargs.h is already included.
1489 * src/main.c (main): Update access.
1490 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1491 variable names to new variable names before assigning value.
1492 * src/reader.c (reader): Update setting default.
1493 * tests/calc.at: Update uses.
1494 * tests/conflicts.at (Unreachable States After Conflict
1495 Resolution): Update use.
1496 * tests/input.at (%define enum variables): Update use.
1497 (%define backward compatibility): New test group.
1498 * tests/push.at: Update uses.
1499 * tests/reduce.at: Update uses.
1500 * tests/torture.at: Update uses.
1501
ba5c6d94
JD
15022009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1503
1504 Set all front-end %define defaults in one place.
1505 * src/main.c (main): Move lr.keep_unreachable_states default...
1506 * src/reader.c (reader): ... to here.
1507
5bab9d08
JD
15082009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1509
1510 Rename lr.default_reductions to lr.default-reductions.
1511 * NEWS (2.5): Here.
1512 * doc/bison.texinfo: Here.
1513 * src/lalr.c (initialize_LA): Here.
1514 * src/print.c (print_reductions): Here.
1515 * src/reader.c (reader): Here.
1516 * src/tables.c (action_row): Here.
1517 * tests/input.at (%define enum variables): Here.
1518 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1519
d521ee19
JD
15202009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1521
1522 Pacify ./configure --enable-gcc-warnings.
1523 * tests/input.at (Symbols): Prototype yyerror and yylex.
1524
15252009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
c9aded4b
JD
1526
1527 Document how `%define "var" "value"' is not M4-friendly.
1528 * src/parse-gram.y (variable): In comments here.
1529
8f0d265e
JD
15302009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1531
1532 Clean up recent patches a little.
1533 Reported by Akim Demaille.
1534 * doc/bison.texinfo (Understanding): Fix typos.
1535 * src/print.c (print_reductions): Don't use negated variable.
1536
f4909773
JD
15372009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1538
1539 List accepted values for a %define enum variable with an invalid value.
1540 Suggested by Akim Demaille at
1541 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1542 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1543 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
1544 * tests/input.at (%define lr.default_reductions invalid values): Merge
1545 into...
1546 (%define enum variables): ... here, and update output.
1547
110ef36a
JD
15482009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1549
1550 Rename "default rule" to "default reduction".
1551 This includes changing variable names in code, changing
1552 comments, and renaming %define lr.default_rules to %define
1553 lr.default_reductions.
1554 * NEWS (2.5): Update IELR documentation.
1555 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
1556 documentation.
1557 * data/glr.c, data/lalr1.java: Sync copyright dates.
1558 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1559 and lr.type documentation. Make some other wording
1560 improvements.
1561 (Glossary): Adjust cross-references and Default Reduction
1562 definition.
1563 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1564 Remove a confusing comment pointed out by Akim Demaille.
1565 (initialize_LA): Adjust code.
1566 * src/print-xml.c (print_reductions): Adjust code.
1567 * src/print.c (print_reductions): Adjust code.
1568 * src/reader.c (reader): Adjust code.
1569 * src/tables.c (action_row): Adjust code.
1570 (token_actions): Adjust code.
1571 * src/tables.h: Adjust YYDEFACT documentation.
1572 * tests/input.at (%define lr.default_rules invalid values):
1573 Rename test group to...
1574 (%define lr.default_reductions invalid values): ... this, and
1575 update grammar file and expected output.
1576 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1577 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1578
746ee38c
AD
15792009-04-21 Akim Demaille <demaille@gostai.com>
1580
1581 tests: check the use of dashes and periods in symbols.
1582 * tests/input.at (Symbol): New test group.
1583
eb45ef3b
JD
15842009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1585
1586 Document %define lr.type and lr.default_rules.
1587 * NEWS (2.5): Add an entry.
1588 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1589 besides just LALR(1) and GLR(1).
1590 * doc/bison.texinfo (Introduction): Likewise.
1591 (Language and Grammar): Bison is no longer limited to LALR(1)
1592 restrictions.
1593 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1594 when trying to distinguish from GLR. Talk about LR(1) grammars
1595 rather than LALR(1) grammars.
1596 (Decl Summary): In %define api.push_pull entry, say it applies
1597 to deterministic parsers in C rather than LALR(1) parsers in C.
1598 Add lr.default_rules entry.
1599 Add lr.type entry.
1600 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1601 restrictions.
1602 (Generalized LR Parsing): Same changes as for the previous GLR
1603 section.
1604 (Memory Management): Say deterministic rather than LALR(1).
1605 (Understanding): Correct some bison output.
1606 Index discussion of "accepting state".
1607 Say deterministic rather than LALR(1).
1608 (Bison Options): In --yacc entry, say deterministic rather than
1609 LALR(1).
1610 In --report, --graph, and --xml entries, just don't mention
1611 LALR(1).
1612 (C++ Parsers): Say deterministic rather than LALR(1).
1613 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1614 (Glossary): Add Accepting State, Consistent State, Default Rule,
1615 and IELR(1) definitions.
1616 In Generalized LR (GLR) definition, make same changes as in
1617 previous GLR sections.
1618 In LALR(1) definition, say Bison uses LALR(1) by default rather
1619 than implying Bison is limited to LALR(1).
1620 (LocalWords): Add IELR.
1621
db34f798
JD
16222009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1623
1624 Finish implementing %define lr.type.
1625 Its value can be "LALR", "IELR", or "canonical LR".
1626 * lib/timevar.def (TV_IELR_PHASE1): New var.
1627 (TV_IELR_PHASE2): New var.
1628 (TV_IELR_PHASE3): New var.
1629 (TV_IELR_PHASE4): New var.
1630 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1631 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1632 Sbitset.h, ielr.h, and ielr.c.
1633 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1634 trace_types): Add trace_ielr.
1635 * src/lalr.h, src/lalr.c (ngotos): Export it.
1636 (F): Rename to...
1637 (goto_follows): ... this, update all uses, and export it.
1638 (set_goto_map): Export it.
1639 (map_goto): Export it.
1640 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1641 handled in ielr.
1642 (initialize_LA): Export it. Move lookback allocation to...
1643 (lalr): ... here because, for canonical LR, initialize_LA must
1644 be invoked but lookback and much of the rest of LALR isn't
1645 needed.
1646 * main.c (main): Instead of lalr, invoke ielr, which invokes
1647 lalr.
1648 * src/reader.c (reader): Default lr.type to "LALR".
1649 Default lr.default_rules to "accepting" if lr.type is "canonical
1650 LR". Leave the default as "all" otherwise.
1651 Check for a valid lr.type value.
1652 * src/state.h, src/state.c (struct state_list): Add state_list
1653 member.
1654 (state_new): Initialize state_list member to NULL.
1655 (state_new_isocore): New function, exported.
1656 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1657 exercises all values of lr.type.
1658 (GNU AWK Grammar): Rename test group to...
1659 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1660 AT_TEST_EXISTING_GRAMMAR.
1661 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1662 (GNU pic Grammar): Rename test group to...
1663 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1664 AT_TEST_EXISTING_GRAMMAR.
1665 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1666 all values of lr.type.
1667 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1668 (Lane Split): Likewise.
1669 (Complex Lane Split): Likewise.
1670 (Split During Added Lookahead Propagation): Likewise.
1671
7fe11bb5
JD
16722009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1673
1674 Add new files for IELR and canonical LR implementation.
1675 * src/AnnotationList.c: New.
1676 * src/AnnotationList.h: New.
1677 * src/InadequacyList.c: New.
1678 * src/InadequacyList.h: New.
1679 * src/Sbitset.c: New.
1680 * src/Sbitset.h: New.
1681 * src/ielr.c: New.
1682 * src/ielr.h: New.
1683
7254f6a8
JD
16842009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1685
1686 Implement %define lr.default_rules.
1687 Its value describes the states that are permitted to contain
1688 default rules: "all", "consistent", or "accepting".
1689 * src/reader.c (reader): Default lr.default_rules to "all".
1690 Check for a valid lr.default_rules value.
1691 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1692 is "accepting", then only mark the accepting state as
1693 consistent.
1694 (initialize_LA): Tell state_lookahead_tokens_count whether
1695 lr.default_rules is "accepting".
1696 * src/tables.c (action_row): If lr.default_rules is not "all",
1697 then disable default rules in inconsistent states.
1698 * src/print.c (print_reductions): Use this opportunity to
1699 perform some assertions about whether lr.default_rules was
1700 obeyed correctly.
1701 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1702 helps with checking the parser tables for a grammar.
1703 * tests/input.at (%define lr.default_rules invalid values): New
1704 test group.
1705 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1706 AT_TEST_TABLES_AND_PARSE.
1707 (`no %define lr.default_rules'): New test group generated by
1708 AT_TEST_LR_DEFAULT_RULES.
1709 (`%define lr.default_rules "all"'): Likewise.
1710 (`%define lr.default_rules "consistent"'): Likewise.
1711 (`%define lr.default_rules "accepting"'): Likewise.
1712
72e727f2
AD
17132009-04-20 Akim Demaille <demaille@gostai.com>
1714
1715 Formatting change.
1716
90462b8d
AD
17172009-04-20 Akim Demaille <demaille@gostai.com>
1718
1719 bison: factoring.
1720 * src/output.c (token_definitions_output): Use symbol_id_get
1721 instead of duplicating its logic.
1722 * TODO (YYERRCODE): Extend.
1723
4f646c37
AD
17242009-04-20 Akim Demaille <demaille@gostai.com>
1725
71b00ed8
AD
1726 variables: prefer error-verbose to error_verbose.
1727 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
1728 instead of error_verbose.
1729 * src/scan-gram.l (%error-verbose): Map to the error-verbose
1730 variable.
1731 * doc/bison.texinfo: Promote %define error-verbose instead of
1732 %error-verbose.
1733 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
1734
17352009-04-15 Akim Demaille <demaille@gostai.com>
1736
4f646c37
AD
1737 variables: accept dashes.
1738 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
1739 underscores.
1740 * src/scan-gram.l ({id}): Also accept dashes after the initial
1741 letter.
1742 ({directive}): Use {id}.
1743 * src/parse-gram.y: Comment and formatting changes.
1744 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1745 symbols.
1746 * src/complain.h, src/complain.c (yacc_at): New.
1747 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1748 symbol names.
1749 * src/output.c (token_definitions_output): Do not #define token
1750 names with dashes.
1751
184e3179
AD
17522009-04-20 Akim Demaille <demaille@gostai.com>
1753
1754 Consistently refer to Yacc, not YACC.
1755 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1756
41253c3a
JD
17572009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1758
1759 Pacify make maintainer-check-posix.
1760 * tests/input.at (%define, --define): Move bison command-line
1761 options before grammar file name.
1762
197b82ba
JD
17632009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1764
1765 Document semicolon warnings.
1766 * NEWS (2.5): Here.
1767
0c90a1f5
AD
17682009-04-14 Akim Demaille <demaille@gostai.com>
1769
1770 variables: use `parse.assert' instead of `assert'.
1771 * TODO (assert): Remove.
1772 * data/bison.m4 (b4_assert_if): Replace with...
1773 (b4_parse_assert_if): this.
1774 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
1775 * doc/bison.texinfo (Decl Summary): Document parse.assert.
1776
fa819509
AD
17772009-04-14 Akim Demaille <demaille@gostai.com>
1778
16dc0d90 1779 variables: use `parse.trace' instead of `debug'.
fa819509
AD
1780 * src/getargs.c (getargs): Map -t to %define trace.parse.
1781 * src/scan-gram.l (%debug): Map to %define trace.parse.
1782 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
1783 names to `_' in macro names.
1784 (b4_debug_if): Replace with...
1785 (b4_parse_trace_if): this.
1786 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1787 * data/yacc.c: Adjust.
1788 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
1789 Use @code to label the variable list.
1790 Document the variable parse.trace.
1791 (Tracing): Promote the parse.trace variable.
1792 * TODO: %printer is not documented.
1793
f7dae1ea
AD
17942009-04-14 Akim Demaille <demaille@gostai.com>
1795
1796 doc: minor fixes.
1797 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1798 (Table of Symbols): Remove duplicate entry for %debug.
1799
3535c071
EB
18002009-04-10 Eric Blake <ebb9@byu.net>
1801
1802 submodules: update to latest
1803 * submodules/autoconf: Use latest upstream Autoconf.
1804
cf48f675
EB
18052009-04-06 Eric Blake <ebb9@byu.net>
1806
1807 Work around autoconf 2.63b bug in testsuite.
1808 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1809 autoconf bug related to # in test.
1810
50cca368
JD
18112009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1812
1813 * NEWS (2.5): New section. Describe new -D/--define feature.
1814
3583d96b
AD
18152009-04-06 Akim Demaille <demaille@gostai.com>
1816
1817 Regen.
1818 * src/parse-gram.h, src/parse-gram.c: Regen.
1819
00f5d575
AD
18202009-04-06 Akim Demaille <demaille@gostai.com>
1821
1822 rename muscle_tab.* as muscle-tab.* for consistency.
1823 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
1824 * src/muscle-tab.h, src/muscle-tab.c: these.
1825 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
1826 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
1827
76bf5102
AD
18282009-04-06 Akim Demaille <demaille@gostai.com>
1829
1830 Makefile: introduce $(BISON).
1831 * src/local.mk (BISON): New.
1832 (YACC): Use it.
1833
bc0f5737
AD
18342009-04-06 Akim Demaille <demaille@gostai.com>
1835
1836 parser: handle %locations as %define locations.
1837 * src/getargs.h, src/getargs.c (locations_flag): Remove.
1838 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
1839 to set "locations" to true.
1840 * src/output.c (prepare): Don't output "locations".
1841 * src/scan-gram.l (%locations): Handle it as a %<flag>.
1842 * src/parse-gram.y: It's no longer a token.
1843 Don't handle it.
1844 * data/bison.m4 (b4_locations_if): Define it with
1845 b4_percent_define_if_define.
1846 * data/c.m4, data/glr.cc: Adjust.
1847
697c912f
AD
18482009-04-06 Akim Demaille <demaille@gostai.com>
1849
1850 Regen.
1851 * src/parse-gram.c: Regen.
1852
4920ae8b
AD
18532009-04-06 Akim Demaille <demaille@gostai.com>
1854
1855 muscle: factor the handling of obsolete of obsolete directives.
1856 Suggested by Joel E. Denny.
50cca368 1857
4920ae8b
AD
1858 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
1859 New, extracted from...
1860 * src/parse-gram.y (prologue_declaration: pure-parser): here.
1861 Remove it.
1862 (prologue_declaration: "%<flag>"): Use
1863 muscle_percent_define_ensure.
1864 (%error-verbose, %pure-parser): No longer tokens.
1865 * src/scan-gram.l (pure-parser): Return as a %<flag>.
1866
1d5b3c08
JD
18672009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1868
1869 Fix options documentation.
1870 * build-aux/cross-options.pl: As in --help output, write optional
1871 arguments as [=ARG] not =[ARG].
1872 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1873
62c99cf4
JD
18742009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1875
1876 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1877 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1878 requirements for a correct m4 are stricter.
1879 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
1880 * configure.ac: Update to use AC_PROG_GNU_M4.
1881 Reported by Eric Blake.
1882
1c93f35b
JD
18832009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1884
1885 Help with updating web manual.
1886 * HACKING: Incorporate instructions from gnulib/doc/README.
1887 * bootstrap.conf (gnulib_modules): Add gendocs.
1888
86cfae0a
AD
18892009-04-03 Akim Demaille <demaille@gostai.com>
1890
1891 Regen.
1892 * src/parse-gram.h, src/parse-gram.c: Regen.
1893
ba061fa6
AD
18942009-04-03 Akim Demaille <demaille@gostai.com>
1895
1896 Factor %FLAG at scan level.
1897 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
1898 definitions and associated rules, replaced by....
1899 (PERCENT_FLAG): this new token type, and rule.
1900 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
1901 Use it for %debug and %error-verbose.
1902
b19ebeb3
AD
19032009-04-03 Akim Demaille <demaille@gostai.com>
1904
1905 Regen.
1906 * src/parse-gram.h, src/parse-gram.c: Regen.
1907
001a16a9
AD
19082009-04-03 Akim Demaille <demaille@gostai.com>
1909
1910 Treat %debug as %define debug.
1911 * data/bison.m4 (b4_debug_if): New.
1912 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
1913 * data/lalr1.java: Use it instead of b4_debug_flag.
1914 * src/getargs.h, src/getargs.c (debug_flag): Remove.
1915 * src/output.c (prepare): Don't output it.
1916 * src/parse-gram.y: Treat %debug as %define debug.
1917
19182009-04-03 Akim Demaille <demaille@gostai.com>
1919
1920 Treat %error-verbose as %define error_verbose.
1921 This allows to pass -Derror_verbose on the command line. Better
1922 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
1923 ERROR_VERBOSE being defined as false or true.
1924 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
1925 on b4_percent_define_ifdef, for does not check the defined value,
1926 but only whether the symbol is defined, rely on
1927 b4_percent_define_flag_if, so that a value of "false" is processed
1928 as a false.
1929 If not defined, define the flag to "false".
1930 (b4_error_verbose_if): New.
1931 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
1932 b4_error_verbose_flag.
1933 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
1934 * src/output.c (prepare): Don't output it.
1935 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
1936
92822aff
JD
19372009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1938
1939 Fix strange %define locations for default values.
1940 Reported by Akim Demaille at
1941 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1942 and discussed again starting at
1943 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1944 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1945 because location information is bogus.
1946 Use angle brackets to delimit fake file name because square brackets
1947 look like underexpanded m4. Choose a better fake file name.
1948 Use negative line numbers.
1949 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1950 * src/location.c (location_print): If line for a boundary is negative,
1951 only print that boundary's file name.
1952 * src/location.h: Document that.
1953 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1954 defaults): Update output.
1955
e021191b
JD
19562009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1957
1958 Pacify ./configure --enable-gcc-warnings.
1959 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
1960 in lib won't compile with it.
1961 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
1962
78f65418
AD
19632009-03-31 Akim Demaille <demaille@gostai.com>
1964
1965 bootstrap: --help to stdout.
1966 * bootstrap (usage): Don't send --help to stderr.
1967 Use a here doc instead of a long string.
1968
f7e241f4
AD
19692009-03-31 Akim Demaille <demaille@gostai.com>
1970
1971 bootstrap: README-hacking no longer exists
1972 * bootstrap (checkout_only_file): Set to HACKING.
1973
31d3e510
AD
19742009-03-26 Akim Demaille <demaille@gostai.com>
1975
1976 doc: merge HACKING and README-hacking.
1977 Two files is confusing.
1978 Reported by Alexandre Duret-Lutz.
1f9d8248 1979
31d3e510
AD
1980 * README-hacking: Merge into...
1981 * HACKING (Working from the repository): here.
1982
81535bfa
AD
19832009-03-26 Akim Demaille <demaille@gostai.com>
1984
1985 doc: update README-hacking.
1986 * README-hacking: We now use git and git submodules.
1987 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1988
56f772e9
AD
19892009-03-26 Akim Demaille <demaille@gostai.com>
1990
1991 lalr1.cc: avoid GCC 4.3 warnings.
1992 GCC 4.3 now warns about "a || b && c" and asks for explicit
1993 parentheses.
1994 Reported by Alexandre Duret-Lutz.
1995 * data/location.cc: Update copyright years.
1996 (Position::operator==): Use parens to make precedence explicit.
1997 Compare lines and columns first, as they are more likely to be
1998 different, and they are faster to compare.
1999
11c073b7
AD
20002009-03-26 Akim Demaille <demaille@gostai.com>
2001
2002 gnulib: update.
2003 * gnulib: Update to latest.
2004 * src/local.mk (AM_CFLAGS): Move to...
2005 * Makefile.am: here.
2006 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
2007 AM_CFLAGS.
2008
91be6b28
AD
20092009-03-02 Akim Demaille <demaille@gostai.com>
2010
2011 Comment changes.
2012
cbf25ce7
AD
20132009-03-02 Akim Demaille <demaille@gostai.com>
2014
2015 Share b4_yytranslate_define.
2016 * data/lalr1.cc (b4_yytranslate_define): Move to...
2017 * data/c++.m4: here.
2018
882f02ed
AD
20192009-03-02 Akim Demaille <demaille@gostai.com>
2020
2021 Use locations in the variant example.
1f9d8248
AD
2022 Yes, this obfuscates the point of this example, variants only.
2023 But glr.cc cannot work (yet?) without locations. This change
2024 makes it easier to use this example with glr.cc.
11c073b7 2025
882f02ed
AD
2026 * examples/variant.yy (assert): %define it.
2027 (locations): Request them.
2028 (yylex): Bind the location to the stage.
2029
0623bacc
AD
20302009-03-02 Akim Demaille <demaille@gostai.com>
2031
2032 Dub make_TOKEN as a public type interface.
2033 * data/c++.m4 (b4_symbol_constructor_declare)
2034 (b4_symbol_constructor_define): New empty stubs.
2035 (b4_public_types_declare, b4_public_types_define): Use them.
2036 * data/lalr1.cc (b4_symbol_constructor_declare)
2037 (b4_symbol_constructor_declare_)
2038 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
2039 Move to...
2040 * data/variant.hh: here.
2041 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
2042 needed.
2043 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
2044 b4_symbol_constructor_declare, as it is now done by
2045 b4_public_types_define and b4_public_types_declare.
2046
5f5a90df
AD
20472009-03-02 Akim Demaille <demaille@gostai.com>
2048
2049 Coding style changes.
2050 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2051 (b4_symbol_constructor_declarations)
2052 (b4_symbol_constructor_definition_)
2053 (b4_symbol_constructor_definitions)
2054 (b4_yytranslate_definition): Rename as...
2055 (b4_symbol_constructor_declare_)
2056 (b4_symbol_constructor_declare)
2057 (b4_symbol_constructor_define_)
2058 (b4_symbol_constructor_define)
2059 (b4_yytranslate_define): these.
2060 * data/variant.hh (b4_variant_definition): Rename as...
2061 (b4_variant_define): this.
2062
b47b6ff7
AD
20632009-03-02 Akim Demaille <demaille@gostai.com>
2064
2065 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
2066 * data/bison.m4 (b4_percent_define_if_define): New.
2067 * data/c++.m4 (b4_variant_if): Move to...
2068 * data/bison.m4: Here, using b4_percent_define_if_define.
2069 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
2070 * data/bison.m4: Here, using b4_percent_define_if_define.
2071
1d6b689b
AD
20722009-03-02 Akim Demaille <demaille@gostai.com>
2073
2074 Dub symbol_type_base as a public type.
2075 * data/c++.m4 (b4_public_types_declare): Now define
2076 symbol_type_base and symbol_type.
2077 (b4_public_types_define): New.
2078 In both cases, the definitions are taken verbatim from lalr1.cc.
2079 * data/lalr1.cc: Adjust.
2080
4f84717d
AD
20812009-03-02 Akim Demaille <demaille@gostai.com>
2082
2083 b4_public_types_declare.
2084 * data/c++.m4 (b4_public_types_declare): New.
2085 * data/glr.cc, data/lalr1.cc: Use it.
2086
b9e4eb5b
AD
20872009-03-02 Akim Demaille <demaille@gostai.com>
2088
2089 b4_semantic_type_declare.
2090 * data/c++.m4 (b4_semantic_type_declare): New.
2091 Factors and generalizes what was in glr.cc and lalr1.cc.
2092 * data/variant.hh (b4_semantic_type_declare): Redefine it for
2093 variants.
2094 * data/lalr1.cc, data/glr.cc: Use it.
2095
6a6e7f0c
AD
20962009-02-26 Akim Demaille <demaille@gostai.com>
2097
2098 Upgrade gnulib.
2099 * gnulib: Upgrade from master.
2100 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
2101 Regen.
2102
e9e61b00
AD
21032009-02-25 Akim Demaille <demaille@gostai.com>
2104
2105 Remove useless arguments.
2106 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
2107 relevant.
2108
3eead995
AD
21092009-02-25 Akim Demaille <demaille@gostai.com>
2110
2111 Comment changes.
2112 * data/lalr1.cc: here.
2113
87f28efe
AD
21142009-02-25 Akim Demaille <demaille@gostai.com>
2115
2116 Fix glr.cc's debug level handling.
2117 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
2118 glr.c which is used.
2119 (debug_level, set_debug_level): Adjust.
2120
9be2a009
AD
21212009-02-25 Akim Demaille <demaille@gostai.com>
2122
2123 Copyright years.
2124 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
2125
07a6e87d
AD
21262009-02-25 Akim Demaille <demaille@gostai.com>
2127
2128 Style changes.
2129 * etc/bench.pl.in (generate_grammar_list): Consitently use
2130 location_type, not yy::location.
2131
33c78bd2
AD
21322009-02-25 Akim Demaille <demaille@gostai.com>
2133
2134 Comment change.
2135 * data/lalr1.cc: here.
2136
49572920
AD
21372009-02-19 Akim Demaille <demaille@gostai.com>
2138
2139 Make yyparser::error public.
2140 * data/lalr1.cc: here.
2141 There is no good reason to keep it private (and it is convenient
2142 to use it from the scanner for instance). It is already public in
2143 glr.cc.
2144
88654b47
AD
21452009-02-19 Akim Demaille <demaille@gostai.com>
2146
2147 Comment changes.
2148 * data/glr.cc: here.
2149
4524c55b
AD
21502009-02-19 Akim Demaille <demaille@gostai.com>
2151
2152 Remove trailing blanks.
6a6e7f0c
AD
2153 The epilogue has its own ending \n, no need to add another.
2154
4524c55b
AD
2155 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
2156 epilogue.
2157 * data/glr.cc: dnl when extending the epilogue.
2158 Remove stray "private:".
2159
6ceccee8
AD
21602009-02-19 Akim Demaille <demaille@gostai.com>
2161
2162 Use b4_c_modern.
2163 * data/c.m4 (b4_c_function_decl): Here.
2164
9c6a8966
AD
21652009-02-19 Akim Demaille <demaille@gostai.com>
2166
2167 Comment changes.
2168 * data/lalr1.cc: here.
2169
507aa0e2
AD
21702009-02-19 Akim Demaille <demaille@gostai.com>
2171
2172 Extract variant.hh
2173 * data/variant.hh: New, extracted from...
2174 * data/lalr1.cc: here.
2175 Adjust.
2176 * data/local.mk: Adjust.
2177
51bacae6
AD
21782009-02-19 Akim Demaille <demaille@gostai.com>
2179
2180 Extract stack.hh from lalr1.cc.
2181 * data/stack.hh: New.
2182 * data/lalr1.cc: Extract from here.
2183 * data/local.mk: Adjust.
2184
06c3084f
JD
21852009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
2186
2187 Add reminder about uploading public key to keys.gnupg.net.
2188 * HACKING (Release Procedure): Here.
2189
0ea583d2
AD
21902009-01-28 Akim Demaille <demaille@gostai.com>
2191
2192 * NEWS: Update information about 2.4.1 and 2.4.2.
2193
402b123d
AD
21942008-11-04 Akim Demaille <demaille@gostai.com>
2195
2196 Reformat NEWS.
2197 * NEWS: Use more outline-mode markup.
2198 Suggested by Jim Meyering.
2199
74553c98
AD
22002009-01-08 Akim Demaille <demaille@gostai.com>
2201
2202 Fix grep portability issues.
2203 Grep on Solaris does not support -q.
2204 Reported by Summum Bonum.
2205
2206 * NEWS: Add a stub for 2.4.2.
2207 * THANKS: Add Summum Bonum.
2208 * tests/atlocal.in (EGREP): New.
2209 (CC, CXX, XSLTPROC): Make it possible to override them via
2210 envvars.
2211 * tests/java.at: Use $EGREP instead of egrep.
2212 Use AT_CHECK's ignore instead of grep's -q.
2213
84eedf86
AD
22142008-12-11 Akim Demaille <demaille@gostai.com>
2215
2216 Pass the token type to yysyntax_error.
2217 * data/yacc.c (yysyntax_error): Take the transated token instead
2218 of the raw number.
2219 Adjust callers.
2220 * TODO: Update.
2221
5860cc8c
AD
22222008-12-11 Akim Demaille <demaille@gostai.com>
2223
2224 Formatting changes.
2225 * data/glr.c: Formatting changes.
2226
2b008529
AD
22272008-12-11 Akim Demaille <demaille@gostai.com>
2228
2229 Propagate i18n changes into glr.c.
2230 * TODO: Update.
2231 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
2232 building the error message format dynamically.
2233 * data/lalr1.java: Formatting changes.
2234
2cd1af95
AD
22352008-12-11 Akim Demaille <demaille@gostai.com>
2236
2237 Use testsuite -C.
2238 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
2239 Solves problems when top_srcdir is an absolute path.
2240 Suggested by Eric Blake.
2241 * configure.ac: Require Autoconf 2.62.
2242
eeb29422
AD
22432008-12-11 Akim Demaille <demaille@gostai.com>
2244
2245 Simplify the i18n of the error messages.
2246 * data/lalr1.cc: Comment changes.
2247 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
2248 lalr1.cc instead of building dynamically the format string.
2249
6617622c
AD
22502008-12-08 Akim Demaille <demaille@gostai.com>
2251
2252 Fix portability issue in the test suite.
2253 * tests/local.at (AT_MATCHES_CHECK): New.
2254 Based on Perl instead of Sed. Sed has too many portability
2255 pitfalls, not ever Sed is GNU Sed.
2256 * tests/actions.at (Fix user actions without a trailing semicolon):
2257 Use it.
2258
2ca1136c
AD
22592008-12-08 Akim Demaille <demaille@gostai.com>
2260
2261 Update data/README.
2262 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
2263
6c63b895
AD
22642008-12-08 Akim Demaille <demaille@gostai.com>
2265
2266 Install autoconf as a submodule to get m4sugar.
2267 * .gitmodules: Add submodules/autoconf.
2268 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
2269 submodules/autoconf.
2270
417e31d2
AD
22712008-12-08 Akim Demaille <demaille@gostai.com>
2272
2273 Test token.prefix in all the skeletons.
2274 * data/java.m4 (b4_token_enum): Use the token.prefix.
2275 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
2276 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
2277 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
2278 * tests/java.at: Comment changes.
2279 (AT_CHECK_JAVA_MINIMAL): Define the END token.
2280 (Java parser class and package names): Add token.prefix check.
2281
97abf544
AD
22822008-12-08 Akim Demaille <demaille@gostai.com>
2283
2284 Fix regeneration of atconfig.
2285 * tests/local.mk (tests/atconfig): The rule was incorrect, but
2286 remove it: now that there is no tests/Makefile.am, the top-level
2287 Makefile properly updates atconfig when needed.
2288
e8cd1ad6
DJ
22892008-12-07 Di-an Jan <dianj@freeshell.org>
2290
2291 Implement the FIXME that ends an user action with a semicolon
2292 if it seems necessary.
2293 * src/scan-code.l (flex rules section): Flag cpp directive from
2294 any `#' to the first unescaped end-of-line. Semicolon is not
2295 needed after `;', `{', '}', or cpp directives and is needed after
2296 any other token (whitespaces and comments have no effect).
2297 * tests/actions.at (Fix user actions without a trailing semicolon):
2298 New test.
2299 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
2300 to make user actions complete statements.
2301 Adjust column numbers in error messages.
2302 * tests/regression.at (Fix user actions without a trailing semicolon):
2303 Remove. Covered by new test.
2304
ce9447fc
AD
23052008-12-07 Akim Demaille <demaille@gostai.com>
2306
2307 Update gnulib.
2308 * gnulib: Update from master.
2309
d333175f
EB
23102008-12-05 Eric Blake <ebb9@byu.net>
2311
2312 Avoid compiler warning.
2313 * src/output.c (muscle_insert_item_number_table): Delete unused
2314 function.
2315
215b40ac
EB
23162008-12-02 Eric Blake <ebb9@byu.net>
2317
2318 Build testsuite with newer autoconf.
2319 * tests/output.at (m4_expand): Don't override in newer autoconf,
2320 where the underlying implementation changed.
2321 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
2322 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
2323 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
2324 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
2325 since some of them contain unbalanced ')'.
2326
3bb21113
AD
23272008-12-01 Akim Demaille <demaille@gostai.com>
2328
2329 Use b4_symbol for printers and destructors everywhere.
2330 * data/bison.m4 (b4_symbol_action_location): New.
2331 * data/c.m4 (b4_symbol_actions): Remove.
2332 Adjust all callers to use by b4_symbol_foreach and the corresponding
2333 b4_symbol_printer/destructor macro.
2334 * data/glr.cc: Adjust.
2335 * data/lalr1.java: Adjust the %destructor sanity check.
2336 * src/output.c (symbol_code_props_output): Remove, we no longer
2337 need the b4_symbol_printers/destructors tables.
2338
fb7c5b1f
AD
23392008-12-01 Akim Demaille <demaille@gostai.com>
2340
2341 Use b4_symbol_case_.
2342 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
2343 b4_symbol_case_.
2344
cf6fb222
AD
23452008-12-01 Akim Demaille <demaille@gostai.com>
2346
2347 Move b4_symbol based macro to bison.m4.
2348 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
2349 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
2350 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
2351 (b4_type_foreach): Move to...
2352 * data/bison.m4: Here.
2353 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
2354 b4_symbol_value_template instead of b4_symbol_value.
cf6fb222 2355
e3c52a63
AD
23562008-12-01 Akim Demaille <demaille@gostai.com>
2357
2358 b4_symbol/type_foreach.
2359 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
2360 Use them.
2361
2bde9113
AD
23622008-12-01 Akim Demaille <demaille@gostai.com>
2363
2364 Use the symbol properties to output the printer/destructor for lalr1.cc.
30c10faf
AD
2365 Instead of defining complex list of tuples to define various
2366 properties of the symbols, we now prefer to define symbols as
2367 "structs" in m4: using the symbol key (its number), and the
2368 property name, b4_symbol gives it value. Use this to handle
2369 destructors and printers.
2370
2bde9113
AD
2371 * src/output.c (CODE_PROP): New.
2372 (prepare_symbol_definitions): Use it to define the printer and
2373 destructor related attributes of the symbols.
2374 * data/lalr1.cc (b4_symbol_actions): Rename as...
2375 (b4_symbol_action): this.
2376 Use b4_symbol instead of 6 arguments.
2377 (b4_symbol_printer, b4_symbol_destructor): New.
2378 Use them instead of b4_symbol_actions.
2379
44494bf6
AD
23802008-12-01 Akim Demaille <demaille@gostai.com>
2381
2382 Avoid capturing variables too easily.
2383 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
2384 v__ and p__ instead of v and p.
2385
fad814bd
AD
23862008-12-01 Akim Demaille <demaille@gostai.com>
2387
2388 Remove spurious empty line before syncline.
2389 * data/bison.m4 (b4_syncline): Don't output an empty line before
2390 the output.
2391
feda5527
AD
23922008-11-26 Akim Demaille <demaille@gostai.com>
2393
2394 Convert lib/Makefile.am into lib/local.mk.
2395 The real problem is rather gnulib.mk, which itself is extracted
2396 from a Makefile.am that gnulib expects to the "recursive". The
2397 tool prefix-gnulib-mk converts such a gnulib.mk to be
2398 non-recursive. Also, some AC_SUBST variables need to be adjusted.
2399
2400 * etc/prefix-gnulib-mk: New.
2401 * bootstrap (slurp): Use it to convert further gnulib.mk.
2402 No longer try to avoid re-creation of lib/gnulib.mk as the changes
2403 are deeper.
2404 * lib/Makefile.am: Rename as...
2405 * lib/local.mk: this.
2406 Adjust to be prefixed.
2407 * Makefile.am, configure.ac: Adjust.
2408 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
2409
56ddee7f
AD
24102008-11-26 Akim Demaille <demaille@gostai.com>
2411
2412 s/_FLAGS/FLAGS/.
2413 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
2414 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
2415 Reported by Eric Blake.
2416
728e89a0
AD
24172008-11-26 Akim Demaille <demaille@gostai.com>
2418
2419 Use b4_parser_tables_define in glr.cc.
2420 * data/glr.c: Use b4_parser_tables_define instead of defining the
2421 (deterministic integral) tables by hand.
2422
2c1bf9bd
AD
24232008-11-26 Akim Demaille <demaille@gostai.com>
2424
2425 Use b4_parser_tables_define in Java.
2426 * data/java.m4 (b4_typed_parser_table): Rename as...
2427 (b4_typed_parser_table_define): this, for consistency.
2428 Accept a comment as $4.
2429 Move $2 into yy*_.
2430 (b4_integral_parser_table): Rename as...
2431 (b4_integral_parser_table_define): this.
2432 * data/lalr1.java: Adjust all uses.
2433 Use b4_parser_tables_define instead of generation by hand.
2434
ba206cf4
AD
24352008-11-26 Akim Demaille <demaille@gostai.com>
2436
2437 Prepare the convergence bw C style and Java table generation.
2438 * data/bison.m4 (b4_tables_map, b4_tables_declare)
2439 (b4_tables_define): Rename as...
2440 (b4_integral_parser_tables_map, b4_parser_tables_declare)
2441 (b4_parser_tables_define): these.
2442 * data/c.m4 (b4_table_define): Rename as...
2443 (b4_integral_parser_table_define): this.
2444 * data/lalr1.cc: Adjust.
2445 (b4_table_define, b4_table_declare): Rename as...
2446 (b4_integral_parser_table_define)
2447 (b4_integral_parser_table_declare): these.
2448 (yyrline_): Move the comment where it is actually used.
2449 * data/yacc.c: Adjust.
2450 (yyrline): Use b4_integral_parser_table_define.
2451
d12f8e49
AD
24522008-11-26 Akim Demaille <demaille@gostai.com>
2453
2454 Regen.
2455 * src/parse-gram.h, src/parse-gram.c: Regen.
2456
0991e29b
AD
24572008-11-26 Akim Demaille <demaille@gostai.com>
2458
2459 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
2460 * data/lalr1.cc (b4_tables_map): Move to...
2461 * data/bison.m4: here.
2462 Update the comment for yytable during the flight.
2463 (b4_tables_declare, b4_tables_define): New.
2464 * data/lalr1.cc: Use them.
2465 * data/c.m4 (b4_table_define): New.
2466 * data/yacc.c: Use b4_tables_define instead of output the tables
2467 by hand.
2468 * tests/regression.at (Web2c Actions): Adjust the expected output,
2469 the order of the tables changed.
2470
3d3bc1fe
AD
24712008-11-26 Akim Demaille <demaille@gostai.com>
2472
2473 Get rid of (yy)rhs and (yy)prhs.
2474 These tables are no longer needed in the parsers, and they don't seem to
2475 be useful. They are not documented either.
feda5527 2476
3d3bc1fe
AD
2477 * src/output.c (prepare_rules): Get rid of rhs and prhs.
2478 Adjust the computation of (yy)r2.
2479
08c81469
AD
24802008-11-26 Akim Demaille <demaille@gostai.com>
2481
2482 Rule length is unsigned.
2483 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
2484
932b0c96
AD
24852008-11-26 Akim Demaille <demaille@gostai.com>
2486
2487 Get rid of lalr1-split.cc.
2488 It was no longer maintainer.
feda5527 2489
932b0c96
AD
2490 * data/lalr1-split.cc: Remove.
2491 * etc/bench.pl.in (bench_fusion_parser): Remove.
2492 Adjust.
2493
8452c667
AD
24942008-11-26 Akim Demaille <demaille@gostai.com>
2495
2496 Use yy* consistently.
2497 * data/glr.c: Now that yyrhs no longer exists as a global
2498 variable, rename local "rhs" variables into "yyrhs" for
2499 consistency.
2500
783aa653
AD
25012008-11-25 Akim Demaille <demaille@gostai.com>
2502
2503 Get rid of yyrhs and yyprhs in glr.c.
2504 * data/glr.c (yyrhs, yyprhs): Remove.
2505 Instead, use the state stack and yystos.
2506
6130b755
AD
25072008-11-25 Akim Demaille <demaille@gostai.com>
2508
2509 Flag glr tests.
2510 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
2511 as an Autotest keyword.
2512
95a7b1c9
AD
25132008-11-25 Akim Demaille <demaille@gostai.com>
2514
2515 Prefer TESTSUITE_FLAGS.
2516 TESTSUITEFLAGS is barely readable.
feda5527 2517
95a7b1c9
AD
2518 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
2519 for backward compatibility.
2520 Use the former instead of the latter.
2521
b4f18401
AD
25222008-11-25 Akim Demaille <demaille@gostai.com>
2523
2524 Get rid of yyrhs and yyprhs in larl1.java.
2525 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
2526 (yy_reduce_print): Rather, use yystos_ and the state stack.
2527
c265fd6b
AD
25282008-11-25 Akim Demaille <demaille@gostai.com>
2529
2530 Formatting changes.
2531
68dbdee8
AD
25322008-11-25 Akim Demaille <demaille@gostai.com>
2533
2534 Get rid of yyrhs and yyprhs in yacc.c.
30c10faf
AD
2535 They were used to get the symbol types, given a rule number, when
2536 displaying the top of the stack before a reduction. But the
2537 symbol type is available from the state stack. This has two be
2538 benefits: two tables less in the parser (making it smaller), and a
2539 more consistent use of the three stacks which will help to fuse
2540 them.
feda5527 2541
68dbdee8
AD
2542 * data/yacc.c (yyprhs, yyrhs): Remove.
2543 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
2544 (yy_reduce_print): Take yyssp as argument.
2545 Use it, together with yystos, to get the symbol type.
2546 * tests/regression.at (Web2c Report): Remove these tables from the
2547 expected output.
2548
6ab1adbe
AD
25492008-11-25 Akim Demaille <demaille@gostai.com>
2550
2551 b4_tables_map.
2552 The point is to factor the generation of the tables across skeletons.
2553 This is language dependant.
feda5527 2554
6ab1adbe
AD
2555 * data/c.m4 (b4_comment_): New.
2556 Should be usable to define how to generate tables independently of
2557 the language.
2558 (b4_c_comment): New.
2559 (b4_comment): Bounce to b4_c_comment.
2560 Now support $2 = [PREFIX] for indentation.
2561 * data/lalr1.cc (b4_table_declare): Don't output a comment if
2562 there is no comment.
2563 Indent it properly when there is one.
2564 Output the ending semicolon.
2565 (b4_table_define): Space changes.
2566 Output the ending semicolon.
2567 (b4_tables_map): New.
2568 Use it twice instead of declaring and defining the (integral)
2569 tables by hand.
2570
0fddb3d5
AD
25712008-11-25 Akim Demaille <demaille@gostai.com>
2572
2573 b4_table_declare.
2574 * data/lalr1.cc (b4_table_declare): New.
2575 Use it to declare the tables defined with b4_table_define.
2576 (b4_table_define): Declare a third arg to match b4_table_declare
2577 signature.
2578 Move all the comments around invocations of b4_table_define into
2579 the invocations itselves.
2580 Move things around to have the order for declarations and
2581 definitions.
2582
c4ddc0fb
AD
25832008-11-25 Akim Demaille <demaille@gostai.com>
2584
2585 Formatting changes.
2586 * data/lalr1.java: here.
2587
e0c653e7
AD
25882008-11-25 Akim Demaille <demaille@gostai.com>
2589
2590 b4_args is more general than only C++.
2591 * data/lalr1.cc (b4_args, _b4_args): Move to...
2592 * data/bison.m4: here.
2593
4182a0a1
DJ
25942008-11-21 Di-an Jan <dianj@freeshell.org>
2595
2596 Implement no-XXX arguments for --warnings, --report, --trace.
2597 * src/getargs.c (flags_argmatch): Handles no-XXX.
2598 Fix typo in doxygen comment.
2599
01466c3e
AD
26002008-11-21 Akim Demaille <demaille@gostai.com>
2601
2602 Display the changes in cross-options.texi.
2603 * build-aux/cross-options.pl ($sep): New, to separate items.
2604 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
2605 changes.
2606
a7c09cba
DJ
26072008-11-20 Di-an Jan <dianj@freeshell.org>
2608
2609 Improves options in the manual.
2610 * doc/bison.texinfo (-g, -x): Add space before argument.
2611 (Option Cross Key): Implement FIXME: listing directives also.
2612 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2613 (Short Option): Special case -d. Put arguments inside @option.
feda5527 2614 (Bison Directive): Add column, automatically extracted from
a7c09cba
DJ
2615 src/scan-gram.l (actual name passed as the first argument)
2616 with special case for %define.
2617 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
2618 to build-aux/cross-options.pl.
2619 * src/getargs.c (usage): Document limitations of cross-options.pl.
2620 * src/scan-gram.l: Likewise.
2621
6c88b51e
JD
26222008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2623
2624 Fix unexpanded macros in GLR defines file.
2625 Reported by Csaba Raduly at
2626 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2627 * THANKS (Csaba Raduly): Add.
2628 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2629 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2630 lexer in a separate module that includes the defines file.
2631 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
2632 source.
2633 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2634 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2635 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2636 (AT_DATA_SOURCE_PROLOGUE): New.
2637 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2638 (AT_DATA_SOURCE): New.
2639 (AT_FULL_COMPILE): Extend to support an additional source file.
2640
1e034807
AD
26412008-11-18 Akim Demaille <demaille@gostai.com>
2642
2643 More TODO.
2644 * TODO: More short term issues.
2645
e3dda35c
AD
26462008-11-18 Akim Demaille <demaille@gostai.com>
2647
2648 Regen.
2649 * src/parse-gram.h, src/parse-gram.c: Regen.
2650
bd187d7b
AD
26512008-11-18 Akim Demaille <demaille@gostai.com>
2652
2653 Use b4_subtract where possible.
2654 * data/lalr1.cc (b4_subtract): Move to...
2655 * data/bison.m4: here.
2656 * data/glr.c (b4_rhs_data): Use it.
2657 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
2658
6085ab0d
AD
26592008-11-18 Akim Demaille <demaille@gostai.com>
2660
2661 Remove incorrect mode specification.
2662 * data/glr.cc: Don't pretend it's C code.
2663
9ce405ce
JD
26642008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2665
2666 Simplify last patch slightly.
2667 * src/getargs.c (getargs): Here.
2668
a8beef7e
JD
26692008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2670
2671 Fix last warning from --enable-gcc-warnings.
2672 * src/getargs.c (getargs): Don't assign const address to non-const
2673 pointer.
2674
d50eea6d
JD
26752008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2676
2677 Don't let maintainer-*-check targets force a version update.
2678 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2679 handled.
2680
f5f419de
DJ
26812008-11-17 Di-an Jan <dianj@freeshell.org>
2682
2683 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2684 Align menus. Adjust word wrapping. Use node names for menu names.
2685 (Examples): Don't abbreviate node names.
2686 (LocalWords): Remove abbreviations.
2687 (Copying): Make description a sentence.
d50eea6d 2688 (Java Action Features): Remove period to match the rest of menu.
f5f419de 2689
d73e55e0
DJ
26902008-11-17 Di-an Jan <dianj@freeshell.org>
2691
2692 Handles several --enable-gcc-warnings.
2693 * src/getargs.c (command_line_location): Set parameters to void.
2694 * src/output.c (symbol_type_name_cmp): Make static.
2695 (symbols_by_type_name): Set parameters to void.
2696 (symbol_definitions_output): Remove unused parameter. Rename as...
2697 (prepare_symbol_definitions): this.
2698 (muscles_output): Move symbol_definitions_output to...
2699 (output): here as prepare_symbol_definitions.
2700 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
d50eea6d 2701 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
d73e55e0 2702
68c989de
DJ
27032008-11-17 Di-an Jan <dianj@freeshell.org>
2704
2705 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
2706 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
2707
23ce6f4c
AD
27082008-11-16 Akim Demaille <demaille@gostai.com>
2709
2710 Add missing $(EXEEXT).
2711 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
2712 "src/bison$(EXEEXT)".
2713 Reported by Di-an Jan.
2714
dd704c35
AD
27152008-11-15 Akim Demaille <demaille@gostai.com>
2716
2717 * TODO: Update.
2718
dab244d5
AD
27192008-11-15 Akim Demaille <demaille@gostai.com>
2720
2721 Formatting changes.
2722 * tests/input.at: here.
2723
4b4da9fb
AD
27242008-11-15 Akim Demaille <demaille@gostai.com>
2725
2726 Remove duplicate header inclusion.
2727 * src/LR0.c: here.
2728
4ea3f53d
AD
27292008-11-15 Akim Demaille <demaille@gostai.com>
2730
2731 * src/parse-gram.h, src/parse-gram.c: Regen.
2732
cb823b6f
AD
27332008-11-15 Akim Demaille <demaille@gostai.com>
2734
2735 Support parametric types.
b06df3c2
AD
2736
2737 There are two issues to handle: first scanning nested angle
2738 bracket pairs to support types such as std::pair< std::string,
2739 std::list<std::string> > >.
2740
2741 Another issue is to address idiosyncracies of C++: do not glue two
2742 closing angle brackets together (otherwise it's operator>>), and
2743 avoid sticking blindly a TYPE to the opening <, as it can result
2744 in '<:' which is a digraph for '['.
2745
cb823b6f
AD
2746 * src/scan-gram.l (brace_level): Rename as...
2747 (nesting): this.
2748 (SC_TAG): New.
2749 Implement support for complex tags.
b06df3c2 2750 (tag): Accept
cb823b6f
AD
2751 , but not <.
2752 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
2753 (b4_symbol_variant): Leave space around types as parameters.
2754 * examples/variant.yy: Use nested template types and leading ::.
2755 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
2756 Rename as...
2757 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
2758 * tests/c++.at: Test parametric types.
2759
7b6e6753
AD
27602008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2761
2762 Test token.prefix.
2763 This is not sufficient, but we test at least that the make_SYMBOL
2764 interface is not affected by token.prefix. A more general test
2765 will be implemented when the support of token.prefix is generalized
2766 to more skeletons.
b06df3c2 2767
7b6e6753
AD
2768 * tests/c++.at: One more variant test, using token.prefix.
2769
dddec537
AD
27702008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2771
2772 Test the make_TOKEN interface.
2773 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
2774 Factor the common code in yylex.
2775 Use it to test "%define lex_symbol".
2776
7d3e21ba
AD
27772008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2778
2779 Formatting change.
2780
4fc55348
AD
27812008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2782
2783 Simplify code for variants bench marks.
2784 * etc/bench.pl.in (&generate_grammar_list): Define and use
2785 location_type.
2786 Factor the common code in yylex.
2787
070e6509
AD
27882008-11-15 Akim Demaille <demaille@gostai.com>
2789
2790 Better error message.
2791 * bootstrap (find_tool): Fix the error message.
2792
0078681b
AD
27932008-11-15 Akim Demaille <demaille@gostai.com>
2794
2795 Update variant.yy to newest interface.
2796 * examples/variant.yy: Define lex_symbol.
2797 Adjust.
2798
ff084799
AD
27992008-11-15 Akim Demaille <demaille@gostai.com>
2800
2801 Don't use locations in variant.yy.
2802 * examples/variant.yy: Adjust to not using locations.
2803
b0d79ec6
AD
28042008-11-15 Akim Demaille <demaille@gostai.com>
2805
2806 Comment changes.
2807 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
2808 comments for the license.
2809
d4977ce3
AD
28102008-11-15 Akim Demaille <demaille@gostai.com>
2811
2812 Remove tests/Makefile.am.
2813 * tests/Makefile.am: Rename as...
2814 * tests/local.mk: this.
2815 * Makefile.am, configure.ac: Adjust.
2816 * Makefile.am (DISTCLEANFILES): Define.
2817 (maintainer-check, maintainer-xml-check, maintainer-push-check):
2818 Remove, we no longer need to bounce to the real targets.
2819
87f1149a
AD
28202008-11-15 Akim Demaille <demaille@gostai.com>
2821
2822 Comment changes.
2823
36415906
AD
28242008-11-15 Akim Demaille <demaille@gostai.com>
2825
2826 djgpp/local.mk.
2827 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
2828 * djgpp/local.mk: this new file.
2829
e2c2f696
AD
28302008-11-15 Akim Demaille <demaille@gostai.com>
2831
2832 Remove doc/Makefile.am.
2833 * doc/Makefile.am: Rename as...
2834 * doc/local.mk: this.
2835 Adjust paths
2836 * Makefile.am, configure.ac: Adjust.
2837 * Makefile.am (MOSTLYCLEANFILES): New.
2838 * src/local.mk: Adjust.
2839
2ead32e6
AD
28402008-11-15 Akim Demaille <demaille@gostai.com>
2841
2842 Move sc_tight_scope into maint.mk.
b06df3c2
AD
2843 It does not work, and I don't know how it was supposed to work: it
2844 seems to be looking for sources in the build tree. I just moved
2845 it at a better place, fixing it is still required.
2846
2ead32e6
AD
2847 * src/local.mk (echo): Remove.
2848 (sc_tight_scope): Move to...
2849 * maint.mk: here.
2850
2df9ec37
AD
28512008-11-15 Akim Demaille <demaille@gostai.com>
2852
2853 Regen.
2854 * src/parse-gram.h, src/parse-gram.h: Regen.
2855
0305d25e
AD
28562008-11-15 Akim Demaille <demaille@gostai.com>
2857
2858 Remove src/Makefile.am.
2859 * src/Makefile.am: Rename as...
2860 * src/local.mk: this.
2861 Prefix all the paths with src/.
2862 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
2863 (AM_CPPFLAGS): Find find in builddir/src.
2864 (YACC): Move the flags into...
2865 (AM_YFLAGS): here.
2866 * maint.mk (sc_tight_scope): Disable.
2867 It used to bounce to the version in src/Makefile.am which is now
2868 part of this very Makefile.
2869 * Makefile.am, configure.ac: Adjust.
2870 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
2871 include "..." to find files "here": we are no longer in src/, so
2872 qualify the includes with src/.
2873 * doc/Makefile.am (PREPATH): No longer include the top_builddir
2874 prefix.
2875 (.x.1): Adjust to be able to create src/foo from the top level
2876 Makefile, instead of going bounce to src/Makefile the creation of
2877 foo.
2878
5277c0a3
AD
28792008-11-15 Akim Demaille <demaille@gostai.com>
2880
2881 Remove useless variable.
2882 * doc/Makefile.am (srcsrcdir): Remove.
2883
6a5aa0cd
AD
28842008-11-15 Akim Demaille <demaille@gostai.com>
2885
2886 Remove data/Makefile.am.
2887 * data/Makefile.am: Rename as...
2888 * data/local.mk: this.
2889 Adjust paths.
2890 * Makefile.am, configure.ac: Adjust.
2891
7cb794dc
AD
28922008-11-15 Akim Demaille <demaille@gostai.com>
2893
2894 Remove etc/Makefile.am.
2895 * etc/Makefile.am: Rename as...
2896 * etc/local.mk: this.
2897 Adjust.
2898 * Makefile.am, configure.ac: Adjust.
2899
cd409e3b
AD
29002008-11-15 Akim Demaille <demaille@gostai.com>
2901
2902 Remove examples/local.mk.
2903 examples/calc++/Makefile.am might be interesting to keep as is, since
2904 it is an example in itself.
2df9ec37 2905
cd409e3b
AD
2906 * examples/Makefile.am: Rename as...
2907 * examples/local.mk: this.
2908 Adjust.
2909 * Makefile.am, configure.ac: Adjust.
2910
9a1e4214
AD
29112008-11-15 Akim Demaille <demaille@gostai.com>
2912
2913 Remove build-aux/Makefile.am.
2914 Recursive Makefiles are really way too slow, let's get rid of some of
2915 them.
2df9ec37 2916
9a1e4214
AD
2917 * build-aux/Makefile.am: Rename as...
2918 * build-aux/local.mk: this.
2919 Adjust paths.
2920 * Makefile.am, configure.ac: Adjust.
2921
0634493c
AD
29222008-11-15 Akim Demaille <demaille@gostai.com>
2923
2924 Provide convenience constructors for locations and positions.
2925 * data/location.cc (position::position): Accept file, line and
2926 column as arguments with default values.
2927 Always qualify initial line and column literals as unsigned.
2928 (location::location): Provide convenience constructors.
2929
fe1b448a
AD
29302008-11-15 Akim Demaille <demaille@gostai.com>
2931
b06df3c2
AD
2932 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
2933 token type.
fe1b448a
AD
2934 Using template buys us nothing, and makes it uselessly complex to
2935 construct a symbol. Besides, it could not be generalized to other
2936 languages, while make_FOO would work in C/Java etc.
2df9ec37 2937
fe1b448a
AD
2938 * data/lalr1.cc (b4_symbol_): New.
2939 (b4_symbol): Use it.
2940 (b4_symbol_constructor_declaration_)
2941 (b4_symbol_constructor_definition_): Instead of generating
2942 specializations of an overloaded template function, just generate
2943 several functions whose names are forged from the token names
2944 without the token.prefix.
2945 (b4_symbol_constructor_declarations): Generate them for all the
2946 symbols, not just by class of symbol type, now that instead of
2947 specializing a function template by the token, we generate a
2948 function named after the token.
2949 (b4_symbol_constructor_specialization_)
2950 (b4_symbol_constructor_specializations): Remove.
2951 * etc/bench.pl.in: Adjust to this new API.
2952
5679f311
AD
29532008-11-13 Akim Demaille <demaille@gostai.com>
2954
2955 %define token.prefix.
b06df3c2
AD
2956 Provide a means to add a prefix to the name of the tokens as
2957 output in the generated files. Because of name clashes, it is
2958 good to have such a prefix such as TOK_ that protects from names
2959 such as EOF, FILE etc. But it clutters the grammar itself.
2df9ec37 2960
5679f311
AD
2961 * data/bison.m4 (token.prefix): Empty by default.
2962 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
2963 * data/lalr1.cc (b4_symbol): Ditto.
2964
3204049e
AD
29652008-11-13 Akim Demaille <demaille@gostai.com>
2966
2967 Compute at M4 time some of the subtractions.
90290ce5 2968 * data/lalr1.cc (b4_subtract): New.
3204049e
AD
2969 (b4_rhs_data): Use it.
2970
202598d3
AD
29712008-11-13 Akim Demaille <demaille@gostai.com>
2972
2973 symbol::token.
b06df3c2 2974 This allows the user to get the type of a token returned by yylex.
2df9ec37 2975
202598d3
AD
2976 * data/lalr1.cc (symbol::token): New.
2977 (yytoknum_): Define when %define lex_symbol, independently of
2978 %debug.
2979 (yytoken_number_): Move into...
2980 (symbol::token): here, since that's the only use.
2981 The other one is YYPRINT which was not officially supported
2982 by lalr1.cc, and anyway it did not work since YYPRINT uses this
2983 array under a different name (yytoknum).
2984
fc2476c7
AD
29852008-11-13 Akim Demaille <demaille@gostai.com>
2986
2987 YYERRCODE.
2988 * TODO (YYERRCODE): Mention the case of $undef.
2989
865f1e9f
AD
29902008-11-13 Akim Demaille <demaille@gostai.com>
2991
2992 TODO: YYPRINT.
2993 * TODO (YYPRINT): New.
2994
cb0b136a
AD
29952008-11-13 Akim Demaille <demaille@gostai.com>
2996
2997 Comment changes.
2998 * data/lalr1.cc, data/yacc.c: Fix the description of the
2999 yytranslate and yytoknum tables.
3000
2c086d29
AD
30012008-11-13 Akim Demaille <demaille@gostai.com>
3002
3003 Define make_symbol in the header.
b06df3c2
AD
3004 To reach good performances these functions should be inlined (yet
3005 this is to measure precisely). To this end they must be available
3006 to the caller.
2df9ec37 3007
2c086d29
AD
3008 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
3009 location_type with the class name.
3010 Since will now be output in the header, declare "inline".
3011 No longer use b4_symbol_constructor_specializations, but
3012 b4_symbol_constructor_definitions in the header.
3013 Don't call it in the *.cc file.
3014
1c4af381
AD
30152008-11-13 Akim Demaille <demaille@gostai.com>
3016
3017 Define yytranslate in the header for lex_symbol.
3018 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
3019 into the header file when using %define lex_symbol.
3020 (yytranslate_): Declare inline.
3021
e51b0a82
AD
30222008-11-13 Akim Demaille <demaille@gostai.com>
3023
b06df3c2
AD
3024 Define the constructors of symbol_type in
3025 b4_symbol_constructor_definitions.
e51b0a82 3026 The constructors are called by the make_symbol functions, which a
b06df3c2
AD
3027 forthcoming patch will move elsewhere. Hence the interest of
3028 putting them together.
2df9ec37 3029
b06df3c2
AD
3030 The stack_symbol_type does not need to be moved, it is used only
3031 by the parser.
2df9ec37 3032
e51b0a82
AD
3033 * data/lalr1.cc: Move symbol_type and symbol_base_type
3034 constructors into...
3035 (b4_symbol_constructor_definitions): here.
3036 Adjust.
3037
78835571
AD
30382008-11-13 Akim Demaille <demaille@gostai.com>
3039
3040 Make it easier to move the definition of yytranslate_.
3041 Forthcoming changes will make it possible to use yytranslate_
3042 from outside the parser implementation file.
2df9ec37 3043
78835571
AD
3044 * data/lalr1.cc (b4_yytranslate_definition): New.
3045 Use it.
3046
c1e6c88c
AD
30472008-11-13 Akim Demaille <demaille@gostai.com>
3048
3049 Remove useless class specification.
3050 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
3051 to refer to the class name to use a type defined by the class for
3052 arguments of member functions.
3053
4654b0c0
AD
30542008-11-13 Akim Demaille <demaille@gostai.com>
3055
3056 Finer input type for yytranslate.
3057 This patch is debatable: the tradition expects yylex to return an int
3058 which happens to correspond to token_number (which is an enum). This
3059 allows for instance to return characters (such as '*' etc.). But this
3060 goes against the stronger typing I am trying to have with the new
3061 lex interface which return a symbol_type. So in this case, feed
3062 yytranslate_ with a token_type.
2df9ec37 3063
4654b0c0
AD
3064 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
3065 expect a token_type.
3066
dd735e4e
AD
30672008-11-13 Akim Demaille <demaille@gostai.com>
3068
3069 Honor lex-params in %define lex_symbol mode.
3070 * data/lalr1.cc: Use b4_lex_param.
3071
6659366c
AD
30722008-11-13 Akim Demaille <demaille@gostai.com>
3073
3074 Simplify names.
3075 * src/output.c (symbol_definitions_output): Rename symbol
3076 attributes type_name and has_type_name as type and has_type.
3077 * data/lalr1.cc: Adjust uses.
3078
e9805e57
AD
30792008-11-13 Akim Demaille <demaille@gostai.com>
3080
3081 Use b4_type_names for the union type.
b06df3c2
AD
3082 The union used to compute the size of the variant used to iterate
3083 over the type of all the symbols, with a lot of redundancy. Now
3084 iterate over the lists of symbols having the same type-name.
2df9ec37 3085
e9805e57
AD
3086 * data/lalr1.cc (b4_char_sizeof_): New.
3087 (b4_char_sizeof): Use it.
3088 Adjust to be called with a list of numbers instead of a single
3089 number.
3090 Adjust its caller for new-line issues.
3091
aea10ef4
AD
30922008-11-13 Akim Demaille <demaille@gostai.com>
3093
3094 Define the "identifier" of a symbol.
b06df3c2
AD
3095 Symbols may have several string representations, for instance if
3096 they have an alias. What I call its "id" is a string that can be
3097 used as an identifier. May not exist.
2df9ec37 3098
b06df3c2
AD
3099 Currently the symbols which have the "tag_is_id" flag set are
3100 those that don't have an alias. Look harder for the id.
2df9ec37 3101
aea10ef4
AD
3102 * src/output.c (is_identifier): Move to...
3103 * src/symtab.c (is_identifier): here.
3104 * src/symtab.h, src/symtab.c (symbol_id_get): New.
3105 * src/output.c (symbol_definitions_output): Use it to define "id"
3106 and "has_id".
3107 Remove the definition of "tag_is_id".
3108 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
3109 "tag_is_id" were used to produce code.
3110 We still use "tag" for documentation.
3111
2ea7730c
AD
31122008-11-11 Akim Demaille <demaille@gostai.com>
3113
3114 Locations are no longer required by lalr1.cc.
3115 * data/lalr1.cc (_b4_args, b4_args): New.
3116 Adjust all uses of locations to make them optional.
3117 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
3118 (AT_CHECK_NAMESPACE): Check the use of locations.
3119 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
3120 without locations with lalr1.cc.
3121 Test these cases.
3122 * tests/output.at: Check lalr1.cc with and without location
3123 support.
3124 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
3125 Don't use locations.
3126
7ca2266a
AD
31272008-11-11 Akim Demaille <demaille@gostai.com>
3128
3129 AT_FULL_COMPILE.
3130 * tests/local.at (AT_FULL_COMPILE): New.
3131 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
3132
1a7a65f9
AD
31332008-11-11 Akim Demaille <demaille@gostai.com>
3134
3135 Support parens in calc++.
3136 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
3137 * examples/calc++/test (run): Check the expected output.
3138 Adjust callers.
3139 Check parens too.
3140
c944f7f2
AD
31412008-11-11 Akim Demaille <demaille@gostai.com>
3142
3143 Simplify lalr1.cc since %defines is mandatory.
3144 * data/lalr1.cc: Remove useless calls to b4_defines_if.
3145
dada3cd1
AD
31462008-11-11 Akim Demaille <demaille@gostai.com>
3147
3148 TODO: yyfmt.
3149 * TODO (yysyntax_error): New item.
3150
422c18f4
AD
31512008-11-11 Akim Demaille <demaille@gostai.com>
3152
3153 Prefer M4 to CPP.
3154 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
3155 YYERROR_VERBOSE.
3156
a0ffc175
AD
31572008-11-11 Akim Demaille <demaille@gostai.com>
3158
3159 Support i18n of the parse error messages.
3160 * TODO (lalr1.cc/I18n): Remove.
3161 * data/lalr1.cc (yysyntax_error_): Support the translation of the
3162 error messages, as done in yacc.c.
3163 Stay within the yy* pseudo namespace.
3164
00a8a083
AD
31652008-11-11 Akim Demaille <demaille@gostai.com>
3166
3167 More TODO.
3168 * TODO (single stack, yysyntax_error): New.
3169
09277875
AD
31702008-11-11 Akim Demaille <demaille@gostai.com>
3171
3172 Make it possible to return a symbol_type from yylex.
3173 * data/lalr1.cc (b4_lex_symbol_if): New.
3174 (parse): When lex_symbol is defined, expected yylex to return the
3175 complete lookahead.
3176 * etc/bench.pl.in (generate_grammar_list): Extend to support this
3177 yylex interface.
3178 (bench_variant_parser): Exercise it.
3179
64c1b92a
AD
31802008-11-11 Akim Demaille <demaille@gostai.com>
3181
3182 Remove useless bench case.
3183 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
3184 no longer used.
3185
2722aa42
AD
31862008-11-11 Akim Demaille <demaille@gostai.com>
3187
3188 Improve display of directives.
3189 * etc/bench.pl.in (parse_term): Don't add useless eol.
3190
918eb7c5
AD
31912008-11-11 Akim Demaille <demaille@gostai.com>
3192
3193 Use string_cast in the bench.
3194 * etc/bench.pl.in (generate_grammar_list): Define and use
3195 string_cast.
3196
39be9022
AD
31972008-11-11 Akim Demaille <demaille@gostai.com>
3198
3199 Replace yychar with a Boolean.
3200 * data/lalr1.cc (parse::yychar): Replace by...
3201 (parse::yyempty): this.
3202
a2e3fa77
AD
32032008-11-11 Akim Demaille <demaille@gostai.com>
3204
3205 Factor the tables.
3206 * TODO: New item.
3207
aba12ad1
AD
32082008-11-11 Akim Demaille <demaille@gostai.com>
3209
3210 Let yytranslate handle the eof case.
3211 * data/lalr1.cc (yytranslate_): Handle the EOF case.
3212 Adjust callers.
3213 No longer expect yychar to be equal to yyeof_, rather, test the
3214 lookahead's (translated) kind.
3215
27cb5b59
AD
32162008-11-11 Akim Demaille <demaille@gostai.com>
3217
3218 yychar cannot be empty in yyerrlab.
3219 * TODO (yychar == yyempty_): New.
3220 * data/lalr1.cc: Remove the handling of this case.
3221 This eases forthcoming changes related to yychar and yytranslate.
3222
fce629c0
AD
32232008-11-11 Akim Demaille <demaille@gostai.com>
3224
3225 Bench: syntactic sugar for %define/#define.
3226 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
3227 (&bench_push_parser, bench_variant_parser): Use this feature.
3228 (&eat): New.
3229 Use it.
3230
ce671960
AD
32312008-11-11 Akim Demaille <demaille@gostai.com>
3232
3233 Less memory pressure on the "list" bench.
3234 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
3235 the values, to limit memory pressure.
3236
2873fdf8
AD
32372008-11-11 Akim Demaille <demaille@gostai.com>
3238
3239 Introduce make_symbol.
b06df3c2
AD
3240 make_symbol provides a means to construct a full symbol (kind,
3241 value, location) in a single shot. It is meant to be a Symbol
3242 constructor, parameterized by the symbol kind so that overloading
3243 would prevent incorrect kind/value pairs. Unfortunately
3244 parameterized constructors do not work well in C++ (unless the
3245 parameter also appears as an argument, which is not acceptable),
3246 hence the use of a function instead of a constructor.
2df9ec37 3247
2873fdf8
AD
3248 * data/lalr1.cc (b4_symbol_constructor_declaration_)
3249 (b4_symbol_constructor_declarations)
3250 (b4_symbol_constructor_specialization_)
3251 (b4_symbol_constructor_specializations)
3252 (b4_symbol_constructor_definition_)
3253 (b4_symbol_constructor_definitions): New.
3254 Use them where appropriate to generate declaration, declaration of
3255 the specializations, and implementations of the templated
3256 overloaded function "make_symbol".
3257 (variant::variant): Always define a default ctor.
3258 Also provide a copy ctor.
3259 (symbol_base_type, symbol_type): New ctor overloads for value-less
3260 symbols.
3261 (symbol_type): Now public, so that functions such as yylex can use
3262 it.
3263
8be046d7
AD
32642008-11-11 Akim Demaille <demaille@gostai.com>
3265
3266 Inform m4 whether a tag is a valid id.
3267 * src/output.c (is_identifier): New.
3268 (symbol_definitions_output): Use it to define tag_is_id.
3269 But maybe this should be done at m4 level?
3270
de62edee
AD
32712008-11-11 Akim Demaille <demaille@gostai.com>
3272
3273 Test 214 was failing: it greps with a pattern containing [ ]*
3274 which obviously meant to catch spaces and tabs, but contained only
3275 spaces. Tabulations in sources are a nuisance, so to simplify the
3276 matter, get rid of all the tabulations in the Java sources. The
3277 other skeletons will be treated equally later.
3278
3279 * data/java.m4, data/lalr1.java: Untabify.
3280 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
3281 tabulations are no longer generated.
3282
905f0697
PB
32832008-11-11 Paolo Bonzini <bonzini@gnu.org>
3284
3285 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
3286 * configure.ac: Adjust usage.
3287 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3288 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
3289 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
3290
09ccae9b
DJ
32912008-11-10 Di-an Jan <dianj@freeshell.org>
3292
3293 Workaround Java's ``code too large'' problem for parser tables
3294 in most cases, by using one function per initialization.
3295 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
3296 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
3297 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
3298 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
3299 (yytname_): Use b4_typed_parser_table.
3300 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
3301 ``code too large'' error.
3302
1979121c
DJ
33032008-11-10 Di-an Jan <dianj@freeshell.org>
3304
3305 * NEWS: Document them.
de62edee 3306
1979121c
DJ
3307 General Java skeleton improvements.
3308 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
3309 using gcj < 4.3 in the testsuite, according to comments in
3310 gnulib/m4/javacomp.m4.
3311 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
3312 location_type, position_type): Remove extraneous brackets from
3313 b4_percent_define_default.
3314 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
3315 m4_define and m4_define_default.
3316 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
3317 which marks the end of user code with appropriate syncline, like all
3318 the other skeletons.
3319 (b4_user_post_prologue): Add. Don't silently drop.
3320 (yylex): Remove.
3321 (parse): Inline yylex.
3322 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
3323 (%{...%}): Fix typo of %code imports.
3324 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
3325
3326 Support annotations on parser class with %define annotations.
3327 * data/lalr1.java (annotations): Add to parser class modifier.
3328 * doc/bison.texinfo (Java Parser Interface): Document
3329 %define annotations.
3330 (Java Declarations Summary): Document %define annotations.
3331 * tests/java.at (Java parser class modifiers): Test annotations.
3332
3333 Do not generate code for %error-verbose unless requested.
3334 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
3335 Make private. Make conditional on %error-verbose.
3336 (getErrorVerbose, setErrorVerbose): New.
3337 (yytnamerr_): Make conditional on %error-verbose.
3338 (yysyntax_error): Make some code conditional on %error-verbose.
3339 * doc/bison.texinfo (Java Bison Interface): Remove the parts
3340 about %error-verbose having no effect.
3341 (getErrorVerbose, setErrorVerbose): Document.
3342
3343 Move constants for token names to Lexer interface.
3344 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
3345 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
3346 (parse): Qualify EOF to Lexer.EOF.
3347 * doc/bison.texinfo (Java Parser Interface): Move documentation of
3348 EOF and token names to Java Lexer Interface.
3349 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
3350
3351 Make yyerror public.
3352 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
3353 (yyerror): Change to public. Add Javadoc comments. Use longer
3354 parameter names. Make the body rather than the declarator
3355 conditional on %locations.
3356 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
3357
3358 Allow user to add code to the constructor with %code init.
3359 * data/java.m4 (b4_init_throws): New, for %define init_throws.
3360 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
3361 Add %code init to the front of the constructor body.
3362 * doc/bison.texinfo (YYParser.YYParser): Document %code init
3363 and %define init_throws.
3364 (Java Declarations Summary): Document %code init and
3365 %define init_throws.
3366 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
3367 (Java constructor init and init_throws): Add tests.
de62edee 3368
42f832d6
AD
33692008-11-10 Akim Demaille <demaille@gostai.com>
3370
3371 Update TODO.
3372 * TODO (-D): is implemented.
3373 (associativity): Same precedence must have the same associativity.
3374 For instance, how can a * b / c be parsed if * is %left and / is
3375 %right?
3376 (YYERRORCODE, YYFAIL, YYBACKUP): New.
3377
247efe34
AD
33782008-11-10 Akim Demaille <demaille@gostai.com>
3379
3380 Formatting changes.
3381
5d731440
AD
33822008-11-10 Akim Demaille <demaille@gostai.com>
3383
3384 More information about the symbols.
3385 * src/output.c (type_names_output): Document all the symbols,
3386 including those that don't have a type-name.
3387 (symbol_definitions_output): Define "is_token" and
3388 "has_type_name".
3389 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
3390 type-name, now that they are defined too in b4_type_names.
3391
21db118b
AD
33922008-11-10 Akim Demaille <demaille@gostai.com>
3393
3394 Regen.
3395
6ed15cde
AD
33962008-11-10 Akim Demaille <demaille@gostai.com>
3397
3398 Make parser::yytranslate static.
b06df3c2
AD
3399 Small speedup (1%) on the list grammar. And makes yytranslate_
3400 available in non member functions.
de62edee 3401
6ed15cde
AD
3402 * data/lalr1.cc (yytranslate_): Does not need to be a instance
3403 function.
3404
30bb2edc
AD
34052008-11-10 Akim Demaille <demaille@gostai.com>
3406
3407 Avoid trailing spaces.
3408 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
3409 * data/lalr1.cc: Don't indent before rule and symbol actions, as
3410 they can be empty, and anyway this incorrectly indents the first
3411 action.
3412
b3a28fd4
AD
34132008-11-10 Akim Demaille <demaille@gostai.com>
3414
3415 Comment changes.
3416
914202bd
AD
34172008-11-10 Akim Demaille <demaille@gostai.com>
3418
3419 Use "enum" for integral constants.
3420 This is just nicer to read, I observed no speedup.
de62edee 3421
914202bd
AD
3422 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
3423 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
3424 (yyuser_token_number_max_, yyundef_token_): Move into...
3425 (yytranslate_): here.
3426
c17f9a4a
AD
34272008-11-10 Akim Demaille <demaille@gostai.com>
3428
3429 Shortcuts in bench directives.
3430 * etc/bench.pl.in (parse_dirs): New.
3431 Use it.
3432 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
3433 Create the benches in "benches/".
3434
b9855ea5
AD
34352008-11-10 Akim Demaille <demaille@gostai.com>
3436
3437 Formatting changes.
3438 * data/lalr1.cc: here.
3439
6e097787
AD
34402008-11-10 Akim Demaille <demaille@gostai.com>
3441
3442 Adjust verbose message to using emacs.
3443 * etc/bench.pl.in: Inform compilation-mode when we change the
3444 directory.
3445 (generate_grammar_list): Recognize %define "variant" in addition
3446 to %define variant.
3447
4c3cc7da
AD
34482008-11-10 Akim Demaille <demaille@gostai.com>
3449
3450 Classify symbols by type-name.
3451 * src/uniqstr.h (UNIQSTR_CMP): New.
3452 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
3453 (type_names_output): New.
3454 (muscles_output): Use it.
3455 * data/lalr1.cc (b4_symbol_action_): Remove.
3456 (b4_symbol_case_, b4_type_action_): New.
3457 Adjust uses of b4_symbol_action_ to use b4_type_action_.
3458
d69c9694
AD
34592008-11-10 Akim Demaille <demaille@gostai.com>
3460
3461 Change the handling of the symbols in the skeletons.
3462 Before we were using tables which lines were the symbols and which
3463 columns were things like number, tag, type-name etc. It is was
3464 difficult to extend: each time a column was added, all the numbers had
3465 to be updated (you asked for colon $2, not for "tag"). Also, it was
3466 hard to filter these tables when only a subset of the symbols (say the
3467 tokens, or the nterms, or the tokens that have and external number
3468 *and* a type-name) was of interest.
de62edee 3469
d69c9694
AD
3470 Now instead of monolithic tables, we define one macro per cell. For
3471 instance "b4_symbol(0, tag)" is a macro name which contents is
3472 self-decriptive. The macro "b4_symbol" provides easier access to
3473 these cells.
de62edee 3474
d69c9694
AD
3475 * src/output.c (type_names_output): Remove.
3476 (symbol_numbers_output, symbol_definitions_output): New.
3477 (muscles_output): Call them.
3478 (prepare_symbols): Define b4_symbols_number.
3479
5263bea9
AD
34802008-11-10 Akim Demaille <demaille@gostai.com>
3481
3482 --trace=muscles
3483 * src/getargs.h, src/getargs.c (trace_muscle): New.
3484 (trace_types, trace_args): Support it.
3485 * src/output.c (output_skeleton): Use it.
3486
4175f6bb
AD
34872008-11-10 Akim Demaille <demaille@gostai.com>
3488
3489 muscles_output.
3490 * src/output.c (muscles_output): New, extracted from...
3491 (output_skeleton): here.
3492 Adjust.
3493
1de69d6a
AD
34942008-11-10 Akim Demaille <demaille@gostai.com>
3495
3496 Formatting changes.
3497
36db78a7
AD
34982008-11-10 Akim Demaille <demaille@gostai.com>
3499
3500 Update the variant example.
3501 * examples/variant.yy: Formatting changes.
3502 One stage build.
3503
e5eb92e7
AD
35042008-11-10 Akim Demaille <demaille@gostai.com>
3505
3506 Support constructor with an argument.
3507 This improves the "list" bench by 2%.
de62edee 3508
e5eb92e7
AD
3509 * data/lalr1.cc (variant::build): Add an overloaded version with
3510 an argument.
3511 * tests/c++.at (AT_CHECK_VARIANT): Check it.
3512
76307410
AD
35132008-11-10 Akim Demaille <demaille@gostai.com>
3514
3515 Test variants.
3516 * tests/c++.at (AT_CHECK_VARIANTS): New.
3517 Use it with and without %define assert.
3518
d78f0ac9
AD
35192008-11-10 Akim Demaille <demaille@gostai.com>
3520
3521 Add %precedence support.
3522 Unfortunately it is not possible to reuse the %prec directive. This
3523 is because to please POSIX, we do not require to end the rules with a
3524 semicolon. As a result,
de62edee 3525
d78f0ac9 3526 foo: bar %prec baz
de62edee 3527
d78f0ac9
AD
3528 is ambiguous: either a rule which precedence is that of baz, or a rule,
3529 and then a declaration of the precedence of the token baz.
de62edee 3530
d78f0ac9
AD
3531 * doc/bison.texinfo: Document %precedence.
3532 (Precedence Only): New.
3533 * src/assoc.h, src/assoc.c (precedence_assoc): New.
3534 * src/conflicts.c (resolve_sr_conflict): Support it.
3535 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
3536 Parse it.
3537 * tests/calc.at: Use %precedence for NEG.
3538 * tests/conflicts.at (%precedence does not suffice)
3539 (%precedence suffices): New tests.
3540
c85be41a
AD
35412008-11-09 Akim Demaille <demaille@gostai.com>
3542
3543 Make benches in a sub dirs.
3544 * etc/bench.pl.in ($dir): New.
3545 Use it.
3546 Check the use of constructors with an argument.
3547 (bench_variant_parser): Fix.
3548
db65ca1f
AD
35492008-11-09 Akim Demaille <demaille@gostai.com>
3550
3551 fix eof condition
3552
9b0efa5b
AD
35532008-11-09 Akim Demaille <demaille@gostai.com>
3554
3555 Fix --help.
3556
432ac57a
AD
35572008-11-09 Akim Demaille <demaille@gostai.com>
3558
3559 Require the generation of parse-gram.output.
3560 * src/Makefile.am (YACC): Pass --report=all.
3561
deef2a0a
AD
35622008-11-09 Akim Demaille <demaille@gostai.com>
3563
3564 Formatting changes.
3565
df72984a
AD
35662008-11-09 Akim Demaille <demaille@gostai.com>
3567
3568 Update TODO.
3569 * TODO: Remove obsolete items.
3570 Update others.
3571
f10e19fd
AD
35722008-11-09 Akim Demaille <demaille@gostai.com>
3573
3574 Enhance bench.pl.
3575 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
3576 (@token, $grammar, $bench): New.
3577 (generate_grammar_variant): Rename as...
3578 (generate_grammar_list): this.
3579 (generate_grammar): Adjust.
3580 (bench_grammar): Rename as...
3581 (bench): this.
3582 Use it in the various bench-marking routines.
3583 (-b, -g): New options.
3584
5de9c593
AD
35852008-11-09 Akim Demaille <demaille@gostai.com>
3586
3587 Use a static hierarchy for symbols in the C++ parser.
3588 * data/lalr1.cc (symbol_base_type, symbol_type)
3589 (stack_symbol_type): Make it a static hierarchy.
3590 Adjust dependencies.
3591
757f8f98
AD
35922008-11-09 Akim Demaille <demaille@gostai.com>
3593
3594 bench.pl -d, --directive.
3595 * etc/bench.pl.in (@directive): New.
3596 (&bench_grammar): Use it.
3597 (&bench_list_grammar): New, to provide access to the "variant"
3598 grammar.
3599 Use it.
3600 (getopts): Support -d, --directive.
3601
d3be4f6d
AD
36022008-11-09 Akim Demaille <demaille@gostai.com>
3603
3604 Use inline for small operations.
3605 * data/lalr1.cc (symbol_base_type, symbol_type)
3606 (stack_symbol_type): Declare constructor and other operations as
3607 inline.
3608 (yy_destroy_): Inline.
3609
1f7d007b
AD
36102008-11-09 Akim Demaille <demaille@gostai.com>
3611
3612 Introduce a hierarchy for symbols.
3613 * data/lalr1.cc (symbol_base_type, symbol_type): New.
3614 (data_type): Rename as...
3615 (stack_symbol_type): this.
3616 Derive from symbol_base_type.
3617 (yy_symbol_value_print_): Merge into...
3618 (yy_symbol_print_): this.
3619 Rename as...
3620 (yy_print_): this.
3621 (yydestruct_): Rename as...
3622 (yy_destroy_): this.
3623 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
3624 (parser::parse): yyla is now of symbol_type.
3625 Use its type member instead of yytoken.
3626
bc0b0477
AD
36272008-11-09 Akim Demaille <demaille@gostai.com>
3628
3629 Rename data_type and stack_symbol_type.
3630 * data/lalr1.cc (data_type): Rename as...
3631 (stack_symbol_type): this.
3632
57295d14
AD
36332008-11-09 Akim Demaille <demaille@gostai.com>
3634
3635 Handle semantic value and location together.
3636 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
3637 yydata.value and yydata.location.
3638 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
3639 (YY_SYMBOL_PRINT): Now take semantic value and location as a
3640 single arg.
3641 Adjust all callers.
3642 (yydestruct_): New overload for a stack symbol.
3643
e9b0834e
AD
36442008-11-09 Akim Demaille <demaille@gostai.com>
3645
3646 Push a complete symbol, not connected parts.
3647 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
3648 state, value and location.
3649 Adjust callers.
3650
6082531a
AD
36512008-11-09 Akim Demaille <demaille@gostai.com>
3652
3653 Agregate yylval and yylloc.
3654 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
3655 (parser::yyla): this.
3656
33c195cc
AD
36572008-11-09 Akim Demaille <demaille@gostai.com>
3658
3659 Rely on the state stack to display reduction traces.
b06df3c2
AD
3660 To display rhs symbols before a reduction, we used information
3661 about the rule reduced, which required the tables yyrhs and
3662 yyprhs. Now use rely only on the state stack to get the same
3663 information.
de62edee 3664
33c195cc
AD
3665 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
3666 Use them.
3667 (parser::yyrhs_, parser::yyprhs_): Remove.
3668 (parser::yy_reduce_print_): Use the state stack.
3669
e1f93869
AD
36702008-11-09 Akim Demaille <demaille@gostai.com>
3671
3672 Fuse yyval and yyloc into yylhs.
3673 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
3674 yylhs.
3675 (parse): Replace yyval and yyloc with yylhs.value and
3676 yylhs.location.
3677 After a user action, compute yylhs.state earlier.
3678 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
3679 fresh error_token.
3680
2935744b
DJ
36812008-11-09 Di-an Jan <dianj@freeshell.org>
3682
3683 Remove unused variable.
3684 * src/output.c (type_names_output): Remove unused variable sep.
3685
bbf9ca37
PB
36862008-11-09 Paolo Bonzini <bonzini@gnu.org>
3687
3688 Change tests/output.at quoting.
3689 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
3690 expanding arguments.
3691
d9a9b96b
JD
36922008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3693
3694 Don't add a semicolon to actions for %skeleton or %language.
3695 It breaks Java test cases as reported by Akim Demaille.
3696 * src/scan-code.l: Implement.
3697
51365192
JD
36982008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3699
3700 Clean up %skeleton and %language priority implementation.
3701 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3702 remove static qualifier because others will soon need to see it.
3703 (language_prio): Likewise.
3704 (getargs): Use command_line_prio rather than 0.
3705 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3706 enum fields.
3707 (skeleton_prio): Extern it.
3708 (language_prio): Extern it.
3709 * src/parse-gram.y: Use grammar_prio rather than 1.
3710
9380cfd0
AD
37112008-11-07 Akim Demaille <demaille@gostai.com>
3712
3713 Moving push traces into yypush_.
3714 * data/lalr1.cc (yypush_): Now takes a optional trace message.
3715 Adjust all uses.
3716
8901f32e
AD
37172008-11-07 Akim Demaille <demaille@gostai.com>
3718
3719 The single-stack C++ parser is now the standard one.
3720 * data/lalr1.cc: Rename as...
3721 * data/lalr1-split.cc: this.
3722 * data/lalr1-fusion.cc: Rename as...
3723 * data/lalr1.cc: this.
3724 * etc/bench.pl.in: Adjust.
3725
8cdabf02
AD
37262008-11-07 Akim Demaille <demaille@gostai.com>
3727
3728 Avoid empty-if warnings.
3729 Reported by Quentin Hocquet.
de62edee 3730
8cdabf02
AD
3731 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
3732 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
3733
5a893c2b
AD
37342008-11-07 Akim Demaille <demaille@gostai.com>
3735
3736 Pass command line location to skeleton_arg and language_argmatch.
3737 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
3738 The location argument is now mandatory.
3739 Adjust all dependencies.
3740 (getargs): Use command_line_location.
3741
58697c6d
AD
37422008-11-07 Akim Demaille <demaille@gostai.com>
3743
3744 -D, --define.
3745 * src/getargs.c (usage): Document -D.
3746 Fix help string for --locations.
3747 (command_line_location): New.
3748 (short_options, long_options, getargs): Support -D, --define.
3749 (getargs): Move -d support at the right place.
3750 * doc/bison.texinfo (Bison Options): Update.
3751 * tests/input.at (%define, --define): New.
3752
9fe5a457
AD
37532008-11-07 Akim Demaille <demaille@gostai.com>
3754
3755 Initialize the muscle table before parsing the command line.
3756 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
3757 (getargs): Define file_name.
3758 * src/main.c (main): Initialize muscle_tab before calling
3759 getargs.
3760 * src/muscle_tab.c (muscle_init): No longer define file_name, as
3761 its value is not available yet.
3762
56c5eca9
AD
37632008-11-07 Akim Demaille <demaille@gostai.com>
3764
3765 Locations without columns for command line arguments.
3766 * src/location.c (location_print): Don't display negative columns.
3767 * src/location.h: Document this.
3768
9b9e0a7d
AD
37692008-11-07 Akim Demaille <demaille@gostai.com>
3770
3771 Fix --help.
3772 * src/getargs.c (usage): Fix help string for -W.
3773
74eae918
AD
37742008-11-07 Akim Demaille <demaille@gostai.com>
3775
3776 Handle more general types of option arguments.
3777 * build-aux/cross-options.pl: The argument ends at the first
3778 space, not the first non-symbol character.
3779 Use @var for each word appearing the argument description.
3780
a3d4c6fb
AD
37812008-11-07 Akim Demaille <demaille@gostai.com>
3782
3783 Destroy the variants that remain on the stack in case of error.
3784 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
3785 destructor.
3786 Display the value only if yymsg is nonnull.
3787 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
3788
2d32fc9f
AD
37892008-11-07 Akim Demaille <demaille@gostai.com>
3790
3791 Add "%define assert" to variants.
3792 This is used to help the user catch cases where some value gets
3793 ovewritten by a new one. This should not happen, as this will
3794 probably leak.
de62edee 3795
2d32fc9f
AD
3796 Unfortunately this uncovered a bug in the C++ parser itself: the
3797 lookahead value was not destroyed between two calls to yylex. For
3798 instance if the previous lookahead was a std::string, and then an int,
3799 then the value of the std::string was correctly taken (i.e., the
3800 lookahead was now an empty string), but std::string structure itself
3801 was not reclaimed.
de62edee 3802
2d32fc9f
AD
3803 This is now done in variant::build(other&) (which is used to take the
3804 value of the lookahead): other is not only stolen from its value, it
3805 is also destroyed. This incurs a new performance penalty of a few
3806 percent, and union becomes faster again.
de62edee 3807
2d32fc9f
AD
3808 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
3809 (b4_variant_if): New.
3810 (variant::built): New.
3811 Use it whereever the status of the variant changes.
3812 * etc/bench.pl.in: Check the penalty of %define assert.
3813
f6038cb8
AD
38142008-11-07 Akim Demaille <demaille@gostai.com>
3815
3816 Use "%define variant" in bench.pl.
3817 * etc/bench.pl.in: No longer use the pseudo directive %variants,
3818 just use %define variants.
3819
ccde1f98
AD
38202008-11-07 Akim Demaille <demaille@gostai.com>
3821
3822 Regen.
3823 * src/parse-gram.h, src/parse-gram.c: Regen.
3824
58bd33b7
JD
38252008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3826
3827 Fix user actions without a trailing semicolon.
3828 Reported by Sergei Steshenko at
3829 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3830 * THANKS (Sergei Steshenko): Add.
3831 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3832 * tests/regression.at (Fix user actions without a trailing semicolon):
3833 New test case.
3834
639867b5
AD
38352008-11-04 Akim Demaille <demaille@gostai.com>
3836
3837 Use b4_copyright_years.
3838 * data/yacc.c (b4_copyright_years): New.
3839 Fix its value according to the comments in the file.
3840 Use it and undefine it.
3841
3c262606
AD
38422008-11-04 Akim Demaille <demaille@gostai.com>
3843
3844 Formatting changes.
3845 * data/lalr1-fusion.cc, src/parse-gram.y: here.
3846
a2b93d52
AD
38472008-11-04 Akim Demaille <demaille@gostai.com>
3848
3849 Formatting changes.
3850 * data/lalr1-fusion.cc: here.
3851
3a2803df
AD
38522008-11-04 Akim Demaille <demaille@gostai.com>
3853
3854 Use strict on bench.pl.
3855 * etc/bench.pl.in (&run, &generate_grammar): New.
3856 Rename the grammar generating functions for consistency.
3857 Change the interface so that the list of benches to run is passed
3858 as (optionless) arguments.
3859 (&compile): Use &run.
3860
a0d4650a
AD
38612008-11-04 Akim Demaille <demaille@gostai.com>
3862
3863 Remove spurious initial empty lines.
3864 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3865 * data/yacc.c: End the @output lines with an @.
3866
cac9e09b
AD
38672008-11-04 Akim Demaille <demaille@gostai.com>
3868
3869 Improve the display of sizes.
3870 * etc/bench.p.in: Higher precision.
3871 Sort by decreasing size.
3872
4af4348a
AD
38732008-11-04 Akim Demaille <demaille@gostai.com>
3874
3875 Don't memcpy C++ structures.
3876 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
3877 arguments.
3878 (variant::build): New overload for
3879 copy-construction-that-destroys.
3880 (variant::swap): New.
3881 (parser::yypush_): Use it in variant mode.
3882
ef05c4d6
AD
38832008-11-04 Akim Demaille <demaille@gostai.com>
3884
3885 Better defaults for bench.pl.
3886 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
3887 default values.
3888 Adjust &verbose uses.
3889 (-q, --quiet): New.
3890
9718cfa9
AD
38912008-11-04 Akim Demaille <demaille@gostai.com>
3892
3893 Make variant.yy more complex.
3894 std::list cannot be copied via memcpy, they are more demanding than
3895 std::string. Use one std::list to strengthen the test.
de62edee 3896
9718cfa9
AD
3897 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
3898 Adjust.
3899 Create a list of strings, instead of a single large string.
3900
a6df593d
AD
39012008-11-04 Akim Demaille <demaille@gostai.com>
3902
3903 bench.pl --bench.
3904 * etc/bench.pl.in (--bench, $bench): New.
3905
006a0303
AD
39062008-11-04 Akim Demaille <demaille@gostai.com>
3907
3908 Sort methods.
3909 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
3910 Define it after as().
3911
faef3466
AD
39122008-11-04 Akim Demaille <demaille@gostai.com>
3913
3914 Useless parens.
3915 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
3916
2141aded
AD
39172008-11-04 Akim Demaille <demaille@gostai.com>
3918
3919 Issue missing synclines after user actions.
3920 * data/c.m4 (b4_case): Issue synclines on the output file.
3921
e426d17b
AD
39222008-11-04 Akim Demaille <demaille@gostai.com>
3923
3924 Remove trailing empty line.
3925 * data/lalr1-fusion.cc: Don't add an empty line after the user's
3926 epilogue.
3927
a9ce3f54
AD
39282008-11-04 Akim Demaille <demaille@gostai.com>
3929
3930 Fix output of copyright years.
3931 * data/bison.m4 (b4_copyright): Fix the indentation of the
3932 copyright year paragraph.
3933 Use b4_copyright_years when no years are given.
3934 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
3935 (b4_copyright_years): New.
3936 Use it.
3937
59c544c2
AD
39382008-11-04 Akim Demaille <demaille@gostai.com>
3939
3940 Avoid the spurious initial empty line.
3941 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
3942 the end of @output request to suppress the empty line that
3943 results.
3944
96b15448
AD
39452008-11-04 Akim Demaille <demaille@gostai.com>
3946
3947 Remove parser::rhs_number_type.
3948 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
3949 (yyrhs_): Use b4_table_define.
3950
f0633174
AD
39512008-11-04 Akim Demaille <demaille@gostai.com>
3952
3953 Fix iteration type.
3954 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
3955
417b8004
AD
39562008-11-04 Akim Demaille <demaille@gostai.com>
3957
3958 Factor the declaration of the integer tables.
3959 * data/lalr1-fusion.cc (b4_table_define): New.
3960 Use it.
3961
1a5246c6
AD
39622008-11-03 Akim Demaille <demaille@gostai.com>
3963
3964 Fix indentation of tables in lalr1.cc
3965 * data/lalr1-fusion.cc: Fix the indentation.
3966
f8a95c9c
AD
39672008-11-03 Akim Demaille <demaille@gostai.com>
3968
3969 Destroy the lhs symbols after reduction.
3970 * data/lalr1-fusion.cc (parse): After the user action, when in
3971 variant mode, destroy the lhs symbols.
3972
d7f4d823
AD
39732008-11-03 Akim Demaille <demaille@gostai.com>
3974
3975 Simplify yysyntax_error_ use.
3976 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
3977 type, but make it unnamed in the declaration when it is not used.
3978
8b9c89fb
AD
39792008-11-03 Akim Demaille <demaille@gostai.com>
3980
3981 Let yy::variant::build return an lvalue.
3982 * data/lalr1-fusion.cc (variant::build): Return a reference to the
3983 object.
3984
83243c24
AD
39852008-11-03 Akim Demaille <demaille@gostai.com>
3986
3987 Define yy::variant only when needed.
3988 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
3989 used.
3990
429b4848
AD
39912008-11-03 Akim Demaille <demaille@gostai.com>
3992
3993 Bench the three-stack lalr1.cc.
3994 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
3995 one-stack one.
3996
414c76a4
AD
39972008-11-03 Akim Demaille <demaille@gostai.com>
3998
3999 Fail on parse error in calc++.
4000 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
4001 status.
4002 * examples/calc++/test ($me, $number, $exit, run): New.
4003 Use them to propagate errors to the exit status.
4004
8a5783fd
AD
40052008-11-03 Akim Demaille <demaille@gostai.com>
4006
4007 Don't specify the skeleton twice in the example.
4008 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
4009 file does what is needed.
4010
0cc5bead
AD
40112008-11-03 Akim Demaille <demaille@gostai.com>
4012
4013 bench: Improve output.
4014 * etc/bench.pl.in (bench_grammar): Tune the printf format.
4015
5b421a4e
AD
40162008-11-03 Akim Demaille <demaille@gostai.com>
4017
4018 bench: check impact of %debug on variants.
4019 * etc/bench.pl.in (variant_grammar): Fix the computation of
4020 $variant.
4021 Generate a grammar file that can work with or without %debug.
4022 Do use the @directive.
4023 (bench_variant_parser): Check impact of %debug.
4024 (@directives): Rename all the occurrences to...
4025 (@directive): this, for consistency.
4026
d11ee647
AD
40272008-11-03 Akim Demaille <demaille@gostai.com>
4028
4029 bench: report the size too.
4030 * etc/bench.pl.in ($iterations): Defaults to -3.
4031 (&bench_grammar): Require hireswallclock.
4032 Compute and display the size of the result.
4033 More comments.
4034
e1b74b92
AD
40352008-11-03 Akim Demaille <demaille@gostai.com>
4036
4037 bench: More use of the verbosity level.
4038 * etc/bench.pl.in ($verbose, &verbose): New.
4039 Use them.
4040 More POD documentation.
4041
7e5f9c54
AD
40422008-11-03 Akim Demaille <demaille@gostai.com>
4043
4044 bench.pl: a command line interface
4045 * etc/bench.pl.in: More doc.
4046 Some fixes in the documentation.
4047 ($cflags, $iterations, &help, &getopt): New.
4048 Use them.
4049 (&variant_grammar): Let the number of stages be 10 times what is
4050 specified.
4051
7109a18d
AD
40522008-11-03 Akim Demaille <demaille@gostai.com>
4053
4054 Bench the use of Boost.Variants.
4055 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
4056 New.
4057 (&compile): Be ready to compile C++ parsers.
4058 (&bench_push_parser): Move debug information to the outermost
4059 level.
4060 * THANKS: Add Michiel De Wilde.
4061
922730fe
AD
40622008-11-03 Akim Demaille <demaille@gostai.com>
4063
4064 bench.pl: Pass directives as a list instead of as a string.
4065 * etc/bench.pl.in (&directives): New.
4066 (&triangular_grammar, &calc_grammar): Use it to format the Bison
4067 directives.
4068 (&triangular_grammar): Do use the directives (were ignored).
4069 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
4070 directives.
4071
7484f1d4
AD
40722008-11-03 Akim Demaille <demaille@gostai.com>
4073
4074 Improve genericity of bench.pl.
4075 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
4076 argument.
4077 (&bench_push_parser): New.
4078 Call it.
4079
15129f25
AD
40802008-11-03 Akim Demaille <demaille@gostai.com>
4081
4082 Add documentation to bench.pl.
4083 * etc/bench.pl.in: Comment changes.
4084
0e0ed236
AD
40852008-11-03 Akim Demaille <demaille@gostai.com>
4086
4087 Fuse the three stacks into a single one.
de62edee 4088
b06df3c2
AD
4089 In order to make it easy to perform benchmarks to ensure that
4090 there are no performance loss, lalr1.cc is forked into
4091 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
4092 lalr1.cc.
4093
4094 Meanwhile, to make sure that lalr1-fusion.cc is correctly
4095 exercized by the test suite, the user must install a symbolic link
4096 from lalr1.cc to it.
de62edee 4097
b06df3c2
AD
4098 Instead of having three stacks (state, value, location), use a
4099 stack of triples. This considerably simplifies the code (and it
4100 will be easier not to require locations as currently does the C++
4101 parser), and also gives a 10% speedup according to
4102 etc/bench (probably mainly since memory allocation is done once
4103 instead of three times).
de62edee 4104
0e0ed236
AD
4105 Another motivation is to make it easier to destruct properly
4106 semantic values: now that they are bound to their state (hence
4107 symbol type) it will be easier to call the appropriate destructor.
de62edee 4108
0e0ed236 4109 These changes should probably benefit the C parser too.
de62edee 4110
b06df3c2
AD
4111 * data/lalr1.cc: Copy as...
4112 * data/lalr1-fusion.cc: this new file.
0e0ed236
AD
4113 (b4_rhs_value, b4_rhs_location): New definitions overriding those
4114 from c++.m4.
4115 (state_stack_type, semantic_stack_type, location_stack_type)
4116 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
4117 (data_type, stack_type, yystack_): New.
4118 (YYLLOC_DEFAULT, yypush_): Adjust.
4119 (yyerror_range): Now based on data_type, not location_type.
4120
7dedf26e
AD
41212008-11-03 Akim Demaille <demaille@gostai.com>
4122
4123 Push the state, value, and location at the same time.
4124 This is needed to prepare a forthcoming patch that fuses the three
4125 stacks into one.
de62edee 4126
7dedf26e
AD
4127 * data/lalr1.cc (parser::yypush_): New.
4128 (parser::yynewstate): Change the semantics: instead of arriving to
4129 this label when value and location have been pushed, but yystate
4130 is to be pushed on the state stack, now the three of them must
4131 have been pushed before. yystate still must be the new state.
4132 This allows to use yypush_ everywhere instead of individual
4133 handling of the stacks.
4134
c4585f1e
AD
41352008-11-03 Akim Demaille <demaille@gostai.com>
4136
4137 Prefer references to pointers.
4138 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
4139 definition to use references instead of pointers.
4140 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
4141 Take the value and location as references.
4142 Adjust callers.
4143
56017c17
AD
41442008-11-03 Akim Demaille <demaille@gostai.com>
4145
4146 stack::size instead of stack::height.
4147 * data/lalr1.cc (stack::height): Rename as...
4148 (stack::size): this.
4149 Fix the output type.
4150 Comment changes.
4151
5ab8c47b
AD
41522008-11-03 Akim Demaille <demaille@gostai.com>
4153
4154 Use variants to support objects as semantic values.
b06df3c2
AD
4155 This patch was inspired by work by Michiel De Wilde. But he used
4156 Boost variants which (i) requires Boost on the user side, (ii) is
4157 slow, and (iii) has useless overhead (the parser knows the type of
4158 the semantic value there is no reason to duplicate this
4159 information as Boost.Variants do).
4160
4161 This implementation reserves a buffer large enough to store the
4162 largest objects. yy::variant implements this buffer. It was
4163 implemented with Quentin Hocquet.
de62edee 4164
5ab8c47b
AD
4165 * src/output.c (type_names_output): New.
4166 (output_skeleton): Invoke it.
4167 * data/c++.m4 (b4_variant_if): New.
4168 (b4_symbol_value): If needed, provide a definition for variants.
4169 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
4170 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
4171 (b4_char_sizeof, yy::variant): New.
4172 (parser::parse): If variants are requested, define
4173 parser::union_type, parser::variant, change the definition of
4174 semantic_type, construct $$ before running the user action instead
4175 of performing a default $$ = $1.
4176 * examples/variant.yy: New.
4177 Based on an example by Michiel De Wilde.
4178
1fa5d8bb
AD
41792008-11-03 Akim Demaille <demaille@gostai.com>
4180
4181 Parameterize the extraction of semantic values.
4182 To make future changes easier, no longer rely on ".TYPE" being the
4183 way to get a semantic value.
de62edee 4184
1fa5d8bb
AD
4185 * data/c.m4 (b4_symbol_value): New.
4186 Use it.
4187 * data/c++.m4, data/yacc.c: Use it.
4188 * data/glr.c: Use b4_symbol_value.
4189 (b4_rhs_data): New.
4190 Use it.
4191
91ba8a55
AD
41922008-11-03 Akim Demaille <demaille@gostai.com>
4193
4194 Prepare easier M4 changes.
4195 * data/lalr1.cc: Use escaped [] instead of literals to prepare
4196 future changes.
4197
c9ba9e59
JD
41982008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4199
4200 Initiate further development.
4201 * NEWS: Create an empty section for new entries.
4202 * gnulib: Update submodule to HEAD.
4203
bfb40910
JD
42042008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4205
4206 * NEWS: Version 2.4.
4207
241fda7a
JD
42082008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4209
4210 Prepare for next release.
4211 * NEWS: Briefly mention changes since 2.3b.
4212 * README: Say GNU m4 1.4.6, which we've been requiring in release
4213 announcements already, not 1.4.3, which breaks the build.
4214
ed4d67dc
JD
42152008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
4216
4217 Say %language is experimental.
4218 We're thinking of extending it's effect on output file naming. See the
4219 thread at
4220 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
4221 * NEWS: Say it's experimental.
4222 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
4223 recommend it over %skeleton for now.
4224 (Bison Options): Likewise.
4225 (C++ Bison Interface): Use %skeleton not %language.
4226 (Calc++ Parser): Use %skeleton not %language.
4227 * src/getargs.c (usage): Say it's experimental.
4228
e254a580
DJ
42292008-11-01 Di-an Jan <dianj@freeshell.org>
4230 Paolo Bonzini <bonzini@gnu.org>
4231
4232 Support all Java parser class modifiers.
4233 * data/java.m4 (b4_percent_define_get3): New.
4234 (b4_final_if, b4_strictfp_if): New.
4235 * data/lalr1.java (final, strictfp, extends, implements): Support.
4236 * doc/bison.texinfo (final, strictfp, extends, implements): Add
4237 documentation.
4238 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
4239 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
4240 (AT_CHECK_JAVA_GREP): New.
4241 (Java parser class modifiers): New test.
4242 (Java parser class extends and implements): New test.
4243
4244 Model exception propagation better with throws and lex_throws.
4245 * data/java.m4 (b4_list2): New.
4246 (throws): Change default.
4247 * data/lalr1.java (yyaction): Add throws.
4248 (parse): Add lex_throws in addition to throws.
4249 * doc/bison.texinfo (throws, lex_throws): Add documentation.
4250 * tests/java.at (Java throws specifications): New test.
4251
4252 Improve documentation for Java parsers.
4253 * doc/bison.texinfo (Java Parsers): Add subsections.
4254 Don't quote first argument of %define.
4255 (Java Bison Interface): Document output files. Move documentation
4256 of parser class and merge into Java Parser Interface. Document
4257 features that error out. Document directives with no effect.
4258 Move note about Javadoc higher.
4259 (Java Semantic Values): Explicitly mention stype.
4260 Document that generic types cannot be used.
4261 (Java Location Values): Use @deftypeivar. Document constructors.
4262 Correct return value for toString.
4263 (Java Parser Interface): List undocumented constants/fields.
4264 Move documentation of fields added by %parse-param closer to list
4265 of members. Document that token names are added as fields.
4266 Document constructors accurately. Remove error method.
4267 (Java Scanner Interface): Move note on %pure-parser to Java Bison
4268 Interface. Describe %code lexer and yylex accutately.
4269 Remove documentation that does not match the code.
4270 (Java Action Features): New.
4271 (Java Differences): Add reference. Add item on semantic values.
4272 Add note about @{ ... @}. Clarify %% epilogue placement.
4273 (Java Declarations Summary): New.
4274
4275 Fix Java skeleton.
4276 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
4277 (b4_remove_comma): Quote test argument.
4278 (b4_identification): Remove "bison" field.
4279 * tests/java.at (Java parser class and package names): New test.
4280 (Java %parse-param and %lex-param): New test.
4281 (Java stype, position_class and location_class): New test.
4282
f259e4e6
PB
42832008-10-31 Di-an Jan <dianj@freeshell.org>
4284
4285 * data/lalr1.jave: Update copyright years.
4286 (YYParser): Correct name of "generated from" file in Javadoc:
4287 use b4_file_name instead of @ofile@.
4288 (Location constructor): Correct Javadoc parameter name.
4289 (yylloc): Add missing opening m4 quote after b4_location_if.
4290 This removes a stray [ in the Javadoc of Lexer.getStartPos.
4291 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
4292 (YYParser constructor): Correct Javadoc parameter name.
4293
cae5057f
JD
42942008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
4295
4296 Always put auxiliary code files in the same dir as other output files.
4297 * src/files.c (compute_file_name_parts): When the user specifies
4298 --output but not --file-prefix, extract the directory prefix from the
4299 file prefix not from the grammar file name. This affects the location
4300 of files like location.hh generated by the C++ skeleton. The includes
4301 in the other output files require this fix.
4302 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
4303 for expected output files.
4304 (Output files): Add a test for the above.
4305
4af432ba
JD
43062008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
4307
4308 * gnulib: Update submodule to HEAD.
4309
e26d4e43
JD
43102008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4311
4312 Update copyright year.
4313 * src/files.c: Here.
4314
c0ee9e21
DJ
43152008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
4316
4317 Don't overwrite the input file.
4318 * src/files.c (output_file_name_check): Fatal error if using input file
4319 for output.
4320 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
4321 argument.
4322 (Conflicting output files): Add test.
4323
482dc52f
AD
43242008-10-28 Akim Demaille <demaille@gostai.com>
4325
4326 Space changes.
4327 * data/lalr1.cc: Formatting changes.
4328
52cbbe84
AD
43292008-10-28 Akim Demaille <demaille@gostai.com>
4330
4331 Don't define debugging functions when !YYDEBUG.
4332 * data/lalr1.cc (debug_stream, set_debug_stream)
4333 (debug_level_type, debug_level, set_debug_level): Don't
4334 declare them when YYDEBUG is not defined.
4335 The implementation are already YYDEBUG-aware.
4336
0925d5bf
AD
43372008-10-28 Akim Demaille <demaille@gostai.com>
4338
4339 Prefer "continue" for empty loop bodies.
4340 * etc/bench.pl.in: Use "continue" instead of {}.
4341
cf98343c
AD
43422008-10-28 Akim Demaille <demaille@gostai.com>
4343
4344 Space and comments changes.
4345 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
4346 * data/c.m4, data/lalr1.cc: Space changes.
4347
9f467b7d
AD
43482008-10-28 Akim Demaille <demaille@gostai.com>
4349
4350 Make gnulib a submodule.
4351 * gnulib: New.
4352 * .gitmodules (gnulib): New.
4353
0f0e1ace
JD
43542008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4355
4356 Fix yyerror_range for user-defined location type in C++. Reported by
4357 Georg Sauthoff at
4358 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
4359 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
4360 * THANKS (Georg Sauthoff): Add.
4361
548e2104
JD
43622008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
4363
4364 Update several administrative files mainly to facilitate releasing.
4365 * HACKING (Administrivia): Make the git-merge-changelog notes more
4366 helpful.
4367 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
4368 (Release Procedure): Update for git and add numerous details that were
4369 previously missing.
4370 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
4371 * maint.mk (announcement): Don't list bison as a bootstrap tool so
4372 that announcements don't claim we bootstrapped with whatever bison
4373 happened to be in PATH. Add flex as a bootstrap tool.
4374 * Makefile.maint: Remove, previously replaced by maint.mk.
4375 * Makefile.cfg: Remove, and migrate settings to...
4376 * cfg.mk: ... here for the sake of `make announcement'.
4377 * bootstrap.conf (gnulib_modules): Add announce-gen.
4378 * README: Say GNU Bison instead of just Bison. Suggested by Karl
4379 Berry.
4380
ddf17a6e
PB
43812008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
4382
4383 Small but important bugfixes for the Java skeleton.
4384 * data/lalr1.java (yyerror): Change Location to b4_location_type.
4385 (yy_symbol_print): Call toString on yyvaluep.
4386
e1145ad8
AD
43872008-08-29 Akim Demaille <demaille@gostai.com>
4388
4389 Clarify UPDATED use.
215b40ac 4390 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 4391 not to the release date of Bison.
215b40ac 4392 Reported by Joel E. Denny.
e1145ad8 4393
0df72d78
AD
43942008-08-29 Akim Demaille <demaille@gostai.com>
4395
4396 * README: Update FAQ pointer.
4397 Reported by Joel E. Denny.
4398
9a90b6bb
EB
43992008-08-27 Eric Blake <ebb9@byu.net>
4400
4401 Resync m4sugar from autoconf.
4402 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
4403 (m4_init): Adjust to latest m4.git changes.
4404 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
4405 effects.
4406 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
4407 (_m4_list_cmp): Reduce side effects.
4408
65015668
AD
44092008-08-27 Akim Demaille <demaille@gostai.com>
4410
4411 Check yyerrok in calc.at.
215b40ac
EB
4412 * tests/calc.at (calc.y): Use yyerrok on "( error )".
4413 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
4414 expected.
65015668 4415
98e26a92
AD
44162008-08-27 Akim Demaille <demaille@gostai.com>
4417
4418 Support yyerrok in lalr1.cc.
4419 YYBACKUP is still to import back into lalr1.cc.
215b40ac 4420 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 4421
86c0e784
JD
44222008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4423
4424 For maintainer-check*, don't recompile for a $(VERSION) update.
4425 * cfg.mk: New file.
4426 (_is-dist-target): Override the one in GNUmakefile.
4427 * Makefile.am (EXTRA_DIST): Add cfg.mk.
4428
88511166
JD
44292008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
4430
4431 Update for recent change to gnulib.
4432 * src/parse-gram.y: Don't include strverscmp.h. It comes from
4433 string.h now.
4434
6bbb2ed5
EB
44352008-08-15 Eric Blake <ebb9@byu.net>
4436
d67c52e8
EB
4437 Remaining m4sugar merge from autoconf.
4438 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
4439 * data/m4sugar/foreach.m4: New file, copied from autoconf.
4440 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
4441 * src/output.c (output_skeleton): Tell m4 how to find it.
4442
6bbb2ed5
EB
4443 Partial m4sugar merge from autoconf: m4_map.
4444 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
4445 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
4446 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
4447 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
4448 for empty list.
4449 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
4450 Likewise.
4451 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
4452 declares it.
4453
8dce3875
JD
44542008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
4455
4456 Keep .version and PACKAGE_VERSION in sync.
4457 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
4458 dependency, and add comments justifying this in more detail. Discussed
4459 starting at
4460 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
4461
882a1fbf
EB
44622008-08-06 Eric Blake <ebb9@byu.net>
4463
a3764451
EB
4464 Partial m4sugar merge from autoconf: m4_shiftn.
4465 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
4466 (m4_shift2, m4_shift3): New macros.
4467 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
4468 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
4469 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
4470 * data/java.m4 (b4_remove_comma): Likewise.
4471
882a1fbf
EB
4472 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
4473 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
4474 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
4475 (m4_init): Consolidate wrapped text into single m4_wrap.
4476 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
4477 in wrapped text.
4478
a30e920d
EB
44792008-08-05 Eric Blake <ebb9@byu.net>
4480
dfcc5959
EB
4481 Partial m4sugar merge from autoconf: builtins, version.m4.
4482 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
4483 (m4_prepend): Remove, as it is unused and inherently quadratic,
4484 whereas m4_append is linear in newer m4.
4485 (m4_mkstemp): New builtin.
4486 (m4_symbols): Make rename conditional.
4487 (m4_version_prereq): Ensure fatal error if used in bison, which
4488 intentionally lacks version.m4.
4489
a30e920d
EB
4490 Fix comments in m4sugar.
4491 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
4492
445b7470
JD
44932008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4494
4495 Update for recent .gitignore fix in Gnulib.
4496 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
4497 anchored .gitignore entries.
4498
a1e50014
JD
44992008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4500
4501 Set gnu or gnits strictness.
4502 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
4503 development and gnits strictness for releases. Based on Eric Blake's
4504 suggestion at
4505 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
4506
d43f77e7
PB
45072008-07-31 Paolo Bonzini <bonzini@gnu.org>
4508
4509 * NEWS: Clarify documentation of %language.
4510
fee2ed87
PB
45112008-07-31 Paolo Bonzini <bonzini@gnu.org>
4512
4513 Support usage of git-merge-changelog.
4514 * .gitattributes: New.
4515 * HACKING: Document usage of git-merge-changelog.
4516 * bootstrap: Install git-merge-changelog entries in .git/config
4517 if appropriate.
4518
78029cd5
JD
45192008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4520
4521 Remove remaining dependence on CVS Id keyword.
4522 * ChangeLog: For the sake of people still using CVS, don't use dollars
4523 when mentioning Id.
4524 * data/xslt/bison.xsl: Remove Id from header comments, where it was
4525 unusual anyway.
4526 * data/xslt/xml2dot.xsl: Likewise.
4527 * data/xslt/xml2text.xsl: Likewise.
4528 * data/xslt/xml2xhtml.xsl: Likewise.
4529 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
4530 * doc/Makefile.am (neutralize): Remove, no longer needed.
4531 (.x.1): Don't use neutralize.
4532 (edit): Don't substitute for ID.
4533 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
4534
c53d18b1
JD
45352008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4536
4537 Fix dependence on computed configure variables.
4538 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
4539 $(top_srcdir)/configure.ac so that changes to computed variables, such
4540 as PACKAGE_VERSION, are seen.
4541 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
4542
5523ac79
JD
45432008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
4544
4545 Update copyright dates for recent changes.
4546 * Makefile.am: Here.
4547 * src/Makefile.am: Here.
4548 * src/reduce.c: Here.
4549 * tests/reduce.at: Here.
4550
8fa36911
JD
45512008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
4552
4553 Use git-version-gen for version names between releases.
4554 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
4555 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
4556 * .prev-version: New.
4557 * .version.in: Remove.
78029cd5 4558 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
4559 revision.
4560 * GNUmakefile: Remove, now copied from Gnulib.
4561 * Makefile.am: Add code suggested by comments in
4562 build-aux/git-version-gen.
4563 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
4564 .prev-version, and .version.
4565 * NEWS (2.3b+): Rename to...
4566 (?.?): ... this because we're dropping the "+" version naming scheme,
4567 but, in general, we still can't be sure of our next release name.
4568 * bootstrap: Add a quick hack to remove from .gitignore the
4569 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
4570 entry. This should really be fixed in gnulib instead.
4571 * bootstrap.conf (gnulib_modules): Add gnumakefile.
4572 * configure.ac (AC_INIT): Set version name by invoking
4573 build-aux/git-version-gen.
4574 (AC_CONFIG_FILES): Remove .version, now generated by
4575 build-aux/git-version-gen.
4576 * maint.mk: New, copied from coreutils.
4577 * doc/.cvsignore (bison.1): Add.
4578 * doc/.gitignore (/bison.1): Add.
4579 * doc/bison.1: Remove, generated.
4580 * src/.cvsignore (revision.c): Remove.
4581 * src/.gitignore (/revision.c): Remove.
4582 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
4583 (BUILT_SOURCES): Remove revision.c.
4584 (revision.c): Remove.
4585 * src/getargs.c (version): Don't print revision after the VERSION.
4586 * src/revision.h: Remove.
4587
bcf07cb7
JD
45882008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4589
4590 Fix untranslatable composition of sentences. Reported by Goran
4591 Uddeborg at
4592 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
4593 * THANKS (Goran Uddeborg): Add.
4594 * src/reduce.c (reduce_print): Report the number of nonterminals and
4595 rules useless in the grammar in separate sentences.
4596 * tests/reduce.at (Useless Rules): Update output.
4597 (Reduced Automaton): Likewise.
4598 (Underivable Rules): Likewise.
4599 (Empty Language): Likewise.
4600
9aacab9a
JD
46012008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4602
4603 Fix some .gitignore and .cvsignore problems.
4604 * bootstrap (insert_sorted_if_absent): Replace all uses with...
4605 (insert_vc_ignore): ... this new function, which prepends `/' to all
4606 .gitignore entries before passing them to insert_sorted_if_absent.
4607 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
4608 .cvsignore files are maintained even though Bison developers run
4609 bootstrap while using Git.
4610 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
4611 unneeded by Bison.
4612 (gnulib): Add.
4613 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
4614 unneeded. Reported by Eric Blake.
4615 * lib/.gitignore (/*~): Add.
4616 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
4617 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
4618 Blake.
4619 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
4620
a9fc7990
JD
46212008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4622
4623 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
4624 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
4625 * bootstrap.conf (gnulib_modules): Add unsetenv.
4626 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
4627 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
4628 (/setenv.m4): Add.
4629 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
4630 the first argument because it may become position-dependent, and unset
4631 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
4632 Add comments explaining these issues in more detail.
4633
0f1d6f10
JD
46342008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
4635
4636 Add .gitignore everywhere based on .cvsignore.
4637 * .gitignore: New.
4638 * build-aux/.gitignore: New.
4639 * data/.gitignore: New.
4640 * doc/.gitignore: New.
4641 * etc/.gitignore: New.
4642 * examples/.gitignore: New.
4643 * examples/calc++/.gitignore: New.
4644 * lib/.gitignore: New.
4645 * m4/.gitignore: New.
4646 * po/.gitignore: New.
4647 * runtime-po/.gitignore: New.
4648 * src/.gitignore: New.
4649 * tests/.gitignore: New.
4650
7bd1665a
JD
46512008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4652
4653 * NEWS (2.3b+): New section, empty for now.
4654 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
4655
72c5b982
JD
46562008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4657
4658 * NEWS (2.3b): Update release date since there has been a delay in
4659 getting the announcements and tarballs out.
4660
bd02cd5d
JD
46612008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4662
4663 * NEWS: Version 2.3b.
4664 * configure.ac (AC_INIT): Likewise.
4665 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
4666
9126263e
JD
46672008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4668
4669 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
4670 been doing it for years.
4671 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
4672 (Release Procedure): Add FIXME about make alpha being unmaintained.
4673
fa6aa7b3
JD
46742008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
4675
4676 * data/yacc.c: Reformat m4 a little for readability.
4677 * src/lalr.c (build_relations): Correct comment.
4678
d30b312d
JMG
46792008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4680
4681 DJGPP specific issue.
4682 * djgpp/config.sed: Fixes required to run configure scripts generated
4683 by autoconf 2.62.
4684
138d4cd9
JD
46852008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4686
4687 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
4688 coordinator@translationproject.org.
4689
8f7e2e1f
JD
46902008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4691
4692 * THANKS: Add Eric Blake.
4693
f55efa38
JD
46942008-04-23 Eric Blake <ebb9@byu.net>
4695
4696 Revert prior patch, by working around autoconf regression.
4697 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
4698 ("Output file name: ("): Uncomment test.
4699 ("Output file name: )"): Likewise.
4700 Based on an idea from Noah Misch.
4701
096c9f9d
JD
47022008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4703
4704 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
4705 2.61. Reported by Juan Manuel Guerrero at
4706 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
4707 * tests/output.at ("Output file name: ("): Comment out test case for
4708 now.
4709 ("Output file name: )"): Likewise.
4710
0f664b89
JD
47112008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4712
4713 * GNUmakefile: Update git-version-gen invocation so make dist
4714 succeeds.
4715
1cfe6375
JD
47162008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4717
4718 Update to the current gnulib CVS repository, and fix trigraph handling
4719 in Bison.
4720 * bootstrap: Update gnulib CVS repository URL.
4721 (symlink_to_dir): Encapsulate the code that guarantees the destination
4722 directory exists into...
4723 (check_dst_dir): ... this new function, and...
4724 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
4725 fail when copying files into lib/uniwidth/.
4726 * src/output.c (prepare_symbols): When writing yytname muscles, where
4727 symbol names will be encoded in C-string literals, tell quotearg to
4728 escape trigraphs. This used to be the default in gnulib.
4729 * tests/regression.at (Token definitions): Because of the change in
4730 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
4731 escapes trigraphs in symbol names. Thus, yytname no longer has
4732 trigraphs unnecessarily doubly escaped. Update test case output.
4733 Extend test case to be sure Bison's own error messages will no longer
4734 have trigraphs in symbol names unnecessarily escaped once.
4735
74c52fc8
JD
47362008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
4737
4738 Fix make dist infinite loop reported by Juan Manuel Guerrero at
4739 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
4740 * .cvsignore: Add .version.
4741 * .version.in: New.
4742 * bootstrap.conf (gnulib_modules): Add git-version-gen.
4743 * configure.ac (AC_CONFIG_FILES): Add .version.
4744 * build-aux/.cvsignore: Add git-version-gen.
4745
8e55b3aa
JD
47462008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4747
4748 * NEWS (2.3a+): Mention that -g now takes an argument.
4749 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
4750 consistency. Update the -g and -x entries now that they take
4751 arguments. Use brackets to indicate optional arguments.
4752 * src/getargs.c (usage): Explain the relationship between arguments of
4753 long and short options more completely. Document --defines and -d
4754 separately since the former takes an argument but, for POSIX Yacc, the
4755 latter does not.
4756 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 4757 (getargs): Sort cases.
8e55b3aa 4758
59c5ac72
AD
47592008-02-28 Akim Demaille <demaille@gostai.com>
4760
4761 * doc/bison.texinfo: Fix a few typos.
4762
118d4978
AD
47632008-02-28 Akim Demaille <akim@epita.fr>
4764
4765 * doc/bison.texinfo (Bison Options): Document -W.
4766 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
4767
7020f1e9
AD
47682008-02-28 Akim Demaille <akim@epita.fr>
4769
4770 * src/getargs.c (short_options): Split and sort for readability.
4771 -g and -x take optional arguments, just like their long options.
4772 * build-aux/cross-options.pl: Use /x to make the regexp easier to
4773 understand.
4774 Fix the handling of $opt which resulted in all the argument to be
4775 considered as optional.
4776
59da312b
JD
47772008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
4778
4779 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
4780 say its interface is experimental.
4781 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4782 Java.
4783 (Bison Options): In the -L and --language entry, mention Java.
4784 (Java Bison Interface): Say the interface is experimental.
4785 * src/getargs.c (usage): Mention -L and --language.
4786
4787 * NEWS (2.3a+): Say the push parsing interface is experimental.
4788 * doc/bison.texinfo (Push Decl): Likewise.
4789 (Decl Summary): Likewise in the "%define api.push_pull" entry.
4790 (Push Parser Function): Likewise.
4791 (Pull Parser Function): Likewise.
4792 (Parser Create Function): Likewise.
4793 (Parser Delete Function): Likewise.
4794 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
4795 yypull_parse, and yypush_parse entries.
4796
4797 * NEWS (2.3a+): Mention XML support, and say the schema is
4798 experimental.
4799 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
4800 * src/getargs.c (usage): Say the XML schema is experimental.
4801
4802 * NEWS (2.3a+): Say option instead of flag.
4803
2bb3ebec
WP
48042008-02-21 Wojciech Polak <polak@gnu.org>
4805
4806 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
4807 text.
4808
333e670c
JD
48092008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
4810
4811 Fix impure push parser compile error reported by Bob Rossi at
4812 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
4813 * data/yacc.c: Clean up whitespace in the output a little.
4814 (yypstate_allocated): Define for impure push parsers regardless of
4815 whether the pull interface is also requested.
4816 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
4817 check impure push parsers without the pull interface.
4818
4819 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
4820 yyerror takes arguments specified by %parse-param while yypstate_new
4821 does not.
4822 * doc/bison.texinfo (Parser Create Function): Document that
4823 yypstate_new returns 0 for multiple impure parser instances.
4824 * tests/push.at (Push Parsing: Multiple impure instances): Update
4825 expected stderr output.
4826
798096e1
JD
48272008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4828
4829 * runtime-po/POTFILES.in (push.c): Remove.
4830
9ca7f077
JD
48312008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4832
4833 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
4834 * data/push.c: Rename to...
4835 * data/yacc.c: ... this, overwriting it.
4836 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
4837 `%push-pull-parser' -> `%define api.push_pull "both"'.
4838 Remove old yacc.c tests, and update push.c tests to yacc.c.
4839
42ee26bb
JD
48402008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4841
4842 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
4843 `"%code top" blocks' instead of `%code "top" blocks'.
4844 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
4845 Clean up whitespace in the output a little.
4846
b1cc23c4
JD
48472008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4848
4849 Fix documentation problems reported by Tim Josling at
4850 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
4851 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
4852 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
4853 integers. Explain the effect of literal string aliases on error
4854 messages. Copy token 0 documentation from the C++ skeleton
4855 documentation.
4856
ab7f29f8
JD
48572008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4858
4859 Accept a token number in a %left, %right, or %nonassoc for POSIX
4860 conformance. Reported by Tim Josling at
4861 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
4862 * NEWS (2.3a+): Mention.
4863 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
4864 and code numbers are treated by precedence declarations.
4865 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
4866 of symbols.1.
4867 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
4868 of symbol.
4869 (symbol.prec): New, just like symbol but allows INT.
4870 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
4871 longer holds.
4872 * tests/regression.at (Token number in precedence declaration): New
4873 test case.
4874
a924ef36
JMG
48752008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4876
4877 DJGPP specific issues.
4878 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
4879 be changed. Copyright timestamp adjusted.
4880 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
4881 be changed. Copyright timestamp adjusted.
4882 * djgpp/config.site: Copyright timestamp adjusted.
4883 * djgpp/config_h.sed: Copyright timestamp adjusted.
4884 * djgpp/djunpack.bat: Copyright timestamp adjusted.
4885 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
4886 filename translation list.
4887 * djgpp/subpipe.c (init_subpipe): Check the environment variables
4888 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
4889 files shall be created. Before trying to use the temp dir where the
4890 environment variable points to check that the dir really exists. If
4891 not default to the cwd as temp dir. Copyright timestamp adjusted.
4892 * djgpp/subpipe.h: Copyright timestamp adjusted.
4893 * djgpp/testsuite.sed: Copyright timestamp adjusted.
4894
389c8cfd
PE
48952008-01-30 Paul Eggert <eggert@cs.ucla.edu>
4896
4897 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
4898
5d1cfef4
PE
48992008-01-09 Paul Eggert <eggert@cs.ucla.edu>
4900
4901 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
4902 Problem reported by Claudio Saavedra in
4903 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
4904
e2dcf996
WP
49052008-01-05 Wojciech Polak <polak@gnu.org>
4906
4907 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
4908 document's title with the input grammar file name.
4909
da730230
JD
49102007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
4911
4912 Automate regression testing of the XML/XSLT implementation. Discussed
4913 starting at
4914 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
4915 * configure.ac (XSLTPROC): New substitution.
4916 * Makefile.am (maintainer-xml-check): New phony target invoking...
4917 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
4918 invoking make maintainer-check with BISON_TEST_XML=1.
4919 * tests/atlocal.in (XSLTPROC): New.
4920 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
4921 not to report reachable memory when Bison is expected to have a
4922 non-zero exit status and (2) to compare XML/XSLT output with --graph
4923 and --report=all output for every working grammar when
4924 BISON_TEST_XML=1.
4925 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
4926 (AT_BISON_CHECK_XML): New.
4927 (AT_QUELL_VALGRIND): New.
4928 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
4929 (AT_CHECK): ... don't redefine this since this was the old way to
4930 quell Valgrind.
4931 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4932 AT_BISON_CHECK invocations.
4933 * tests/c++.at: Likewise.
4934 * tests/calc.at: Likewise.
4935 * tests/conflicts.at: Likewise.
4936 * tests/cxx-type.at: Likewise.
4937 * tests/existing.at: Likewise.
4938 * tests/glr-regression.at: Likewise.
4939 * tests/headers.at: Likewise.
4940 * tests/input.at: Likewise.
4941 * tests/java.at: Likewise.
4942 * tests/output.at: Likewise.
4943 * tests/push.at: Likewise.
4944 * tests/reduce.at: Likewise.
4945 * tests/regression.at: Likewise.
4946 * tests/sets.at: Likewise.
4947 * tests/skeletons.at: Likewise.
4948 * tests/synclines.at: Likewise.
4949 * tests/torture.at: Likewise.
4950 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4951 tends to hang xsltproc.
4952 (Big horizontal): Likewise.
4953
408476bc
JD
49542007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4955
4956 In XML output, remove redundant class attribute on symbol element.
4957 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4958 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4959 look up a symbol to determine whether it's a nonterminal or terminal.
4960 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4961 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4962
4963 Add prec/assoc information to XML output.
4964 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4965 %prec, add a percent_prec attribute.
4966 * src/print-xml.c (print_grammar): For each terminal that has a
4967 precedence or associativity, add a prec or assoc attribute.
4968 (xml_indent): New.
4969 (xml_puts): Use xml_indent.
4970 (xml_printf): Use xml_indent.
4971 * src/print-xml.h (xml_indent): Prototype.
4972
4973 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4974 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4975
d4a26c48
JD
49762007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4977
4978 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4979 (bison:ruleByNumber): ... this for clarity.
4980 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4981 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4982 (xsl:template match="reduction"): Update.
4983 (xsl:template match="item"): Update.
4984 (xsl:template match="reduction"): Update.
4985
4986 In the XML output, don't print the list of rules where symbols appear.
4987 Compute it in XSLT instead. Discussed at
4988 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4989 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4990 (bison:ruleByRhs): New.
4991 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4992 bison:ruleByRhs.
4993 (xsl:template match="terminal/rule"): Remove.
4994 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4995 bison:ruleByRhs.
4996 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4997 Remove.
4998 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4999 bison:ruleByRhs and mode="number-link" for rule template.
5000 (xsl:template match="terminal/rule"): Remove.
5001 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
5002 bison:ruleByRhs and mode="number-link" for rule template.
5003 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
5004 Rewrite as...
5005 (xsl:template match="rule" mode="number-link"): ... this.
5006 * src/print-xml.c (print_grammar): Don't print the list of rules.
5007
ef1b4273
JD
50082007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
5009
5010 Don't let --report affect XML output; always print all information.
5011 Discussed at
5012 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
5013 * src/conflicts.c (log_resolution): Implement.
5014 * src/print-xml.c (print_core): Implement.
5015 (print_state): Implement.
5016 (print_xml): Implement.
5017
5018 * NEWS (2.3a+): Fix quotes.
5019 * src/parse-gram.y (prologue_declaration): For consistency with -v,
5020 don't let %verbose clear the list specified by --report.
5021
0f6cd9e3
AD
50222007-11-26 Akim Demaille <akim@epita.fr>
5023
5024 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
5025
d80fb37a
JD
50262007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
5027
5028 In the XML output, list useless and unused symbols and rules with the
5029 useful ones and add a "usefulness" attribute. Discussed starting at
5030 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
5031 * src/gram.c (grammar_rules_partial_print_xml): Remove.
5032 (grammar_rules_print_xml): Print all rules instead of just those
5033 useful in the grammar, and add a "usefulness" attribute.
5034 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
5035 * src/print-xml.c (print_rules_useless_in_parser): Remove.
5036 (print_grammar): Print all nonterminals instead of just useful ones,
5037 and add a "usefulness" attribute to nonterminals and terminals.
5038 (print_xml): Don't print a separate "reductions" or
5039 "rules-useless-in-parser" element.
5040 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
5041 (reduce_xml): Remove.
5042 (reduce_token_unused_in_grammar): New.
5043 (reduce_nonterminal_useless_in_grammar): New.
5044 * src/reduce.h (reduce_xml): Remove prototype.
5045 (reduce_token_unused_in_grammar): Add prototype.
5046 (reduce_nonterminal_useless_in_grammar): Add prototype.
5047 * data/xslt/xml2text.xsl: Update for XML changes.
5048 * data/xslt/xml2xhtml.xsl: Update for XML changes.
5049 * tests/reduce.at (Useless Terminals): Update output.
5050 (Useless Rules): Update output.
5051 (Reduced Automaton): Update output.
5052
5053 Say "Terminals unused in grammar" instead of "Unused terminals".
5054 * NEWS (2.3a+): Update.
5055 * doc/bison.texinfo (Understanding): Update example output.
5056 * src/reduce.c (reduce_output): Implement.
5057 * data/xslt/xml2text.xsl: Implement.
5058 * data/xslt/xml2xhtml.xsl: Implement.
5059
1bb2bd75
JD
50602007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
5061
5062 Accept --report-file=FILE to override the default `.output' filename.
5063 * NEWS (2.3a+): Mention.
5064 * doc/bison.texinfo (Bison Options): Add an entry.
5065 * src/files.c (compute_output_file_names): Don't override
5066 spec_verbose_file if already set.
5067 * src/getargs.c (usage): Document --report-file.
5068 (REPORT_FILE_OPTION): New anonymous enum member.
5069 (long_options): Add entry for it.
5070 (getargs): Add case for it setting spec_verbose_file.
5071
5072 * build-aux/cross-options.pl: Don't record a short option just because
5073 there's an arg.
5074 * doc/.cvsignore: Add yacc.1.
5075
a005a9c4
AD
50762007-11-14 Akim Demaille <akim@epita.fr>
5077
5078 * doc/yacc.1.in: New.
5079 * configure.ac, doc/Makefile.am: Adjust.
5080 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
5081 config.h symbol.
5082 Use AC_SUBST for assignments too.
5083 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
5084
cff03fb2
JD
50852007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
5086
5087 * src/gram.c: Remove comments that duplicate comments in gram.h.
5088
5089 When reporting useless rules and nonterminals, say "useless in grammar"
5090 instead of "useless", and say "useless in parser" instead of "never
5091 reduced". Discussed starting at
5092 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
5093 * NEWS (2.3a+): Mention this change.
5094 * data/xslt/xml2text.xsl: Update output text and expected input XML
5095 element names to match changes below.
5096 * data/xslt/xml2xhtml.xsl: Likewise.
5097 (xsl:template match="bison-xml-report"): Add missing entry in Table of
5098 Contents: "Rules useless in parser due to conflicts".
5099 * doc/bison.texinfo (Decl Summary): Reword a little.
5100 (Understanding): Update example output for changes below.
5101 * src/gram.c: (rule_useful_p): Rename to...
5102 (rule_useful_in_grammar_p): ... this.
5103 (rule_useless_p): Rename to...
5104 (rule_useless_in_grammar_p): ... this.
5105 (rule_never_reduced_p): Rename to...
5106 (rule_useless_in_parser_p): ... this.
5107 (grammar_rules_print): Update for renames.
5108 (grammar_rules_print_xml): Update for renames.
5109 (grammar_rules_never_reduced_report): Rename to...
5110 (grammar_rules_useless_report): ... this since it is used for either
5111 kind of useless rule.
5112 * src/gram.h: Reword comments and update function names in prototypes.
5113 * src/main.c (main): Say "rule useless in parser due to conflicts".
5114 * src/print-xml.c (print_rules_never_reduced): Rename to...
5115 (print_rules_useless_in_parser): ... this, and rename output XML
5116 element "rules-never-reduced" to "rules-useless-in-parser".
5117 (print_xml): Update for rename.
5118 * src/print.c (print_results): Say "Rules useless in parser due to
5119 conflicts".
5120 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
5121 (nonterminals_reduce): Say "nonterminal useless in grammar".
5122 (reduce_output): Say "Nonterminals useless in grammar".
5123 Say "Rules useless in grammar".
5124 (reduce_xml): Rename output XML element "useless" to
5125 "useless-in-grammar".
5126 (reduce_print): Don't report the count of grammatically useless rules
5127 as "rules never reduced" just because %yacc is specified.
5128 In the correct report of this count, say nonterminal(s) and rule(s)
5129 "useless in grammar".
5130 * tests/conflicts.at (S/R in initial): Update expected output.
5131 (Defaulted Conflicted Reduction): Likewise.
5132 (Unreachable States After Conflict Resolution): Likewise.
5133 * tests/existing.at (GNU pic Grammar): Likewise.
5134 * tests/reduce.at (Useless Nonterminals): Likewise.
5135 (Useless Rules): Likewise.
5136 (Reduced Automaton): Likewise.
5137 (Underivable Rules): Likewise.
5138 (Empty Language): Likewise.
5139
66f0441d
JD
51402007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
5141
5142 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
5143 here document and before the EOF so that BSD's implementation of Bourne
5144 shell doesn't parse the delimiter as part of the here document.
5145 * doc/.cvsignore: Add cross-options.texi.
5146 * src/getargs.c (usage): Add a blank line after the warning categories.
5147
d0ee4105
PB
51482007-11-08 Paolo Bonzini <bonzini@gnu.org>
5149
5150 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
5151
e8b1fb9b
AD
51522007-11-05 Akim Demaille <akim@epita.fr>
5153
5154 Remove Id: from bison.1.
5155 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
5156 (perl -0777 -pi -e 's/\.PP\nId): New.
5157 (.x.1): Use it to ignore the version control revision.
5158
2f7a96b5
AD
51592007-11-05 Akim Demaille <demaille@gostai.com>
5160
5161 * build-aux/Makefile.am: Ship cross-options.pl.
5162 * doc/Makefile.am: Always refer to cross-options.texi with
5163 $(srcdir).
5164 (MAINTAINERCLEANFILES): Add it.
5165
f4101aa6
AD
51662007-11-04 Akim Demaille <demaille@gostai.com>
5167
5168 Generate the long/short option cross-table.
5169 * build-aux/cross-options.pl: New.
5170 * doc/Makefile.am (cross-options.texi): New.
5171 * doc/bison.texinfo: Use it.
5172
727a1401
AD
51732007-11-04 Akim Demaille <demaille@gostai.com>
5174
5175 Generate bison.1 using help2man.
5176 * doc/common.x, doc/bison.x: New.
5177 * doc/Makefile.am (bison.1, .x.1): New.
5178 The code is taken from autoconf-2.61/man/Makefile.am.
5179 * configure.ac: Look for help2man.
5180
6aeb9c57
AD
51812007-11-04 Akim Demaille <demaille@gostai.com>
5182
5183 Complete --help.
5184 * src/getargs.c (usage): Document -W, make it clear that -d,
5185 -g and -x have optional arguments.
5186
d7be4085
AD
51872007-11-04 Akim Demaille <demaille@gostai.com>
5188
5189 Find sha1sum when named gsha1sum.
5190 * bootstrap (find_tool): New.
5191 ($SHA1SUM): New.
5192
d9df47b6
JD
51932007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5194
5195 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
5196 at
5197 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
5198 * NEWS (2.3a+): Mention.
5199 * data/bison.m4 (b4_pure_if): Don't define it here.
5200 * data/c.m4 (b4_identification): Depend on individual skeletons to
5201 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
5202 values of the %define variables api.pure or api.push_pull. Define
5203 YYPURE, YYPUSH, and YYPULL accordingly.
5204 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
5205 glr.cc has already defined b4_pure_flag.
5206 * data/push.c: Define b4_pure_if based on `%define api.pure'.
5207 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 5208 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
5209 * doc/bison.texinfo (Pure Decl): Update.
5210 (Push Decl): Update.
5211 (Decl Summary): Add api.pure to %define entry.
5212 In %pure-parser entry, say it's deprecated and reference %define.
5213 (Pure Calling): Update.
5214 (Error Reporting): Update.
5215 (C++ Scanner Interface): Update.
5216 (How Can I Reset the Parser): Update.
5217 (Table of Symbols): In %pure-parser entry, say it's deprecated and
5218 reference %define.
5219 * src/getargs.c (pure_parser): Remove global variable.
5220 * src/getargs.h (pure_parser): Remove extern.
5221 * src/output.c (prepare): Don't define pure_flag muscle.
5222 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
5223 wrapper around `%define api.pure'.
5224 * tests/calc.at (Simple LALR Calculator): Update.
5225 (Simple GLR Calculator): Update.
5226 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
5227 Update.
5228 (GLR: Resolve ambiguity, pure, locations): Update.
5229 (GLR: Merge conflicting parses, pure, no locations): Update.
5230 (GLR: Merge conflicting parses, pure, locations): Update.
5231 * tests/glr-regression.at (Uninitialized location when reporting
5232 ambiguity): Update
5233 * tests/input.at (Unused %define api.pure): New test case.
5234 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
5235 AT_PURE_IF and AT_PURE_AND_LOC_IF.
5236 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5237
c373bf8b
JD
52382007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
5239
5240 %define push_pull -> %define api.push_pull. Discussed starting at
5241 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
5242 * data/push.c: Expect the new name.
5243 * data/yacc.c: Likewise.
5244 * doc/bison.texinfo (Push Decl): Update.
5245 (Decl Summary): Update %define entry.
5246 (Push Parser Function): Update.
5247 (Pull Parser Function): Update.
5248 (Parser Create Function): Update.
5249 (Parser Delete Function): Update.
5250 * tests/calc.at (Simple LALR Calculator): Update.
5251 * tests/input.at (%define enum variables): Update.
5252 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
5253 (Push Parsing: Multiple impure instances): Update.
5254 (Push Parsing: Unsupported Skeletons): Update.
5255 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
5256 (Exploding the Stack Size with Malloc): Update.
5257
5258 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
5259 other entries some.
5260
32f19b6b
JD
52612007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
5262
5263 For the XML output's terminal element, rename @number to @token-number,
5264 and add @symbol-number. In the nonterminal element, rename @number to
5265 @symbol-number. Discussed starting at
5266 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
5267 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
5268 renames.
5269 (xsl:template match="nonterminal"): Likewise.
5270 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
5271 (xsl:template match="nonterminal"): Likewise.
5272 * src/print-xml.c (print_grammar): Implement.
5273
255a6b90
JD
52742007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
5275
5276 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
5277 2007-10-11 change, the child elements here are items not rules.
408476bc 5278 (xsl:template match="item"): New.
255a6b90
JD
5279 (xsl:template match="rule"): Update for new reduced itemset.
5280 (xsl:template match="point"): Remove.
5281 (xsl:template match="empty"): For consistency with --graph, don't
5282 output "/* empty */".
5283 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
5284 line-wrap, don't pass a negative value as first-line-length since this
5285 won't work with the following changes.
5286 (xsl:template name="line-wrap"): Simplify slightly.
5287 (xsl:template name="ws-search"): Eliminate recursion.
5288 * src/print_graph.c (print_core): Don't print a reduction's lookahead
5289 set next to an item whose dot is not at the end of the RHS even if it
5290 happens to be associated with the same rule.
5291
88c78747
JD
52922007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5293
31984206
JD
5294 Add %define lr.keep_unreachable_states.
5295 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
5296 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
5297 * src/main.c (main): Implement it.
5298 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5299 Extend to test it, and fix a typo.
5300
53012007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
5302
5303 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
5304 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
5305 the example .output text.
5306 * tests/regression.at (Extra lookahead sets in report): Improve wording
5307 of comments.
5308
b7a70162
WP
53092007-10-17 Wojciech Polak <polak@gnu.org>
5310
5311 * src/print-xml.c (print_grammar): Renamed
5312 <terminal> and <nonterminal> attributes:
5313 "type" to "number" and "symbol" to "name".
5314 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
5315 Use new attribute names.
5316 (xsl:template match="nonterminal"): Likewise.
5317 * data/xslt/xml2xhtml.xsl: Likewise.
5318
a0de5091
JD
53192007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
5320
5321 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
5322 (Option Cross Key): Likewise.
5323
5324 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
5325 next to an item whose dot is not at the end of the RHS even if it
5326 happens to be associated with the same rule.
5327 * src/print.c (print_core): Likewise.
5328 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
5329 (Resolved SR Conflicts): Update output.
5330 * tests/regression.at (Extra lookahead sets in report): New test case.
5331
4c20d18d
WP
53322007-10-11 Wojciech Polak <polak@gnu.org>
5333
5334 * src/print-xml.c (print_core): Remove item set
5335 redundancy.
5336 * data/xslt/bison.xsl (bison:ruleNumber): New key.
5337 Improve processing time. Suggested by Joel E. Denny.
5338 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
5339 Write xsl:param "required" attribute as comment.
5340 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
5341 (xsl:template match="rule"): Support new reduced itemset.
5342 (xsl:template match="point"): Remove.
5343 * data/xslt/xml2xhtml.xsl: Likewise.
5344
f506ad1c
JD
53452007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5346
5347 * src/getargs.c (version): Update copyright year.
5348
21f1b063
JD
53492007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
5350
5351 Make xml2dot.xsl and --graph produce the same output.
5352 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
5353 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
5354 escaped later.
5355 (xsl:template name="output-node"): Use the new escape template instead
5356 of the string-replace template directly.
5357 (xsl:template name="output-edge"): Likewise.
5358 (xsl:template name="escape"): New, escapes backslashes and newlines in
5359 addition to quotation marks.
5360 * src/graphviz.c (start_graph, output_node, output_edge): Add
5361 whitespace to output for legibility.
5362
5363 Make xml2text.xsl and --report produce the same output, and remove the
5364 XML "conflicts" element since a conflict summary is easily extracted
5365 from the automaton.
5366 * data/xslt/bison.xsl: New.
5367 (xsl:template match="state" mode="bison:count-conflicts): New.
5368 * data/xslt/xml2text.xsl: Import bison.xsl.
5369 (xsl:template match="bison-xml-report"): Instead of styling the
5370 "conflicts" element, style the "automaton" element with mode
5371 "conflicts". Unlike the former, the latter lists S/R and R/R
5372 conflicts for a state on the same line.
5373 (xsl:template match="conflicts"): Remove.
5374 (xsl:template match="conflict"): Remove.
5375 (xsl:template match="terminal"): Line-wrap the list of rules in which
5376 the terminal is used.
5377 (xsl:template match="nonterminal"): Likewise for nonterminals.
5378 (xsl:template match="automaton" mode="conflicts"): New.
5379 (xsl:template match="state" mode="conflicts"): New.
5380 (xsl:template name="line-wrap"): New.
5381 (xsl:template name="ws-search"): New.
5382 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
5383 (xsl:template match="bison-xml-report"): Instead of styling the
5384 "conflicts" element, style the "automaton" element with mode
5385 "conflicts."
5386 (xsl:template match="conflicts"): Remove.
5387 (xsl:template match="conflict"): Remove.
5388 (xsl:template match="automaton" mode="conflicts"): New.
5389 (xsl:template match="state" mode="conflicts): New.
5390 * src/conflicts.c (conflicts_output_xml): Remove.
5391 * src/conflicts.h (conflicts_output_xml): Remove prototype.
5392 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
5393 * src/print.c (print_grammar): Consistently wrap at the 66th column so
5394 the corresponding XSLT is easier. Also, never wrap between a word and
5395 the comma that follows it.
5396
793fbca5
JD
53972007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5398
5399 Improve C++ namespace support. Discussed starting at
5400 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
5401 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
5402 b4_namespace_close): New macros that interpret the %define variable
5403 "namespace" so its value can contain "::" to indicate nested
5404 namespaces.
5405 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
5406 the above macros.
5407 * data/lalr1.cc (b4_namespace): Likewise.
5408 * data/location.cc (b4_namespace): Likewise.
5409 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
5410 inside a new table in the general %define entry. Document `%define
5411 namespace' there as well. Point the %name-prefix entry to it since it
5412 explains it more completely in the case of C++.
5413 (C++ Bison Interface): Mention `%define namespace' instead of
5414 %name-prefix.
5415 (Table of Symbols): Remove the `%define push_pull' entry. The %define
5416 entry suffices.
5417 * tests/c++.at (Relative namespace references): New test case.
5418 (Absolute namespace references): New test case.
5419 (Syntactically invalid namespace references): New test case.
5420 * tests/input.at (C++ namespace reference errors): New test case.
5421
35b8730d
JD
54222007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
5423
5424 Add syncline support and location accessor to internal %define
5425 interfaces.
5426 * data/bison.m4 (b4_percent_define_get_loc): New.
5427 (b4_percent_define_get_syncline): New.
5428 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
5429 (b4_percent_define_default): Record defining location as line 1 rather
5430 than 0 for the sake of synchronizing #line's, and define
5431 b4_percent_define_syncline(VARIABLE).
5432 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
5433 * src/muscle_tab.c (muscle_syncline_grow): New.
5434 (muscle_code_grow): Use muscle_syncline_grow.
5435 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
5436 define b4_percent_define_syncline(VARIABLE).
5437 (muscle_percent_define_get_loc): New.
5438 (muscle_percent_define_get_syncline): New.
5439 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
5440 remove some unused variables.
5441 (muscle_percent_define_default): Record defining location as line 1
5442 rather than 0 for the sake of synchronizing #line's, and define
5443 b4_percent_define_syncline(VARIABLE).
5444 (muscle_percent_define_check_values): Use
5445 muscle_percent_define_get_loc.
5446 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
5447 (muscle_percent_define_get_syncline): Prototype.
5448 * tests/skeletons.at (%define Boolean variables: invalid skeleton
5449 defaults): Update output for location change.
5450 (Complaining during macro argument expansion): Extend to test
5451 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
5452
7dc4a694
JD
54532007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
5454
5455 Fix some error-reporting macro bugs.
5456 * data/bison.m4 (b4_cat): New.
5457 (b4_error, b4_error_at): Use b4_cat to send error directives directly
5458 to stdout so they don't become arguments to other macros. Update
5459 comments and add examples.
5460 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
5461 add examples.
5462 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
5463 after printing the error directive so that M4 doesn't report subsequent
5464 problems that are induced by this problem.
5465 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
5466 instead of just in them. Recognize @\n in both places. Both expand to
5467 the empty string. Needed by b4_cat.
5468 * tests/skeletons.at (Complaining during macro argument expansion):
5469 New test case.
5470 (Fatal errors make M4 exit immediately): New test case.
5471
d4bd2295
JD
54722007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
5473
5474 Implement --print-datadir.
5475 * src/getargs.c (usage): Mention.
5476 (PRINT_DATADIR_OPTION): New anonymous enum member.
5477 (long_options): Add entry for it.
5478 (getargs): Add case for it calling compute_pkgdatadir.
5479 * src/output.c (output_skeleton): Encapsulate data directory
5480 computation from here...
5481 (prepare): ... and from here...
5482 (compute_pkgdatadir): ... into this new function.
5483 * src/output.h (compute_pkgdatadir): Prototype.
5484
34cdeddf
JD
54852007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
5486
5487 * src/print-xml.c (escape_bufs): New static global variable
5488 replacing...
5489 (xml_escape_n): ... the static local variable buf here.
5490 (print_xml): Free memory for escape_bufs.
5491 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
5492
d782395d
JD
54932007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
5494
5495 Replace `%push-parser' and `%push-pull-parser' with
5496 `%define push_pull "push"' and `%define push_pull "both"'.
5497 `%define push_pull "pull"' is the default.
5498 * doc/bison.texinfo (Push Decl, Push Parser Function,
5499 Pull Parser Function, Parser Create Function, Parser Delete Function):
5500 Update declarations.
5501 (Decl Summary, Table of Symbols): Replace %push-parser and
5502 %push-pull-parser entries with a %define push_pull entry.
5503 * data/bison.m4 (b4_percent_define_check_values): New macro.
5504 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
5505 definitions...
5506 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
5507 definitions...
5508 * data/push.c: ... to here and compute them from the value of the
5509 %define variable push_pull.
5510 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
5511 parsing requests here...
5512 * data/yacc.c: ... hack this to switch to push.c any time
5513 b4_use_push_pull_flag or the %define variable push_pull is set. This
5514 will go away when we mv push.c yacc.c.
5515 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
5516 push parsing is not supported since unused %define variables are
5517 reported anyway.
5518 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
5519 * src/muscle_tab.h (muscle_percent_define_check_values): Update
5520 comments for consistency with b4_percent_define_check_values.
5521 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
5522 muscles.
5523 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
5524 Remove.
5525 (prologue_declaration): Remove %push-parser and %push-pull-parser
5526 rules.
5527 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
5528 * tests/calc.at: Update declarations.
5529 * tests/input.at (%define enum variables): New test case.
5530 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
5531 declaration.
5532 (Push Parsing: Multiple impure instances): Update declaration.
5533 (Push Parsing: Unsupported Skeletons): New test case.
5534 * tests/torture.at (Exploding the Stack Size with Alloca): Update
5535 declaration.
5536 (Exploding the Stack Size with Malloc): Update declaration.
5537
3f999f78
WP
55382007-09-24 Wojciech Polak <polak@gnu.org>
5539
5540 Add XSLT transformations.
5541
5542 * data/xslt/xml2dot.xsl: Transform XML into DOT.
5543 * data/xslt/xml2text.xsl: Transform XML into plain text.
5544 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
5545 * data/Makefile.am (xsltdir): New variable.
5546 (dist_xslt_DATA): Add xslt/*.xsl files.
5547
a4f75309
PE
55482007-09-23 Paul Eggert <eggert@cs.ucla.edu>
5549
5550 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
5551 Problem reported by Wojciech Polak.
5552 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
5553 (xml_printf): Undo change I made on 21 September; that is,
5554 indent 2 spaces, not 1.
5555
ad5feac4
JD
55562007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
5557
5558 Pacify ./configure --enable-gcc-warnings.
5559 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
5560 `char const *' instead of `char *'.
5561 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
5562 local variable `sep'.
5563
41d7a5f2
PE
55642007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5565
5566 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
5567 elsewhere.
5568 * src/print-xml.c: Prefer "const" after types; that's more consistent.
5569 (xml_printf): Indent just 1 space for level.
5570 (e_char, xlate_char): Remove.
5571 (xml_escape_string): Rewrite to avoid undefined behavior (used
5572 storage that was freed from the stack).
5573 (xml_escape_n): Don't bother checking for subscript error.
5574
3f999f78
WP
55752007-09-21 Wojciech Polak <polak@gnu.org>
5576
5577 Add Bison XML Automaton Report.
41d7a5f2
PE
5578
5579 Add support for an -x option to generate an XML report.
5580 It is not documented yet.
5581 * src/print-xml.c: New file.
5582 * src/print-xml.h: Likewise.
5583 * lib/timevar.def (TV_XML): New var.
5584 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
5585 * src/conflicts.c: Include print-xml.h.
5586 (solved_conflicts_xml_obstack): New var.
5587 (log_resolution, conflicts_solve, conflicts_free):
5588 Add support for XML report.
5589 (conflicts_output_val): New function.
5590 * src/conflicts.h (conflicts_output_val): New decl.
5591 * src/files.c (spec_xml_file): New var.
5592 (compute_output_file_names, output_file_names_free): Add XML support.
5593 * src/files.h (spec_xml_file): New decl.
5594 * src/getargs.c (xml_flag): New var.
5595 (usage, short_options, long_options, getargs): Add XML support.
5596 * src/getargs.h (xml_flag): New decl.
5597 * src/gram.c: Include print-xml.h.
5598 (rule_lhs_print_xml, rule_rhs_print_xml):
5599 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
5600 New functions.
5601 * src/gram.h: Declare external ones.
5602 * src/main.c: Include print-xml.h.
5603 (main): Add XML support.
5604 * src/reduce.c: Include print-xml.h.
5605 (reduce_xml): New function.
5606 * src/reduce.h: Declare it.
5607 * src/state.c: Include print-xml.h.
5608 (state_new): Add XML support.
5609 (state_rule_lookahead_tokens_print_xml): New function.
5610 * src/state.h: Declare it.
5611 (struct state): New member solved_conflicts_xml.
5612 * src/symtab.c (symbol_class_get_string): New function.
5613 * src/symtab.h: Declare it.
5614
6d8e724d
PE
56152007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5616
5617 * GNUmakefile: Switch to coreutils's version.
5618 * bootstrap: Likewise.
5619 * Makefile.cfg: Adjust to new GNUmakefile.
5620 * README-hacking: Likewise.
5621
5622 Import from gnulib:
5623
5624 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
5625 Bruno Haible <bruno@clisp.org>
5626
5627 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5628 and is a script that invokes bison. Tighten the code. Add comments.
5629
922bdd7f
JD
56302007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
5631
5632 Spell "boolean" as "Boolean". Reported by Akim Demaille.
5633 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
5634 * doc/bison.texinfo (Decl Summary): Fix.
5635 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
5636 * tests/input.at (Boolean %define variables): Update output.
5637 * tests/skeletons.at (%define boolean variables: invalid skeleton
5638 defaults): Rename to...
5639 (%define Boolean variables: invalid skeleton defaults): ... this and
5640 update output.
5641
1b17b01d
JD
56422007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
5643
5644 In impure push mode, don't allow more than one yypstate to be allocated
5645 since multiple impure parsers would corrupt yynerrs.
5646 * data/push.c (yypstate_allocated): New static global variable
5647 initialized to 0.
5648 (yypull_parse): If yypstate_new returns 0, don't report it as memory
5649 exhaustion if yypstate_allocated is 1, but still return 2.
5650 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
5651 already 1. Otherwise, set it to 1.
5652 (yypstate_delete): Set it to 0.
5653 * tests/push.at (Push Parsing: Multiple impure instances): New test
5654 case.
5655
9987d1b3
JD
56562007-08-17 Bob Rossi <bob@brasko.net>
5657
5658 * doc/bison.texinfo (Push Decl): Document the push parser.
5659 (Table of Symbols): Ditto.
5660 (Pure Decl): Ditto.
5661 (Decl Summary): Ditto.
5662 (Multiple Parsers, Push Parser Function, Pull Parser Function,
5663 Parser Create Function, Parser Delete Function):
5664 Add new push parser symbols.
5665 (Table of Symbols): Document push-parser, push-pull-parser,
5666 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
5667
f16b0819
PE
56682007-08-15 Paul Eggert <eggert@cs.ucla.edu>
5669
5670 Update to GPLv3.
5671 * doc/gpl-3.0.texi: New file.
5672 * doc/gpl.texi: Remove.
5673 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
5674 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
5675 * README-hacking, TODO, bootstrap, bootstrap.conf:
5676 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
5677 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
5678 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
5679 * data/lalr1.cc, data/lalr1.java, data/location.cc:
5680 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
5681 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
5682 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
5683 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
5684 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
5685 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
5686 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
5687 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
5688 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
5689 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
5690 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
5691 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
5692 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
5693 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
5694 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
5695 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
5696 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
5697 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
5698 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
5699 * src/complain.c, src/complain.h, src/conflicts.c:
5700 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
5701 * src/files.h, src/flex-scanner.h, src/getargs.c:
5702 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
5703 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
5704 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
5705 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
5706 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
5707 * src/print.c, src/print.h, src/print_graph.c:
5708 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
5709 * src/reduce.h, src/relation.c, src/relation.h:
5710 * src/revision.h, src/scan-code.h, src/scan-code.l:
5711 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
5712 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
5713 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
5714 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
5715 * tests/Makefile.am, tests/actions.at, tests/c++.at:
5716 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
5717 * tests/existing.at, tests/glr-regression.at:
5718 * tests/headers.at, tests/input.at, tests/java.at:
5719 * tests/local.at, tests/output.at, tests/push.at:
5720 * tests/reduce.at, tests/regression.at, tests/sets.at:
5721 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
5722 * tests/torture.at:
5723 Update to GPLv3.
5724
728c4be2
JD
57252007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5726
5727 Get rid of broken %no-parser, -n, and --no-parser implementation and
5728 documentation.
5729 * TODO: Don't mention them.
5730 * doc/bison.1: Likewise.
5731 * doc/bison.texinfo (Decl Summary): Likewise.
5732 (Bison Options): Likewise.
5733 (Option Cross Key): Likewise.
5734 * src/getargs.c (no_parser_flag): Remove global variable.
5735 (usage): Don't print description of -n and --no-parser.
5736 (long_options): Remove --no-parser entry here.
5737 (getargs): Remove -n case in the switch here.
5738 * src/getargs.h (no_parser_flag): Remove extern.
5739 * tests/regression.at (Web2c Actions): Remove comment that mentions
5740 --no-parser.
5741
5d31a216
JD
57422007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5743
5744 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
5745 name user variables starting with `yy'. Just pass NULL instead of a
5746 dummy local &yylval to yypush_parse.
5747 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
5748 starting with `yy'.
5749
a2ea208d
JD
57502007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
5751
5752 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
5753 true since it's then always used regardless of whether yyoverflow is
5754 defined. Reported by Christian Burger at
5755 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
5756 * THANKS: Add Christian Burger.
5757
91661ebb
JD
5758 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5759 node names: say "Decl Summary" not "Bison Declaration Summary".
5760
cbd50549
JD
57612007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
5762
5763 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
5764 determine whether this function has already complained about an invalid
5765 value for a %define boolean variable, don't check whether Bison has
5766 ever examined the value. As written, the check was a tautology.
5767 Instead, record and check for this complaint using a separate muscle.
5768
eb1b0740
JD
57692007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5770
5771 Fix push parsing memory leak reported by Brandon Lucia at
5772 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
5773 * THANKS: Add Brandon Lucia.
5774 * data/push.c (yypstate_delete): Free the stack if it was reallocated
5775 but the parse never completed and thus freed it.
5776 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
5777 * tests/testsuite.at: Include push.at.
5778 * test/push.at: New.
5779 (Push Parsing: Memory Leak for Early Deletion): New test case.
5780
9d774aff
JD
57812007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
5782
5783 Improve handling of multiple S/R conflicts in the same state and of S/R
5784 conflicts involving multiple reductions.
5785 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
5786 set for a state here or Bison will abort if it is reassigned on a
5787 later conflicted reduction in the same state.
5788 Similarly, don't finalize and assign the solved conflicts report here
5789 or it will be lost if it is reassigned on a later conflicted reduction
5790 in the same state.
5791 (set_conflicts): Instead, assign them both here after all S/R conflicts
5792 in the state have been fully examined.
5793 * src/print.c (shift_set): Rename to...
5794 (no_reduce_set): ... this.
5795 (print_reductions): Update for rename, and add %nonassoc error action
5796 tokens to no_reduce_set so that, when printing the first remaining
5797 reduction on an error action token, the reduction is enclosed in
5798 brackets.
5799 (print_results): Update for rename.
5800 * tests/conflicts.at (Solved conflicts report for multiple reductions
5801 in a state): New test case.
5802 (%nonassoc error actions for multiple reductions in a state): New test
5803 case.
5804
5805 * src/main.c (main): Don't depend on C99 features.
5806
10159d2a
JD
58072007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5808
5809 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
5810 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
5811 uniwidth.
10159d2a 5812
953b3935
JD
58132007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
5814
5815 * bootstrap (slurp): Create target directories that don't exist.
5816 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
5817
6ce2d93a
JD
58182007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5819
5820 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
5821 than item number.
5822 * closure.c (closure): Likewise.
5823 * state.h (reductions): Comment sorting of rules.
5824 (state): Comment sorting of items.
5825
ce3448d5
JD
58262007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
5827
5828 Fix C++ test cases after recent Gnulib changes. Discussed starting at
5829 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
5830 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
5831 definition in order to avoid Gnulib headers since we don't use config.h
5832 here.
5833 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
5834 rather than AT_DATA so that config.h is included.
5835
8a86eef0
JD
58362007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
5837
5838 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
5839 instead of fprintf. Guard these functions with #if YYDEBUG instead of
5840 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
5841 and so that YYFPRINTF is guaranteed to be defined here.
5842
b1a81613
JD
58432007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5844
5845 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
5846 with...
5847 (muscle_percent_define_check_values): ... this more helpful function.
5848 Again, it's not used yet, but it will be.
5849 * src/muscle_tab.h: Likewise.
5850
71b61d4d
JD
5851 Improve some comments in parser table construction.
5852 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
5853 (generate_states): Don't mention ruleset, which is internal to closure.
5854 * src/closure.c (closure): Explain sorting of core and itemset, which
5855 is required for this function to behave correctly.
5856 * src/closure.h (closure): Mention sorting.
5857
2a6b783d
JD
58582007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
5859
5860 * src/lalr.c (state_lookahead_tokens_count): For code readability,
5861 move the check for disabled transitions to an aver since conflict
5862 resolution hasn't happened yet.
5863
5864 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
5865 labels a state as inconsistent just because it has error transitions.
5866 The original form of this check appeared in revision 1.1 of lalr.c,
5867 which was committed on 1991-12-21. Now (at least), changing the
5868 consistency label on such a state appears to have no useful effect in
5869 any of the places it is examined, which I enumerate below. The key
5870 point to understanding each item in this enumeration is that a state
5871 with an error transition is labelled consistent in the first place only
5872 if it has no rules, so the check cannot matter for states that have
5873 rules. (1) Labelling a state as inconsistent will cause set_conflicts
5874 to try to identify its conflicts, and a state must have *rules* to have
5875 conflicts. (2) Labelling a state as inconsistent will affect how
5876 action_row sets the default *rule* for the state. (3) Labelling a
5877 state as inconsistent will cause build_relations to add lookback edges
5878 to *rules* in that state.
5879 * src/state.h (struct state): Word the comment for member consistent
5880 more carefully.
5881
14462c2b
JD
58822007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5883
5884 Don't depend on C99 features.
5885 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
5886 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
5887 * src/reader.c (check_and_convert_grammar): Fix for-loop.
5888 * src/state.c (state_mark_reachable_states): Fix for-loop.
5889 (state_remove_unreachable_states): Fix for-loop.
5890
5891 Don't widen struct state with member reachable just to temporarily
5892 record reachability. Instead, use a local bitset.
5893 * src/state.h (struct state): Remove member.
5894 * src/state.c (state_new): Don't initialize it.
5895 (state_mark_reachable_states): Rename to...
5896 (state_record_reachable_states): ... this, and use bitset.
5897 (state_remove_unreachable_states): Use bitset.
5898
5a43d418
JD
58992007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
5900
5901 * src/Makefile.am (yacc): Quote target action commands properly so
5902 that the yacc script isn't corrupt. Reported by Hans Aberg at
5903 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
5904
0c650a20
JD
5905 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
5906 the case of pure parsers. Reported by Frans Englich at
5907 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
5908 * THANKS: Add Frans Englich.
5909
61fee93e
JD
5910 * NEWS (2.3a+): In the %code entry, reference section `Bison
5911 Declaration Summary' from the manual now since the %code summary has
5912 moved there.
5913 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
5914 in the rules section must be terminated by semicolons.
5915
f124d423
JD
59162007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
5917
5918 Extend the front-end API for %define variables to more completely
5919 mirror the back-end. This will be useful in the future.
5920 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
5921 Update comments to mention the new front-end counterparts of these
5922 macros.
5923 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
5924 for muscle_string_decode and muscle_location_decode.
5925 (muscle_string_decode): New static function.
5926 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
5927 (muscle_percent_define_get, muscle_percent_define_ifdef): New
5928 functions.
5929 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5930 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5931 implementation more closely.
5932 (muscle_percent_define_invalid_value): New function.
5933 * src/muscle_tab.h (muscle_percent_define_get,
5934 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5935 Prototype.
5936
75ad86ee
JD
59372007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5938
5939 * NEWS (2.3a+): Mention yesterday's state-removal change.
5940 (2.3a): Remove the %language entry, which was added after 2.3a.
5941 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5942 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5943 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5944 tests/existing.at: Update copyright date.
5945
5967f0cf
JD
59462007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5947
5948 If conflict resolution makes states unreachable, remove those states,
5949 report rules that are then unused, and don't report conflicts in those
5950 states.
5951 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5952 New global function.
5953 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5954 function.
5955 * src/main.c (main): After conflict resolution, remove the unreachable
5956 states and update all data structures that reference states by number.
5957 * src/state.c (state_new): Initialize each state's reachable member to
5958 false.
5959 (state_mark_reachable_states): New static function.
5960 (state_remove_unreachable_states): New global function.
5961 * src/state.h (struct state): Add member bool reachable.
5962 (state_remove_unreachable_states): Prototype.
5963 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5964 New test case.
5965 * tests/existing.at (GNU pic Grammar): Update test case output now that
5966 an unused rule is discovered.
5967
b09f4f48
JD
59682007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5969
5970 Minor code cleanup in parser table construction.
5971 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5972 (new_itemsets, save_reductions): Update for rename to nitemset.
5973 * src/closure.c (nritemset): Rename to...
5974 (nitemset): ... this since the "r" appears to meaningless and isn't
5975 used in the comments.
5976 (closure): Update for rename.
5977 * src/closure.h (nritemset): Update extern to...
5978 (nitemset): ... this.
5979 * src/lalr.c (LA): Fix a typo in comments.
5980 * src/print.c (print_core): Update for rename to nitemset.
5981 * src/print_graph.c (print_graph): Likewise.
5982 * src/state.h: Fix some typos in header comments.
5983
bbb44d83
PE
59842007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5985
9b33de72
PE
5986 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5987 still sticks to ASCII. Sorry!
5988
bbb44d83
PE
5989 * README-hacking: New file, taken mostly from coreutils, with changes
5990 for Bison. Contains much of the contents of:
5991 * README-cvs: Remove.
5992 * bootstrap: Sync from gnulib.
5993 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5994 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5995
29553547
JD
59962007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5997
5998 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5999 Setzer.
6000 (Java Differences): Fix some typos.
6001 * THANKS: Add Sebastian Setzer.
6002
01b477c6
PB
60032007-03-07 Paolo Bonzini <bonzini@gnu.org>
6004
730739e4
AD
6005 * data/java.m4 (b4_single_class_if): Remove.
6006 (b4_abstract_if): Look at "%define abstract".
6007 (b4_lexer_if): New.
6008 (b4_union_name): Rename...
6009 (b4_yystype): ... to this. Map to "%define stype".
6010 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
6011 b4_maybe_throws): Fix quoting.
6012 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
6013 * data/lalr1.java (Lexer interface): Always define.
6014 (Lexer interface within parser class): Remove.
6015 (YYLexer class): New, used when "%code lexer" is present.
6016 (constructor): When "%code lexer" is used, pass %lex-param
6017 to the lexer constructor.
6018 (yylex, yyparse): Remove %lex-param from method invocations
6019 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
6020
6021 * doc/bison.texinfo (Java Bison Interface): Mention "%define
6022 abstract". Rename "%define union_name" to "%define stype".
6023 Rename method names according to previous patch.
6024 (Java Scanner Interface): Describe "%code lexer" instead of
6025 "%pure-parser" and "%define single_class".
6026 (Java Differences): Mention "%code lexer".
6027
6028 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
6029 Include scanner here, using macros from tests/local.at.
6030 (AT_DATA_CALC_Y): Remove final argument.
6031 (_AT_CHECK_JAVA_CALC): Likewise.
6032 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
6033 of %locations and %error-verbose.
6034 (main): Test with and without %lex-param.
6035 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
6036 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 6037
122bea3a
JMG
60382007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6039
6040 DJGPP spefic issue. Inhibit the use of disallowed characters for
6041 file name genertion on Win98, WinXP, etc. These are |<>":?*\
6042 and concern testsuite case 46.
6043 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
6044 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
6045 * djgpp/config.bat: Inhibit the use of disallowed characters.
6046
9611cfa2
JD
60472007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
6048
6049 Miscellaneous %define and %code cleanup.
6050 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
6051 values are interpreted.
6052 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
6053 documentation a little more.
6054 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
6055 muscle_percent_define_insert, muscle_percent_code_grow): New
6056 functions/macros.
6057 * src/muscle_tab.h (muscle_percent_define_insert,
6058 muscle_percent_code_grow): Prototype.
6059 * src/parse-gram.y (prologue_declaration): Use
6060 muscle_percent_define_insert and muscle_percent_code_grow when parsing
6061 %define and %code directives.
6062
6063 Make it easy to share %define boolean variables between the front-end
6064 and back-end. Though not used yet, this will be useful in the future.
6065 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
6066 Bison uses of names rather than just skeleton uses of names.
6067 (b4_percent_define_get, b4_percent_define_ifdef): Rename
6068 b4_percent_define_skeleton_variables(VARIABLE) to
6069 b4_percent_define_bison_variables(VARIABLE).
6070 (b4_percent_code_get, b4_percent_code_ifdef): Rename
6071 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
6072 b4_percent_code_bison_qualifiers(QUALIFIER).
6073 (b4_check_user_names_wrap): Update for renames.
6074 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
6075 muscle_percent_define_default): New functions mimicking
6076 b4_percent_define_flag_if and b4_percent_define_default.
6077
6078 For %define variables, report locations for invalid values and
bbb44d83 6079 redefinitions.
9611cfa2
JD
6080 * data/bison.m4 (b4_percent_define_flag_if): Read
6081 b4_percent_define_loc(VARIABLE) to report the location of an invalid
6082 value for VARIABLE.
6083 (b4_percent_define_default): Save a special location in
6084 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
6085 must later be reported as invalid.
6086 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
6087 functions.
6088 (muscle_percent_define_insert): Record the location of VARIABLE in
6089 muscle percent_define_loc(VARIABLE), and use it to report the previous
6090 location for a redefinition.
6091 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
6092 (muscle_percent_define_default): Update like b4_percent_define_default.
6093 (muscle_grow_user_name_list): Rename to...
6094 (muscle_user_name_list_grow): ... this for consistency and use
6095 muscle_location_grow.
6096 * src/muscle_tab.h (muscle_location_grow): Prototype.
6097 * tests/input.at (%define errors): Update expected output.
6098 * tests/skeletons.at (%define boolean variables: invalid skeleton
6099 defaults): New test case.
6100
0bf92491
JD
61012007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
6102
6103 * src/print.c (lookahead_set, state_default_rule): Remove.
6104 (print_reductions): Replace state_default_rule invocation with
6105 equivalent use of yydefact, which was computed in token_actions in
6106 tables.c.
6107 (print_results): Don't allocate lookahead_set.
6108
d3b12988
PB
61092007-02-27 Paolo Bonzini <bonzini@gnu.org>
6110
6111 * data/lalr1.java: Prefix all private members with yy.
6112
f57a7536
JD
61132007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
6114
6115 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 6116 Sebastien Fricker at
f57a7536 6117 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 6118 * THANKS: Add Sebastien Fricker.
f57a7536
JD
6119 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
6120 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
6121 accept a variable number of arguments.
6122
6404a5bf
JD
61232007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
6124
6125 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
6126
e4e09639
JMG
61272007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6128
6129 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
6130 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
6131 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
6132
d7e0a1a7
PE
61332007-02-11 Paul Eggert <eggert@cs.ucla.edu>
6134
6135 Undo my 2007-02-07 change, switching back to the c-strcase module
6136 introduced in the 2007-02-03 change. Bruno Haible reported that
6137 the 2007-02-07 change would be dangerous in Turkish if we add a
6138 language whose name contains "i", since "i" is not lowercase "I"
6139 in Turkish.
6140 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
6141 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
6142 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
6143 * m4/.cvsignore: Remove strcase.m4.
6144 * src/getargs.c: Revert 2007-02-07 change, as follows.
6145 Include c-strcase.h.
6146 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
6147
deee93a1
JD
61482007-02-11 Bruno Haible <bruno@clisp.org>
6149
6150 Enable the Java related testsuite tests when the only Java compiler
6151 found is a gcj < 4.3. Discussed at
6152 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
6153 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
6154
574add85
JD
61552007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
6156
6157 * data/Makefile.am: Update copyright date.
6158 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
6159 yypstate_new returns NULL.
6160 (yypstate_new): Return NULL if malloc does.
6161 * src/reader.c (packgram): Move translation of rule actions from the
6162 beginning of packgram to...
6163 (check_and_convert_grammar): ... here right before packgram is invoked
6164 so it's easier to write more complete comments, and remove redundant
6165 code.
6166
e785ccf7
JD
61672007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
6168
6169 As in semantic actions, make @$ in %initial-action, %destructor, and
6170 %printer imply %locations.
6171 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
6172 scanning @$.
6173 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
6174 (@$ in %initial-action implies %locations,
6175 @$ in %destructor implies %locations,
6176 @$ in %printer implies %locations): ... these new test cases.
6177
1cfe1ed7
PE
61782007-02-07 Paul Eggert <eggert@cs.ucla.edu>
6179
6180 Undo most of the 2007-02-03 change, switching to the strcase module
6181 now that gnulib strcase has been fixed.
6182 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
6183 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
6184 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
6185 * m4/.cvsignore: Add strcase.m4.
6186 * src/getargs.c: Revert 2007-02-03 change, as follows.
6187 Don't include c-strcase.h.
6188 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
6189 strcasecmp has "unspecified behavior" outside the POSIX locale,
6190 but it works fine in practice if at least one argument is ASCII,
6191 as is the case in Bison.
6192
0049ec86
PB
61932007-02-07 Paolo Bonzini <bonzini@gnu.org>
6194
6195 * tests/java.at: Skip tests if only one of javac/java is present.
6196 Reported by Joel E. Denny.
6197 * tests/atlocal.in: Adjust copyright years.
6198
61992007-02-05 Paolo Bonzini <bonzini@gnu.org>
6200
6201 * data/lalr1.java (Stack): Work around old verifiers that disallow
6202 access to the private fields of an inner class, from the outer class.
6203 We can make Stack's fields public because user code doesn't have access
6204 to the instance of Stack used by parse(). Reported by Paul Eggert.
6205
2c2b7220
PE
62062007-02-03 Paul Eggert <eggert@cs.ucla.edu>
6207
6208 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
6209 the right spot for these files?
6210 * bootstrap.conf (gnulib_modules): Add c-strcase.
6211 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
6212 c-strncasecmp.c.
6213 * src/getargs.c: Include c-strcase.h.
6214 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
6215 to avoid unspecified behavior.
6216
b2b81dae
JD
62172007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
6218
6219 * doc/bison.texinfo (Decl Summary): Correct typo.
6220
c1d19e10
PB
62212007-01-30 Paolo Bonzini <bonzini@gnu.org>
6222
6223 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
6224 Complain if the value does not match empty, "true" or "false".
6225 * data/c++.m4: Adjust default definitions of %define variables.
6226 * data/java.m4: Adjust default definitions of %define variables.
6227 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
6228 to above behavior.
6229 * tests/input.at (Boolean %define variables): Test new behavior.
6230
8405b70c
PB
62312007-01-29 Paolo Bonzini <bonzini@gnu.org>
6232
6233 * NEWS: Mention java.
6234 * TODO: Remove things that are done.
6235 * bootstrap.conf: Add javacomp-script and javaexec-script.
6236 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
6237
6238 * data/Makefile.am: Add new files.
6239 * data/java-skel.m4: New.
6240 * data/java.m4: New.
6241 * data/lalr1.java: New.
6242
6243 * doc/bison.texinfo: Put "A Complete C++ Example" under
6244 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
6245 under Other Languages.
6246
6247 * src/getargs.c (valid_languages): Add Java.
6248 * src/getargs.h (struct bison_language): Update size of string fields.
6249
6250 * tests/Makefile.am: Add java.at.
6251 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
6252 * tests/java.at: New.
6253 * tests/testsuite.at: Include it.
6254
3eb82471
JD
62552007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
6256
6257 Clean up.
6258 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
6259 at_directive_argv arguments so these no longer have to be global
6260 variables. Also, update the implementation for the following changes.
6261 (fail_for_at_directive_too_many_args,
6262 fail_for_at_directive_too_few_args): Add at_directive_name argument.
6263 (at_directive_name): Remove as at_directive_argv[0] will be used for
6264 this now.
6265 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
6266 for the directive name.
6267 (at_directive_argc, at_directive_argv): Make these local within
6268 skel_lex instead of global.
6269 (INITIAL): Update directive start action for above changes.
6270 (SC_AT_DIRECTIVE_ARG): Rename to...
6271 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
6272 (SC_AT_DIRECTIVE_SKIP_WS): Update.
6273 (scan_skel): Move yylex_destroy to...
6274 (skel_scanner_free): ... here.
6275 * tests/skeletons.at (installed skeleton file name): Rename to...
6276 (installed skeleton file names): ... this.
6277
148d66d8
JD
62782007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
6279
6280 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
6281 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
6282 Summary" not "Directives".
6283 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
6284 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
6285 since the former is now the more complete one.
6286 (Prologue Alternatives): Likewise and do the same for %defines.
6287 (Table of Symbols): Add summary of %code, add summary of %define, and
6288 move full %code documentation to...
6289 (Decl Summary): ... here for consistency with other entries in these
6290 sections.
6291 Move %define entry in order to keep this list alphabetized.
6292 Reword %define entry a little to put less emphasis on the skeleton
6293 concept, which most users shouldn't have to think about.
6294
665f0c24
PE
62952007-01-26 Paul Eggert <eggert@cs.ucla.edu>
6296
6297 Adjust to recent gnulib changes.
6298 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
6299 Add string.h, string_.h, unistd_.h, wchar_.h.
6300 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
6301 * src/system.h: Don't include <stpcpy.h>; this is now done by
6302 <string.h>.
6303
592d0b1e
PB
63042007-01-23 Paolo Bonzini <bonzini@gnu.org>
6305
6306 Simplify implementation of unqualified %code, implement macros for
6307 uniform treatment of boolean %define flags. Document %define.
6308 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
6309 b4_percent_code_ifdef): New.
6310 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
6311 * data/c++.m4: Define default value for global_tokens_and_yystype.
6312 * data/glr.cc: Likewise.
6313 * data/location.cc: Use b4_percent_define_flag_if.
6314
148d66d8 6315 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
6316
6317 * src/parse-gram.y (Unqualified %code): Change muscle name to
6318 b4_percent_code().
6319 (content.opt): Default to empty.
6320
a7867f53
JD
63212007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6322
6323 Implement support for relative and absolute skeleton file names.
6324 Discussed starting at
6325 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
6326 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
6327 (Bison Options): Document in --skeleton entry.
6328 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
6329 full_skeleton can't necessarily hold all of pkgdatadir.
6330 If the specified skeleton file name contains a `/', don't prepend
6331 pkgdatadir.
6332 * src/parse-gram.y (prologue_declaration): If the specified skeleton
6333 file name contains a `/', prepend the grammar file directory.
6334 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
6335 * skeletons.at: New file.
6336 (relative skeleton file names): New test case.
6337 (installed skeleton file names): New test case.
6338 * tests/testsuite.at: Include skeletons.at.
6339
6340 * bootstrap: Update copyright to 2007.
6341
830c9b18
PB
63422007-01-17 Paolo Bonzini <bonzini@gnu.org>
6343
6344 * bootstrap: Remove occurrences of .#bootmp from the files.
6345
a8c2e813
AD
63462007-01-17 Akim Demaille <akim@epita.fr>
6347
6348 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
6349 nonterminals.
6350 Use per-type %printer.
6351
279cabb6
JD
63522007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
6353
6354 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
6355 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6356 djgpp/config.site, src/files.c, src/files.h, src/main.c,
6357 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
6358 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
6359 tests/glr-regression.at, tests/input.at, tests/local.at,
6360 tests/output.at, tests/torture.at: Update copyright to 2007.
6361
bb32f4f2
AD
63622007-01-16 Akim Demaille <akim@epita.fr>
6363
6364 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
6365 error code.
6366 (Calc++ Scanner): Exit with failure if we can't open the input
6367 file.
6368 Accept "-" standing for stdin.
6369 (Calc++ Top Level): Print the result only if the parsing was
6370 successful.
6371
7cff04b5
AD
63722007-01-16 Akim Demaille <akim@epita.fr>
6373
6374 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
6375
a4e25e1d
JD
63762007-01-15 Paolo Bonzini <bonzini@gnu.org>
6377 and Joel E. Denny <jdenny@ces.clemson.edu>
6378
6379 Clean up %define and %code implementation in M4 some. Most
6380 importantly, rename all related macros to be in the b4_percent_define
6381 and b4_percent_code namespaces. Also, complete support for `.' in
6382 %define variable names and %code qualifiers.
6383 * data/bison.m4 (b4_check_user_names): Check for special
6384 "SKELETON-NAMESPACE(name)" macros instead of using two nested
6385 m4_foreach loops.
6386 (b4_get_percent_define, b4_get_percent_code): Rename to...
6387 (b4_percent_define_get, b4_percent_code_get): ... these.
6388 Extend documentation with examples.
6389 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
6390 b4_percent_define_skeleton_variables and
6391 b4_percent_code_skeleton_qualifiers.
6392 Expect any value for the %define variable `foo' to be stored in the
6393 macro named `b4_percent_define(foo)'; expect any %code blocks for the
6394 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
6395 expect any unqualified %code blocks to be stored in a macro named
6396 `b4_percent_code_unqualified'.
6397 Use m4_indir so that %define variable names and %code qualifiers can
6398 contain `.', which is allowed by the grammar parser.
6399 (b4_percent_define_default): New macro to set a default value for a
6400 %define variable.
6401 (m4_wrap): Update wrapped code, and fix some underquoting.
6402 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
6403 Expect grammar uses of %define variables and %code qualifiers to be
6404 defined in b4_percent_define_user_variables and
6405 b4_percent_code_user_qualifiers.
6406 * data/c++.m4: Use b4_percent_define_default rather than
6407 m4_define_default. Fix some underquoting. Skeleton usage of %define
6408 variable define_location_comparison now implies skeleton usage of
6409 %define variable filename_type.
6410 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6411 data/push.c, data/yacc.c: Update macro names.
6412 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
6413 muscle names.
6414
e37c665c
JMG
64152007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
6416
6417 DJGPP specific issues.
6418
6419 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
6420 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
6421
7d2d521f
JD
64222007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6423
6424 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
6425 run parsers in all tests so that Valgrind is invoked during
6426 maintainer-check-valgrind.
6427 (Duplicate representation of merged trees): Free all semantic values.
6428 (Duplicated user destructor for lookahead): Likewise.
6429
e0ac9b4b
JD
64302007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6431
6432 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
6433 command-line prefix.
6434 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
6435 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
6436 miss Valgrind messages.
6437 (Exploding the Stack Size with Malloc): Likewise.
6438
78143faa
JD
64392007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
6440
6441 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
6442 locals. Reported by Juan Manuel Guerrero at
6443 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
6444 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
6445 Fix some indentation also.
6446 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
6447 explaining this issue.
6448
7ecec4dd
JD
64492007-01-09 Paolo Bonzini <bonzini@gnu.org>
6450 and Joel E. Denny <jdenny@ces.clemson.edu>
6451
6452 Simplify union and prologue handling, and escape union and lex/parse
6453 params with digraphs.
6454 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
6455 values to the empty string since these are no longer guaranteed
6456 initialized by the front-end.
6457 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
6458 braces around b4_user_stype since this is no longer done by the
6459 front-end.
6460 * src/files.c, src/files.h (pre_prologue_obstack,
6461 post_prologue_obstack): Remove.
6462 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
6463 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
6464 with digraphs. This fixes lex params and parse params.
6465 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
6466 * src/output.c (prepare): Remove muscle insertion of the prologues.
6467 (output): Remove freeing of pre_prologue_obstack and
6468 post_prologue_obstack.
6469 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
6470 than prologue_augment for prologue parsing so you don't need prologue
6471 obstacks.
5c80250c
JD
6472 (grammar_declaration): For %union RHS, use `braceless' instead of
6473 "{...}" so that braces are already stripped and code is escaped with
6474 digraphs.
7ecec4dd
JD
6475 * src/reader.c (prologue_augment): Remove.
6476 (reader): Remove initialization of pre_prologue_obstack and
6477 post_prologue_obstack.
6478 * src/reader.h (prologue_augment): Remove.
6479
6480 * data/c.m4: Remove stray parenthesis.
6481
16dc6a9e
JD
64822007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6483
6484 Remove quotes from variables names in %define directives and from
6485 qualifiers in %code directives, and restrict the characters that are
6486 allowed in them to M4-friendly ones. For %define, continue to support
6487 the quoted form as a deprecated feature. Discussed starting at
6488 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
6489 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
6490 %code.
6491 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
6492 (Decl Summary): In %defines entry, update mention of `%code requires'
6493 and `%code provides'.
16dc6a9e
JD
6494 (C++ Location Values): Update %define uses.
6495 (Calc++ Parser Interface): Likewise.
6496 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 6497 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
6498 * src/parse-gram.y (prologue_declaration): For %define variables, use
6499 `variable' instead of `STRING'.
6500 (grammar_declaration): For %code qualifiers, use `ID' instead of
6501 `STRING'.
6502 (variable): New nonterminal that takes an `ID' or a `STRING'.
6503 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
6504 and %define uses.
6505 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
6506 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
6507 (%define errors): Update %define uses.
6508
e9813cd4
JD
65092007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6510
6511 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
6512 instead of muscle_insert for %define values so that M4-special
6513 characters are replaced with digraphs.
6514 * tests/input.at (%define errors): Extend to check weird values.
6515
6afc30cc
JD
65162007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6517
6518 Instead of having skeletons declare all valid %define variables and
6519 %code qualifiers, provide macros that retrieve the associated values
6520 and build these lists automatically. Thus Bison will now warn when a
6521 variable or qualifier is not used by the skeleton in the current
6522 invocation regardless of whether it might sometimes be used by that
6523 skeleton in other invocations. Also, move all %define value macros to
6524 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
6525 form, which is replaced by %code.
6526 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
6527 (b4_check_user_names): ... this, and change the series of valid name
6528 arguments to a single list argument for names used in the skeleton
6529 similar to the existing list argument for names used in the grammar.
6530 Warn instead of complaining.
6531 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
6532 values and %code code, to format %code code properly, and to build
6533 lists of all %define variables and %code qualifiers used in the
6534 skeleton: b4_skeleton_percent_define_variables and
6535 b4_skeleton_percent_code_qualifiers.
6536 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
6537 Remove, and...
6538 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
6539 the skeleton names lists can finish building first. In place of
6540 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
6541 expect the lists b4_user_percent_define_variables and
6542 b4_user_percent_code_qualifiers.
6543 * data/c++.m4: Where setting default values for b4_parser_class_name,
6544 b4_location_type, b4_filename_type, b4_namespace, and
6545 b4_define_location_comparison, update their names to the
6546 b4_percent_define_ namespace.
6547 * data/glr.c: Don't use b4_check_percent_define_variables and
6548 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6549 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
6550 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 6551 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
6552 * data/location.cc: Use b4_get_percent_define.
6553 * data/push.c: Don't use b4_check_percent_define_variables and
6554 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6555 * data/yacc.c: Likewise, and don't call m4_exit in
6556 b4_use_push_for_pull_if or m4_wrap code will never execute.
6557 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
6558 Rename to...
6559 (muscle_grow_user_name_list): ... this for consistency with the
6560 terminology used in bison.m4.
6561 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
6562 %define variable names, and rename muscle used_percent_define_variables
6563 to user_percent_define_variables.
6564 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
6565 user_percent_code_qualifiers.
6566 (content): Remove.
6567 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
6568 {CODE} form is no longer accepted.
6569 * tests/input.at (Reject bad %code qualifiers): Rename to...
6570 (Reject unused %code qualifiers): ... this, and update test output.
6571 (%define error): Update test output.
6572
7eb8a0bc
JD
65732007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
6574
6575 Check for unrecognized %define variables similar to checking for
6576 unrecognized %code qualifiers. Check for redefined %define variables.
6577 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
6578 generalizes...
6579 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
6580 (b4_check_percent_define_variables): New, also wraps it.
6581 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
6582 variables using b4_check_percent_define_variables.
6583 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
6584 all those exercised in the test suite and all those listed in the
6585 `Default values' section of c++.m4. Are there others?
6586 * data/push.c, data/yacc.c: Declare no valid %define variables.
6587 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
6588 similar to muscle_find, but it works even when the muscle stores a
6589 const value.
6590 (muscle_grow_used_name_list): New function for constructing the used
6591 name list muscles that b4_check_for_unrecognized_names requires.
6592 * src/parse-gram.y (prologue_declaration): Warn if a variable is
6593 %define'd more than once. Define the b4_used_percent_define_variables
6594 muscle with muscle_grow_used_name_list.
6595 (grammar_declaration): Abbreviate %code code with
6596 muscle_grow_used_name_list.
6597 * tests/input.at (%define errors): New.
6598
3fc65ead
JD
65992007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6600
6601 Provide warn_at, complain_at, and fatal_at function callbacks to the
6602 skeletons, and use this for %code qualifier complaints.
6603 * data/bison.m4 (b4_error_at): New, invoked by...
6604 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
6605 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
6606 @fatal_at(...@) directives.
6607 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
6608 qualifiers in b4_used_percent_code_qualifiers and to use
6609 b4_complain_at.
6610 * src/location.c, src/location.h (boundary_set_from_string): New global
6611 function.
6612 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
6613 function.
6614 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
6615 to b4_used_percent_code_qualifiers.
6616 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
6617 function.
6618 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
6619 (lineno): Rename to...
6620 (out_lineno): ... this so I don't misunderstand it again.
6621 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
6622 here; these newlines are in the input but not the output file.
6623 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
6624 (at_directive_perform): ... this new static function, and add handling
6625 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
6626 directives.
6627 * tests/input.at (Reject bad %code qualifiers): Update test output with
6628 locations and extend.
6629
6630 * tests/output.at (Output file name: [, Output file name: ]): Remove
6631 bogus comment about these tests failing.
6632
1c7b7e1d
JD
66332007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6634
6635 Clean up b4_check_percent_code_qualifiers a little.
6636 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
6637 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
6638 documentation and add examples.
6639 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
6640 qualifiers here.
6641
08af01c2
JD
66422007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6643
6644 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
6645 unreliable -- especially when they're hidden inside another macro.
6646 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
6647 data/c.m4: Remove m4_divert(-1).
6648 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6649 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
6650 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 6651 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
6652 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
6653 pushed and popped by m4sugar, should be first on the stack.
6654
6655 Provide warn, complain, and fatal function callbacks to the skeletons.
6656 This provides more flexibility than m4_fatal, improves the error
6657 message format, and captures messages for translation. Discussed
6658 starting at
6659 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
6660 * data/bison.m4 (b4_error): New, invoked by...
6661 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
6662 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
6663 directives. Because these M4 macros might be called when the current
6664 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
6665 the previous removal of uses of m4_divert, which caused trouble.
6666 (b4_check_percent_code_qualifiers): Use b4_complain instead of
6667 m4_fatal to report unrecognized %code qualifiers.
6668 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
6669 push parser requests.
6670 * data/glr.c: Use b4_complain instead of m4_fatal to report
6671 non-deterministic push parser requests.
6672 Update @output usage to @output(...@) form.
6673 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
6674 report missing %defines. Update @output usage to @output(...@) form.
6675 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
6676 @output(...@) form.
6677 * src/main.c (main): Invoke skel_scanner_free.
6678 * src/scan-skel.h (skel_scanner_free): Prototype new function.
6679 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
6680 obstack_for_string from flex-scanner.h.
6681 (YY_DECL): Use to declare skel_lex static.
6682 (decode_at_digraphs): Remove; now handled in the new
6683 SC_AT_DIRECTIVE_ARG start condition.
6684 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
6685 functions.
6686 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
6687 at_directive_argv): New static globals.
6688 (INITIAL): Use fail_for_invalid_at.
6689 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
6690 recognize the start of a generalized `@directive(...@)' form and
6691 start...
6692 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
6693 directive args (using the new obstack_for_string), to decode the
6694 contained @ diagraphs, and to perform the directive. It recognizes
6695 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
6696 @output(...@).
6697 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
6698 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
6699 `@,'.
6700 (scan_skel): Initialize obstack_for_string on the first call.
6701 (skel_scanner_free): New function to free obstack_for_string.
6702 * tests/input.at (Reject bad %code qualifiers): Update test output.
6703
8e0a5e9e
JD
67042007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
6705
6706 Consolidate the 4 prologue alternative directives (%code, %requires,
6707 %provides, and %code-top) into a single %code directive with an
6708 optional qualifier field. Discussed at
6709 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
6710 * NEWS (2.3a+): Rewrite the existing entry for the prologue
6711 alternatives.
6712 * doc/bison.texinfo (Prologue Alternatives): Update.
6713 (Decl Summary): Update to %code "requires" and %code "provides".
6714 (Calc++ Parser): Update to %code "requires".
148d66d8 6715 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
6716 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
6717 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
6718 are replaced by b4_percent_code_provides and b4_percent_code_requires,
6719 which are skeleton-specific.
6720 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
6721 declare what %code qualifiers it supports and to complain if any other
6722 qualifiers were used in the grammar.
6723 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
6724 and b4_user_code([b4_percent_code_provides]) in place of
6725 b4_user_requires and b4_user_provides.
6726 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
6727 Add b4_user_code([b4_percent_code_top]) and
6728 b4_user_code([b4_percent_code]).
6729 Invoke b4_check_percent_code_qualifiers.
6730 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6731 PERCENT_REQUIRES): Remove.
6732 (grammar_declaration): Remove RHS's for %code-top, %provides, and
6733 %requires. Rewrite the %code RHS as the unqualified form defining the
6734 muscle b4_percent_code. Add another RHS for the qualified %code form,
6735 which defines muscles of the form b4_percent_code_QUALIFIER and the
6736 b4_used_percent_code_qualifiers muscle.
6737 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6738 PERCENT_REQUIRES): Remove.
6739 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
6740 %code "requires" and %code "provides".
6741 * tests/input.at (Reject bad %code qualifiers): New.
6742
95021767
JD
67432007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6744
6745 Use the new code_props interface for destructors and printers.
6746 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
6747 printer_location members, and change the type of the destructor and
6748 printer members to code_props.
6749 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
6750 symbol_printer_get, semantic_type_destructor_set,
6751 semantic_type_printer_set, default_tagged_destructor_set,
6752 default_tagless_destructor_set, default_tagged_printer_set,
6753 default_tagless_printer_set): Use code_props in arguments and return
6754 types in place of char const * and location.
6755 (symbol_destructor_location_get, symbol_printer_location_get): Remove
6756 since the locations are now contained in the return of
6757 symbol_destructor_get and symbol_printer_get.
6758 * src/output.c (symbol_destructors_output, symbol_printers_output):
6759 Replace with...
6760 (symbol_code_props_output): ... this to eliminate duplicate code.
6761 (output_skeleton): Update to use symbol_code_props_output.
6762 * src/reader.c (symbol_should_be_used): Update use of
6763 symbol_destructor_get.
6764 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6765 Update uses of the various _destructor_set and _printer_set functions.
6766 * src/symtab.c: (default_tagged_destructor_location,
6767 default_tagless_destructor_location, default_tagged_printer_location,
6768 default_tagless_printer_location): Remove since we...
6769 (default_tagged_destructor, default_tagless_destructor,
6770 default_tagged_printer, default_tagless_printer): ... change the type
6771 of these to code_props.
6772 (symbol_new, semantic_type_new, symbol_destructor_set,
6773 semantic_type_destructor_set, symbol_destructor_get,
6774 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
6775 symbol_check_alias_consistency, default_tagged_destructor_set,
6776 default_tagless_destructor_set, default_tagged_printer_set,
6777 default_tagless_printer_set): Update.
6778 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
6779 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
6780 code_props members.
6781 (symbol_print): Use SYMBOL_CODE_PRINT.
6782
f6857bbf
JD
67832007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6784
6785 Use the new code_props interface for rule actions.
6786 * src/symlist.h (symbol_list): Replace action, action_location, and
6787 used members with a code_props action_props member.
6788 * src/reader.c (symbol_should_be_used, grammar_rule_check,
6789 grammar_midrule_action, grammar_current_rule_merge_set,
6790 grammar_current_rule_symbol_append, packgram): Update.
6791 * src/scan-code.h (translate_rule_action): Remove, no longer used.
6792 * src/scan-code.l (handle_action_dollar): Update.
6793 (translate_rule_action): Remove, no longer used.
6794 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
6795
7c0c6181
JD
67962007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6797
6798 Use the new code_props interface in parse-gram.y.
6799 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
6800 Update all uses of translate_* functions to use the new code_props
6801 interface and to use gram_scanner_last_string_free and
6802 code_scanner_last_string_free where possible.
6803 (grammar_declaration): symbol_list_destructor_set and
6804 symbol_list_printer_set now perform the translation, so don't do it
6805 here. Use gram_scanner_last_string_free where possible.
6806 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
6807 translate_code): Remove, no longer used.
6808 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
6809 symbol_list_printer_set): Perform code translation here rather than
6810 depending on the caller to do so.
6811
6812 * src/symlist.h (struct symbol_list): Correct some documentation typos.
6813 * src/scan-gram.h (gram_last_string): Remove declaration.
6814 * src/scan-gram.l (last_string): Declare it static.
6815
28e52c0d
JD
68162007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6817
6818 Encapsulate code properties and related functionality for the various
6819 destructors, printers, and actions into a code_props structure and
6820 interface. This patch merely implements code_props in scan-code.h and
6821 scan-code.l. Future patches will rewrite other modules to use it.
6822 Discussed starting at
6823 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
6824 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
6825 consistently initialize const structs that have an empty location
6826 field.
6827 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
6828 to ensure consistency.
6829 * src/scan-code.h (code_props): New structure.
6830 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
6831 function, macro, and const global variable for initializing a
6832 code_props with no code.
6833 (code_props_plain_init, code_props_symbol_action_init,
6834 code_props_rule_action_init, code_props_translate_code): The rest of
6835 the new code_props functional interface. Among other things, the init
6836 functions set the code_props kind field so that
6837 code_props_translate_code will know whether to behave like
6838 translate_symbol_action, translate_rule_action, or translate_code.
6839 These old translate functions must remain until all other modules are
6840 updated to use the new code_props interface.
6841 (code_scanner_last_string_free): New function similar to
6842 gram_scanner_last_string_free.
6843 (code_scanner_free): Add documentation.
6844 * src/scan-code.l: Implement the new interface.
6845 (code_lex): Make it static, add a code_props* argument, and remove the
6846 rule argument.
6847 (last_string): New static global similar to the one in scan-gram.l.
6848 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
6849 instead of rule.
6850 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
6851 code_props since Bison may one day use this information for destructors
6852 and printers.
6853 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
6854 (handle_action_dollar): Use symbol_list_n_get and set used flag
6855 directly since symbol_list_n_used_set is removed.
6856 (translate_action): Add a code_props* argument and remove the rule,
6857 action, and location arguments. Pass the code_props* on to code_lex.
6858 (translate_rule_action, translate_symbol_action, translate_code):
6859 Rewrite as wrappers around the new code_props interface.
6860 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
6861 it would eventually need to break the encapsulation of code_props.
6862
96034983
JD
68632007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6864
6865 * etc/.cvsignore: New.
6866
945e396c
JD
68672007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6868
6869 Add maintainer-push-check to run maintainer-check using push parsing in
6870 place of pull parsing where available.
6871 * Makefile.am (maintainer-push-check): New.
6872 * data/bison.m4 (b4_use_push_for_pull_if): New.
6873 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
6874 appropriately based on their existing values.
6875 (yypush_parse): Don't print push-parser-specific diagnostics if push
6876 parsing is being used in place of pull parsing.
6877 * data/yacc.c: If push parsing should replace pull parsing, redirect to
6878 push.c.
6879 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
6880 variable, and insert b4_use_push_for_pull_flag into muscles.
6881 * tests/Makefile.am (maintainer-push-check): New.
6882
7d596384
JD
68832006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6884
6885 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
6886 (whether successful or failed) so that yypush_parse can be invoked
6887 again to start a new parse using the same yypstate.
6888 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
6889 check multiple yypull_parse invocations on the same yypstate. For pull
6890 mode, extend to check multiple yyparse invocations.
6891 (Exploding the Stack Size with Alloca): Extend to try with
6892 %push-pull-parser.
6893 (Exploding the Stack Size with Malloc): Likewise.
6894
6895 * tests/calc.at (Simple LALR Calculator): Don't specify
6896 %skeleton "push.c" since %push-pull-parser implies that now.
6897 * tests/headers.at (export YYLTYPE): Don't check for the push
6898 declarations. Otherwise, this test case can't be used to see if push
6899 mode can truly emulate pull mode.
6900 * tests/input.at (Torturing the Scanner): Likewise.
6901 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
6902 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
6903 AT_YACC_IF, which now includes the case of push mode since %skeleton
6904 need not be used for push mode. This will be more intuitive once
6905 push.c is renamed to yacc.c.
6906
7172e23e
JD
69072006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6908
6909 For push mode, convert yyparse from a macro to a function, invoke yylex
6910 instead of passing a yylexp argument to yypull_parse, and don't
6911 generate yypull_parse or yyparse unless %push-pull-parser is declared.
6912 Discussed starting at
6913 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
6914 * data/bison.m4 (b4_pull_if): New.
6915 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
6916 * data/push.c: Improve M4 quoting a little.
6917 (b4_generate_macro_args, b4_parenthesize): Remove.
6918 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
6919 any time a pull parser is requested.
6920 Don't #define this as a wrapper around yypull_parse. Instead, when
6921 both push and pull are requested, make it a function that does that
6922 same thing.
6923 (yypull_parse): If there's a b4_prefix, #define this to
6924 b4_prefix[pull_parse] when both push and pull are requested.
6925 Don't define this as a function unless both push and pull are
6926 requested.
6927 Remove the yylexp argument and hard-code yylex invocation instead.
6928 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
6929 %push-parser.
6930 * src/getargs.c (pull_parser): New global initialized to true.
6931 * getargs.h (pull_parser): extern it.
6932 * src/output.c (prepare): Insert pull_flag muscle.
6933 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6934 (prologue_declaration): Set both push_parser and pull_parser = true for
6935 %push-pull-parser. Set push_parser = true and pull_parser = false for
6936 %push-parser.
6937 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6938 %push-parser since there's no backward-compatibility concern here.
6939 Scan %push-pull-parser.
6940 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6941 instead of %push-parser.
6942 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6943 prototype it in the module that calls yyparse.
6944 * tests/input.at (Torturing the Scanner): Likewise.
6945 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6946
2e7944cb
JD
69472006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6948
6949 Update etc/bench.pl. Optimize push mode a little (the yyn change
6950 deserves most of the credit).
6951 * Makefile.am (SUBDIRS): Add etc subdirectory.
6952 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6953 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6954 yytoken, yyval, and yyloc declarations to...
6955 (yyparse or yypush_parse): ... here to improve performance. For
6956 yypush_parse invocations after the first, be sure to assign yyn its old
6957 value again.
6958 (yypstate_new): Don't bother initializing the yyresult field since the
6959 initial value isn't used.
6960 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6961 remove the #define that, in push mode, set it to yyps->NAME.
6962 * etc/Makefile.am: New.
6963 * etc/bench.pl: Remove and build it instead from...
6964 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6965 "tests/bison" from the build directory by default rather than just
6966 invoking "bison" from $PATH.
6967 (calc_grammar): Update push parser code: don't declare yylval globally,
6968 don't define yyparse_wrapper, and don't #define yyparse.
6969 (bench_grammar): Update to check all working combinations of yacc.c,
6970 push.c, impure, pure, pull, and push.
6971
c3d50342
JD
69722006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6973
6974 For push mode, add pull wrappers around yypush_parse.
6975 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6976 (yypull_parse): New function wrapping yypush_parse.
6977 (yyparse): New #define wrapping yypull_parse.
6978 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6979 is declared.
6980 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6981 prototype yylex in the module that calls yyparse, and don't prototype
6982 yyparse there. Otherwise, the yyparse expansion won't compile.
6983 * tests/input.at (Torturing the Scanner): Likewise.
6984
94ebeba5
JD
69852006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6986
6987 Enable push parsers to operate in impure mode. Thus, %push-parser no
6988 longer implies %pure-parser. The point of this change is to move
6989 towards being able to test the push parser code by running the entire
6990 test suite as if %push-parser had been declared.
6991 * data/push.c (yypush_parse): For impure mode, remove the
6992 yypushed_char, yypushed_val, and yypushed_loc arguments.
6993 Instead, declare these as local variables initialized to the global
6994 yychar, yylval, and yylloc.
6995 For the first yypush_parse invocation only, restore the initial values
6996 of these global variables when it's time to read a token since they
6997 have been overwritten.
6998 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6999 %push-parser.
7000 * tests/calc.at (Simple LALR(1) Calculator): Always declare
7001 %pure-parser along with %push-parser since this test case was designed
7002 for pure push parsers.
7003 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
7004 (AT_YACC_OR_PUSH_IF): New.
7005 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
7006 add a note that it's still wrong for some cases (as it has been for a
7007 while).
7008 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
7009 %push-parser no longer implies %pure-parser.
7010
a0633178
JD
70112006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7012
7013 Remove some unnecessary differences between the pull parser code and
7014 the push parser code. This patch enables yynerrs in push mode.
7015 * data/push.c: Reformat M4 a little.
7016 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
7017 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
7018 because push mode is on. Instead, if pure mode is on, move yynerrs
7019 to...
7020 (b4_declare_parser_state_variables): ... here.
7021 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
7022 to yyps->NAME so it can be used in yypush_parse.
7023 (yypush_parse): Don't omit uses of yynerrs in push mode.
7024
8646b6a3
JD
70252006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7026
7027 Fix bug such that the first pushed token's value and location are
7028 sometimes overwritten (sometimes by %initial-action) before being used.
7029 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
7030 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
7031 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
7032 more closely mimic the pull parser logic.
7033 Don't copy the pushed token to yychar, yylval, and yylloc until it's
7034 time to read a token, which is after any initialization of yylval and
7035 yylloc.
7036 (gottoken): Rename label to...
7037 (yyread_pushed_token): ... for clarity and to avoid infringing on the
7038 user namespace.
7039
9baf4d74
JD
70402006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
7041
7042 Rearrange initialization of the parser state variables so that the
7043 skeleton doesn't have to have a copy for pull mode and another for push
7044 mode. This patch also fixes at least a bug such that yylloc was not
7045 initialized (with b4_location_initial_line and
7046 b4_location_initial_column) upon calling yypush_parse. However, that
7047 initialization now overwrites the first token's location;
7048 %initial-action assigning @$ already did the same thing, and both bugs
7049 will be fixed in a later patch.
7050 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
7051 (b4_declare_parser_state_variables): Remove initialization of yytoken,
7052 yyss, yyvs, yyls, and yystacksize.
7053 (yypstate_new): Remove initialization of some yypstate fields: yystate,
7054 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
7055 yylsp.
7056 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
7057 yyps->NAME so it can be used in yypush_parse.
7058 (yyparse or yypush_parse): For yypush_parse, don't print the
7059 "Starting parse" diagnostic for invocations after the first.
7060 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
7061 yypush_parse, only do it for the first invocation.
7062 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
7063 initialization to occur in yypush_parse but only on the first
7064 invocation.
7065
23522164
JD
70662006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7067
7068 * data/push.c: Add CPP guards around push parser declarations in both
7069 the header and the code file.
7070 In the code file, move the push parser declarations to the same place
7071 they appear in the header file.
7072 Clean up the M4 some, especially the inconsistent underquoting in
7073 some b4_c_function_def and b4_c_function_decl uses.
7074
bb010fe5
JD
70752006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7076
7077 Encapsulate the push parser state variables into an M4 macro so the
7078 push skeleton doesn't have to list them again for pull mode's yyparse.
7079 For push mode, remove yypush_parse's local equivalents of these
7080 variables to eliminate unnecessary copying between the two sets at
7081 run-time. This patch also fixes at least a bug related to multiple
7082 %initial-action invocations in push mode.
7083 * data/push.c (b4_declare_parser_variables): Rename to...
7084 (b4_declare_scanner_communication_variables): ... this for clarity and
7085 update both uses.
7086 (b4_declare_yyparse_variables): Remove and move its contents to the one
7087 spot where it was invoked.
7088 (b4_declare_parser_state_variables): New macro containing the parser
7089 state variables required by push mode.
7090 (struct yypstate): Replace all fields but yynew with
7091 b4_declare_parser_state_variables.
7092 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
7093 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
7094 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
7095 (yyparse or yypush_parse): For yyparse in pull mode, replace local
7096 parser state variable declarations with
7097 b4_declare_parser_state_variables.
7098 Don't initialize parser state variables when calling yypush_parse since
7099 yypstate_new already does that.
7100 Invoke the user's initial action only upon the first yypush_parse
7101 invocation.
7102 Remove all code that copies between the local parser state variables
7103 and the yypstate.
7104
2d212f8c
JD
71052006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
7106
7107 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
7108 prevent a name collision in a future patch where these names will
7109 sometimes be #define'd.
7110 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
7111 since it no longer has the same name as the existing argument.
7112 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
7113
e6e704dc
JD
71142006-12-19 Paolo Bonzini <bonzini@gnu.org>
7115 and Joel E. Denny <jdenny@ces.clemson.edu>
7116
7117 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
7118 that the argument is case-insensitive, and there's no `=' here.
7119 For the %skeleton entry, mention that %language is better.
7120 (Bison Options): Likewise for --language and --skeleton. Move the
7121 --skeleton entry so that the `Tuning the parser' section is sorted
7122 alphabetically on long options.
7123 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
7124 %language directive in detail here; cross-reference the %language
7125 documentation instead.
7126 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
7127 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 7128 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
7129 * examples/extexi (normalize): Instead of replacing every %require
7130 argument with the current Bison version, just substitute for
7131 `@value{VERSION}'. This guarantees that we're testing what actually
7132 appears in the documentation.
7133 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
7134 rather than `@VERSION@'.
7135
0e021770
PE
71362006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7137
fd575f05
PE
7138 * NEWS: Reword the %language news a bit, and put it earlier.
7139
0e021770
PE
7140 * src/getargs.c (skeleton_arg): Last arg is now location const *.
7141 Rewrite to simplify the logic.
7142 (language_argmatch): Likewise.
fd575f05
PE
7143 (program_name): We now own this var.
7144 * src/getargs.h (struct bison_language): Use char[] rather than
7145 const char *.
0e021770
PE
7146
7147 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
7148 Java is supported.
7149 * src/complain.c (program_name): Remove decl; no longer needed.
7150 * src/main.c (program_name): Remove; now belongs to getargs.
7151
71522006-12-18 Paolo Bonzini <bonzini@gnu.org>
7153
7154 * NEWS: Document %language.
7155
7156 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
7157
7158 * data/c-skel.m4, data/c++-skel.m4: New files.
7159 * data/glr.c: Complain on push parsers.
7160
7161 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
7162 over %skeleton.
148d66d8 7163 (Decl Summary): Document %language and %skeleton.
0e021770
PE
7164 (Command line): Document -L.
7165
7166 * examples/extexi: Rewrite %require directive.
7167 * examples/calc++/Makefile.am: Pass VERSION to extexi.
7168
7169 * src/files.c (compute_exts_from_gc): Look in language structure
7170 for .y extension.
7171 (compute_file_name_parts): Check whether .tab should be added.
7172 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
7173 (language, skeleton_arg, language_argmatch): New.
7174 (long_options): Add --language.
7175 (getargs): Use skeleton_arg, add -L/--language.
7176 * src/getargs.h: Include location.h.
7177 (struct bison_language, language, skeleton_arg, language_argmatch): New.
7178 * src/output.c (prepare): Pick default skeleton from struct language.
7179 Don't dispatch C skeletons here.
7180 * src/parse-gram.y (PERCENT_LANGUAGE): New.
7181 (prologue_declaration): Add "%language" rule, use skeleton_arg.
7182 * src/scan-gram.l ("%language"): New rule.
7183
7184 * tests/calc.at: Test %skeleton and %language.
7185 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
7186 (AT_GLR_IF): Look for %skeleton "glr.cc".
7187 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
7188 (AT_YACC_IF): Reject %language.
7189
5691bf57
PE
71902006-12-18 Paul Eggert <eggert@cs.ucla.edu>
7191
db06f0ce
PE
7192 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
7193 since it wasn't used; only the typedef name 'semantic_type' is needed.
7194 Also, omit trailing white space.
7195
5691bf57
PE
7196 * bootstrap: Sync from coreutils.
7197 (gnulib_extra_files): Add build-aux/announce.gen.
7198 (slurp): Adjust .gitignore files like .cvsignore files.
7199 * build-aux/announce-gen: Remove from CVS, since bootstrap
7200 now creates this.
7201
791934e4
JD
72022006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
7203
7204 Make %push-parser imply %pure-parser. This fixes several bugs; see
7205 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
7206 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
7207 pure_parser = true.
7208 * data/push.c: Don't bother testing b4_push_if when deciding whether
7209 to expand b4_declare_parser_variables globally.
7210 (yypush_parse): Likewise in here.
7211
7212 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
7213 (yy_reduce_print): Reformat M4 for readability.
7214
ee5abb37
JD
72152006-12-15 Bob Rossi <bob@brasko.net>
7216 and Joel Denny <jdenny@ces.clemson.edu>
7217
7218 * data/push.c (yypstate): Add typedef, and update all uses of
7219 struct yypstate to just yypstate.
7220 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
7221
16ca01f9
JD
72222006-12-14 Bob Rossi <bob@brasko.net>
7223
7224 * data/push.c (yypush_parse): Declare prototype regardless of
7225 %locations option.
7226
ab8e7e1a
JD
72272006-12-14 Bob Rossi <bob@brasko.net>
7228
7229 * data/push.c (yyparse): Remove the prototype and the #define when in
7230 push-parser mode.
7231
9bf32be3
JD
72322006-12-13 Bob Rossi <bob@brasko.net>
7233
7234 * data/push.c (yypstate_init): Rename to...
7235 (yypstate_new): ... this and use b4_c_function_def.
7236 (yypstate_delete): New.
7237 (yypush_parse): Change parameters yynval and yynlloc to be const.
7238 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
7239 yypstate_delete functions.
7240
f02e2948
JD
72412006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
7242
7243 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
7244 strange test case titles. Reported by Bob Rossi.
7245
38eb7751
PE
72462006-12-13 Paul Eggert <eggert@cs.ucla.edu>
7247
7248 * TODO: Add pointer to Sylvain Schmitz's work on static detection
7249 of potential ambiguities in GLR grammers.
7250
bd9d212b
JD
72512006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
7252
7253 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
7254 `bison ', use m4_index instead of m4_substr since chopping up a string
7255 containing M4-special characters causes problems here.
7256
7257 Fix a couple of bugs related to special characters in user-specified
7258 file names, and make it easier for skeletons to compute output file
7259 names with the same file name prefix as Bison-computed output file
7260 names.
7261 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
7262 b4_parser_file_name and b4_spec_defines_file instead of
7263 @output_parser_name@ and @output_header_name@, which are now redundant.
7264 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
7265 b4_parser_file_name, b4_spec_defines_file, and the new
7266 @basename(FILENAME@) instead of @output_parser_name@ and
7267 @output_header_name@, which inappropriately escaped the file names as
7268 C string literals.
7269 * src/files.c (all_but_ext): Remove static qualifier.
7270 (compute_output_file_names): Move `free (all_but_ext)' to...
7271 (output_file_names_free): ... here since all_but_ext is needed later.
7272 * src/files.h (all_but_ext): Extern.
7273 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
7274 exactly what MUSCLE_INSERT_STRING used to do.
7275 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
7276 characters are escaped properly.
7277 * src/output.c (prepare): Define muscle file_name_all_but_ext as
7278 all_but_ext.
7279 For pkgdatadir muscle, maintain previous functionality by using
7280 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
7281 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
7282 digraphs would never be expanded. Hopefully no one has M4-special
7283 characters in his Bison installation path.
7284 * src/scan-skel.l: Don't parse @output_header_name@ and
7285 @output_parser_name@ anymore since they're now redundant.
7286 In @output, use decode_at_digraphs.
7287 Parse a new @basename command that invokes last_component.
7288 (decode_at_digraphs): New.
7289 (BASE_QPUTS): Remove unused.
7290 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
7291 (Output file name): New tests.
7292
3f7ca628
JD
72932006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
7294
7295 Warn about output files that are generated by the skeletons and that
7296 conflict with other output files.
7297 * data/glr.c: Don't generate the header file here when glr.cc does.
7298 * src/files.c (file_names, file_names_count): New static globals.
7299 (compute_output_file_names): Invoke output_file_name_check for files
7300 not generated by the skeletons and remove existing checks.
7301 (output_file_name_check): New function that warns about conflicting
7302 output file names.
7303 (output_file_names_free): Free file_names.
7304 * src/files.h (output_file_name_check): Declare.
7305 * src/scan-skel.l: Invoke output_file_name_check for files generated by
7306 the skeletons.
7307 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
7308 (Conflicting output files): New tests.
7309
178e123e
PE
73102006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
7311
7312 * doc/bison.texinfo: Fix a couple of typos.
7313
73142006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
7315
7316 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
7317 Rename to...
7318 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
7319 update all uses.
7320 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
7321 (yypush_parse): Rename yypvars argument to yyps and remove redundant
7322 local pv.
7323 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
7324 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
7325
ea17f233
JD
73262006-12-07 Bob Rossi <bob@brasko.net>
7327 and Joel Denny <jdenny@ces.clemson.edu>
7328
7329 * data/push.c (yypvarsinit): Change return type from void* to struct
7330 yypvars*. No longer cast to void* on return.
7331 (struct yypvars): Remove yylen since it need not be remembered between
7332 yypushparse invocations.
7333 (yypushparse): Don't copy between yylen and pv->yylen.
7334
55a30bda
JD
73352006-12-05 Bob Rossi <bob@brasko.net>
7336
7337 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
7338 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
7339 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
7340 (struct yypvars): Remove b4_declare_parser_variables.
7341 (yypvarsinit): Remove init code for removed variables.
7342 (global scope): Do not declare b4_declare_parser_variables if
7343 push or pure mode.
7344 (yypushparse): Add b4_declare_parser_variables.
7345 Init new local variables, and remove init code for removed
7346 yypvars variables.
7347 (yyparse): Delete.
7348 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
7349 and yyparse for other modes.
7350 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
7351 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
7352 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
7353 (AT_PURE_LEX_IF): True if pure or push parser.
7354
85894313
JD
73552006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
7356
7357 Document Yacc prologue alternatives and default %destructor's and
7358 %printer's as experimental. Don't mention Java yet. Discussed at
7359 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
7360 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
7361 (2.3a): Annotate this entry to say the old forms of these features were
7362 also experimental.
7363 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 7364 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
7365 of Java (we'll want this back eventually).
7366
02975b9a
JD
73672006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
7368
7369 Support a file name argument to %defines. Deprecate `=' in
7370 %file-prefix, %name-prefix, and %output. Discussed at
7371 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
7372 * NEWS (2.3a+): Mention.
148d66d8 7373 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
7374 form of %defines, and remove `=' from entries for %file-prefix,
7375 %name-prefix, and %output.
7376 * src/parse-gram.y (prologue_declaration): Implement.
7377 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
7378 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
7379 all but one occurrence of %name-prefix.
7380 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
7381 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
7382 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
7383 occurrence of each of %file-prefix and %output. Add check for %defines
7384 with argument.
7385 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
7386 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
7387 Remove the `=' from %output.
7388
287b314e
JD
73892006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
7390
7391 Don't escape $ in test case titles since Autoconf 2.61 now does that
7392 correctly.
7393 * tests/actions.at (Default %printer and %destructor are not for error
7394 or $undefined): Here.
7395 (Default %printer and %destructor are not for $accept): Here.
7396 * tests/input.at (Invalid $n and @n): Here.
7397
3ebecc24
JD
73982006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
7399
7400 Rename <!> to <>. Discussed starting at
7401 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
7402 * NEWS (2.3a+): Update.
148d66d8 7403 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
7404 Update.
7405 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
7406 * src/scan-gram.l (INITIAL): Implement.
7407 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
7408 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
7409 comment.
7410 * tests/actions.at (Default tagless %printer and %destructor,
7411 Default tagged and per-type %printer and %destructor,
7412 Default %printer and %destructor are not for error or $undefined,
7413 Default %printer and %destructor are not for $accept,
7414 Default %printer and %destructor for mid-rule values): Update.
7415 * tests/input.at (Default %printer and %destructor redeclared,
7416 Unused values with default %destructor): Update.
7417
26b8a438
JD
74182006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
7419
7420 Don't let %prec take a nonterminal.
7421 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
7422 token.
7423 * tests/input.at (%prec takes a token): New test checking that %prec
7424 won't take a nonterminal.
7425
07c39ae9
JD
74262006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7427
405d53b7
JD
7428 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
7429 it was double-quoted.
07c39ae9
JD
7430 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
7431 grammar is maintained with Bison's highest standards.
7432 * src/getargs.c: Fix some typos in Doxygen comments.
7433
580b8926
JD
74342006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
7435
7436 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
7437 later. Reported by Paul Eggert in
7438 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
7439 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
7440 * src/scan-code.l (translate_action): Don't bother invoking
7441 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
7442 (code_scanner_free): Instead of invoking
7443 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
7444 which frees more.
7445 * src/scan-gram.l (gram_scanner_free): Likewise.
7446 * src/scan-skel.l (scan_skel): Likewise.
7447
4502eadc
JD
74482006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
7449
7450 * src/files.c (tr): Change return type to void.
7451 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
7452 has been called previously for the same key.
7453 (muscle_find): Return storage instead of value so that
7454 --enable-gcc-warnings doesn't produce warnings that the return discards
7455 const. aver that the value and storage are the same since storage
7456 could potentially be NULL when value is not.
7457 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
7458 same as 0.
7459
7746c8f6
PE
74602006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7461
7462 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
7463 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
7464 us a slightly cleaner distribution, and also works.
7465 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
7466 gnulib changes.
7467
eb095650
PE
74682006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
7469 and Paul Eggert <eggert@cs.ucla.edu>
7470
7471 Don't let Bison leak memory except when it complains.
7472 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
7473 (spec_defines_file, dir_prefix): Now char *, not const char *,
7474 since they are freed.
7475 * src/files.c: Likewise.
7476 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
7477 Likewise.
7478 (tr): Now operates in-place. All uses changed.
7479 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
7480 values.
7481 (compute_file_name_parts, compute_output_file_names): Don't store
7482 read-only data in variables that will be freed.
7483 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
7484 src_extension, and header_extension.
7485 (output_file_names_free): New public function to free
7486 spec_verbose_file, spec_graph_file, spec_defines_file,
7487 parser_file_name, and dir_prefix.
7488 * src/getargs.c (getargs): Don't store read-only data in variables that
7489 will be freed.
7490 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
7491 (which previously existed but was unused), and quotearg_free.
7492 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
7493 * src/muscle_tab.c: Likewise.
7494 (muscle_entry): Make the value char const *,
7495 and add a new storage member that is char * and can be freed.
7496 (muscle_entry_free): New private function.
7497 (muscle_init): Use it instead of free.
7498 (muscle_insert, muscle_grow): Update and use new storage member.
7499 (muscle_code_grow): Free the string passed to muscle_grow
7500 since it's not needed anymore.
7501 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
7502 add a new `char *code' member.
7503 ("{...}"): Declare semantic type as code.
7504 * src/scan-code.h (translate_rule_action):
7505 (translate_symbol_action, translate_code, translate_action): Return
7506 `char const *' rather than `char *' since external code should not free
7507 these strings.
7508 * src/scan-code.l: Likewise.
7509 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
7510 which is "{...}" in the parser.
7511 * tests/Makefile.am (maintainer-check-valgrind): Set
7512 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
7513 Valgrind.
7514 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
7515 complain.
7516 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
7517 expecting a non-zero exit status sets --leak-check=summary and
7518 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
7519 this case, and we don't want to hear about it.
7520
ac564be4
PE
75212006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7522
7523 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
7524 instead of from the template, to simplify configuration a bit.
7525 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
7526 and m4/wint_t.m4, as they are needed with the latest gnulib.
7527
17bd8a73
JD
75282006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7529
7530 Disable unset/unused mid-rule value warnings by default, and recognize
7531 --warnings=midrule-values to enable them. Discussed starting at
7532 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
7533 * NEWS (2.3a+): Mention.
7534 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
7535 warnings): Add entry for midrule-values subargument.
7536 * src/reader.c (symbol_should_be_used): Don't return true just because
7537 the value is a set/used mid-rule value unless
7538 --warnings=midrule-values was specified.
7539 * tests/input.at (Unused values, Unused values before symbol
7540 declarations): Run tests with and without --warnings=midrule-values.
7541
7542 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
7543 than LIST_FREE directly.
7544
89eb3c76
JD
75452006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7546
7547 Finish implementing --warnings=error, which should not be implied by
7548 --warnings=all (or by its synonyms -W and --warnings without
7549 subarguments).
7550 * src/complain.c (set_warning_issued): New function to report that
7551 warnings are being treated as errors and to record an error if so.
7552 Invoke...
7553 (warn_at, warn): ... here.
7554 * src/getargs.c (warnings_args, warnings_types): Reorder so that
7555 "error - warnings are errors" does not appear above "all - all of the
7556 above".
7557 (getargs): For -W and --warnings without subarguments, don't let
7558 FLAGS_ARGMATCH set warnings_error in warnings_flag.
7559 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
7560
ba7560e2
JD
75612006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7562
7563 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
7564 empty subargument list. For example: `bison --warnings= parser.y'.
7565
31283fc3
JD
75662006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7567
7568 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
7569 the parser header file so that gcc doesn't warn.
7570
12e35840
JD
75712006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7572
7573 Split the default %destructor/%printer into two kinds: <*> and <!>.
7574 Discussed starting at
7575 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
7576 * NEWS (2.3a+): Mention.
7577 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
7578 previous change today related to mid-rules.
148d66d8 7579 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 7580 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
7581 (TYPE_TAG_ANY): Add as <*>.
7582 (TYPE_TAG_NONE): Add as <!>.
7583 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
7584 for <*> and <!>.
7585 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
7586 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
7587 * src/symlist.c (symbol_list_default_new): Split into tagged and
7588 tagless versions.
7589 (symbol_list_destructor_set, symbol_list_printer_set): Split
7590 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
7591 SYMLIST_DEFAULT_TAGLESS.
7592 * src/symlist.h: Update symbol_list_default*_new prototypes.
7593 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
7594 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
7595 * src/symtab.c (default_destructor, default_destructor_location,
7596 default_printer, default_printer_location): Split each into tagged and
7597 tagless versions.
7598 (symbol_destructor_get, symbol_destructor_location_get,
7599 symbol_printer_get, symbol_printer_location_get): Implement tagged
7600 default and tagless default cases.
7601 (default_destructor_set, default_printer_set): Split each into tagged
7602 and tagless versions.
7603 * src/symtab.h: Update prototypes.
7604 * tests/actions.at (Default %printer and %destructor): Rename to...
7605 (Default tagless %printer and %destructor): ... this, and extend.
7606 (Per-type %printer and %destructor): Rename to...
7607 (Default tagged and per-type %printer and %destructor): ... this, and
7608 extend.
7609 (Default %printer and %destructor for user-defined end token): Extend.
7610 (Default %printer and %destructor are not for error or $undefined):
7611 Update.
7612 (Default %printer and %destructor are not for $accept): Update.
7613 (Default %printer and %destructor for mid-rule values): Extend.
7614 * tests/input.at (Default %printer and %destructor redeclared): Extend.
7615 (Unused values with default %destructor): Extend.
7616
f91b1629
JD
76172006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7618
7619 Don't apply the default %destructor/%printer to an unreferenced midrule
7620 value. Mentioned at
7621 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
7622 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
7623 like $@n instead of just @n so that the default %destructor/%printer
7624 logic doesn't see them as user-defined symbols.
7625 (symbol_is_dummy): Check for both forms of the name.
7626 * src/reader.c (packgram): Remove the `$' from each midrule symbol
7627 name for which the midrule value is referenced in any action.
7628 * tests/actions.at (Default %printer and %destructor for mid-rule
7629 values): New test.
7630 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
7631 for change to dummy symbol names.
7632
519d0004
JD
76332006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7634
7635 Warn about unset midrule $$ if the corresponding $n is used.
7636 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
7637 $n usage.
7638 (packgram): Before invoking grammar_rule_check on any rule, make sure
7639 all actions have already been scanned in order to set `used' flags.
7640 Otherwise, checking that a midrule's $$ is set will not always work
7641 properly because the midrule check must forward-reference the midrule's
7642 parent rule.
7643 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
7644 warning.
7645
a501eca9
JD
76462006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7647
7648 More improvements to the documentation of the prologue alternatives:
7649 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
7650 Bison manual.
7651 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
7652 some text to clarify the relative importance of the new directives and
7653 to show how these directives may be viewed as code labels.
7654
2cbe6b7f
JD
76552006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
7656
7657 Similar to the recently removed %before-header, add %code-top as the
7658 alternative to the pre-prologue. Mentioned at
7659 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
7660 Also, let the prologue alternatives appear in the grammar section.
7661 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
7662 (prologue_declaration): Move the existing prologue alternatives to...
7663 (grammar_declaration): ... here and add %code-top.
7664 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
7665
7666 Clean up and extend documentation for the prologue alternatives.
7667 * NEWS (2.3a+): Describe prologue alternatives.
7668 * doc/bison.texinfo (Prologue): Move discussion of prologue
7669 alternatives to...
7670 (Prologue Alternatives): ... this new section, and extend it to discuss
7671 all 4 directives in detail.
148d66d8
JD
7672 (Table of Symbols): Clean up discussion of prologue alternatives and
7673 add %code-top.
2cbe6b7f 7674
e557d3ea
JMG
76752006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7676
7677 DJGPP specific issues.
7678
7679 * djgpp/config.bat: config.hin has been moved to lib. Adjust
7680 config.bat accordingly.
7681 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
7682 * djgpp/config.site: Likewise.
7683
136a0f76
PB
76842006-10-16 Paolo Bonzini <bonzini@gnu.org>
7685
27bd5d67
PB
7686 Replace %*-header with %provides, %requires, %code. See discussion at
7687 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
7688
136a0f76
PB
7689 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
7690 (b4_user_start_header): Remove.
7691 * data/glr.c: Use new macros instead of b4_*start_header
7692 and b4_*end_header.
7693 * data/glr.cc: Likewise.
7694 * data/lalr1.cc: Likewise.
7695 * data/push.c: Likewise.
7696 * data/yacc.c: Likewise.
7697
7698 * doc/bison.texinfo: Remove %before-header, rename
7699 %{start,end,after}-header to %requires, %provides, %code.
7700
7701 * src/parse-gram.y: Likewise (also rename token names accordingly).
7702 * src/scan-gram.l: Likewise.
7703 * tests/actions.at: Likewise.
7704
10f429ef
PE
77052006-10-14 Paul Eggert <eggert@cs.ucla.edu>
7706
7707 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
7708 Problem reported by Joel E. Denny.
7709
77102006-10-14 Jim Meyering <jim@meyering.net>
7711
7712 (Sync from coreutils.)
7713 Work also when the working directory (with e.g. coreutils sources)
7714 is version controlled with git, rather than CVS.
7715 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
7716 rather than CVS.
7717 In messages and comments, say e.g., "checked-out sources",
7718 rather than "CVS sources".
7719 (version_controlled_file): New function. Work for git as well as
7720 for CVS. Don't use grep's -q option.
7721 (slurp): Call it here, in place of CVS-specific code.
7722
c4bd5bf7
JD
77232006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
7724
7725 Fix testsuite for ./configure --enable-gcc-warnings:
7726 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
7727 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
7728 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
7729 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
7730 * test/regression.at (Diagnostic that expects two alternatives):
7731 Likewise.
7732
46356ea4
PE
77332006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7734
231ed89a
PE
7735 * bootstrap.conf (gnulib_modules): Add config-h.
7736 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
7737 worry about HAVE_CONFIG_H.
7738 * lib/abitset.c: Likewise.
7739 * lib/bitset.c: Likewise.
7740 * lib/bitset_stats.c: Likewise.
7741 * lib/bitsetv-print.c: Likewise.
7742 * lib/bitsetv.c: Likewise.
7743 * lib/ebitset.c: Likewise.
7744 * lib/get-errno.c: Likewise.
7745 * lib/lbitset.c: Likewise.
7746 * lib/subpipe.c: Likewise.
7747 * lib/timevar.c: Likewise.
7748 * lib/vbitset.c: Likewise.
7749 * lib/bitset.c: Include "bitset.h" first, to test interface.
7750 * lib/bitset_stats.c: Include "bitset_stats.h" first.
7751 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
7752 * lib/bitsetv.c: Include "bitsetv.h" first.
7753 * lib/get-errno.c: Include "get-errno.h" first.
7754 * m4/.cvsignore: Add config-h.m4.
7755 * tests/actions.at (Default %printer and %destructor for ...):
7756 Adjust expected line numbers in output to reflect removal of #if
7757 HAVE_CONFIG_H lines.
7758 * tests/glr-regression.at (Missed %merge type warnings when ...):
7759 Likewise.
7760 * tests/regression.at (Braced code in declaration in rules section):
7761 Likewise.
7762 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
7763 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
7764 Include <config.h> unconditionally.
7765
46356ea4
PE
7766 * bootstrap: Sync from coreutils, as follows:
7767
7768 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7769
7770 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
7771 variable was sometimes used without being initialized. This
7772 messed up the installation of the INSTALL file in some cases.
7773
7774 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7775
7776 * bootstrap (usage, main program, symlink_to_gnulib): Add option
7777 --copy. Inspired by a suggestion from Bruno Haible.
7778
7779 2006-10-03 Jim Meyering <jim@meyering.net>
7780
7781 * bootstrap: Undo last change to this file, since now gnulib-tool
7782 sticks with the automake default in generating dependencies.
7783
dd4bf078
PE
77842006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7785
cf2a5f7c
PE
7786 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
7787 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
7788
7789 * doc/bison.1: Add copyright notice.
7790
7791 * data/glr.c: Don't include <stdarg.h>; not used.
7792
35fe0834
PE
7793 * NEWS: The -g and --graph options now output graphs in Graphviz
7794 DOT format, not VCG format.
7795 * doc/bison.1: Likewise.
7796 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
7797 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
7798 of this change in
7799 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
7800 * TODO: Remove Graphviz entry.
7801 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
7802 remove vcg.c, vcg.h, vcg_defaults.h.
7803 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
7804 * src/graphviz.c, src/graphviz.h: New files.
7805 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
7806 * src/files.h: Make comment more generic.
7807 * src/main.c (main): Likewise.
7808 * src/print_graph.h: Likewise.
7809 * src/getargs.c (usage): Make usage description more generic.
7810 * src/print_graph.c: Include graphviz.h rather than vcg.h.
7811 (static_graph, fgraph): Remove. All uses changed to pass
7812 arguments instead of sharing a static var.
7813 (print_core, print_actions, print_state, print_graph):
7814 Output graphviz format rather than VCG format.
7815 * tests/.cvsignore: Remove *.vcg; add *.dot.
7816 * tests/output.at: Expect *.dot files, not *.vcg files.
7817
dd4bf078
PE
7818 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
7819 accommodates the 2006-10-08 change.
7820
efdd7421
PE
78212006-10-11 Bob Rossi <bob@brasko.net>
7822
7823 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
7824 (b4_yyssa, b4_yyerror_range): New macros.
7825 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
7826 (yypvarsinit): Remove init of removed fields.
7827 (yypushparse): Remove use of removed fields; use new macros instead.
7828
96a1981a
PE
78292006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7830
7831 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
7832 in a push parser. Reindent slightly to match yacc.c better.
7833
78342006-10-11 Bob Rossi <bob@brasko.net>
7835
46356ea4
PE
7836 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
7837 yymsg_alloc fields.
7838 (yypvarsinit, yypushparse): Remove init of removed fields.
7839 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 7840
c1630a8b
PE
78412006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7842
7843 * THANKS: Add Paolo Bonzini and Bob Rossi.
7844
90b9908d
PB
78452006-10-08 Paolo Bonzini <bonzini@gnu.org>
7846
7847 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
7848 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
7849 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
7850 b4_define_user_cde and uses): Remove.
7851 (b4_comment, b4_prefix, b4_sync_start): New.
7852 * data/bison.m4: New file, with most of the content removed from c.m4.
7853 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
7854 * src/output.c (output_skeleton): Pass bison.m4.
7855 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
7856 only if specified.
7857
cf806753
PE
78582006-10-05 Paul Eggert <eggert@cs.ucla.edu>
7859
7860 Fix test failure reported by Tom Lane in
7861 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
7862 and try to make such failures easier to catch in the future.
7863 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
7864 that's now the caller's responsibility.
7865 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
7866 Set yychar = YYEOF if it's negative.
7867 * tests/actions.at (yylex): Abort if asked to read past EOF.
7868 * tests/conflicts.at (yylex): Likewise.
7869 * tests/cxx-type.at (yylex): Likewise.
7870 * tests/glr-regression.at (yylex): Likewise.
7871 * tests/input.at (yylex): Likewise.
7872 * tests/regression.at (yylex): Likewise.
7873 * tests/torture.at (yylex): Likewise.
7874
0e2f006a
PE
78752006-10-01 Paul Eggert <eggert@cs.ucla.edu>
7876
7877 Fix problems with translating English-language diagnostics.
7878 * bootstrap: Fix bug introduced in recent bootstrap changes, with
7879 respect to bison-runtime pot generation. The YY_ stuff
7880 wasn't being captured.
7881 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
7882 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
7883 * runtime-po/POTFILES.in: Add data/push.c.
7884
e3ddc1e3
PE
78852006-09-29 Paul Eggert <eggert@cs.ucla.edu>
7886
7887 Merge bootstrap changes from coreutils.
7888
7889 2006-09-28 Jim Meyering <jim@meyering.net>
7890
7891 Automatically generated dependencies are important even
7892 when all of the sources in a directory come from gnulib.
7893 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
7894 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
7895
7896 2006-09-23 Jim Meyering <jim@meyering.net>
7897
7898 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
7899
7900 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7901
7902 * bootstrap: Add support for --force.
7903 (usage): New function. Describe usage less tersely.
7904 (CVS_only_file): New var.
7905
01e972b3
PE
79062006-09-21 Paul Eggert <eggert@cs.ucla.edu>
7907
7908 * data/push.c (YYPUSH_MORE): Make it an enum instead.
7909 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
7910 Adjust white space and comments to match GNU style better.
7911
c63d3e90
PE
79122006-09-20 Bob Rossi <bob@brasko.net>
7913
7914 * data/push.c (yyresult_get): Remove function.
7915 (YYPUSH_MORE): Add #define.
7916 (yypushparse): Modify return value.
7917
e70f46d1
PE
79182006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7919
7920 * stamp-h.in: Remove; no longer needed.
7921 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
7922 Remove config.h, config.hin, intl (no longer created).
7923 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
7924 stamp-h1.
7925
7926 Sync bootstrap from coreutils, as follows:
7927
7928 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
7929
7930 * bootstrap (symlink_to_gnulib): New function.
7931 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7932 to copies-of-gnulib.
7933 (cp_mark_as_generated, slurp, gnulib_files):
7934 Avoid making a copy if it's the same as the old version.
7935 (gnulib_files): Add support for this variable (used by Bison).
7936
a92be413
PE
79372006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7938
7939 * src/getargs.c (usage): Rework to use conventions similar to
7940 coreutils, to make translation a bit easier and the code a bit
7941 smaller. Problem reported by Tim Van Holder.
7942
4f82b42a
PE
79432006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7944
3b2942e6
PE
7945 Use some of gnulib's new modules, taken from coreutils.
7946
7947 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7948 * bootstrap.conf: New file.
7949 (gnulib_modules): Add configmake, inttypes, unistd.
7950 (XGETTEXT_OPTIONS): Add complain, complain_at,
7951 fatal, fatal_at, warn, warn_at, unexpected_end.
7952 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7953 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7954 (gl_EARLY): Add.
7955 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7956 (gl_INIT): Add
7957 (GNULIB_AUTOCONF_SNIPPET): Remove.
7958 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7959 the pickiest.
7960 * lib/.cvsignore: Add inttypes_.h.
7961 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7962 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7963 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7964 no-longer-necessary initializations.
7965 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7966 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7967 use the unistd module.
7968 * src/system.h: Likewise.
7969 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7970 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7971 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7972 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7973 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7974 * src/system.h: Include inttypes.h unconditionally, now that we
7975 use the inttypes module. Don't bother to include stdint.h, since
7976 inttypes.h now does that for us.
7977 (LOCALEDIR): Remove, now that we use the configmake module.
7978 * src/getargs.c: Include configmake.h.
7979 * src/main.c: Likewise.
7980 * src/output.c: Likewise.
7981 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7982 not from $abs_top_builddir, since config.h moved.
7983
7984
4f82b42a
PE
7985 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7986 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7987
7988 * src/parse-gram.y (symbol_declaration): Don't put statements
7989 before declarations; it's not portable to C89.
7990 * src/scan-code.l (handle_action_at): Likewise.
7991
7992 * src/scan-code.l: Always initialize braces_level; the old code
7993 left it uninitialized and therefore had undefined behavior.
7994
7995 Don't attempt to redefine 'assert', since it runs afoul of
7996 systems where standard headers (mistakenly) include <assert.h>.
7997 Instead, define and use our own alternative, called 'aver'.
7998 * src/reader.c: Don't include assert.h, since we no longer
7999 use assert.
8000 * src/scan-code.l: Likewise.
8001 * src/system.h (assert): Remove, replacing with....
8002 (aver): New function, taking a bool arg. All uses changed.
8003 * src/tables.c (pack_vector): Ensure that aver arg is bool,
8004 not merely an integer.
8005
31c10e38
PE
80062006-09-15 Bob Rossi <bob@brasko.net>
8007
d6bdb90a
JD
8008 Add support for push parsing. Based on the original work of
8009 Odd Arild Olsen <oao@fibula.no>.
31c10e38
PE
8010 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
8011 * data/c.m4 (YYPUSH): New.
8012 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
d6bdb90a 8013 * data/push.c: New file.
31c10e38
PE
8014 * src/getargs.c (push_parser): New var.
8015 * src/getargs.h (push_parser): New declaration.
8016 * src/output.c (prepare): Add macro insertion of `push_flag'.
8017 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
8018 (prologue_declaration): Parse %push-parser.
8019 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
8020 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
8021 list of removed lines from the traces observed.
8022 (AT_CHECK_CALC_LALR): Added push parser tests.
8023
fa7b79c0
PE
80242006-09-13 Paul Eggert <eggert@cs.ucla.edu>
8025
21fe08ca
PE
8026 * NEWS: Version 2.3a.
8027 * configure.ac (AC_INIT): Likewise.
8028
e8ec4d9b
PE
8029 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
8030 "#define YYSTYPE int" that caused "make maintainer-check" to fail
8031 due to header ordering dependencies. I don't know why the #define
8032 was there.
8033
fa7b79c0
PE
8034 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
8035 runtime cost when YYDEBUG is not defined, and so that some tests
8036 that used to fail now work. Problem and initial suggestion by
8037 Paolo Bonzini.
8038 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
8039 * data/glr.cc (b4_parser_class_name):
8040 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
8041 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
8042 (yydebug_) [YYDEBUG]: New member.
8043 (yycdebug_): Now defined only if YYDEBUG.
8044 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
8045 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
8046 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
8047 if YYYDEBUG.
8048 (debug_stream, set_debug_stream, debug_level, set_debug_level):
8049 Define only if YYDEBUG.
8050 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
8051 set_debug_level.
8052 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
8053 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
8054 AT_CHECK_CALC_GLR_CC that are working now.
8055
4ec13d60
PE
80562006-09-12 Paul Eggert <eggert@cs.ucla.edu>
8057
8058 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
8059 We don't need them in glr.cc, and glr.c defines them.
8060 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
8061 assumes that defining it to anything is the same as defining
8062 it to 1. Problem reported by Paolo Bonzini.
8063
8e1687ae
PE
80642006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
8065
8066 * data/c.m4 (b4_null, b4_case): Define.
8067 * src/output.c (prepare_symbols): Use b4_null.
8068 (user_actions_output): Use b4_case.
8069
3dc5e96b
PE
80702006-09-11 Paul Eggert <eggert@cs.ucla.edu>
8071
aef3da86
PE
8072 * data/glr.c (b4_shared_declarations): Put start-header first,
8073 before any #includes that we generate, so that feature-test
8074 macros work. Problem reported by Michael Deutschmann in
8075 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
8076 * data/lalr1.cc: Likewise.
8077 * doc/bison.texinfo (Prologue): Document that feature-test macros
8078 should be defined before any Bison declarations.
8079 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
8080 that depend on location.hh after, not before, Bison decls, since
8081 we now include location.hh after the first user prologue.
8082
3dc5e96b
PE
8083 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
8084 Sander Brandenburg in
8085 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
8086 Also, fix minor white space and comment issues.
aef3da86
PE
8087 (Prologue): Mention that it's better to define feature-test macros
8088 before Bison declarations. Problem reported by Michael Deutschmann.
8089
8090 * README-cvs: Fix typo: "&" should be "&&". Problem reported
8091 by Jim Meyering.
8092 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
8093 This adjusts to recent gnulib changes.
3dc5e96b 8094
b2a0b7ca
JD
80952006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8096
8097 Finish implementation of per-type %destructor/%printer. Discussed
8098 starting at
8099 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
8100 and
8101 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
8102 * NEWS (2.3+): Add a description of this feature to the default
8103 %destructor/%printer description.
8104 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
8105 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
8106 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
8107 list node contains a semantic type.
8108 * src/symtab.c, src/symtab.h: Extend with a table that associates
8109 semantic types with their %destructor's and %printer's.
8110 (semantic_type_from_uniqstr, semantic_type_get,
8111 semantic_type_destructor_set, semantic_type_printer_set): New functions
8112 composing the public interface of that table.
8113 (symbol_destructor_get, symbol_destructor_location_get,
8114 symbol_printer_get, symbol_printer_location_get): If there's no
8115 per-symbol %destructor/%printer, look up the per-type before trying
8116 the default.
8117 * tests/actions.at (Per-type %printer and %destructor): New test case.
8118 * tests/input.at (Default %printer and %destructor redeclared):
8119 Extend to check that multiple occurrences of %symbol-default in a
8120 single %destructor/%printer declaration is an error.
8121 (Per-type %printer and %destructor redeclared, Unused values with
8122 per-type %destructor): New test cases.
8123
3be03b13
JD
81242006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
8125
8126 Require default %destructor/%printer to be declared using
8127 %symbol-default instead of an empty symbol list, and start working on
8128 new per-type %destructor/%printer. Discussed at
8129 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
8130 * NEWS (2.3+): Add %symbol-default to example.
8131 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 8132 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
8133 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
8134 (generic_symlist, generic_symlist_item): New nonterminals for creating
8135 a list in which each item is a symbol, semantic type, or
8136 %symbol-default.
8137 (grammar_declaration): Use generic_symlist in %destructor and %printer
8138 declarations instead of symbols.1 or an empty list.
8139 (symbol_declaration, precedence_declaration, symbols.1): Update actions
8140 for changes to symbol_list.
8141 * src/reader.c: Update for changes to symbol_list.
8142 * src/scan-code.l: Likewise.
8143 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
8144 * src/symlist.c, src/symlist.h: Extend such that a list node may
8145 represent a semantic type or a %symbol-default in addition to just an
8146 ordinary symbol. Add switched functions for setting %destructor's and
8147 %printer's.
8148 * tests/actions.at, tests/input.at: Add %symbol-default to all default
8149 %destructor/%printer declarations.
8150
3508ce36
JD
81512006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
8152
8153 Whether the default %destructor/%printer applies to a particular symbol
8154 isn't a question of whether the user *declares* that symbol (in %token,
8155 for example). It's a question of whether the user by any means
8156 *defines* the symbol at all (by simply using a char token, for
8157 example). $end is defined by Bison whereas any other token with token
8158 number 0 is defined by the user. The error token is always defined by
8159 Bison regardless of whether the user declares it with %token, but we
8160 may one day let the user define error as a nonterminal instead.
8161 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
8162 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
8163 the meaning of "user-defined".
8164 * tests/actions.at (Default %printer and %destructor for user-declared
8165 end token): Rename to...
8166 (Default %printer and %destructor for user-defined end token): ...
8167 this.
8168
8169 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
8170 computation of whether to apply the default, don't maintain a list of
8171 every Bison-defined symbol. Instead, just check for a first character
8172 of '$', which a user symbol cannot have, and check for the error token.
8173
9350499c
JD
81742006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
8175
8176 Don't apply the default %destructor or %printer to the error token,
8177 $undefined, or $accept. This change fits the general rule that the
8178 default %destructor and %printer are only for user-declared symbols,
8179 and it solves several difficulties that are described in the new test
8180 cases listed below.
8181 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
8182 * tests/actions.at (Default %printer and %destructor are not for error
8183 or $undefined, Default %printer and %destructor are not for $accept):
8184 New test cases.
8185
4d7370cb
JD
81862006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
8187
8188 Allow %start after the first rule.
8189 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
8190 when parsing the first rule.
8191 (check_and_convert_grammar): Search for it here after all grammar
8192 declarations have been parsed. Skip midrules, which have dummy LHS
8193 nonterminals.
8194 * src/symtab.c (symbol_is_dummy): New function.
8195 * src/symtab.h (symbol_is_dummy): Declare it.
8196 * tests/input.at (%start after first rule): New test.
8197
6d0ef4ec
JD
81982006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8199
8200 Redo some of the previous commit: add back the ability to use
8201 non-aliased/undeclared string literals since it might be useful to
8202 those declaring %token-table.
8203 * src/reader.c (check_and_convert_grammar): Undo changes in previous
8204 commit: don't worry about complaints from symbols_pack.
8205 * src/symtab.c (symbol_new, symbol_class_set,
8206 symbol_check_alias_consistency): Undo changes in previous commit: count
8207 each string literal as a new symbol and token, assign it a symbol
8208 number, and don't complain about non-aliased string literals.
8209 (symbols_pack): Since symbol_make_alias still does not decrement symbol
8210 and token counts but does still set aliased tokens to the same number,
8211 symbol_pack_processor now leaves empty slots in the symbols array.
8212 Remove those slots.
8213 * tests/regression.at (Undeclared string literal): Remove test case
8214 added in previous commit since non-aliased string literals are allowed
8215 again.
8216 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
8217 remove unnecessary string literal declarations.
8218 * tests/sets.at (Firsts): Likewise.
8219
965537bc
JD
82202006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
8221
8222 Don't allow an undeclared string literal, but allow a string literal to
8223 be used before its declaration.
8224 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
8225 symbols_pack complained.
8226 * src/symtab.c (symbol_new): Don't count a string literal as a new
8227 symbol.
8228 (symbol_class_set): Don't count a string literal as a new token, and
8229 don't assign it a symbol number since symbol_make_alias does that.
8230 (symbol_make_alias): It's not necessary to decrement the symbol and
8231 token counts anymore. Don't assume that an alias declaration occurs
8232 before any uses of the identifier or string, and thus don't assert that
8233 one of them has the highest symbol number so far.
8234 (symbol_check_alias_consistency): Complain if there's a string literal
8235 that wasn't declared as an alias.
8236 (symbols_pack): Bail if symbol_check_alias_consistency failed since
8237 symbol_pack asserts that every token has been assigned a symbol number
8238 although undeclared string literals have not.
8239 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 8240 string literal): New test cases.
965537bc
JD
8241 (Characters Escapes, Web2c Actions): Declare string literals as
8242 aliases.
8243 * tests/sets.at (Firsts): Likewise.
8244
47aee066
JD
82452006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
8246
8247 In the grammar scanner, STRING_FINISH unclosed constructs and return
8248 them to the parser in order to improve error messages.
8249 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
8250 SC_BRACED_CODE, SC_PROLOGUE): Implement.
8251 * tests/input.at (Unclosed constructs): New test case.
8252 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
8253 seen.
8254
8255 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
8256 unused global.
8257
1f6b3679
JD
82582006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
8259
8260 Handle string aliases for character tokens correctly.
8261 * src/symtab.c (symbol_user_token_number_set): If the token has an
8262 alias, check and set its alias's user token number instead of its own,
8263 which is set to indicate the alias. Previously, every occurrence of
8264 the character token in the grammar overwrote that alias indicator with
8265 the character code.
8266 * tests/input.at (String aliases for character tokens): New test.
8267
219741d8
JD
82682006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
8269
8270 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
8271
11daa4e7
PE
82722006-08-11 Paul Eggert <eggert@cs.ucla.edu>
8273
8274 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
8275 to prevent failures when building on older platforms.
8276 Check for autopoint failure.
8277 Set XGETTEXT_OPTIONS to values that check for C format strings,
8278 so that translators are warned about them (this also helps
8279 prevent core dumps).
8280
8281 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
8282 function, since it simplifies our code a bit.
8283
8284 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
8285 rather than -W, so we don't get bogus warnings about sign comparisons.
8286 Add -Wpointer-arith, since that warning is useful (it reports code
8287 that does not conform to C89 and that some compilers reject).
8288 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
8289 since it's no longer needed.
8290
f9bfc42a
JD
82912006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
8292
8293 Clean up scanners a bit.
8294 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
8295 definitions so gcc won't warn when obstack_for_string is unused.
8296 * src/scan-code.l: config.h and system.h are already #include'd by
8297 scan-code-c.c, so get rid of them here.
8298 * src/scan-gram.l: Likewise.
8299 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
8300 definitions rather than duplicating the rest of it.
8301 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
8302
06e8700a
JD
83032006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
8304
8305 Suppress signed/unsigned comparison warnings for yycheck.
8306 * data/c.m4 (b4_safest_int_type): New macro.
8307 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
8308 a signed int type, cast it to b4_safest_int_type first.
8309 * data/yacc.c: Likewise.
8310 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
8311 also overwritten.
8312
9c437126
PE
83132006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
8314
8315 * doc/bison.texinfo: Fix some typos.
8316
284d8a13
PE
83172006-08-02 Paul Eggert <eggert@cs.ucla.edu>
8318
8319 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
8320 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
8321
8322 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
8323 the latest gnulib does this a different way.
8324 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
8325 translation was patched, so stop omitting it.
8326
ec5479ce
JD
83272006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8328
8329 Enable declaration of default %printer/%destructor. Make the parser
8330 use these for all user-declared grammar symbols for which the user does
8331 not declare a specific %printer/%destructor. Thus, the parser uses it
8332 for token 0 if the user declares it but not if Bison generates it as
8333 $end. Discussed starting at
8334 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
8335 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
8336 and
8337 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
8338 * NEWS (2.3+): Mention.
8339 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
8340 declare a %destructor for a mid-rule's semantic value. It's just
8341 impossible to declare one specific to it.
8342 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
8343 code. Describe default %destructor form.
8344 * src/parse-gram.y (grammar_declaration): Parse default
8345 %printer/%destructor declarations.
8346 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
8347 and symbol_destructor_location_get rather than accessing the destructor
8348 and destructor_location members of struct symbol.
8349 (symbol_printers_output): Likewise but for %printer's.
8350 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
8351 again.
8352 * src/symtab.c (default_destructor, default_destructor_location,
8353 default_printer, default_printer_location): New static global
8354 variables to record the default %destructor and %printer.
8355 (symbol_destructor_get, symbol_destructor_location_get,
8356 symbol_printer_get, symbol_printer_location_get): New functions to
8357 compute the appropriate %destructor and %printer for a symbol.
8358 (default_destructor_set, default_printer_set): New functions to set the
8359 default %destructor and %printer.
8360 * src/symtab.h: Prototype all those new functions.
8361 * tests/actions.at (Default %printer and %destructor): New test to
8362 check that the right %printer and %destructor are called, that they're
8363 not called for $end, and that $$ and @$ work correctly.
8364 (Default %printer and %destructor for user-declared end token): New
8365 test to check that the default %printer and %destructor are called for
8366 a user-declared end token.
8367 * tests/input.at (Default %printer and %destructor redeclared, Unused
8368 values with default %destructor): New tests to check related grammar
8369 warnings and errors.
8370
868d2d96
JD
83712006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
8372
8373 Clean up handling of %destructor for the end token (token 0).
8374 Discussed starting at
8375 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
8376 and
8377 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
8378
8379 Make the skeletons consistent in how they pop the end token and invoke
8380 its %destructor.
8381 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
8382 state, which has token number 0, since this would invoke the
8383 %destructor for the end token.
8384 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
8385 until after shifting the end token, or else it won't be popped.
8386 * data/yacc.c (yyparse): Likewise.
8387
8388 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
8389 it's the end token. Upon termination, destroy an unshifted lookahead
8390 even when it's the end token.
8391 * data/lalr1.cc (yy::parser::parse): Likewise.
8392 * data/yacc.c (yyparse): Likewise.
8393
8394 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
8395 value warnings for the end token when the user gives the end token a
8396 %destructor.
8397
8398 * tests/actions.at (Printers and Destructors): Test all the above.
8399
62a9592d
PE
84002006-07-24 Paul Eggert <eggert@cs.ucla.edu>
8401
8402 Update to latest gnulib and gettext versions.
8403 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
8404 Add fopen-safer.
8405 (gnulib_files): Add m4/warning.m4. Don't worry about files
8406 overwritten by autopoint.
8407 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
8408 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
8409 rejects them.
8410 Don't use autoreconf; instead, invoke autopoint etc. by hand,
8411 so that we can remove the intl files at a better time.
8412 (intl_files_to_remove): Remove aclocal.m4, since it gets
8413 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
8414 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
8415 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
8416 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
8417 Remove datarootdir hack; no longer needed.
8418 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
8419 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
8420 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
8421 strdup.h.
8422 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
8423 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
8424
10d6970f
PE
84252006-07-20 Paul Eggert <eggert@cs.ucla.edu>
8426
8427 * bootstrap: Adjust to today's change to gnulib-tool by invoking
8428 it with --assume-autoconf='latest-stable'.
8429
50a33993
JD
84302006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
8431
8432 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
8433 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
8434 YYSTYPE' and `{'.
8435 * src/muscle_tab.h (muscle_grow): Replace the header comments with
8436 those from muscle_tab.c since the old ones are misleading.
8437
2ce4ed68
AD
84382006-07-13 Akim Demaille <akim@epita.fr>
8439
8440 Support %define "KEY" {VALUE}.
8441 * src/scan-code.h, src/scan-code.l (translate_action)
8442 (translate_rule_action, translate_symbol_action, translate_code):
8443 Return char *, not const char *.
8444 * src/parse-gram.y (declaration): Rename as...
8445 (prologue_declaration): this.
8446 (string_content): Remove this nonterminal, use STRING.
8447 (braceless, content, content.opt): New nonterminal.
8448 Use them.
8449 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
8450 as value.
8451 * src/scan-gram.l (getargs.h): Don't include it.
8452
db7e5eb5
PE
84532006-07-12 Paul Eggert <eggert@cs.ucla.edu>
8454
8455 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
8456 rather than a for-loop that declares a local bool variable. This
8457 should work around a compatibility problem with a Cray x1e C++
8458 compiler reported by Hung Nguyen in
8459 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
8460 The for-loop was introduced in the 2004-11-17 change but I don't
8461 know why it was needed.
8462
a5d80ba5
AD
84632006-07-12 Akim Demaille <akim@epita.fr>
8464
8465 * data/c.m4: Comment changes.
8466
23eb2a69
AD
84672006-07-10 Akim Demaille <akim@lrde.epita.fr>
8468
8469 * src/complain.c (error_message, ERROR_MESSAGE): New.
8470 To factor...
8471 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
8472 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
8473
ddc8ede1
PE
84742006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8475
8476 * NEWS: Instead of %union, you can define and use your own union type
8477 YYSTYPE if your grammar contains at least one <type> tag.
8478 Your YYSTYPE need not be a macro; it can be a typedef.
8479 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
8480 (Union Decl, Decl Summary): Document this.
8481 * data/glr.c (YYSTYPE): Implement this.
8482 * data/glr.cc (YYSTYPE): Likewise.
8483 * data/lalr1.cc (YYSTYPE): Likewise.
8484 * data/yacc.c (YYSTYPE): Likewise.
8485 * src/output.c (prepare): Output tag_seen_flag.
8486 * src/parse-gram.y (declaration, grammar_declaration):
8487 Use 'union_seen' rather than 'typed' to determine whether
8488 %union has been seen, since grammars can now be typed without
8489 %union.
8490 (symbol_declaration, type.opt, symbol_def):
8491 Keep track of whether a tag has been seen.
8492 * src/reader.c (union_seen, tag_seen): New vars.
8493 (typed): remove.
8494 * src/reader.h (union_seen, tag_seen, typed): Likewise.
8495 * src/scan-code.l (untyped_var_seen): New variable.
8496 (handle_action_dollar): Adjust to above changes.
8497 (handle_action_dollar, handle_action_at):
8498 Improve overflow checking for outlandish numbers.
8499 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
8500 avoid new diagnostics generated by above changes.
8501 * tests/regression.at (YYSTYPE typedef): Add test to check
8502 for type tags without %union.
8503
8504 * src/symlist.c (symbol_list_length): Return int, not unsigned
8505 int, since callers expect int. This may need to get revisited
8506 once we have proper integer overflow checking.
8507
8508 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
8509 object is now static.
8510
8511 * src/getargs.c (flags_argmatch): Return void, not int,
8512 to pacify ./configure --enable-gcc-warnings.
8513
8514 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
8515 since last_string is already defined to FLEX_PREFIX (last_string).
8516
7b42569e
AD
85172006-07-09 Akim Demaille <akim@lrde.epita.fr>
8518
8519 Implement --warnings/-W.
8520 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
8521 replaced by...
8522 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
8523 Adjust callers.
8524 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
8525 (warnings_args, warnings_types): New.
8526 (getargs, short_options, long_options): Accept -W/--warnings.
8527 Sort the options by alphabetical order, upper case letter right
8528 before its lower case.
8529
3b452f4e
JD
85302006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
8531
8532 Change %merge result type clash warnings to errors. Discussed at
8533 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
8534 * src/reader.c (record_merge_function_type): Use complain_at.
8535 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8536 declared later): Update test case results.
8537
b8a41559
AD
85382006-07-09 Akim Demaille <akim@lrde.epita.fr>
8539
8540 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
8541 to be in alphabetical order.
8542 (trace_args): Spelling fixes.
8543
cd9e1ba2
PE
85442006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8545
8546 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
8547 so they don't collide with user-defined macros.
8548 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
8549 this was never guaranteed, and now that we're using gnulib stdint,
8550 which defines int_fast16_t to long int, the problem is exposed.
8551
cb48f191
PE
85522006-07-08 Paul Eggert <eggert@cs.ucla.edu>
8553
b8445a15
PE
8554 * data/c.m4 (b4_basename): Simplify a bit, since we don't
8555 need the full POSIX semantics (and weren't implementing them
8556 anyway).
8557
cb48f191
PE
8558 Adjust to Autoconf 2.60 and today's gnulib.
8559 * bootstrap (gnulib_modules): Add stdint.
8560 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
8561 no longer copies it.
8562 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
8563 since stdint needs the former and wcwidth (which is now required
8564 by mbswidth) needs the latter.
8565 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
8566 work around a compatibility glitch between gettext 0.14.6 and
8567 Autoconf 2.60.
8568 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
8569 Do not check for uintptr_t, since new stdint module does the right
8570 thing.
8571 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
8572 Add stdint.h, stdint_.h, wcwidth.h.
8573 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
8574 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
8575 stdint.m4, wchar_t.m4, wcwidth.m4.
8576 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
8577 usual order for ../lib/*.h files.
8578 (file_name_split): Use last_component, not base_name, to adjust
8579 to gnulib changes.
8580 * src/parse-gram.h: Include <strverscmp.h> in the usual order
8581 for ../lib/*.h files.
8582 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
8583 Define unconditionally, since we now assume the stdint module.
8584 * src/scan-skel.l: Include <dirname.h>.
8585 (BASE_QPUTS): Use last_component, not base_name.
8586 * src/system.h: Include <unlocked-io.h> in the usual order
8587 for ../lib/*.h files. Include <stdint.h> unconditionally,
8588 since we now use the stdint module.
8589 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
8590 HAVE_UINTPTR_T, since we now use the stdint module.
8591 (base_name): Remove decl, since files now include <dirname.h>
8592 to get the decl.
8593
cd48d21d
AD
85942006-07-08 Akim Demaille <akim@lrde.epita.fr>
8595
8596 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
8597 New, default to 1.
8598 * data/yacc.c, data/glr.c, data/location.cc: Use them.
8599 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
8600 default.
8601 * tests/calc.at: Adjust.
8602
8ec0a172
AD
86032006-07-08 Akim Demaille <akim@lrde.epita.fr>
8604
b8445a15 8605 * data/c.m4 (b4_basename): New.
8ec0a172
AD
8606 (b4_syncline): Also output the location of its invocation (from
8607 the skeleton).
8608 (b4_user_action, b4_define_user_action, b4_user_actions)
8609 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
8610 (b4_user_stype): New.
8611 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
8612
4a678af8
JD
86132006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8614
8615 In the grammar file, the first column is 1 not 0 on the first line as
8616 on every other line.
8617 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
8618 * tests/input.at (Torturing the Scanner): Update output.
8619
8620 * src/scan-gram.l (scanner_cursor): Declare it static.
8621
dd60572a
JD
86222006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8623
8624 In warnings, say "previous declaration" rather than "first
8625 declaration".
8626 * src/symtab.c (redeclaration): Do that here.
8627 * src/reader.c (record_merge_function_type): In the case of a result
8628 type clash, report the previous declaration rather than the very first
8629 one in the grammar file.
8630 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8631 declared later): Add a third declaration to check this behavior.
8632 * tests/input.at (Incompatible Aliases): Update output.
8633
2073e1b6
AD
86342006-06-27 Akim Demaille <akim@epita.fr>
8635
8636 * doc/Doxyfile.in: New.
8637 * doc/Makefile.am: Use it.
8638 * src/lalr.h, src/symtab.h: Initial doxygenation.
8639
8ee5b538
JD
86402006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8641
8642 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
8643 declared after the %merge. This continues the effort of the previous
8644 patch.
8ee5b538
JD
8645 * src/reader.c (get_merge_function): Don't set the merger type yet.
8646 (record_merge_function_type): New function for setting the merger type
8647 and checking for clashes.
8648 (grammar_current_rule_merge_set): Set the location of the %merge for
8649 the current rule.
8650 (packgram): Invoke record_merge_function_type for each rule now that
8651 all symbol type declarations have been parsed.
8652 * src/reader.h (merger_list.type_declaration_location): New member
8653 storing the location of the first %merge from which the type for this
8654 merging function was derived.
8655 * src/symlist.h (symbol_list.merger_declaration_location): New member
8656 storing the location of a rule's %merge, if any.
8657 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8658 declared later): New test to catch the error fixed by the above patch.
8659
ffa4ba3a
JD
86602006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8661
8662 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
8663 declarations appear after the rules. Discussed at
8664 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
8665 and
8666 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
8667 Don't mistake the type of $$ in a midrule to be that of its parent
8668 rule's $$.
ffa4ba3a
JD
8669 * src/reader.c (grammar_current_rule_end): Don't invoke
8670 grammar_rule_check yet since not all symbol declarations may have been
8671 parsed yet.
8672 (grammar_midrule_action): Likewise.
8673 Don't record whether the midrule's $$ has been used yet since actions
8674 haven't been translated yet.
8675 Record the midrule's parent rule and its RHS index within the parent
8676 rule.
8677 (grammar_current_rule_action_append): Don't translate the action yet
8678 since not all symbol declarations may have been parsed yet and, thus,
8679 warnings about types for $$, $n, @$, and @n can't be reported yet.
8680 (packgram): Translate the action and invoke grammar_rule_check now that
8681 all symbol declarations have been parsed.
8682 * src/scan-code.l (handle_action_dollar): Now that this is invoked
8683 after parsing the entire grammar file, the symbol list here in the case
8684 of a midrule is actually the midrule's empty RHS, so reference its
8685 parent rule's RHS where necessary.
8686 On the other hand, now that you can already know it's a midrule, you
8687 aren't forced to think $$ has the same type as its parent rule's $$.
8688 (handle_action_at): In the case of a midrule, reference the parent rule
8689 where necessary.
8690 * src/symlist.c (symbol_list_new): Initialize new midrule-related
8691 members.
8692 (symbol_list_length): Now that this is invoked after all rules have
8693 been parsed, a NULL symbol (rather than a NULL symbol list node)
8694 terminates a rule. symbol_list_print already does this correctly.
8695 * src/symlist.h (symbol_list.midrule_parent_rule,
8696 symbol_list.midrule_parent_rhs_index): New members so that midrules can
8697 remember their relationships with their parents.
8698 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
8699 fixed by the above patch.
8700 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
8701 implementing...
8702 (Unused values): ... this old test case and...
8703 (Unused values before symbol declarations): ... this new test case.
8704 This one is the same as `Unused values' except that all symbol
8705 declarations appear after the rules in order to catch the rest of the
8706 errors fixed by the above patch.
8707
e256e17f
JD
87082006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8709
300a1930
JD
8710 More cleanup.
8711 * src/reader.c (current_rule): Declare it static since it's no longer
8712 used outside this file.
8713 (grammar_current_rule_action_append): Remove redundant arguments from
8714 translate_rule_action invocation.
8715 * src/reader.h (current_rule): Remove this unused extern.
8716 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
8717 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 8718
381ecb06
JD
87192006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
8720
8721 Clean up yesterday's patch.
8722 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
8723 to...
8724 * src/reader.c (grammar_current_rule_action_append): ... here for
8725 consistency with grammar_current_rule_symbol_append.
8726 * tests/regression.at (Braced code in declaration in rules section):
8727 Make yyerror and yylex static as usual.
8728
4210cd0b
JD
87292006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
8730
8731 Fix bug that mistakes braced code in a declaration in the rules section
8732 to be a rule action. Mentioned at
8733 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
8734 * src/scan-gram.l: Move midrule action detection from the start of the
8735 scanning of any braced code to...
8736 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
8737 action. For readability, use $2 and @2 rather than the equivalent
8738 global variables.
8739 * tests/regression.at (Braced code in declaration in rules section):
8740 New test to catch the error fixed by the above patch.
8741
8742 Work on code readability some.
8743 * src/scan-code.l (current_rule): Get rid of this misleading and
8744 redundant declaration: it's actually extern'ed in reader.h.
8745 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
8746 translate_action): Add a rule argument and use it instead of the global
8747 current_rule.
8748 (translate_rule_action): This already receives current_rule through an
8749 argument, so pass it on to translate_action instead of assigning
8750 current_rule to current_rule.
8751 (translate_symbol_action, translate_code): Pass rule = NULL to
8752 translate_action.
8753
34f98f46
JD
87542006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
8755
8756 Rename %before-definitions to %start-header and %after-definitions to
8757 %end-header. Don't use these declarations to separate pre-prologue
8758 blocks from post-prologue blocks. Add new order-independent
8759 declarations %before-header and %after-header as alternatives to the
8760 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
8761 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
8762 * NEWS (2.3+): Update for these changes.
8763 * data/glr.c (b4_before_definitions): Update to...
8764 (b4_start_header): ... this.
8765 (b4_after_definitions): Update to...
8766 (b4_end_header): ... this.
8767 * data/glr.cc: Likewise.
8768 * data/lalr1.cc: Likewise.
8769 * data/yacc.c: Likewise.
8770 * doc/bison.texinfo (The prologue): Update names, and replace remaining
8771 prologue blocks with %*-header declarations.
8772 (Calc++ Parser): Likewise.
91661ebb 8773 (Decl Summary): Update names.
148d66d8 8774 (Table of Symbols): Update description.
34f98f46
JD
8775 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
8776 (PERCENT_END_HEADER): ... this.
8777 (PERCENT_BEFORE_DEFINITIONS): Update to...
8778 (PERCENT_START_HEADER): ... this.
8779 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8780 (declaration): Update token names and m4 macro names.
8781 When parsing %end-header and %start-header, invoke translate_code
8782 before muscle_code_grow, and no longer set global booleans to remember
8783 whether these declarations have been seen.
8784 Parse new %after-header and %before-header.
8785 * src/reader.c (before_definitions, after_definitions): Remove.
8786 (prologue_augment): Accept a new bool argument to specify whether to
8787 augment the pre-prologue or post-prologue.
8788 * src/reader.h (before_definitions, after_definitions): Remove these
8789 extern's.
8790 (prologue_augment): Add new bool argument.
8791 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
8792 (PERCENT_END_HEADER): ... this.
8793 (PERCENT_BEFORE_DEFINITIONS): Update to...
8794 (PERCENT_START_HEADER): ... this.
8795 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8796 * tests/actions.at (Printers and Destructors): Update names.
8797
31b2b07e
JD
87982006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
8799
8800 Add comparison operators for C++ location classes. Discussed at
8801 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
8802 * data/c++.m4 (b4_define_location_comparison): New boolean %define
8803 declaration indicating whether filename_type has an operator==. If
8804 filename_type is `std::string', it defaults to `1', `0' otherwise.
8805 * data/location.cc: Iff b4_define_location_comparison is `1', add
8806 operator== and operator!= for class position and for class location.
8807
8808 Some minor fixes.
8809 * src/scan-action.l: Remove unused file.
8810 * src/symtab.c (symbol_printer_set): Use printer_location not
8811 destructor_location.
8812 * src/symtab.h (struct symbol): Replace incorrect source comment for
8813 printer members.
8814 * tests/input.at (Incompatible Aliases): Update output with correct
8815 printer location.
8816
9bc0dd67
JD
88172006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
8818
8819 Don't put the pre-prologue in the header file. For the yacc.c code
8820 file and the glr.c header and code files, move the pre-prologue before
8821 the token definitions. Add new %before-definitions and
8822 %after-definitions to declare code that will go in both the header file
8823 and code file. Discussed at
8824 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
8825 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
8826 and
8827 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
8828 * NEWS (2.3+): Describe these changes.
8829 * data/glr.c (b4_pre_prologue): Move from within to before...
8830 (b4_shared_declarations): ... this.
8831 Add new b4_before_definitions before b4_token_enums.
8832 Add new b4_after_definitions at the end.
8833 * data/glr.cc (b4_pre_prologue): Replace with...
8834 (b4_before_definitions): ... this in the header file.
8835 (b4_after_definitions): New near the end of the header file.
8836 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
8837 code file right before including the header file.
8838 (b4_before_definitions): New in the previous position of
8839 b4_pre_prologue in the header file.
8840 (b4_after_definitions): New near the end of the header file.
8841 * data/yacc.c: Clean up some m4 quoting especially in the header file.
8842 (b4_token_enums_defines): In the code file, move to right before
8843 YYSTYPE for consistency with the header file.
8844 (b4_before_definitions): New right before b4_token_enums_defines in
8845 both the header and code file.
8846 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
8847 header and code file.
8848 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
8849 of prologues for %union dependencies.
91661ebb
JD
8850 (Decl Summary): In %defines description, mention the effect of
8851 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
8852 (Calc++ Parser): Forward declare driver in a %before-definitions rather
8853 than in the pre-prologue so that make check succeeds.
148d66d8 8854 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
8855 %after-definitions.
8856 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
8857 %before-definitions.
8858 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
8859 (declaration): Parse those declarations and append to
8860 b4_before_definitions and b4_after_definitions, respectively.
8861 * src/reader.c (before_definitions, after_definitions): New bools to
8862 track whether those declarations have been seen.
8863 (prologue_augment): Add to the post-prologue if %union,
8864 %before-definitions, or %after-definitions has been seen.
8865 * src/reader.h (before_definitions, after_definitions): New extern's.
8866 * src/scan-gram.l: Scan the new declarations.
8867 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
8868 prologue block in a %before-definitions or a %after-definitions based
8869 on whether the %union is declared.
8870 * tests/regression.at (Early token definitions with --yacc, Early token
8871 definitions without --yacc): Move tests for token definitions into the
8872 post-prologue since token names are no longer defined in the
8873 pre-prologue.
8874
203b9274
AD
88752006-06-20 Akim Demaille <akim@epita.fr>
8876
8877 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
8878 (symbol_get): Use it.
8879 * src/parse-gram.y: Use it.
8880
a7ee59cf
JD
88812006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
8882
8883 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
8884 build succeeds when configured with --enable-gcc-warnings.
8885
5a2baae7
PE
88862006-06-19 Paul Eggert <eggert@cs.ucla.edu>
8887
33ad1a9c
PE
8888 * src/parse-gram.y (char_name): New function.
8889 (CHAR, STRING, string_content): For %printer, properly escape.
8890 (ID): Prefer fputs to fprintf.
8891 (id): Reindent to be consistent with other rules.
8892 Properly quote char.
8893
5a2baae7
PE
8894 The Translation Project changed its way of publishing translations
8895 to maintainers. I haven't received any responses to my request
8896 for supporting the old way, or for documenting the new way. I
8897 have modified 'bootstrap' to use screen scraping
8898 (in this case, HTML scraping). This is unreliable and inelegant,
8899 but I don't see any better way. Yuck.
8900 * bootstrap (TP_URL, WGET_COMMAND): New vars.
8901 (get_translations): New function, which uses HTML scraping to
8902 deduce locations of latest translations.
8903 Use this function to grab both bison and bison-runtime .po files.
8904 Don't bother priming the pump for the runtime-po domain any more,
8905 as it's now translated better than bison is.
8906
58d7a1a1
AD
89072006-06-19 Akim Demaille <akim@epita.fr>
8908
8909 * src/scan-gram.l: No longer "parse" things after `%union' until
8910 `{'. Rather, return a single "%union" token.
8911 No longer make symbols: return strings, and leave the conversion
8912 to symbols to the parser.
8913 (SC_PRE_CODE, token_type): Remove.
8914 * src/parse-gram.y (%union): New field `character'.
8915 Sort tokens.
8916 (CHAR): New token.
8917 (ID, ID_COLON): Now that the scanner no longer makes them
8918 identifiers, adjust all uses to invoke symbol_get.
8919 (id_colon): New, wraps the conversion from string to symbol.
8920 (%union): Accept a possible union_name.
8921 (symbol): Now can be a char.
8922 * data/c.m4 (b4_union_name): Leave a default value.
8923 * data/glr.c, data/yacc.c: Use it.
8924
b931235e
JD
89252006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
8926
8927 For associating token numbers with token names for "yacc.c", don't use
8928 #define statements unless `--yacc' is specified; always use enum
8929 yytokentype. Most important discussions start at:
8930 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
8931 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
8932 and
8933 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8934 * NEWS (2.3+): Mention.
8935 * data/c.m4 (b4_yacc_if): New.
8936 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8937 token #define's.
8938 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8939 on token name definitions.
8940 * src/getargs.c (usage): Capitalize `Yacc' in English.
8941 * src/output.c (prepare): Define b4_yacc_flag.
8942 * tests/regression.at (Early token definitions): Test that tokens names
8943 are defined before the pre-prologue not just before the post-prologue.
8944 Remove this test case and copy to...
8945 (Early token definitions with --yacc): ... this to test #define's.
8946 (Early token definitions without --yacc): ... and this to test enums.
8947
9e6e7ed2
PE
89482006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8949
8950 * NEWS: Reword the post-2.3 change to not be so optimistic about
8951 removing the old "look-ahead" spelling.
8952 Update previous look-ahead/lookahead change reports.
8953 * REFERENCES: look-ahead -> lookahead (since that's
8954 what he actually wrote).
8955 * doc/refcard.tex: look ahead -> lookahead,
8956 look-ahead -> lookahead
8957
742e4900
JD
89582006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8959
8960 For consistency, use `lookahead' instead of `look-ahead' or
8961 `look_ahead'. Discussed starting at
8962 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8963 and then at
8964 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8965 * NEWS: For the next release, note the change to `--report'.
8966 * TODO, doc/bison.1: Update English.
8967 * doc/bison.texinfo: Update English.
8968 (Understanding Your Parser, Bison Options): Document as
8969 `--report=lookahead' rather than `--report=look-ahead'.
8970 * src/conflicts.c: Update English in comments.
8971 (lookahead_set): Rename from look_ahead_set.
8972 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8973 (resolve_sr_conflict): Rename local look_ahead_tokens to
8974 lookahead_tokens, and update other uses.
8975 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8976 count_rr_conflicts, conflicts_free): Update uses.
8977 * src/getargs.c (report_args): Move "lookahead" before alternate
8978 spellings.
8979 (report_types): Update uses.
8980 (usage): For `--report' usage description, state `lookahead' spelling
8981 rather than `look-ahead'.
8982 * src/getargs.h (report.report_lookahead_tokens): Rename from
8983 report_look_ahead_tokens.
8984 * src/lalr.c: Update English in comments.
8985 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8986 (state_lookahead_tokens_count): Rename from
8987 state_look_ahead_tokens_count.
8988 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8989 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8990 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8991 Update other uses.
8992 Update English in output.
8993 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8994 * src/print.c: Update English in comments.
8995 (lookahead_set): Rename from look_ahead_set.
8996 (print_reduction): Rename argument lookahead_token from
8997 look_ahead_token.
8998 (print_core, state_default_rule, print_reductions, print_results):
8999 Update uses.
9000 * src/print_graph.c: Update English in comments.
9001 (print_core): Update uses.
9002 * src/state.c: Update English in comments.
9003 (reductions_new): Update uses.
9004 (state_rule_lookahead_tokens_print): Rename from
9005 state_rule_look_ahead_tokens_print, and update other uses.
9006 * src/state.h: Update English in comments.
9007 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
9008 (state_rule_lookahead_tokens_print): Rename from
9009 state_rule_look_ahead_tokens_print.
9010 * src/tables.c: Update English in comments.
9011 (conflict_row, action_row): Update uses.
9012 * tests/glr-regression.at
9013 (Incorrect lookahead during deterministic GLR,
9014 Incorrect lookahead during nondeterministic GLR): Rename
9015 print_look_ahead to print_lookahead.
9016 * tests/torture.at: Update English in comments.
9017 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
9018 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
9019 (Many lookahead tokens): Update uses.
9020 * data/glr.c: Update English in comments.
9021 * lalr1.cc: Likewise.
9022 * yacc.c: Likewise.
9023 * src/conflicts.h: Likewise.
9024 * src/lalr.h: Likewise.
9025 * src/main.c: Likewise.
9026 * src/output.c: Likewise.
9027 * src/parse-gram.c: Likewise.
9028 * src/tables.h: Likewise.
9029 * tests/calc.at: Likewise.
9030
3c40d0b5
JD
90312006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
9032
9033 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
9034
5d278082
PE
90352006-06-07 Paul Eggert <eggert@cs.ucla.edu>
9036
9037 * TODO: Add request from Nelson H. F. Beebe to be able to install
9038 Bison without installing the yacc script.
9039
9e668899
JD
90402006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9041
9042 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
9043 and yytext if they're already #define'd.
9044 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
9045 * src/scan-code-c.c: ... here.
9046 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
9047 <config.h>.
9048
0c8e079f
JD
90492006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
9050
9051 Get Bison to build again when configured with --enable-gcc-warnings.
9052 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
9053 missing #include's.
9054 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
9055 loc argument as it shadows a global.
9056 * src/scan-gram.l: Remove stray comma that prevents boundary_set
9057 invocation.
9058
9059 * src/.cvsignore: Add scan-code.c.
9060
2346344a
AD
90612006-06-07 Akim Demaille <akim@epita.fr>
9062
9063 * src/scan-gram.l: Move the "add a trailing ; to actions" code
9064 to...
9065 * src/scan-code.l: here.
9066 * tests/input.at (Torturing the Scanner): Fix another location
9067 error.
9068
4862bdfd
AD
90692006-06-07 Akim Demaille <akim@epita.fr>
9070
9071 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
9072
e9071366
AD
90732006-06-06 Akim Demaille <akim@epita.fr>
9074
9075 Extract the parsing of user actions from the grammar scanner.
9076 As a consequence, the relation between the grammar scanner and
9077 parser is much simpler. We can also split "composite tokens" back
9078 into simple tokens.
9079 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
9080 * src/scan-gram.l (add_column_width, adjust_location): Move to and
9081 rename as...
9082 * src/location.h, src/location.c (add_column_width)
9083 (location_compute): these.
9084 Fix the column count: the initial column is 0.
9085 (location_print): Be robust to ending column being 0.
9086 * src/location.h (boundary_set): New.
9087 * src/main.c: Adjust to scanner_free being renamed as
9088 gram_scanner_free.
9089 * src/output.c: Include scan-code.h.
9090 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
9091 Use boundary_set.
9092 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
9093 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
9094 which is now, again, a separate token.
9095 Adjust all dependencies.
9096 Whereever actions with $ and @ are used, use translate_code.
9097 (action): Remove this nonterminal which is now useless.
9098 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
9099 (grammar_current_rule_action_append): Use translate_code.
9100 (packgram): Bound check ruleno, itemno, and rule_length.
9101 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
9102 (last_string, last_braced_code_loc, max_left_semantic_context)
9103 (scanner_initialize, scanner_free, scanner_last_string_free)
9104 (gram_out, gram_lineno, YY_DECL_): Move to...
9105 * src/scan-gram.h: this new file.
9106 (YY_DECL): Rename as...
9107 (GRAM_DECL): this.
9108 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
9109 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
9110 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
9111 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
9112 Move these declarations, and...
9113 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
9114 these to...
9115 * src/flex-scanner.h: this new file.
9116 * src/scan-gram.l (rule_length, rule_length_overflow)
9117 (increment_rule_length): Remove.
9118 (last_braced_code_loc): Rename as...
9119 (gram_last_braced_code_loc): this.
9120 Adjust to the changes of the parser.
9121 Move all the handling of $ and @ into...
9122 * src/scan-code.l: here.
9123 * src/scan-gram.l (handle_dollar, handle_at): Remove.
9124 (handle_action_dollar, handle_action_at): Move to...
9125 * src/scan-code.l: here.
9126 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
9127 scan-code.h, scan-code-c.c, scan-gram.h.
9128 (EXTRA_bison_SOURCES): Add scan-code.l.
9129 (BUILT_SOURCES): Add scan-code.c.
9130 (yacc): Be robust to white spaces.
9131
9132 * tests/conflicts.at, tests/input.at, tests/reduce.at,
9133 * tests/regression.at: Adjust the column numbers.
9134 * tests/regression.at: Adjust the error message.
7891a7c4 9135
184e42f0
JD
91362006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9137
9138 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9139 Use Akim's wording from
9140 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
9141
7891a7c4
JD
91422006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
9143
9144 Between Bison releases, manually append `+' to the previous Bison
9145 release number, and use that as a signal to automatically print the
9146 ChangeLog's CVS Id keyword from --version. Discussed starting at
9147 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
9148 * ChangeLog: Add Id header.
9149 * configure.ac (AC_INIT): Append `+' to `2.3'.
9150 * src/.cvsignore: Add revision.c.
9151 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
9152 (BUILT_SOURCES): Add revision.c.
9153 (revision.c): New target rule. This file defines a new global variable
9154 named revision. It initializes it with either the Id from ChangeLog
9155 or, if VERSION doesn't contain `+', with the empty string.
9156 * src/getargs.c (version): Print the value of revision.
9157 * src/revision.h: Extern revision.
9158
4ad3ed84
PE
91592006-06-05 Paul Eggert <eggert@cs.ucla.edu>
9160
9161 * NEWS: Version 2.3.
9162 * configure.ac (AC_INIT): Likewise.
9163
02103984
PE
91642006-05-30 Paul Eggert <eggert@cs.ucla.edu>
9165
9166 * data/glr.c (YYRECOVERING): Define to be a function-like macro
9167 with no arguments, not as an object-like macro. This is for
9168 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
9169 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
9170 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
9171 Document this.
9172
2c08afa5
JD
91732006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
9174
9175 * src/getargs.c (usage): Back out yesterday's modification of the
9176 --help output so that we don't have to wait for translation before
9177 releasing 2.3.
9178
6077da58
PE
91792006-05-29 Paul Eggert <eggert@cs.ucla.edu>
9180
9181 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
9182 Problem reported by Akim Demaille.
9183
2a26b6c2
JD
91842006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
9185
9186 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
9187
aefef0d6
PE
91882006-05-26 Paul Eggert <eggert@cs.ucla.edu>
9189
9190 * data/yacc.c (yy_reduce_print): Omit trailing white space in
9191 generated source code. Problem reported by Frans Englich in
9192 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
9193
fcd8e201
PE
91942006-05-22 Paul Eggert <eggert@cs.ucla.edu>
9195
9196 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
9197 shell, not within 'make', so that 'make' by an ordinary builder
9198 (using GNU make) does not worry about configuring gzip. This also
9199 works around a bug reported independently by Keith Thompson and by
9200 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
9201 stderr rather than stdout, messing up the build logs.
9202
7b5cdcbd
JD
92032006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9204
9205 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
9206 to make sure that YYID will never be unused. This fixes a 'make
9207 maintainer-check' failure caused by the recent changes to the 'Trivial
9208 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
9209 not used.
9210 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
9211
5ad0a449
JD
92122006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
9213
9214 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
9215 state before an empty RHS is always resolved here. Only the location
9216 of that state is guaranteed to be resolved, and that's enough. This
9217 fixes the remaining bug reported by Derek M. Jones in
9218 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9219 * tests/glr-regression.at (Uninitialized location when reporting
9220 ambiguity): Test the above case.
9221 Also, the embedded comments in this test case claim it checks the case
9222 of an empty RHS that has inherited the initial location. However, the
9223 corresponding LHS was already resolved, so yyresolveLocations didn't
9224 actually have reason to modify it. Fix this by forcing
9225 nondeterministic operation at the beginning of the parse.
9226
50cce58e
PE
92272006-05-20 Paul Eggert <eggert@cs.ucla.edu>
9228
9229 * data/c.m4 (b4_yy_symbol_print_generate):
9230 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
9231 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
9232 of the bugs reported today by Derek M Jones in
9233 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
9234 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
9235 defined to be a type name without parens or brackets.
9236 (Location Type): Similarly for YYLTYPE.
9237 * tests/regression.at (Trivial grammars): Put in a test for this
9238 bug that will be caught by 'make maintainer-check' (though not,
9239 alas, by 'make check' unless your compiler is picky).
9240
ab8d9dc5
PE
92412006-05-19 Paul Eggert <eggert@cs.ucla.edu>
9242
0d2c8934 9243 * NEWS: Version 2.2.
ab8d9dc5
PE
9244 * configure.ac (AC_INIT): Likewise.
9245
9138c575
JD
92462006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
9247
9248 * data/glr.c (yyreportTree): Make room in yystates for the state
9249 preceding the RHS. This fixes the segmentation fault reported by Derek
9250 M. Jones in
9251 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
9252 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
9253 to the user. Reported for yyreportTree by Derek M. Jones later in the
9254 same thread.
9255 * THANKS: Add Derek M. Jones.
9256 Update my email address.
9257 Fix typo in Steve Murphy's name.
9258
276f48df
PE
92592006-05-14 Paul Eggert <eggert@cs.ucla.edu>
9260
d6645148
PE
9261 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
9262 checking against YYLAST that caused the parser to miss a potential
9263 alternative in its diagnostic.
9264 Problem reported by Maria Jose Moron Fernandez in
9265 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
9266 * data/lalr1.cc (yysyntax_error_): Likewise.
9267 * data/yacc.c (yysyntax_error): Likewise.
9268 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
9269 tokens, in case we run into an older C compiler.
9270 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
9271 Use them to check for the off-by-one error fixed above.
9272
276f48df
PE
9273 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
9274 YYSIZE_T, not size_t.
9275 * tests/regression.at (Trivial grammars): New test, to catch
9276 the error fixed by the above patch.
9277
cd8b5791
AD
92782006-05-14 Akim Demaille <akim@lrde.epita.fr>
9279
9280 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
9281 scheme.
9282 Reported by Steve Murphy.
9283
34376418
AD
92842006-05-14 Akim Demaille <akim@lrde.epita.fr>
9285
9286 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
9287 * data/glr.cc: b4_location_flag is now b4_locations_flag.
9288
327afc7c
AD
92892006-05-14 Akim Demaille <akim@lrde.epita.fr>
9290
9291 Implement --trace=m4.
9292 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
9293 * src/output.c (output_skeleton): When set, pass -dV to m4.
9294
9295 Factor the handling of flags in m4.
9296 * src/output.c (prepare): Rename the muscle names debug, defines,
9297 error_verbose to debug_flag, defines_flag, error_verbose_flag.
9298 * data/c.m4: Adjust.
9299 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
9300 Use b4_define_flag_if to define other b4_FLAG_if macros.
9301 (b4_location_if): As a consequence, rename as...
9302 (b4_locations_if): this, for consistency.
9303 Adjust all the skeletons.
9304
ba9ecd19
AD
93052006-05-14 Akim Demaille <akim@lrde.epita.fr>
9306
9307 * etc/bench.pm: Shorten bench names.
9308
4e83ea15
AD
93092006-05-14 Akim Demaille <akim@lrde.epita.fr>
9310
9311 * src/output.h, src/output.c (error_verbose): Move to...
9312 * src/getargs.h, src/getargs.c: here.
9313 Sort the flags.
9314 Adjust dependencies.
9315
6e93d810
PE
93162006-05-13 Paul Eggert <eggert@cs.ucla.edu>
9317
9318 * data/c.m4 (b4_copyright): Put the special exception for Bison
9319 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
9320 uses changed. Suggested by Akim Demaille. Also, wrap the
9321 copyright notice, in case it is longer than 80 columns. Replace
9322 comma by newline after title.
6e93d810 9323
eaea13f5
PE
93242006-05-11 Paul Eggert <eggert@cs.ucla.edu>
9325
9326 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
9327 incompatibility, not a bug. Mention that it wasn't fixed as of
9328 flex 2.5.33.
9329
3cf084ec
AD
93302006-05-11 Akim Demaille <akim@lrde.epita.fr>
9331
9332 * examples/extexi: Enforce the precedence of concatenation over
9333 >>.
0a9f1c7d 9334 Reported by Tommy Nordgren.
3cf084ec 9335
32c96bd7
AD
93362006-05-11 Akim Demaille <akim@lrde.epita.fr>
9337
9338 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
9339 with the member "token".
f94705b2 9340 Reported by Martin Nylin.
32c96bd7 9341
eaea13f5
PE
93422006-05-08 Paul Eggert <eggert@cs.ucla.edu>
9343
9344 * data/glr.c: Switch to Bison 2.2 special-exception language in
9345 the copyright notice. Use more-regular format for titles and
9346 copyright notices.
9347 * data/glr.cc: Likewise.
9348 * data/location.cc: Likewise.
9349 * data/yacc.cc: Likewise.
9350 * doc/bison.texinfo (Conditions): Document this.
9351 * NEWS: likewise. Upgrade version to 2.2.
9352
6e2d1146
AD
93532006-04-27 Akim Demaille <akim@lrde.epita.fr>
9354
9355 * data/glr.cc: Remove dead code.
9356
47671055
PE
93572006-04-25 Paul Eggert <eggert@cs.ucla.edu>
9358
9359 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
9360 that variable and the line breaks the bootstrap. Problem reported
9361 by Juan M. Guerrero.
9362
ed2e6384
AD
93632006-04-24 Akim Demaille <akim@lrde.epita.fr>
9364
9365 * doc/bison.texinfo (Multiple start-symbols): New.
9366
3cedc2dc
AD
93672006-04-24 Akim Demaille <akim@lrde.epita.fr>
9368
9369 * etc/README, etc/bench.pl: New.
9370
b2ddc3f3
AD
93712006-04-03 Akim Demaille <akim@lrde.epita.fr>
9372
9373 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
9374 rule.
9375 Reported by Mickael Labau.
9376 * tests/input.at (Torturing the Scanner): Test it.
9377
91e3ac9a
PE
93782006-03-16 Paul Eggert <eggert@cs.ucla.edu>
9379
9380 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
9381 Problem reported by Bob Rossi.
9382
93832006-03-13 Paul Eggert <eggert@cs.ucla.edu>
9384
9385 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
9386 and didn't really work.
9387 For the index, use @ifnotinfo, not @iftex.
9388 Minor cleanups of spacing and terminology.
9389
5cf61e93
AD
93902006-03-12 Akim Demaille <akim@lrde.epita.fr>
9391
9392 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
9393 of AT_NAME_PREFIX when %name-prefix is not used.
9394
aa08666d
AD
93952006-03-12 Akim Demaille <akim@lrde.epita.fr>
9396
9397 Apply --prefix to C++ skeletons too: they change the namespace.
9398 The test suite already exercize these cases.
9399 * data/c++.m4 (b4_namespace): New.
9400 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
9401 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
9402 * data/yacc.c, data/glr.c: Remove a useless `[]'.
9403 * doc/bison.texinfo: Document it.
9404 (Option Cross Key): Use @multitable in all formats. It looks
9405 nicer, even in TeX outputs.
9406 (Rules): Use the same code whatever the output type is.
9407 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
9408 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
9409 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 9410
45567173
AD
94112006-03-10 Akim Demaille <akim@lrde.epita.fr>
9412
9413 * TODO: Remove dead items.
9414
e9d8f881 94152006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
9416
9417 * doc/FAQ: Remove, merged into...
9418 * doc/bison.texinfo (FAQ): this.
9419 * doc/Makefile.am (EXTRA_DIST): Adjust.
9420
c095d689
AD
94212006-03-10 Akim Demaille <akim@lrde.epita.fr>
9422
9423 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
9424 even if empty.
9425 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
9426 * doc/bison.texinfo (Calc++ Scanner): Use it.
9427
6e0f8287
PE
94282006-03-09 Paul Eggert <eggert@cs.ucla.edu>
9429
9430 Fix two nits reported by twlevo, plus one more that I discovered.
9431
9432 * src/assoc.h (assoc_to_string): Give a name to the arg, as
9433 this is the usual Bison style.
9434 * src/location.h (location_print): Likewise.
9435
9436 * src/reader.h (token_name): Likewise.
9437
d6b771c3
PE
94382006-03-08 Paul Eggert <eggert@cs.ucla.edu>
9439
9440 Fix some nits reported by twlevo.
9441 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
9442 and "POSIX". Use more-modern syntax for URLs. Mention C++
9443 and ask for Java. Don't hardwire OS version numbers. Add
9444 copyright notice.
9445 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
9446 * src/conflicts.c (solved_conflicts_obstack): Now static.
9447
1e137b71
JD
94482006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
9449
9450 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
9451 page. Say "you can use it" not "you may use it" as on the web page;
9452 we're describing capabilities not granting permission.
9453
73f2e47e
PE
94542006-03-06 Paul Eggert <eggert@cs.ucla.edu>
9455
6d05403d
PE
9456 * data/glr.c (yyresolveLocations): Rename local variables to avoid
9457 shadowing warnings. Use usual patter for iterating through RHS.
9458 * tests/glr-regression.at
9459 (Uninitialized location when reporting ambiguity):
9460 Modify yylex so that it uses its argument, rather than trying
9461 to rely on ARGSUSED (which doesn't work for gcc with warnings).
9462 const char -> char const.
9463
73f2e47e
PE
9464 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
9465 Don't use tabs inside commands; it messes up 'ps'.
9466 Problem reported by twlevo.
9467
8710fc41
JD
94682006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
9469
9470 * tests/glr-regression.at (Uninitialized location when reporting
9471 ambiguity): New test case.
9472 * data/glr.c (yyresolveLocations): New function, which uses
9473 YYLLOC_DEFAULT.
9474 (yyresolveValue): Invoke yyresolveLocations before reporting an
9475 ambiguity.
9476 * doc/bison.texinfo (Default Action for Locations): Note
9477 YYLLOC_DEFAULT's usage for ambiguity locations.
9478 (GLR Semantic Actions): Cross-reference those notes.
9479
ae952af2
JD
94802006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
9481
9482 * tests/glr-regression.at (Leaked semantic values when reporting
9483 ambiguity): Remove unnecessary union and type declarations.
9484 (Leaked lookahead after nondeterministic parse syntax error): New test
9485 case.
9486 * data/glr.c (yyparse): Check for zero stacks remaining before
9487 attempting to shift the lookahead so that you don't lose it.
9488
35ee866a
JD
94892006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9490
9491 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
9492 * tests/glr-regression.at (Leaked semantic values when reporting
9493 ambiguity): New test case.
9494 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
9495 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
9496 now unnecessary yystackp parameter.
9497 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
9498 destructors can be called.
9499
9500 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
9501 in existing testcases.
9502
520181ab
JD
95032006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9504
9505 Don't leak semantic values for parent RHS when a user action cuts the
9506 parser, and clean up related code a bit.
9507 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
9508 cuts parse): Rename to...
9509 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
9510 for leaked parent RHS values.
9511 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
9512 between an unresolved state (non-empty chain of semantic options) and
9513 an incomplete one (signaled by an empty chain).
ae952af2 9514 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
9515 successfully or unsuccessfully resolved yyGLRState to...
9516 (yyresolveValue): ... here so that yyresolveValue always leaves a
9517 yyGLRState with consistent data and thus is easier to understand.
9518 Remove the yyvalp and yylocp parameters since they are always just
9519 taken from the yys parameter. When reporting a discarded merged value
9520 in debugging output, note that it is incompletely merged. Document the
9521 interface.
9522 (yyresolveAction): If resolving any of the RHS states fails, destroy
9523 them all rather than leaking them. Thus, as long as user actions are
9524 written to clean up the RHS correctly, yyresolveAction always cleans up
9525 the RHS of a semantic option. Document the interface.
9526
18d9185c
PE
95272006-02-27 Paul Eggert <eggert@cs.ucla.edu>
9528
9529 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
9530 led to a segmentation fault in GNU Pascal. Problem reported
9531 by Waldek Hebisch.
9532
841a7737
JD
95332006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
9534
9535 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
9536 mid-rule action inside a nonterminal symbol in order to declare a
9537 destructor for its semantic value.
9538
fc3f467f
PE
95392006-02-16 Paul Eggert <eggert@cs.ucla.edu>
9540
9541 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
9542 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
9543 __cplusplus && ! defined _STDLIB_H && !
9544 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
9545 defined free))]: Include <stdlib.h> rather than rolling our own
9546 declarations of malloc and free, to avoid problems with
9547 incompatible declarations (using 'throw') C++'s stdlib.h. This
9548 should fix Debian bug 340012
9549 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
9550 reported by Guillaume Melquiond.
9551
a3af26dd
PE
95522006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9553
4d7bc38c
PE
9554 * NEWS: Clarify symbols versus types in unused-value warnings.
9555
a3af26dd
PE
9556 * configure.ac (AC_INIT): Bump version number.
9557
4e26c69e
PE
95582006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9559
9560 * NEWS: Version 2.1a.
9561 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
9562 since C99 requires this.
9563
498e897c
PE
95642006-02-11 Paul Eggert <eggert@cs.ucla.edu>
9565
9566 * m4/c-working.m4: New file.
9567 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
9568
57bb17ca
PE
95692006-02-10 Paul Eggert <eggert@cs.ucla.edu>
9570
9571 * Makefile.maint: Merge from coreutils.
9572
0be105dc
PE
95732006-02-09 Paul Eggert <eggert@cs.ucla.edu>
9574
9575 More portability fixes for problems summarized by Nelson H. F. Beebe.
9576
9577 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
9578 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
9579 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
9580 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
9581 messes up because C++ code is compiled in 32-bit mode but linked
9582 in 64-bit mode.
9583
6fc0c024
PE
95842006-02-08 Paul Eggert <eggert@cs.ucla.edu>
9585
9586 More portability fixes for problems summarized by Nelson H. F. Beebe.
9587
7870f699
PE
9588 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
9589 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
9590
6fc0c024
PE
9591 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
9592 nodist_PROGRAMS, since we don't need to actually compile the
9593 example if we're just doing a plain 'make'. This avoids bothering
9594 the installer unnecessarily about problems due to weird C++
9595 compilers.
9596
fe6c2fde
PE
95972006-02-06 Paul Eggert <eggert@cs.ucla.edu>
9598
9599 More portability fixes for problems summarized by Nelson H. F. Beebe.
9600
9601 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
9602 than #include "...", and compile with -I'.'. The old method was
9603 not portable, according to Posix and the C standard, and it does
9604 not work with Sun C 5.7, where previous #line directives affect
9605 the working directory used in later #include "..." directives.
9606
927b425b
JMG
96072006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9608
9609 Various DJGGP specific issues in /djgpp
9610
d9735e9e
PE
96112006-02-02 Paul Eggert <eggert@cs.ucla.edu>
9612
9613 More portability fixes for problems summarized by Nelson H. F. Beebe.
9614
9615 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
9616 '#include <map>' works and that you can apply ++ to iterators.
9617
5a6755af
PE
96182006-02-01 Paul Eggert <eggert@cs.ucla.edu>
9619
67a0dc4f
PE
9620 Work around portability problems summarized by Nelson H. F. Beebe in
9621 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
9622
8c86f0ef
PE
9623 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9624 that '#include <string>' works.
9625
de35dd59
PE
9626 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
9627 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
9628 "warning: sorry: semantics of inline function static data `const
9629 unsigned char translate_table[262]' are wrong (you'll wind up with
9630 multiple copies)".
9631
67a0dc4f
PE
9632 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
9633 or, xor to not_, and_, or_, and xor_, respectively. This works
9634 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
9635 random system header somewhere that includes the equivalent of
9636 <iso646.h>.
9637
5a6755af
PE
9638 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
9639 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 9640 Suite Version 2.0.
5a6755af 9641
3f001415
JD
96422006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
9643
9644 During deterministic GLR operation, user actions should be able to
9645 influence the parse by changing yychar. To make this easier to fix and
9646 to make glr.c easier to evolve in general, don't maintain yytoken in
9647 parallel with yychar; just compute yytoken when needed.
9648 * tests/glr-regression.at (Incorrect lookahead during deterministic
9649 GLR): Check that setting yychar in a user action has the intended
9650 effect.
9651 * data/glr.c (yyGLRStack): Remove yytokenp member.
9652 (yyclearin): Don't set *yytokenp.
9653 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
9654 yychar rather than *yytokenp to determine the current lookahead.
9655 Compute yytoken locally when needed.
9656 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
9657 point to.
9658
9659 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
9660 after `--report' documentation.
9661
e2a8c0f5
PE
96622006-01-30 Paul Eggert <eggert@cs.ucla.edu>
9663
9664 * src/parse-gram.y (grammar_declaration): Location of printer
9665 symbol is @1, not list->location. Bug reported by twlevo.
9666 * tests/input.at (Incompatible Aliases): Adjust to above change.
9667
6b702268
PE
96682006-01-29 Paul Eggert <eggert@cs.ucla.edu>
9669
27622431
PE
9670 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
9671 all the test at once. This makes the output easier to read in the
9672 normal case.
9673
6b702268
PE
9674 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
9675 got from <http://bro-ids.org/download.html>. The bug is that
9676 when two actions appeared in succession, the second one was
9677 scanned before the first one was added to the grammar rule
9678 as a midrule action. Bison then output the incorrect warning
9679 "parse.y:905.17-906.36: warning: unused value: $3".
9680 * src/parse-gram.y (BRACED_CODE, action): These are no longer
9681 associated with a value.
9682 (rhs): Don't invoke grammar_current_rule_action_append.
9683 (action): Invoke it here instead.
9684 * src/reader.c (grammar_midrule_action): Now extern.
9685 (grammar_current_rule_action_append): Don't invoke
9686 grammar_midrule_action; that is now the scanner's job.
9687 * src/reader.h (last_string, last_braced_code_loc):
9688 (grammar_midrule_action): New decls.
9689 * src/scan-gram.l (last_string): Now extern, sigh.
9690 (last_braced_code_loc): New extern variable.
9691 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
9692 rule already has an action.
9693 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
9694 * tests/input.at (AT_CHECK_UNUSED_VALUES):
9695 Add some tests to check that the above changes fixed the bug.
9696
d40ba6c2
PE
96972006-01-27 Paul Eggert <eggert@cs.ucla.edu>
9698
9699 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
9700 All used changed. Check whether the symbol has a destructor,
9701 not whether it is typed.
9702 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
9703 that the values are still reported as unused. All line numbers
9704 adjusted.
9705
401aace6
PE
97062006-01-23 Paul Eggert <eggert@cs.ucla.edu>
9707
9708 Work around a bug in bro 0.8, which underparenthesizes its
9709 definition of YYLLOC_DEFAULT.
9710 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
9711 their arguments.
9712 * data/lalr1.cc: Likewise.
9713 * data/yacc.cc: Likewise.
9714
06f01bc4
PE
97152006-01-22 Paul Eggert <eggert@cs.ucla.edu>
9716
401aace6
PE
9717 Work around a bug in Pike 7.0, and give the Pike folks a
9718 better way to override the usual int widths.
9719 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
9720 user can override the types.
9721 (short): #undef, to work around a bug in Pike 7.0.
9722 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
9723 (union yyalloc.yyss): Use yytype_int16 rather than short.
9724 All uses changed.
9725 (yysigned_char): Remove.
9726 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
9727 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
9728 * tests/regression.at (Web2c Actions): Adjust to above changes.
9729
9730 * src/reader.c (check_and_convert_grammar): New function.
9731 (reader): Close the input file even if something went wrong during
9732 parsing. Minor file descriptor leak reported by twlevo.
9733
06f01bc4
PE
9734 * src/assoc.c (assoc_to_string): Use a default: abort (); case
9735 to pacify gcc -Wswitch-default.
9736 * src/scan-gram.l (adjust_location): Use a default: break; case
9737 to pacify gcc -Wswitch-default.
9738 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
9739 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9740 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9741 Move these decls to scan-skel.l, since they don't need to be
9742 visible elsewhere.
9743 * src/scan-skel.l: Accept the above decls.
9744 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
9745 is used.
9746
02650b7f
PE
97472006-01-21 Paul Eggert <eggert@cs.ucla.edu>
9748
9749 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
9750 since we don't want to insist on a version number at the start
9751 of the changelog every time.
9752 * Makefile.maint: Sync from coreutils a bit better.
9753 (sc_trailing_blank): Renamed from sc_trailing_space.
9754 All uses changed.
9755 (sc_no_if_have_config_h, sc_require_config_h):
9756 (sc_prohibit_assert_without_use): New rules.
9757 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
9758 (sc_dd_max_sym_length): Fix leading spaces in rule.
9759 (sc_system_h_headers): Prefix with @.
9760 (sc_useless_cpp_parens, m4-check): Output line numbers.
9761 (changelog-check): Allow version only in head.
9762 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
9763 satisfy new Makefile.maint rule.
9764 * data/glr.c: Likewise.
9765 * data/glr.cc: Likewise.
9766 * data/lalr1.cc: Likewise.
9767 * data/yacc.c: Likewise.
9768 * lib/ebitsetv.c: Likewise.
9769 * lib/lbitset.c: Likewise.
9770 * lib/subpipe.c: Likewise.
9771 * lib/timevar.c: Likewise.
9772 * src/system.h: Likewise.
9773 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
9774 * djgpp/Makefile.maint: Add copyright notice.
9775 * djgpp/README.in: Likewise.
9776 * djgpp/config.bat: Likewise.
9777 * djgpp/config.site: Likewise.
9778 * djgpp/config_h.sed: Likewise.
9779 * djgpp/djunpack.bat: Likewise.
9780 * djgpp/config.sed: Fix copyright notice to match standard format.
9781 * djgpp/subpipe.h: Likewise.
9782 * lib/bitsetv-print.c: Likewise.
9783 * lib/bitsetv.c: Likewise.
9784 * lib/subpipe.h: Likewise.
9785 * lib/timevar.c: Likewise.
9786 * lib/timevar.h: Likewise.
9787 * djgpp/subpipe.c: Use standard recipe for config.h.
9788 * lib/abitset.c: Likewise.
9789 * lib/bitset.c: Likewise.
9790 * lib/bitset_stats.c: Likewise.
9791 * lib/bitsetv-print.c: Likewise.
9792 * lib/bitsetv.c: Likewise.
9793 * lib/ebitsetv.c: Likewise.
9794 * lib/get-errno.c: Likewise.
9795 * lib/lbitset.c: Likewise.
9796 * lib/subpipe.c: Likewise.
9797 * lib/timevar.c: Likewise.
9798 * lib/vbitset.c: Likewise.
9799 * tests/local.at: Likewise.
9800 * src/scan-gram.l: Don't include verify.h, since system.h does
9801 that for us.
9802 * .x-sc_require_config_h: New file.
9803 * .x-sc_unmarked_diagnostics: New file.
9804
287c78f6
PE
98052006-01-20 Paul Eggert <eggert@cs.ucla.edu>
9806
287c78f6
PE
9807 Be a bit more systematic about using 'abort'.
9808 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
9809 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
9810 Put 'default: abort ();' before some other case, to satisfy older
9811 pedantic compilers.
9812 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9813 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
9814 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
9815 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
9816 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
9817 (get_decision_str, get_orientation_str, get_node_alignment_str):
9818 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
9819 (get_linestyle_str, get_arrowstyle_str): Likewise.
9820 * src/conflicts.c (resolve_sr_conflict):
9821 Use a default case rather than one for the one remaining enum
9822 value, to catch invalid enum values as well.
9823 * src/lalr.c (set_goto_map, map_goto):
9824 Prefer "assert (FOO);" to "if (!FOO) abort ();".
9825 * src/nullable.c (nullable_compute, token_definitions_output):
9826 Likewise.
9827 * src/reader.c (packgram, reader): Likewise.
9828 * src/state.c (transitions_to, state_new, state_reduction_find):
9829 Likewise.
9830 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
9831 (symbol_pack): Likewise.
9832 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
9833 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
9834 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
9835 * src/system.h: Don't include <assert.h>.
9836 (assert): New macro.
9837
9838 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
9839 (Destructor Decl, Parser Function, Pure Calling):
9840 Describe rules for braces inside C code more carefully.
287c78f6 9841
c66dfadd
PE
98422006-01-19 Paul Eggert <eggert@cs.ucla.edu>
9843
c21493b8
PE
9844 Fix some porting glitches found by Nelson H. F. Beebe.
9845 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
9846 compilers that don't understand that abort () does not return.
9847 * src/state.c (transitions_to): Likewise.
9848 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9849 that '#include <cstdlib>' works.
9850 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
9851 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
9852 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
9853 for the benefit of some pre-C99 compilers.
9854
b6e3facf
PE
9855 * bootstrap: Undo changes to gnulib files that autoreconf made.
9856
c66dfadd
PE
9857 Minor fixups to get 'make maintainer-check' to work.
9858 * configure.ac: Don't use -Wnested-externs, as it's incompatible
9859 with the new verify.h implementation.
9860 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
9861 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
9862 * data/yacc.c (YYUSE): Likewise.
9863 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
9864 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
9865 * src/parse-gram.y (declaration): Don't pass a string constant
9866 to a function that expects char *, since GCC might complain
9867 about the constant value.
9868 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
9869 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
9870 before #defining them.
9871 * tests/glr-regression.at
9872 (Incorrectly initialized location for empty right-hand side in GLR):
9873 In yyerror, use the msg arg.
9874 (Corrupted semantic options if user action cuts parse):
9875 (Incorrect lookahead during deterministic GLR):
9876 (Incorrect lookahead during nondeterministic GLR):
9877 Don't name a local var 'index'; it shadows string.h's 'index'.
9878
ed94ef2a
AD
98792006-01-19 Akim Demaille <akim@epita.fr>
9880
9881 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
9882 location, not just parts of it.
9883
e9ad4aec
PE
98842006-01-18 Paul Eggert <eggert@cs.ucla.edu>
9885
d6ca7905
PE
9886 * NEWS: Document the fact that multiple %unions are now allowed.
9887 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
9888 * TODO: This feature is now implemented, so remove it from
9889 the wishlist.
d6ca7905 9890
ef1b70e0
PE
9891 * Makefile.maint: Merge with coreutils Makefile.maint.
9892 (CVS_LIST): Use build-aux version if available.
9893 (VERSION_REGEXP): New macro.
9894 (syntax-check-rules): Add sc_no_if_have_config_h,
9895 sc_prohibit_assert_without_use, sc_require_config_h,
9896 sc_useless_cpp_parens.
9897 (sc_obsolete_symbols): Check for O_NDELAY.
9898 (sc_dd_max_sym_length): Track coreutils.
9899 (sc_unmarked_diagnostics): Look in all files, not just *.c.
9900 (sc_useless_cpp_parens): New rule.
9901 (news-date-check): Look for version or today's date.
9902 (changelog-check): Don't require version number near head.
9903 (copyright-check): Use current year instead of hardwiring 2005.
9904 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
9905 (announcement): Add --gpg-key-ID.
9906
9907 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
9908 with "file system".
9909
2073ce56 9910 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
9911 array. Problem reported by twlevo.
9912 * src/reader.c (packgram): Prepend a new sentinel before ritem.
9913 * src/lalr.c (build_relations): Rely on new sentinel.
9914 * src/gram.c (gram_free): Adjust to new sentinel.
9915
b7691f15
JD
99162006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
9917
9918 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
9919 yylookaheadNeeds. All uses updated.
9920 (yysplitStack): Rename local yynewLookaheadStatuses to
9921 yynewLookaheadNeeds.
9922 * data/glr-regression.at (Incorrect lookahead during nondeterministic
9923 GLR): In comments, change `lookahead status' to `lookahead need'.
9924
ddee1b06
PH
99252006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9926
9927 * data/glr.c (yysplitStack): A little stylistic rewrite.
9928
12f4614d
PH
99292006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9930
9931 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
9932
32c29292
JD
99332006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9934
9935 * doc/bison.texinfo: Fix some typos.
9936 (GLR Semantic Actions): New subsection discussing special
9937 considerations because GLR semantic actions might be deferred.
9938 (Actions): Mention look-ahead usage of yylval.
9939 (Actions and Locations): Mention look-ahead usage of yylloc.
9940 (Special Features for Use in Actions): Add YYEOF entry and mention it
9941 in the yychar entry.
9942 In the yychar entry, remove mention of the local yychar case (pure
9943 parser) since this is irrelevant information when writing semantic
148d66d8 9944 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
9945 yychar is otherwise described as an external variable.
9946 In the yychar entry, don't call it the `current' look-ahead since it
9947 isn't when semantic actions are deferred.
9948 In the yychar and yyclearin entries, add note about deferred semantic
9949 actions.
9950 Add yylloc and yylval entries discussing look-ahead usage.
9951 (Look-Ahead Tokens): When discussing yychar, don't call it the
9952 `current' look-ahead, and do mention yylval and yylloc.
9953 (Error Recovery): Cross-reference `Action Features' when mentioning
9954 yyclearin.
148d66d8 9955 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
9956 look-ahead.
9957 In the yylloc and yylval entries, mention look-ahead usage.
9958
de366a2f 99592006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
9960
9961 * tests/glr-regression.at: Update copyright year to 2006.
9962
bf70fa87
JD
99632006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9964
9965 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9966 use during nondeterministic operation to track which stacks have
9967 actually needed the current lookahead.
9968 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9969 Allocate, deallocate, resize, and otherwise shuffle space for
9970 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9971 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9972 appropriately during nondeterministic operation.
9973 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9974 members to store the current lookahead to be used by the deferred
9975 user action.
9976 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9977 from which the RHS is taken. Set the lookahead members of the new
9978 yySemanticOption according to the lookahead status for stack yyk.
9979 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9980 yyaddDeferredAction.
9981 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9982 members of yySemanticOption before invoking yyuserAction, and then set
9983 them back to their current values afterward.
9984 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9985 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9986 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9987 titles for consistency.
9988 (Leaked merged semantic value if user action cuts parse): In order to
9989 suppress lint warnings, use arguments in merge function, and assign
9990 char value < 128 in main.
9991 (Incorrect lookahead during deterministic GLR): New test case.
9992 (Incorrect lookahead during nondeterministic GLR): New test case.
9993
05449a2c
JD
99942006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9995
de366a2f 9996 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
9997 !yyvaluep as signal that no semantic value is available to print.
9998 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9999 to print a semantic value.
10000
4158e0a1 100012006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 10002
4158e0a1
JD
10003 * tests/glr-regression.at: For consistency with my newer test cases,
10004 don't thank myself.
10005
d659304d
JD
100062006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
10007
10008 * data/glr.c (yyresolveValue): When merging semantic options, if at
10009 least one user action succeeds but a later one cuts the parse, then
10010 destroy the semantic value before returning rather than leaking it.
10011 (yyresolveStates): If a user action cuts the parse and thus
10012 yyresolveValue fails, ignore the (unset) semantic value rather than
10013 corrupting the yyGLRState, and empty the semantic options list since
10014 the user actions should have called all necessary destructors.
10015 Simplify code with YYCHK.
10016 * tests/glr-regression.at (Corrupted semantic options if user action
10017 cuts parse): New test case.
10018 (Undesirable destructors if user action cuts parse): New test case.
10019 Before applying any of this patch, this test case never actually failed
10020 for me... but only because the corrupted semantic options usually
10021 masked this bug.
10022 (Leaked merged semantic value if user action cuts parse): New test
10023 case.
10024
6ec2c0f2
AD
100252006-01-05 Akim Demaille <akim@epita.fr>
10026
10027 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
10028
1b9c21fb
PE
100292006-01-04 Paul Eggert <eggert@cs.ucla.edu>
10030
10031 * data/c.m4 (b4_c_modern): New macro, with a new provision for
10032 _MSC_VER. Problem reported by Cenzato Marco.
10033 (b4_c_function_def): Use it.
10034 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
10035 b4_c_modern.
10036 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
10037 than rolling our own.
10038
84866159
AD
100392006-01-04 Akim Demaille <akim@epita.fr>
10040
10041 Also warn about non-used mid-rule values.
10042 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
10043 member.
10044 (symbol_list_new): Adjust.
10045 * src/reader.c (symbol_typed_p): New.
10046 (grammar_rule_check): Use it.
10047 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
10048 Check its rule.
10049 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
10050 Use it.
10051 * tests/actions.at (Exotic Dollars): Adjust.
10052
378f4bd8
AD
100532006-01-04 Akim Demaille <akim@epita.fr>
10054
10055 * src/reader.c (grammar_midrule_action): If $$ is set in a
10056 mid-rule, move the `used' bit to its lhs.
10057 * tests/input.at (Unused values): New.
10058 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
10059
e2a21b6f
PE
100602006-01-03 Paul Eggert <eggert@cs.ucla.edu>
10061
54662697
PE
10062 * doc/bison.texinfo (Bison Options): Say more accurately what
10063 --yacc does.
10064 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
10065 about declarations in the grammar when in Yacc mode, as POSIX does
10066 not require a diagnostic when the grammar uses extensions.
10067
10068 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
10069
073f9288
PE
10070 Warn about dubious constructions like "%token T T".
10071 Reported by twlevo.
10072 * src/symtab.h (struct symbol.declared): New member.
10073 * src/symtab.c (symbol_new): Initialize it to false.
10074 (symbol_class_set): New arg DECLARING, specifying whether
10075 this is a declaration that we want to warn about, if there
10076 is more than one of them. All uses changed.
10077
1221b78a
PE
10078 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
10079 Allow multiple %union directives, whose contents concatenate.
10080 * src/parse-gram.y (grammar_declaration): Likewise.
10081 Use muscle_code_grow, so that we don't need stype_line any more.
10082 All uses changed.
10083
10084 * src/muscle_tab.c (muscle_grow): Fix comment.
10085
e2a21b6f
PE
10086 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
10087 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
10088 Update copyright year to 2006.
10089
8f7e3cf9
AD
100902006-01-03 Akim Demaille <akim@epita.fr>
10091
10092 Have glr.cc pass (some of) the calc.at tests.
10093 * data/glr.cc (b4_parse_param_orig): New.
10094 (b4_parse_param): Improve its definition, and bound it more
10095 clearly in the skeleton.
10096 (b4_epilogue): Append, instead of prepending, in order to keep
10097 #line consistency.
10098 Simplify the generation of auxiliary functions: locations and
10099 purity are mandated.
10100 (b4_global_tokens_and_yystype): Honor it.
10101 * data/location.cc (c++.m4): Don't include it.
10102 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
10103 and AT_SKEL_CC_IF.
10104 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
10105 AT_LALR1_CC_IF.
10106 Be sure to initialize the first position's filename.
10107 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
10108 mandated anyway.
10109 (AT_CHECK_CALC_GLR_CC): New.
10110 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
10111
3953ed88
AD
101122006-01-02 Akim Demaille <akim@epita.fr>
10113
10114 * src/output.c (output_skeleton): Don't hard wire the inclusion of
10115 c.m4.
0a96ba81 10116 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
10117 * data/glr.cc: Do not include stack.hh.
10118
9ecafbbf
AD
101192006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
10120
10121 * data/glr.c: Reformat whitespace with tabs.
10122 (b4_lpure_formals): Remove this unused m4 macro.
10123 * tests/cxx-type.at: Reformat whitespace with tabs.
10124 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
10125 since it's a member. Rename type to isNterm for clarity.
10126
c4d497a0
AD
101272005-12-29 Akim <akim@sulaco.local>
10128
10129 Let glr.cc catch up with symbol_value_print.
10130 * data/glr.cc (b4_yysymprint_generate): Replace by...
10131 (b4_yy_symbol_print_generate): this.
10132 (yy_symbol_print, yy_symbol_value_print): Declare them.
10133
4517da37
PE
101342005-12-28 Paul Eggert <eggert@cs.ucla.edu>
10135
10136 * src/location.h (boundary): Note that a line or column equal
10137 to INT_MAX indicates an overflow.
10138 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
10139 (rule_length_overflow, increment_rule_length, add_column_width):
10140 New functions.
10141 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
10142 (<SC_BRACED_CODE>"}"):
10143 Use increment_rule_length rather than incrementing it by hand.
10144 (adjust_location, handle_syncline): Diagnose overflow.
10145 (handle_action_dollar, handle_action_at):
10146 Fix bug with monstrosities like $-2147483648.
10147 Remove now-unnecessary checks.
10148 (scan_integer): Verify assumptions and remove now-unnecessary checks.
10149 (convert_ucn_to_byte): Verify assumptions.
10150 (handle_syncline): New arg LOC. All callers changed.
10151 Don't store through a value derived from char const * pointer.
10152
10153 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
10154 GCC warnings.
10155
e3233bf6
PE
101562005-12-27 Paul Eggert <eggert@cs.ucla.edu>
10157
10158 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
10159 Remove unnecessary forward static decls.
10160
8f3596a6
AD
101612005-12-27 Akim Demaille <akim@epita.fr>
10162
10163 * src/reader.c (grammar_current_rule_check): Also check that $$
10164 is used.
10165 Take the rule to check as argument, hence rename as...
10166 (grammar_rule_check): this.
10167 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
10168 Rename as...
10169 (grammar_rule_begin, grammar_rule_end): these, for consistency.
10170 (grammar_midrule_action, grammar_symbol_append): Now static.
10171 * tests/torture.at (input): Don't rely on the default action
10172 being always performed.
10173 * tests/calc.at: "Set" $$ even when the action is "cut" with
10174 YYERROR or other.
10175 * tests/actions.at (Exotic Dollars): Instead of using unused
10176 values, check that the warning is issued.
10177
721be13c
PE
101782005-12-22 Paul Eggert <eggert@cs.ucla.edu>
10179
10180 * NEWS: Improve wording for unused-value warnings.
10181
a0af42fc
AD
101822005-12-22 Akim Demaille <akim@epita.fr>
10183
10184 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
10185 (b4_yysymprint_generate): Rename as...
10186 (b4_yy_symbol_print_generate): this.
10187 Generate yy_symbol_print instead of yysymprint.
10188 Generate also yy_symbol_value_print, and use it.
10189
affac613
AD
101902005-12-22 Akim Demaille <akim@epita.fr>
10191
721be13c 10192 * NEWS: Warn about unused values.
affac613
AD
10193 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
10194 a `used' member.
10195 (symbol_list_n_get, symbol_list_n_used_set): New.
10196 (symbol_list_n_type_name_get): Use symbol_list_n_get.
10197 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
10198 * src/reader.c (grammar_current_rule_check): Check that values are
10199 used.
10200 * src/symtab.c (symbol_print): Accept 0.
10201 * tests/existing.at: Remove the type information.
10202 Empty the actions.
10203 Remove useless actions (beware of mid-rule actions: perl -000
10204 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
10205 * tests/actions.at (Exotic Dollars): Use unused values.
10206 * tests/calc.at: Likewise.
10207 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10208 Likewise.
10209
10210 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
10211 rule_useful_p.
10212
9d9b8b70
PE
102132005-12-21 Paul Eggert <eggert@cs.ucla.edu>
10214
8bb4c753
PE
10215 Undo 2005-12-01 tentative license wording change. The wording is
10216 still being reviewed by the lawyers, and we don't want to wait for
10217 them before publishing a test release. For now, revert to the
10218 previous wording.
10219 * NEWS: Undo 2005-12-01 change.
10220 * data/glr.c: Revert to previous license wording.
10221 * data/glr.cc: Likewise.
10222 * data/lalr1.cc: Likewise.
10223 * data/location.cc: Likewise.
10224 * data/yacc.c: Likewise.
10225
9d9b8b70
PE
10226 * NEWS: Reword %destructor vs YYABORT etc.
10227 * data/glr.c: Use American spacing, for consistency.
10228 * data/glr.cc: Likewise.
10229 * data/lalr1.cc: Likewise.
10230 * data/yacc.c: Likewise.
10231 * data/yacc.c: Reformat comments slightly.
10232 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
10233 for consistency. Fix some spelling errors and reword recently-included
10234 text slightly.
10235 * tests/cxx-type.at: Cast results of malloc, for C++.
10236
2c3b392a
AD
102372005-12-21 Joel E. Denny <address@hidden>
10238
10239 * tests/cxx-type.at: Construct a tree, count the parents of shared
10240 nodes, and free each node once and only once. Previously, the memory
10241 for semantic values was leaked instead.
10242
d6cff4dc
AD
102432005-12-21 Joel E. Denny <address@hidden>
10244
10245 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
10246 (yylval, yylloc): If pure, #define to yystackp->yyval and
10247 yystackp->yyloc similar to yychar and yynerrs.
10248 (yyparse): If pure, remove local yylval and yylloc. Add local
10249 yystackp to accommodate pure definitions of yylval and yylloc.
10250 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
10251 yylvalp and yyllocp to &yylval and &yylloc.
10252 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
10253 namespace. Previously, nerrs and char were missing, but lval and lloc
10254 weren't necessary.
10255 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
10256 yylvalp and yyllocp parameters since, if pure, these are now always
10257 accessible through yystackp. If not pure, they are still accessible
10258 globally.
10259 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
10260 `if (YYID (N))' to pacify lint.
10261
a85284cf
AD
102622005-12-21 Akim Demaille <akim@epita.fr>
10263
10264 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
10265 destroy the RHS symbols of a rule.
10266 * data/yacc.c (yylen): Initialize to 0.
10267 Keep its value to the number of items to possibly shift.
10268 In particular, a regular successful parse that ends on YYFINAL by
10269 a (internal) YYACCEPT must not have yylen != 0.
10270 (yyerrorlab, yyreturn): Pop the RHS.
10271 Reorder a bit to emphasize the `shifting' bits of code.
10272 (YYPOPSTACK): Now accept a number of items to pop.
10273 * data/lalr1.cc: Likewise.
10274 * data/glr.c: Formatting changes.
10275 Use goto instead of fall through.
10276 * doc/bison.texinfo (Destructor Decl): Complete.
10277
d508c281
JMG
102782005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10279
10280 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10281 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
10282 * djgpp/config.bat: Replace every occurence of the file name
10283 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10284 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10285 * djgpp/config.sed: Replace every occurence of the file name
10286 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
10287 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
10288 * djgpp/djunpack.bat: DJGPP specific file.
10289 * djgpp/fnchange.lst: DJGPP specific file.
10290 * djgpp/README.in: Add new information about how to unpack the bison
10291 source on MSDOS and other systems which have 8.3 file name restrictions
10292 using djunpack.bat and fnchange.lst.
10293
3e7a2cd9
PE
102942005-12-12 Paul Eggert <eggert@cs.ucla.edu>
10295
10296 * bootstrap (build_cvs_prefix): Remove; unused.
10297 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
10298 when getting gnulib.
10299
103002005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
10301
10302 * data/glr.c: Reorder typedef declarations for structs to match order
10303 of struct declarations.
10304 Rename yystack everywhere to yystackp except in yyparse where it's not
10305 a pointer.
10306 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
10307 consistency.
10308 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
10309 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
10310 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
10311 lint.
10312
877519f8
PE
103132005-12-09 Paul Eggert <eggert@cs.ucla.edu>
10314
0eca5a39
PE
10315 * tests/sets.at (Accept): Fix typos in regular expression used to
10316 sed out the final state number.
10317
2cec9080
PE
10318 Work around portability problem on Solaris 10: flex-generated
10319 files include <stdio.h> before <config.h>, which messes up
10320 because the latter defines __EXTENSIONS__. Address the problem
10321 by creating two new little files that include <config.h> first,
10322 then include the flex-generated files. Rewrite everyone else
10323 to include <config.h> first, as well.
10324 * lib/timevar.c: Always include "config.h".
10325 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
10326 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
10327 (EXTRA_bison_SOURCES): New macro.
10328 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
10329 * src/system.h: Don't include config.h.
10330 * src/LR0.c: Include <config.h> first.
10331 * src/assoc.c: Likewise.
10332 * src/closure.c: Likewise.
10333 * src/complain.c: Likewise.
10334 * src/conflicts.c: Likewise.
10335 * src/derives.c: Likewise.
10336 * src/files.c: Likewise.
10337 * src/getargs.c: Likewise.
10338 * src/gram.c: Likewise.
10339 * src/lalr.c: Likewise.
10340 * src/location.c: Likewise.
10341 * src/main.c: Likewise.
10342 * src/muscle_tab.c: Likewise.
10343 * src/nullable.c: Likewise.
10344 * src/output.c: Likewise.
10345 * src/parse-gram.y: Likewise.
10346 * src/print.c: Likewise.
10347 * src/print_graph.c: Likewise.
10348 * src/reader.c: Likewise.
10349 * src/reduce.c: Likewise.
10350 * src/relation.c: Likewise.
10351 * src/state.c: Likewise.
10352 * src/symlist.c: Likewise.
10353 * src/symtab.c: Likewise.
10354 * src/tables.c: Likewise.
10355 * src/uniqstr.c: Likewise.
10356 * src/vcg.c: Likewise.
10357
877519f8
PE
10358 * src/parse-gram.y: Fix minor problems uncovered by lint.
10359 (current_lhs, current_lhs_location): Now static.
10360 (current_assoc): Remove unused variable.
10361
10362 Cleanups so that Bison-generated parsers have less lint.
10363 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
10364 Prepend /*ARGSUSED*/, for lint's sake.
10365 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
10366 definition if 'lint' is defined.
10367 (YYID): New macro (or function, if lint).
10368 All uses of /*CONSTCOND*/0 replaced by YYID(0).
10369 * data/yacc.c: Likewise.
10370 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
10371 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
10372 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
10373 is C++ only.
10374 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
10375 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
10376 Use YYID(0) rather than 0, for lint.
10377 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
10378 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
10379
f5228370
PE
103802005-12-07 Paul Eggert <eggert@cs.ucla.edu>
10381
10382 * tests/glr-regression.at
10383 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10384 Close memory leak reported by twlevo.
10385
69ce078b
PE
103862005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
10387
6ff99711
PE
10388 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
10389 all stacks.
10390 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
10391 * tests/glr-regression.at (No users destructors if stack 0 deleted):
10392 New test case.
10393 (Duplicated user destructor for lookahead): This test now is expected
10394 to succeed.
10395
af3412cd
PE
103962005-12-01 Paul Eggert <eggert@cs.ucla.edu>
10397
32b5b719 10398 * NEWS: Document the following change.
af3412cd
PE
10399 * data/yacc.c: Say "parser skeleton" rather than "file", since
10400 it's no longer just a file.
10401 * data/glr.c: Grant a special exception for C GLR parsers, that
10402 reads like the already-existing exception for C LALR(1) parsers.
10403 * data/glr.cc: Likewise.
10404 * data/lalr1.cc: Likewise.
10405 * data/location.cc: Likewise.
10406 * data/yacc.c: Reword the "written by" statement to clarify that
10407 it was the parser skeleton, not the entire output file.
10408 * data/glr.c: Written by Paul Hilfinger.
10409 * data/glr.cc: Written by Akim Demaille.
10410 * data/lalr1.cc: Likewise.
10411
035aa4a0
PE
104122005-11-18 Paul Eggert <eggert@cs.ucla.edu>
10413
d9963c85
PE
10414 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
10415 Fix typos in previous change that broke 'make check'.
10416 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
10417 supported in C.
10418 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
10419 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
10420 We can revert this once things settle down.
10421
035aa4a0
PE
10422 * src/conflicts.c (conflicts_print): Don't print file name twice
10423 when %expect fails because there were no conflicts.
10424 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
10425 change.
10426 * tests/conflicts.at (%expect not enough, %expect too much):
10427 (%expect with reduce conflicts): Adjust to new behavior.
10428
104292005-11-18 Akim Demaille <akim@epita.fr>
10430
10431 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
10432 errors.
10433 * NEWS: Document this.
10434 * doc/bison.texinfo (Expect Decl): Likewise.
10435
d1ff7a7c
AD
104362005-11-16 Akim Demaille <akim@epita.fr>
10437
10438 Generalize the display of semantic values and locations in traces.
10439 * data/glr.c (yy_reduce_print): Fix indices (again).
10440 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
10441 literal integers.
10442 * data/lalr1.cc (yyreduce_print): Rename as...
10443 (yy_reduce_print): this.
10444 Display values and locations.
10445 * data/yacc.c (yy_reduce_print): Likewise.
10446 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
10447 (yysymprint): Move higher to be visible from yy_reduce_print).
10448 (yyparse): Adjust.
10449 * tests/calc.at: Adjust the expected length of the traces.
10450
6de5398d
AD
104512005-11-14 Akim Demaille <akim@epita.fr>
10452
10453 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
10454 from 1 to N, while values and location start at 0.
10455 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
10456
a1373f55
AD
104572005-11-14 Akim Demaille <akim@epita.fr>
10458
10459 * data/glr.c (yy_reduce_print): Fix the $ number.
10460
613d8952
AD
104612005-11-14 Akim Demaille <akim@epita.fr>
10462
10463 "Use" parse parameters.
10464 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
10465 * data/glr.c, data/glr.cc: Use them.
10466 * data/glr.c (YYUSE): Have a C++ definition that supports
10467 non-pointer types.
10468
b2741627
AD
104692005-11-14 Akim Demaille <akim@epita.fr>
10470
10471 * data/glr.c (yyexpandGLRStack): Declare only if defined.
10472
5059b5c8
AD
104732005-11-14 Akim Demaille <akim@epita.fr>
10474
42249483
AD
10475 * data/glr.cc: New.
10476 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 10477
4626a15d
AD
104782005-11-12 Akim Demaille <akim@epita.fr>
10479
10480 Let position and location be PODs.
10481 * data/location.cc (position::initialize, location::initialize): New.
10482 (position::position, location::location): Define only if
10483 b4_location_constructors is defined.
10484 * data/lalr1.cc (b4_location_constructors): Define it for backward
10485 compatibility.
10486 * doc/bison.texinfo (Initial Action Decl): Use initialize.
10487
104882005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
10489
10490 * data/lalr1.cc: Move the body of the ctor and dtor into the
10491 parser file (instead of the header).
10492 Wrap the implementations in a "namespace yy".
10493
104942005-11-12 Akim Demaille <akim@epita.fr>
10495
10496 Have glr.c include its header file when created.
10497 * data/glr.c (b4_shared_declarations): New.
10498 Output them verbatim in the parser if !%defines, otherwise
10499 output then in the header file, and include it instead.
10500
1989d947
AD
105012005-11-11 Akim Demaille <akim@epita.fr>
10502
10503 * data/glr.c: Comment changes.
10504
105052005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
10506
10507 When yydebug, report semantic and location values for reductions.
10508 * data/glr.c (yy_reduce_print): Report the semantic values and the
10509 locations.
10510 (YY_REDUCE_PRINT): Adjust.
10511 (yyglrReduce): Use them.
10512 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
10513 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
10514 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
10515 traces.
10516
02998094
AD
105172005-11-10 Akim Demaille <akim@epita.fr>
10518
10519 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
10520 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
10521 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
10522
5210672f
PE
105232005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
10524
10525 * m4/cxx.m4, examples/Makefile.am: Don't build
10526 examples/calc++ if no C++ compiler is available. (trivial change)
10527
a8991a1d
AD
105282005-11-09 Akim Demaille <akim@epita.fr>
10529
10530 * src/scan-skel.l: Use a couple of asserts.
10531
36b5e963
AD
105322005-11-03 Akim Demaille <akim@epita.fr>
10533
10534 In some (weird) cases, the final state number is incorrect.
10535 Reported by Alexandre Duret-Lutz.
10536 * src/LR0.c (state_list_append): Remove the computation of
10537 final_state.
10538 (save_reductions): Do it here.
10539 (get_state): Alpha conversion.
10540 (generate_states): Use a for loop.
10541 * src/gram.h (item_number_is_rule_number)
10542 (item_number_is_symbol_number): New.
10543 * src/state.c: Use assert.
10544 * src/system.h: Include assert.h.
10545 * tests/sets.at (Accept): New.
10546
44e7ead1
PH
105472005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10548
10549 * data/glr.c (yyfill): Adjust comment.
36b5e963 10550 (yyresolveAction): Initialize default location properly
44e7ead1
PH
10551 for empty right-hand sides.
10552 (yydoAction): Ditto.
10553 Add comment explaining apparently dead code.
36b5e963
AD
10554 * tests/glr-regression.at
10555 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 10556 New test.
36b5e963 10557
e10a80ee
PE
105582005-10-30 Paul Eggert <eggert@cs.ucla.edu>
10559
10560 * bootstrap (cleanup_gnulib): New function. Use it to clean up
10561 gnulib when interrupted. This fixes some race conditions and
10562 works around some portability problems (one noted by Paul
10563 Hilfinger).
10564
067b32ee
AD
105652005-10-22 Akim <akim@epita.fr>
10566
10567 * Makefile.cfg: Adjust to config -> build-aux.
10568 Reported by twledo.
10569
4b367315
AD
105702005-10-21 Akim Demaille <akim@epita.fr>
10571
10572 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
10573 the %parse-params.
10574 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
10575 * data/yacc.c (b4_Pure_if): Rename as...
10576 (b4_yacc_pure_if): this.
10577 (YY_SYMBOL_PRINT, yyparse): Adjust.
10578 * doc/bison.texinfo: Formatting changes.
10579
24cc23d9
AD
105802005-10-21 Akim Demaille <akim@epita.fr>
10581
10582 Finish the transition config -> build-aux.
10583 * configure.ac, Makefile.am: Use build-aux.
10584 * config/prev-version, config/announce-gen, config/Makefile.am:
10585 Move to...
10586 * build-aux/prev-version, build-aux/announce-gen,
10587 * build-aux/Makefile.am: here.
10588
d4476375
AD
105892005-10-14 Akim Demaille <akim@epita.fr>
10590
10591 * examples/calc++/test: Use set -x only when VERBOSE.
10592
302c0aee
PE
105932005-10-13 Paul Eggert <eggert@cs.ucla.edu>
10594
10595 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
10596 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
10597
7625ec2c
AD
105982005-10-13 Akim Demaille <akim@epita.fr>
10599
10600 * src/scan-skel.l: Output the base name parts of the parser and
10601 header file names.
302c0aee 10602 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
10603 additional checks.
10604 Use this to exercise C++ outputs in subdirs.
10605 Reported by Oleg Smolsky.
10606
ba0fe3c7
PE
106072005-10-12 Paul Eggert <eggert@cs.ucla.edu>
10608
10609 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
10610 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
10611 Problem reported by John P. Hartmann.
10612 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
10613 already defined it.
10614
9b8a5ce0
AD
106152005-10-12 Akim Demaille <akim@epita.fr>
10616
10617 * src/parse-gram.y (version_check): Exit 63 to please missing
10618 (stands for "version mismatch).
10619 * tests/input.at, doc/bison.texinfo: Adjust.
10620
4f6e011e
PE
106212005-10-10 Paul Eggert <eggert@cs.ucla.edu>
10622
10623 Work around portability problems with Visual Age C compiler
10624 (xlc and xlC_r) reported by John P. Hartmann.
10625 * data/location.cc (initial_column, initial_line): Remove.
10626 All uses replaced by 0 and 1.
10627 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
10628 that xlc complains about.
10629 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 10630 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 10631 as __STDC__.
4d7aa45e
PE
10632 * data/yacc.c (YYMODERN_C): New macro, which also looks at
10633 __STDC_VERSION__. Use it everywhere instead of looking at
10634 __STDC__ and __cplusplus.
4f6e011e 10635
a1b3bf8c
AD
106362005-10-10 Akim Demaille <akim@epita.fr>
10637
10638 * examples/calc++/test: Be quiet unless VERBOSE.
10639
412e44aa
PE
106402005-10-05 Paul Eggert <eggert@cs.ucla.edu>
10641
2a4647a3
PE
10642 * data/c.m4 (yydestruct, yysymprint):
10643 Use YYUSE instead of casting to void.
10644 * data/glr.c (YYUSE): New macro.
10645 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10646 Use it instead of rolling our own.
10647 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10648 (YYCHK1):
10649 Use /*CONSTCOND*/ to suppress lint warnings.
10650 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10651 (YY_STACK_PRINT): Use 'false' not '0'.
10652 (YYUSE): New macro.
10653 (yysymprint_, yydestruct_): Use it instead of rolling our own.
10654 * data/yacc.c (YYUSE): New macro.
10655 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
10656 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
10657 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
10658
10659
412e44aa
PE
10660 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
10661 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
10662
88c6637f
PE
106632005-10-04 Paul Eggert <eggert@cs.ucla.edu>
10664
2f4f028d
PE
10665 Undo the parts of the unlocked-I/O change that substituted
10666 putc or puts for printf. This might hurt performance a bit,
10667 but some people prefer the printf style.
10668 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
10669 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
10670 All uses replaced by YYFPRINTF and YYDPRINTF.
10671 * data/yacc.c: Likewise.
10672 * lib/bitset.c (bitset_print): Likewise.
10673 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
10674 putc and puts.
10675 * lib/lbitset.c (debug_lbitset): Likewise.
10676 * src/closure.c (print_firsts, print_fderives): Likewise.
10677 * src/gram.c (grammar_dump): Likewise.
10678 * src/lalr.c (look_ahead_tokens_print): Likewise.
10679 * src/output.c (escaped_output): Likewise.
10680 (user_actions_output): Break apart two printfs.
10681 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
10682 * src/reduce.c (reduce_print): Likewise.
10683 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10684 * src/system.h: Include unlocked-io.h rathe than stdio.h.
10685
88c6637f
PE
10686 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10687 Use assignments rather than casts-to-void to suppress
10688 unused-variable warnings. This pacifies 'lint'.
10689 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
10690 unused-variable warnings.
10691
fb32e373
JMG
106922005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10693
10694 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10695
edb8f44f
PE
106962005-10-02 Paul Eggert <eggert@cs.ucla.edu>
10697
fb9c0b33
PE
10698 Use unlocked I/O for a minor performance improvement on hosts like
10699 GNU/Linux and Solaris that support unlocked I/O. The basic idea
10700 is to use the gnlib unlocked-io module, and to prefer putc and
10701 puts to printf when either will work (since the latter doesn't
10702 come in an unlocked flavor).
10703 * bootstrap (gnulib_modules): Add unlocked-io.
10704 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
10705 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
10706 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
10707 and similarly for puts and putc and printf.
10708 * data/yacc.c: Likewise.
10709 * lib/bitset.c (bitset_print): Likewise.
10710 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
10711 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
10712 to printf.
10713 * lib/lbitset.c (debug_lbitset): Likewise.
10714 * src/closure.c (print_firsts, print_fderives): Likewise.
10715 * src/gram.c (grammar_dump): Likewise.
10716 * src/lalr.c (look_ahead_tokens_print): Likewise.
10717 * src/output.c (escaped_output): Likewise.
10718 (user_actions_output): Coalesce two printfs.
2f4f028d 10719 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
10720 * src/reduce.c (reduce_print): Likewise.
10721 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 10722 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 10723
edb8f44f
PE
10724 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
10725 this confuses xgettext.
10726
b50d2359
AD
107272005-10-02 Akim Demaille <akim@epita.fr>
10728
10729 * bootstrap (gnulib_modules): Add strverscmp.
10730 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
10731 * m4/.cvsignore: Add strverscmp.m4.
10732 * src/parse-gram.y (%require): New token, new rule.
10733 (version_check): New.
10734 * src/scan-gram.l (%require): Adjust.
10735 * tests/input.at (AT_REQUIRE): New.
10736 Use it.
10737 * doc/bison.texinfo (Require Decl): New.
10738 (Calc++ Parser): Use %require.
10739
21667f64
AD
107402005-10-02 Akim Demaille <akim@epita.fr>
10741
10742 * data/location.cc: New.
10743
2b81e969
AD
107442005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
10745 Akim Demaille <akim@epita.fr>
10746
10747 Make sure -odir/foo.cc creates dir/location.hh etc.
10748 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
10749 (spec_file_prefix, spec_verbose_file, spec_graph_file)
10750 (spec_defines_file): Now const.
10751 (dir_prefix): New.
10752 (short_base_name): Remove.
10753 * src/files.c: Adjust.
10754 (dirname.h): Include.
10755 (base_name): Don't prototype it.
10756 (finput): Remove, duplicates gram_in.
10757 (full_base_name, short_base_name): Replace by...
10758 (all_but_ext, all_but_tab_ext): these.
10759 (compute_base_names): Rename as...
10760 (compute_file_name_parts): this.
10761 Update to compute the new variables, including dir_prefix.
10762 Adjust dependencies.
10763 * src/output.c (prepare): Output them.
10764 * src/reader.c: Adjust to use gram_in, not finput.
10765 * src/scan-skel.l (@dir_prefix@): New.
10766
ad6a9b97
JMG
107672005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10768
10769 * lib/subpipe.c: New function end_of_output_subpipe() added
10770 to allow support for non-posix systems. This is a no-op function
10771 for posix systems.
10772
10773 * lib/subpipe.h: New function end_of_output_subpipe() added
10774 to allow support for non-posix systems. This is a no-op function
10775 for posix systems.
10776
10777 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
10778 handle the lack of pipe/fork functionality on non-posix systems.
10779
10780 * djgpp/Makefile.maint: DJGPP specific file.
10781
10782 * djgpp/README.in: DJGPP specific file.
10783
10784 * djgpp/config.bat: DJGPP specific configuration file.
10785
10786 * djgpp/config.sed: DJGPP specific configuration file.
10787
10788 * djgpp/config.site: DJGPP specific configuration file.
10789
10790 * djgpp/config_h.sed: DJGPP specific configuration file.
10791
10792 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
10793
10794 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
10795
fc695704
AD
107962005-10-02 Akim Demaille <akim@epita.fr>
10797
10798 * data/location.cc: New, extract from...
10799 * data/lalr1.cc: here.
10800 (location.hh): Include it after the user prologue, in case the
10801 filename type is defined by the user.
10802 Forward declation location and position before the pre-prologue.
10803 (yyresult_): Rename as...
10804 (yyresult): this, it's a local variable, not an attribute.
10805 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
10806
108072005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
10808
10809 * examples/extexi: Restore the #line generation.
10810
fb9712a9
AD
108112005-09-30 Akim Demaille <akim@epita.fr>,
10812 Alexandre Duret-Lutz <adl@gnu.org>
10813
10814 Move the token type and YYSTYPE in the parser class.
10815 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
10816 (parser::token): New, from the moved free definition of tokens.
10817 (parser::semantic_value): Now a full definition instead of an
10818 indirection to YYSTYPE.
10819 (b4_post_prologue): No longer included in the header file, but
10820 in the implementation file.
10821 * doc/bison.texi (C+ Language Interface): Update.
10822 * src/parse-gram.y: Support unary %define.
10823 * tests/actions.at: Define global_tokens_and_yystype for backward
10824 compatibility until we update the tests.
10825 * tests/calc.at: Idem.
10826 (first_line, first_column, last_line, last_column): Define for lalr1.cc
10827 to simplify the code.
10828
55f0c7b1
PE
108292005-09-29 Paul Eggert <eggert@cs.ucla.edu>
10830
10831 Port to SunOS 4.1.4, which lacks strtoul and strerror.
10832 Ah, the good old days! Problem reported by Peter Klein.
10833 * bootstrap (gnulib_modules): Add strerror, strtoul.
10834 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
10835 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
10836
fb9712a9 108372005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
10838
10839 * data/c.m4 (b4_error_verbose_if): New.
10840 * data/lalr1.cc: Use it.
10841 (YYERROR_VERBOSE_IF): Remove.
10842 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
10843 parser members, replaced by...
10844 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
10845 local variables.
10846 (yysyntax_error_): Takes the state number as argument.
10847 (yyreduce_print_): Use the argument yyrule, not the former
10848 attribute yyn_.
10849
8a6f72f3
PE
108502005-09-26 Paul Eggert <eggert@cs.ucla.edu>
10851
10852 * bootstrap (gnulib_modules): Add verify.
10853 * lib/.cvsignore: Add verify.h.
10854 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
10855 * src/system.h (verify): Remove.
10856 Include verify.h instead.
10857 * src/tables.c (tables_generate): Use new API for 'verify'.
10858
0d50976f
PE
108592005-09-21 Paul Eggert <eggert@cs.ucla.edu>
10860
ebc3737e
PE
10861 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
10862 local variables whose names begin with 'yy'.
10863 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10864 Trivial changes from Joel E. Denny.
10865
0d50976f
PE
10866 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
10867 it itself.
10868 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
10869 don't use alloca any more.
10870
10871 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
10872 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 10873 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
10874 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
10875 to match yacc.c, to test more hosts.
10876
a05b79df
PE
108772005-09-20 Paul Eggert <eggert@cs.ucla.edu>
10878
55289366
PE
10879 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
10880 doesn't affect behavior.
10881 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
10882 Solaris, AIX, MSC.
10883 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
10884 This works a bit better with glibc, if user code has already included
10885 stdlib.h.
10886 * doc/bison.texinfo (Bison Parser): Document that users can't
10887 arbitrarily use malloc and free for other purposes. Document
10888 that <alloca.h> and <malloc.h> might be included.
10889 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
10890 user must declare alloca.
10891
a05b79df
PE
10892 * HACKING (release): Forwarn the Translation Project about
10893 stable releses.
10894
3ab2ca22
AD
108952005-09-20 Akim Demaille <akim@epita.fr>
10896
10897 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
10898
a9739e7c
PE
108992005-09-19 Paul Eggert <eggert@cs.ucla.edu>
10900
a702593e
PE
10901 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
10902 (YYSTACK_ALLOC_MAXIMUM): Use it.
10903 (yysyntax_error): New function.
10904 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
10905 multiple syntax errors are reported, and alloca is being used.
10906 Instead, reallocate buffers twice as big each time, so that
10907 we waste at most half the allocated memory. Start with a small
10908 (128-byte) buffer that will suffice in most cases anyway.
10909 Use yysyntax_error to do most of the work.
10910
10911 * doc/bison.texinfo (Error Reporting, Table of Symbols):
10912 yynerrs is the number of errors reported, not the number of
10913 errors encountered.
10914
a9739e7c
PE
10915 * tests/glr-regression.at (Duplicated user destructor for lookahead):
10916 Mark it as expected to fail.
10917 Cast result of malloc; problem reported by twlevo@xs4all.nl.
10918 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
10919 Don't start user-code symbols with "yy", to avoid name space problems.
10920
f479c6c6
AD
109212005-09-19 Akim Demaille <akim@epita.fr>
10922
10923 Remove the traits, failed experiment.
10924 It never proved useful, and anyway because of the current
10925 definition, it was not possible to have several specialization of
10926 this traits, making it useless.
10927 * data/lalr1.cc (yy:traits): Remove.
10928 Inline its definitions in the parser class.
10929
e2586f82
AD
109302005-09-19 Akim Demaille <akim@epita.fr>
10931
10932 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10933 least Mac OSX with a /usr/local install of gettext.
10934
2e8cf949
AD
109352005-09-19 Akim Demaille <akim@epita.fr>
10936
10937 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10938 and yytoken for similarity with the other skeletons.
10939
c7fb0b90
AD
109402005-09-19 Akim Demaille <akim@epita.fr>
10941
4e26c69e 10942 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 10943
1bd0deda
PE
109442005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10945
10946 * NEWS: Version 2.1.
10947
10948 * NEWS: Remove notice of yytname change, since it was never in an
10949 official release.
10950 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10951 diagnostic.
10952 * src/output.c (prepare): Likewise.
10953 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10954 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10955 is not defined. This is an awful hack, but it's enough for now.
10956 All callers changed.
10957 * tests/glr-regression-at (make_value): Args are const pointers now,
10958 to avoid GCC warning.
10959 (Duplicated user destructor for lookahead): New test. Currently
10960 skipped. It fails on my host but I'm not sure it'll always fail.
10961
109622005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
10963
10964 * src/symtab.h (struct symbol): Declare the printer and destructor
10965 as const, to avoid accidental calls to free.
10966 (symbol_destructor_set, symbol_printer_set): Adjust.
10967 * src/symtab.c: Adjust.
10968
1bd0deda 109692005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
10970
10971 * data/c.m4 (b4_token_enums): New.
10972 (b4_token_defines): Rename as...
10973 (b4_token_enums_defines): this.
10974 (b4_token_defines): New, output only the #defines.
10975 * data/yacc.c, data/glr.c: Adjust.
10976 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10977 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10978 as default values.
10979
dbcdae2d
AD
109802005-09-16 Akim Demaille <akim@epita.fr>
10981
10982 * data/lalr1.cc (yylex_): Remove, inline its code.
10983 (yyreport_syntax_error_): Remove, replaced by...
10984 (yysyntax_error_): this which returns a string and leaves to the
10985 caller the call to the users' error function.
10986 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10987 Move from members of the parser object...
10988 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10989 to local variables of the parse function.
10990
70d8f291
AD
109912005-09-16 Akim Demaille <akim@epita.fr>
10992
10993 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10994 since it's in Bison's name space.
10995
b47dbebe
PE
109962005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10997
ae199bf1
PE
10998 * data/glr.c (yyresolveValue): Add default case to pacify
10999 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
11000
b47dbebe
PE
11001 * NEWS: Document when yyparse started to return 2.
11002 * doc/bison.texinfo (Parser Function): Document when yyparse
11003 returns 2.
11004
11005 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
11006 (b4_filename_type): Renamed back from b4_file_name_type. All uses
11007 changed.
11008 (class position): file_name -> filename (reverting). All uses changed.
11009
110102005-09-14 Paul Eggert <eggert@cs.ucla.edu>
11011
11012 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
11013 do anything if $@ exists. This reverts part of the 2005-07-07
11014 patch.
11015
00292f66
PE
110162005-09-11 Paul Eggert <eggert@cs.ucla.edu>
11017
11018 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
11019 contains obsolete information and isn't worth distributing as a
11020 separate file anyway.
11021 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
11022 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
11023 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
11024 (yyparse): Abort if user code uses longjmp to throw an unexpected
11025 value.
11026
a420f962
PE
110272005-09-09 Paul Eggert <eggert@cs.ucla.edu>
11028
00292f66
PE
11029 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
11030 Suggested by twlevo@xs4all.nl.
11031
127287e9
PE
11032 * data/glr.c (YYCHK1): Do not assume YYE is in range.
11033 This avoids a diagnostic from gcc -Wswitch-enum.
11034 Problem reported by twlevo@xs4all.nl.
11035
a420f962
PE
11036 * doc/bison.texinfo: Don't use "filename", as per GNU coding
11037 standards. Use "file name" or "file" or "name", depending on
11038 the context.
11039 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
11040 not to hack/foo.tab.c.
11041 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
11042 * data/glr.c: b4_filename -> b4_file_name.
11043 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
11044 All uses changed.
11045 (class position): filename -> file_name. All uses changed.
11046 * data/yacc.c: b4_filename -> b4_file_name.
11047 * lib/bitset.h: filename -> file_name in local vars.
11048 * lib/bitset_stats.c: Likewise.
11049 * src/files.c: Likewise.
11050 * src/scan-skel.l ("@output ".*\n): Likewise.
11051 * src/files.c (file_name_split): Renamed from filename_split.
11052 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
11053
110542005-09-08 Paul Eggert <eggert@cs.ucla.edu>
11055
11056 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
11057 to accommodate latest gnulib.
11058
11059 * tests/glr-regression.at (Duplicate representation of merged trees):
11060 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
11061
11062 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
11063 needed.
11064
42a6501d
PE
110652005-08-26 Paul Eggert <eggert@cs.ucla.edu>
11066
11067 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
11068 All uses changed. Invoke user destructor after an error during a
11069 split parse (trivial change from Joel E. Denny).
11070
11071 * tests/glr-regression.at
11072 (User destructor after an error during a split parse): New test case.
11073 Problem reported by Joel E. Denny in:
11074 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
11075
ef9a1faf
PE
110762005-08-25 Paul Eggert <eggert@cs.ucla.edu>
11077
5b4aaf78
PE
11078 * README-cvs: Give URLs for recommended tools.
11079 Mention Gzip version problem, and bootstrapping issues.
11080 Remove troubleshooting section, as it's somewhat obsolete.
11081
b5240ba5
PE
11082 * bootstrap (no_cache): New var, to accommodate different wget
11083 variants. Use it instead of '-C off'. Problem reported by
11084 twlevo@xs4all.nl.
11085
ef9a1faf
PE
11086 * data/glr.c (yydestroyStackItem): New function.
11087 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
11088 debugging information. Problem reported by Joel E. Denny.
11089
e6efa9da
AD
110902005-08-25 Akim Demaille <akim@epita.fr>
11091
11092 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
11093
adc90f13
PE
110942005-08-24 Paul Eggert <eggert@cs.ucla.edu>
11095
11096 * data/glr.c (yyrecoverSyntaxError, yyreturn):
11097 Don't invoke destructor on unresolved entries.
11098 * tests/glr-regression.at
11099 (User destructor for unresolved GLR semantic value): New test case.
11100 Problem reported by Joel E. Denny in:
11101 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
11102
f9315de5
PE
111032005-08-21 Paul Eggert <eggert@cs.ucla.edu>
11104
15d29c1f
PE
11105 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
11106 Add strnlen.c.
11107 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
11108 lib-prefix.m4, po.m4.
11109
dd5f2af2
PE
11110 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
11111 in yydestruct diagnostic, since it might not be an error.
11112 Problem reported by Joel Denny near end of
11113 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 11114 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
11115 * data/yacc.c (yyreturn): Likewise.
11116 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
11117
11118 * src/files.c: Remove obsolete FIXME comment.
11119
11120 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
11121 with the other templates, and to fix bogus run-on messages such
11122 as the one reported at the end of
11123 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
11124 All callers changed to avoid the newline.
11125 (yyprocessOneStack): Output two lines rather than one, to accommodate
11126 the above change. This changes the debug output format slightly.
11127
f9315de5
PE
11128 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
11129 reported by Joel E. Denny in
11130 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
11131 (trivial change).
11132 * tests/glr-regression.at (Duplicate representation of merged trees):
11133 New test, from Joel E. Denny in:
11134 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
11135 * THANKS: Add Joel E. Denny.
11136
11137 * configure.ac (AC_INIT): Bump to 2.0c.
11138
04098407
PE
111392005-07-24 Paul Eggert <eggert@cs.ucla.edu>
11140
11141 * NEWS: Version 2.0b.
11142
ca5d2013
PE
11143 * Makefile.am (SUBDIRS): Put examples before tests, so that
11144 "make check" doesn't finish with "All 1 tests passed".
11145
3d54b576
PE
11146 * tests/regression.at (Token definitions): Don't rely on
11147 AT_PARSER_CHECK for data that contains backslashes. It currently
11148 uses 'echo', and 'echo' isn't portable if its argument contains
11149 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
11150 that the byte '\0xff' is not printable in the C locale; it is,
11151 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
11152 not printable, so use '\0x81' to test.
11153
d53ae497
PE
11154 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
11155 version of GCC, since the macro is used with non-GCC compilers.
11156
fc01665e
PE
11157 Fix core dump reported by Pablo De Napoli in
11158 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
11159 * tests/regression.at (Invalid inputs with {}): New test.
11160 * src/parse-gram.y (token_name): Translate type before using
11161 it as an index.
11162
04098407
PE
11163 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
11164 the user's name space. All uses changed to __attribute__
11165 ((__unused__)).
11166 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
11167 Add __attribute__ ((__noreturn__)).
11168
11169 * etc/clcommit: Remove. We weren't using it, and it failed
11170 "make maintainer-distcheck".
11171 * Makefile.maint: Merge from coreutils.
11172 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
11173 (syntax-check-rules): Change list of rules as described below.
11174 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
11175 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
11176 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
11177 (sc_trailing_space): New rules.
11178 (sc_xalloc_h_in_src): Remove.
11179 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
11180 (sc_space_tab, sc_error_exit_success, sc_changelog):
11181 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
11182 (makefile-check, po-check, author_mark_check):
11183 (makefile_path_separator_check, copyright-check):
11184 Use grep -n, to make it easier to find violations.
11185 Use CVS_LIST and CVS_LIST_EXCEPT.
11186 (header_regexp, h_re): Remove.
11187 (dd_c): New macro.
11188 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
11189 (my-distcheck): Use more-modern GCC flags.
11190 (signatures, %.asc): Remove.
11191 (rel-files, announcement): Remove signatures.
11192 Restore old updating code, even though we don't use it, so
11193 that we're the same as coreutils.
11194 (alpha, beta, major): Depend on news-date-check.
11195 Make the upload commands.
11196
11197 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
11198 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
11199 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
11200 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
11201 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
11202 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
11203 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
11204 * tests/sets.at: Likewise.
11205
11206 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
11207 we comment out the Autoconf version number.
11208 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
11209 it's error-prone and "make maintainer-distcheck" rejects it.
11210
11211 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
11212 Indent calls to "error" to pacify "make maintainer-distcheck",
11213 when the calls are not intended to be translated.
11214 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
11215
11216 * src/Makefile.am (DEFS): Use +=, to pacify
11217 "make maintainer-distcheck".
11218 (bison_SOURCES): Add scan-skel.h.
11219 (sc_tight_scope): New rule, from coreutils.
11220
11221 * src/files.c (src_extension, header_extension):
11222 Now static, not extern.
11223 * src/getargs.c (short_options): Likewise.
11224 * src/muscle_tab.c (muscle_table): Likewise.
11225 * src/parse-gram.y (current_class, current_type, current_prec):
11226 Likewise.
11227 * src/reader.c (grammar_end, previous_rule_end): Likewise.
11228 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
11229 * src/main.c (main): Cast bindtextdomain and textdomain calls to
11230 void, to avoid warning when NLS is disabled.
11231 * src/output.c: Include scan-skel.h.
11232 (scan_skel): Remove decl, since scan-skel.h does this.
11233 (output_skeleton):
11234 Indent calls to "error" to pacify "make maintainer-distcheck".
11235 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
11236 * src/reader.h (gram_end, gram_lineno): New decls to pacify
11237 "make maintainer-distcheck".
11238 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
11239 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
11240 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
11241 (skel_lex_destroy, scan_skel): Move these decls to...
11242 * src/scan-skel.h: New file.
11243 * src/uniqstr.c (uniqstr_assert):
11244 Indent calls to "error" to pacify "make maintainer-distcheck".
11245
11246 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
11247 not @VAR@.
11248
11249 * tests/torture.at: Revamp to avoid misuse of atoi that
11250 "make maintainer-distcheck" complained about.
11251
11252 * examples/extexi (message): Don't print a message more than once,
11253 and omit line-number decoration that makes Emacs compile think
11254 that informative messages are worth worrying about.
11255
112562005-07-22 Paul Eggert <eggert@cs.ucla.edu>
11257
11258 * configure.ac: Update version number.
11259
11260 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
11261 accidentally.
11262 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
11263 autogenerated by the maintainer.
11264 * examples/calc++/.cvsignore: Add *.yy.
11265
11266 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
11267 * lib/bitset_stats.c (bitset_stats_init): Likewise.
11268 * lib/bitsetv.c (bitsetv_alloc): Likewise.
11269
11270 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
11271
11272 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
11273 from maintainer-distcheck about casting the argument of 'free'.
11274
11275 * NEWS: Mention recent yytname changes.
11276 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
11277
11278 * bootstrap: For translations that have not yet been upgraded to
11279 the new runtime-po domain, prime the pump by extracting the
11280 relevant strings from the obsolete translations. This code can be
11281 removed once the bison-runtime domain has been translated by each
11282 team.
11283
11284 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
11285 now that token names are already quoted.
11286
11287 Fix problem reported by Anthony Heading.
11288 * data/glr.c (YYTOKEN_TABLE): New macro.
11289 (yytname): Define if YYTOKEN_TABLE.
11290 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
11291 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
11292 (YYERROR_VERBOSE): Define the same way the other skeletons do.
11293 * src/output.c (prepare_symbols): Output token_table_flag.
11294
0ffda363
PE
112952005-07-21 Paul Eggert <eggert@cs.ucla.edu>
11296
11297 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
11298 again if the first call fails.
11299
11300 * data/glr.c (yytnamerr): New function.
11301 (yyreportSyntaxError): Use it to dequote most string literals.
11302 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
11303 with other skeletons. All uses changed.
11304 (yytnameerr_): New function.
11305 (yyreport_syntax_error): Use it to dequote most string literals.
11306 * data/yacc.c (yytnamerr): New function.
11307 (yyerrlab): Use it to decode most string literals.
11308 * doc/bison.texinfo (Decl Summary, Calling Convention):
11309 Clarify quoting convention of yytname.
11310 * src/output.c (prepare_symbols): Quote all names. This undoes
11311 the 2005-04-17 change, which is now accomplished (mostly) via
11312 changes in the parsers as described above.
11313 * tests/regression.at (Token definitions, Web2c Actions):
11314 Undo most 2005-04-17 change here, too.
11315
113162005-07-20 Paul Eggert <eggert@cs.ucla.edu>
11317
11318 Fix more problems reported by twlevo@xs4all.nl.
11319 * tests/cxx-type.at: Don't pipe output of ./types through sed to
11320 remove trailing spaces. This loses the exit status of ./types,
11321 and isn't needed since ./types shouldn't be emitting trailing
11322 spaces.
11323 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
11324 as the stack isn't valid in that case.
11325
11326 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
11327 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
11328 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
11329 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
11330 is used.
11331 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
11332 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
11333 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
11334 Likewise.
11335
11336 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
11337 overly-picky compilers that reject 'char *foo = "bar";'.
11338
11339 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
11340 to FILE * parameter, not to stderr. This fixes a typo introduced
11341 in the 2005-07-12 change.
11342
11343 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
11344 warnings from GCC 4.
11345
11346 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
11347 (yyglrShiftDefer, yysplitStack):
11348 Remove unused parameters b4_pure_formals. All uses changed.
11349 (yyglrShift): Remove unused parameters b4_user_formals.
11350 All uses changed.
11351 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
11352
6100a9aa
PE
113532005-07-18 Paul Eggert <eggert@cs.ucla.edu>
11354
258b75ca
PE
11355 Destructor cleanups and regularization among the three skeletons.
11356 * NEWS: Document the behavior changes.
11357 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
11358 stack before failing, as the cleanup code will do it for us now.
11359 * data/lalr1.cc (yyerrlab): Likewise.
11360 * data/glr.c (yyparse): Pop everything off the stack before
11361 freeing it, so that destructors get called properly.
11362 * data/lalr1.cc (yyreturn): Likewise.
11363 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
11364 This is more consistent.
11365 * doc/bison.texinfo (Destructor Decl): Mention more reasons
11366 why destructors might be called. 1.875 -> 2.1.
11367 (Destructor Decl, Decl Summary, Table of Symbols):
11368 Some English-language cleanups for %destructor.
11369 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
11370 Add output line for destructor of start symbol.
11371 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
11372 because of that same extra output line.
11373
1a059451
PE
11374 * NEWS: Document minor wording changes in diagnostics of
11375 Bison-generated parsers.
11376 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
11377 Remove unused formals. All uses changed.
11378 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
11379 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
11380 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
11381 Rename yyoverflowab to yyexhaustedlab.
11382 When memory exhaustion occurs during syntax-error reporting,
11383 report it separately rather than in a single diagnostic; this
11384 eases translation.
11385 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
11386 (Memory Exhausted): Renamed from Parser Stack Overflow.
11387 Revamp wording slightly to prefer "memory exhaustion".
11388 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
11389
97460c78
PE
11390 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
11391
30757c8c
PE
11392 Add i18n support to the GLR skeleton. Partially fix the C++
11393 skeleton; a C++ expert needs to finish this. Remove debugging
11394 msgids; there's little point to having them translated, since they
11395 can be understood only by someone who can read the
11396 (English-language) source code.
11397
11398 Generate runtime-po/bison-runtime.pot automatically, so that we
11399 don't have to worry about garbage getting in that file. We'll
11400 make sure after the next official release that old msgids don't
11401 get lost. See
11402 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
11403
11404 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
11405 Now auto-generated.
11406 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
11407 Fix typos in explanations of the runtime file.
11408 * bootstrap: Change gettext keyword from YYI18N to YY_.
11409 Use standard Makefile.in.in in runtime-po, since we'll arrange
11410 for backward-compatible bison-runtime.po files in a different way.
11411 * data/glr.c (YY_): New macro, from yacc.c.
11412 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
11413 Translate messages intended for users.
11414 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
11415 the wording in the other skeletons. We don't know that the memory
11416 is virtual.
11417 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
11418 Use same method that yacc.c uses.
11419 Don't translate debugging messages.
11420 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
11421 it doesn't work (yet), and requires C++ expertise to fix.
11422 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
11423 Move defn to a more logical place, to be consistent with other
11424 skeletons.
11425 Don't translate debugging messages.
11426 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
11427 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
11428 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
11429 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
11430
ac8c5689
PE
11431 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
11432 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
11433 void, not int.
11434 * tests/glr-regression.at (Badly Collapsed GLR States):
11435 Likewise.
11436 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
11437 yylex should return 0 at EOF rather than aborting.
11438
6100a9aa
PE
11439 Improve tests for stack overflow in GLR parser.
11440 Problem reported by twlevo@xs4all.nl.
11441 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
11442 All uses removed.
11443 (yyStackOverflow): Just longjmp, but with value 2 so that caller
11444 can handle the problem.
11445 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
11446 (yyparse): New local variable yyresult to record the result.
11447 Use result of setjmp to set it, rather than storing itinto
11448 struct.
11449 (yyDone): Remove label.
11450 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
11451 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
11452 if YYABORT is used).
11453 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
11454 yyparse status; put status > 1 into diagnostic.
11455 Check that status==2 works.
11456 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
11457 Use exit status 3 for failure to open (which shouldn't happen).
11458
15f40952
PE
114592005-07-17 Paul Eggert <eggert@cs.ucla.edu>
11460
67fd79c4
PE
11461 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
11462 1 on syntax error; just let yyparse do its thing.
11463 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
11464 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
11465 (Exploding the Stack Size with Alloca):
11466 (Exploding the Stack Size with Malloc):
11467 Expect exit status 2, not 1, since the parser is supposed to blow
11468 its stack. Problem reported by twlevo@xs4all.nl.
11469
15f40952
PE
11470 * data/glr.c (yyparse): Don't assume that the initial calls
11471 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
11472 Print a stack-overflow message and fail instead.
11473 Initialize the line-number information before creating the stack,
11474 so that the stack-overflow message can report line zero safely.
11475
f32c66b5
PE
114762005-07-14 Paul Eggert <eggert@cs.ucla.edu>
11477
a22ff96f 11478 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
11479 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
11480 (yyuserMerge): Provide a default case if b4_mergers is empty.
11481 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
11482 * tests/glr-regression.at
11483 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 11484 Add casts to pacify C++ compilers.
1beb0b24
PE
11485 * tests/glr-regression.at (Improper merging of GLR delayed action
11486 sets): Declare yylex before using it.
f32c66b5 11487 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
11488 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
11489 test for valgrind; valgrind is independent of g++.
11490 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
11491 for compatibility with POSIX 1003.1-2001 (if running coreutils).
11492 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
11493 Use a destructor, so that we can expand the stack. Change
11494 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 11495
d741bd1b
PE
114962005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11497
11498 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
11499 a valgrind failure. Problem reported by twlevo@xs4all.nl.
11500
0410a6e0
PE
115012005-07-13 Paul Eggert <eggert@cs.ucla.edu>
11502
11503 * PACKAGING: New file, suggested by Bruno Haible and taken from
11504 similar wording in gettext's PACKAGING file.
11505 * NEWS: Mention PACKAGING.
11506 * Makefile.am (EXTRA_DIST): Add PACKAGING.
11507
f7ab6a50
PE
115082005-07-12 Paul Eggert <eggert@cs.ucla.edu>
11509
baf785db 11510 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
11511 * bootstrap: Get runtime translations into runtime-po.
11512 Create runtime-po files automatically, if possible.
11513 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
11514 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
11515 does not infringe on the user's name space.
11516 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
11517 * doc/bison.texinfo (Internationalization): Revamp the English
11518 and Texinfo syntax a bit, to try to make it clearer.
11519 (Bison Options, Option Cross Key): Mention --print-localedir.
11520 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
11521 YYENABLE_NLS. Quote a bit more.
11522 * runtime-po/.cvsignore: New file.
11523 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
11524 * runtime-po/Rules-quot: Remove; now created by bootstrap.
11525 * runtime-po/quot.sed: Likewise.
11526 * runtime-po/boldquot.sed: Likewise.
11527 * runtime-po/en@quot.header: Likewise.
11528 * runtime-po/en@boldquot.header: Likewise.
11529 * runtime-po/insert-header.sin: Likewise.
11530 * runtime-po/remove-potcdate.sin: Likewise.
11531 * runtime-po/Makevars: Likewise.
11532 * runtime-po/LINGUAS: Likewise.
11533 * runtime-po/de.po: Likewise; we will rely on the translation project
11534 to maintain this, so "bootstrap" should get it.
0410a6e0 11535 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
11536 its value.
11537 * src/main.c (main): Bind the bison-runtime domain, too.
11538
115392005-07-12 Bruno Haible <bruno@clisp.org>
11540
11541 * data/yacc.c: Include <libintl.h> when NLS is enabled.
11542 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
11543 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
11544 * runtime-po: New directory.
11545 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
11546 $(DOMAIN).pot-update rule, so that old messages are never dropped.
11547 * runtime-po/Rules-quot: New file, copied from po/.
11548 * runtime-po/quot.sed: Likewise.
11549 * runtime-po/boldquot.sed: Likewise.
11550 * runtime-po/en@quot.header: Likewise.
11551 * runtime-po/en@boldquot.header: Likewise.
11552 * runtime-po/insert-header.sin: Likewise.
11553 * runtime-po/remove-potcdate.sin: Likewise.
11554 * runtime-po/Makevars: New file.
11555 * runtime-po/POTFILES.in: New file.
11556 * runtime-po/LINGUAS: New file.
11557 * runtime-po/bison-runtime.pot: New file.
11558 * runtime-po/de.po: New file.
11559 * m4/bison.m4: New file.
11560 * Makefile.am (SUBDIRS): Add runtime-po.
11561 (aclocaldir, aclocal_DATA): New variables.
11562 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
11563 Define aclocaldir.
11564 * src/getargs.c (usage): Document --print-localedir option.
11565 (PRINT_LOCALEDIR_OPTION): New enum item.
11566 (long_options): Add --print-localedir option.
11567 (getargs): Handle --print-localedir option.
11568 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
11569 (Internationalization): New section.
11570
22dda0f0
AD
115712005-07-12 Akim Demaille <akim@epita.fr>
11572
11573 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
11574 for consistency with the rest of the code.
11575 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
11576 Add separators.
11577
82b248ad
AD
115782005-07-12 Akim Demaille <akim@epita.fr>
11579
11580 * src/parse-gram.y: Use %printer instead of YYPRINT.
11581
fa0e9314
AD
115822005-07-12 Akim Demaille <akim@epita.fr>
11583
867a3e00
AD
11584 * src/symtab.h, src/symtab.c (symbol_print): New.
11585 * src/symlist.h, src/symlist.c (symbol_list_print): New.
11586 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
11587
115882005-07-12 Akim Demaille <akim@epita.fr>
11589
11590 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
11591 b4_at_dollar and b4_dollar_dollar.
11592
e054b190
PE
115932005-07-11 Paul Eggert <eggert@cs.ucla.edu>
11594
11595 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
11596 and Pennello's paper.
11597
34160ec4
PE
115982005-07-09 Paul Eggert <eggert@cs.ucla.edu>
11599
407d4a75
PE
11600 * data/yacc.c (yyparse): Undo previous patch. Instead,
11601 set yylsp[0] and yyvsp[0] only if the initial action
11602 sets yylloc and yylval, respectively.
11603
34160ec4
PE
11604 * data/yacc.c (yyparse): In the initial action, set
11605 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
11606 This avoids the use of undefined variables if the initial
11607 action does not set yylloc and/or yylval.
11608
c3d5a4a7
PE
116092005-07-07 Paul Eggert <eggert@cs.ucla.edu>
11610
b34d96c1
PE
11611 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
11612 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
11613 Remove from CVS. These files are automatically generated.
11614 * examples/extexi: Clarify that this file is now part of Bison,
11615 not GNU M4, and that it works with any POSIX-compatible Awk.
11616 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
11617 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
11618 so that we also get calc++-parser.yy. Geneate it.
11619 Use $(AWK), not gawk, since any conforming Awk will do.
11620 Put comment before action, since older 'make' can't handle comment
11621 in action.
11622 $(BUILT_SOURCES): List all built sources, not just some of them.
11623 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
11624 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
11625 $($(calc_sources_generated)): Remove unnecessary test for existence
11626 of target. (This had a shell syntax error anyway; a stray "x".)
11627 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
11628 calc++-parser.yy.
11629 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
11630
c3d5a4a7
PE
11631 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
11632 implied by the other modules.
11633
828c373b
AD
116342005-07-06 Akim Demaille <akim@epita.fr>
11635
11636 Bind examples/calc++ to the package.
11637 * examples/calc++/Makefile: Remove, replaced by...
11638 * examples/calc++/Makefile.am: ... this new file.
11639 * examples/calc++/test: Remove input.
11640 * examples/calc++/compile: Remove.
11641 * examples/Makefile.am: New.
11642 * configure.ac, Makefile.am: Adjust.
11643 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
11644
63cb01d6
PE
116452005-07-05 Paul Eggert <eggert@cs.ucla.edu>
11646
fd2df2ed
PE
11647 * data/glr.c (yyFail): Drastically simplify; since the format argument
11648 never had any % directives, we can simply pass it to yyerror.
11649 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
11650 be modified later, as that is the usual style in glr.c.
11651 Problems reported by Paul Hilfinger.
11652
63cb01d6
PE
11653 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
11654 and size overflow errors.
11655 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
11656 in case the user prolog sets feature-test macros like _GNU_SOURCE.
11657 (YYSIZEMAX): New macro.
11658 (yystpcpy): New function, taken from yacc.c.
11659 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
11660 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
11661 so that we don't have to maintain their signatures.
11662 (yyFail): Check for buffer overflow, by using vsnprintf rather
11663 than vsprintf. Allocate a bigger buffer if possible.
11664 Report an error if buffer allocation fails.
11665 (yyStackOverflow): New function.
11666 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
11667 the initialization was successful. It might fail if storage was
11668 exhausted.
11669 (yyexpandGLRStack): Add more checks for storage allocation failure.
11670 Use yyStackOverflow to report failures.
11671 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
11672 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
11673 Don't assume stack number fits in int.
11674 (yysplitStack): Check for storage allocation failure.
11675 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
11676 can print diagnostics on storage allocation failure. All callers
11677 changed.
11678 (yyresolveValue): Use yybool for boolean.
11679 (yyreportSyntaxError): Check for size-calculation overflow.
11680 This code is taken from yacc.c.
11681 (yyparse): Check for storage allocation errors when allocating
11682 the initial stack.
11683
1c59e0a1
AD
116842005-07-05 Akim Demaille <akim@epita.fr>
11685
11686 Extract calc++ from the documentation.
11687 * doc/bison.texinfo (Calc++): Add the extraction marks.
11688 * examples/extexi: New, from the aborted GNU Programming 2E.
11689 Separate the different paragraph of a file with empty lines.
11690 * examples/Makefile: Use it to extract the whole calc++ example.
11691
8a0adb01
AD
116922005-06-24 Akim Demaille <akim@epita.fr>
11693
11694 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
11695 class typedefs.
11696
12545799
AD
116972005-06-22 Akim Demaille <akim@epita.fr>
11698
11699 * doc/bison.texinfo (C++ Language Interface): First stab.
11700 (C++ Parsers): Remove.
11701
99be0235
AD
117022005-06-22 Akim Demaille <akim@epita.fr>
11703
11704 * data/lalr1.cc (yylex_): Honor %lex-param.
11705
0ffd4fd1
AD
117062005-06-22 Akim Demaille <akim@epita.fr>
11707
11708 Start a set of simple examples.
11709 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
11710 * examples/calc++/calc++-driver.hh,
11711 * examples/calc++/calc++-parser.yy,
11712 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
11713 * examples/calc++/compile, examples/calc++/test: New.
11714
0925ebb4
PE
117152005-06-09 Paul Eggert <eggert@cs.ucla.edu>
11716
11717 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
11718 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
11719 which stems from the 2005-05-27 patch.
11720
43d3b664
PH
117212005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11722
11723 * data/glr.c: Modify treatment of unused parameters to permit use
11724 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
11725
3062864d
PE
117262005-05-30 Paul Eggert <eggert@cs.ucla.edu>
11727
11728 Fix infringement on user name space reported by Janos Zoltan Szabo.
11729 * data/yacc.c (yyparse): strlen -> yystrlen.
11730
989b5b8e
AD
117312005-05-30 Akim Demaille <akim@epita.fr>
11732
11733 * data/lalr1.cc (_): New.
11734 Translate the various messages.
11735
bedf57f5
PE
117362005-05-27 Paul Eggert <eggert@cs.ucla.edu>
11737
11738 Fix infringement on user name space reported by Bruno Haible.
11739 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
11740 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
11741 the user's name space.
11742 (alloca): Include <stdlib.h> to get it, if it's not built in.
11743 (YYMALLOC, YYFREE): Define only if needed.
11744 (malloc, free): Declare, but only if needed, as this infringes on
11745 the user name space.
11746
4d1801f1
PE
117472005-05-25 Paul Eggert <eggert@cs.ucla.edu>
11748
11749 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
11750 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
11751 with %d format.
11752 * lib/ebitset.c (min, max): Undef before defining.
11753 * lib/vbitset.c (min, max): Likewise.
11754 * lib/subpipe.c (create_subpipe): Save local variables in case
11755 vfork clobbers them.
11756
117572005-05-24 Bruno Haible <bruno@clisp.org>
11758
11759 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
11760 error message syntax used by gcc-4.0.
11761
b94a9e1e
PE
117622005-05-23 Paul Eggert <eggert@cs.ucla.edu>
11763
85ac3861
PE
11764 * README: Mention m4 1.4.3. Remove obsolete advice about
11765 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
11766
b94a9e1e
PE
11767 * bootstrap: Remove workaround for problem I encountered with
11768 gettext 0.14.1; it seems to be fixed now.
11769
51c30d21
PE
117702005-05-22 Paul Eggert <eggert@cs.ucla.edu>
11771
009ce67d
PE
11772 * NEWS: Version 2.0a.
11773
f2a97c62
PE
11774 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
11775 the previous change.
11776
c8775f93
PE
11777 Various maintainer cleanups.
11778 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
11779 conftest*, for benefit of CVS commands run at the same time as
11780 "configure". Add build-aux, since "bootstrap" now creates it and
11781 its subfiles.
11782 * Makefile.cfg (move_if_change): Remove.
11783 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
11784 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
11785 (po_repo, do-po-update, po-update, wget_files, get-targets):
11786 (config.guess-url_prefix, config.sub-url_prefix):
11787 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
11788 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
11789 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
11790 Remove.
11791 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
11792 this is now the recommended name.
11793 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
11794 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
11795 ylwrap. These files now go into build-aux.
11796 * config/move-if-change: Remove.
11797 * config/prev-version.txt: Bump from 1.75 to 2.0.
11798
3ea5f0ec
PE
11799 * bootstrap: Add stdio-safer, unistd-safer modules.
11800 Remove m4/glibc2.m4 (introduced by latest gnulib, but
11801 we don't need it).
11802 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
11803 fopen-safer.c, stdio-safer.h, unistd-safer.h.
11804 * lib/subpipe.c: Include "unistd-safer.h".
11805 (create_subpipe): Make sure all the newly-created
11806 file descriptors are > 2, so that diagnostics don't
11807 get sent down them (which might cause Bison to hang, in theory).
11808 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
11809 * src/files.c (xfopen): Use fopen_safer, not fopen.
11810
51c30d21
PE
11811 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
11812 yesterday's yacc.c fix.
11813
cea1469d
PE
118142005-05-21 Paul Eggert <eggert@cs.ucla.edu>
11815
3ea5f0ec
PE
11816 * data/glr.c, data/lalr1.cc: Update copyright date.
11817
cea1469d
PE
11818 Fix a destructor bug reported by Wolfgang Spraul in
11819 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
11820 * data/yacc.c (yyabortlab): Don't call destructor, and
11821 don't set yychar to EMPTY.
11822 (yyoverflowlab): Don't call destructor.
11823 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
11824 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
11825 since we no longer output the message "discarding lookahead token
11826 end of input ()".
11827
5e6f62f2
PH
118282005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11829
11830 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
11831 fix a small glitch in debugging output.
11832 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
11833 after YY_SYMBOL_PRINT where needed.
11834
11835 (struct yyGLRState): Add some comments.
11836 (struct yySemanticOption): Add some comments.
11837 (union yyGLRStackItem): Add comment.
11838
11839 (yymergeOptionSets): Correct this to properly perform the union,
11840 avoiding infinite reported by Michael Rosien.
11841 Update comment.
11842
11843 * tests/glr-regression.at: Add test for GLR merging error reported
11844 by M. Rosien.
cea1469d 11845
0fb669f9
PE
118462005-05-13 Paul Eggert <eggert@cs.ucla.edu>
11847
11848 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
11849 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
11850 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
11851 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
11852 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
11853 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
11854 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
11855 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
11856 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
11857 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
11858 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
11859 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
11860 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
11861 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
11862 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
11863 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
11864 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
11865 src/derives.h, src/files.c, src/files.h, src/getargs.c,
11866 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
11867 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
11868 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
11869 src/output.h, src/parse-gram.c, src/parse-gram.h,
11870 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
11871 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
11872 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
11873 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
11874 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
11875 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
11876 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
11877 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
11878 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
11879 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
11880 tests/reduce.at, tests/regression.at, tests/sets.at,
11881 tests/synclines.at, tests/testsuite.at, tests/torture.at:
11882 Update FSF postal mail address.
11883
51f4735e
PE
118842005-05-11 Paul Eggert <eggert@cs.ucla.edu>
11885
11886 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
11887 Problem reported by Ralf Menzel.
11888
80ce3401
PE
118892005-05-01 Paul Eggert <eggert@cs.ucla.edu>
11890
11891 * tests/actions.at: Test that stack overflow invokes destructors.
11892 From Marcus Holland-Moritz.
11893 * data/yacc.c (yyerrlab): Move the code that destroys the stack
11894 from here....
11895 (yyreturn): to here. That way, destructors are called properly
11896 even if the stack overflows, or the user calls YYACCEPT or
11897 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
11898 (yyoverflowlab): Destroy the lookahead.
11899
119002005-04-24 Paul Eggert <eggert@cs.ucla.edu>
11901
11902 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
11903
72f000b0
PE
119042005-04-17 Paul Eggert <eggert@cs.ucla.edu>
11905
11906 * NEWS: Bison-generated C parsers no longer quote literal strings
11907 associated with tokens.
11908 * src/output.c (prepare_symbols): Don't escape strings,
11909 since users don't want to see C escapes.
11910 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
11911 in diagnostics.
c19683bb 11912 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
11913 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
11914
1094323f
PE
119152005-04-16 Paul Eggert <eggert@cs.ucla.edu>
11916
11917 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
11918 the data size is known to be too small and we can't increase it.
11919 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
11920
ca407bdf
PE
119212005-04-15 Paul Eggert <eggert@cs.ucla.edu>
11922
11923 * src/parse-gram.y: Include quotearg.h.
11924 (string_as_id): Quote $1 before using it as a key, since the
11925 lexer no longer quotes it for us.
11926 (string_content): Don't strip quotes, since lexer no longer
11927 quotes it for us.
11928 * src/scan-gram.l: Include quotearg.h.
11929 ("\""): Omit quote.
11930 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
11931 a key, since the rest of the lexer doesn't quote it.
11932 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11933 * tests/regression.at (Token definitions): Check for backslashes
11934 in token strings.
11935
11936 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11937 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11938 (yyparse): Revamp code to generate long syntax error message, to
11939 make it easier to translate, and to avoid problems with arithmetic
11940 overflow. Change "virtual memory" to "memory" in diagnostic, since
11941 we don't know whether the memory is virtual.
11942
1ce59070
PE
119432005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11944
11945 * NEWS: Bison-generated C parsers now use the _ macro to
11946 translate strings.
11947 * data/yacc.c (_) [!defined _]: New macro.
11948 All English strings wrapped inside this macro.
11949 * doc/bison.texinfo (Bison Parser): Document _.
11950 * po/POTFILES.in: Include src/parse-gram.c, since it now
11951 includes translateable strings that parse-gram.y doesn't.
11952
a749a695
PE
119532005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11954
11955 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11956 reverting the 2004-10-11 change to this function.
11957 (symbol_check_alias_consistency): Don't call symbol_type_set
11958 if the type name is already correct.
11959 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11960
8fb1053b
PE
119612005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11962
11963 * tests/regression.at (Token definitions): Don't use a token named
11964 c, as that generates a "#define c ..." that runs afoul of buggy
11965 stdlib.h that uses the identifier c as a member of struct
11966 drand48_data. Problem reported by Horst Wente.
11967
ff498c4a
PE
119682005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11969
11970 * bootstrap: Change translation URL from
11971 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11972 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11973 redirection glitches. Problem reported by twlevo@xs4all.nl.
11974
65211d70
PE
119752005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11976
11977 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11978 after operands; POSIX says this isn't portable for the c99 command.
11979
9577fb1f
PE
119802005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11981
11982 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11983 immediately if a data overrun has occurred; this may help us track
11984 down what may be a spurious failure on MacOS.
11985
78b178f7
PE
119862005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11987
a2599d0f
PE
11988 Respond to problems reported by twlevo@xs4all.nl.
11989
11990 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11991
78b178f7
PE
11992 * src/vcg.h: Comment fix.
11993 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11994 (G_CMAX): Change to -1 instead of INT_MAX.
11995
11996 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 11997
7296e729
PE
119982005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11999
12000 * src/tables.c (state_number_to_vector_number): Put it inside an
12001 "#if 0", since it's not currently used. Problem reported by
12002 Roland McGrath.
12003
05ac60f3
PE
120042005-03-06 Paul Eggert <eggert@cs.ucla.edu>
12005
12006 * src/output.c (escaped_output): Renamed from
12007 escaped_file_name_output, since we now use it for symbol tags as
12008 well. All uses changed.
12009 (symbol_destructors_output, symbol_printers_output):
12010 Escape symbol tags too.
12011 Problem reported by Matyas Forstner in
12012 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
12013
12014 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
12015 not needed.
12016 * src/output.c (user_actions_output, token_definitions_output,
12017 symbol_destructors_output, symbol_printers_output): Likewise.
12018 * src/reader.c (prologue_augment): Likewise.
12019 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
12020
12021 * src/vcg.c (output_edge): Don't quote linestyle arg.
12022 Problem reported by twlevo@xs4all.nl.
12023
7eb453ac
PE
120242005-02-28 Paul Eggert <eggert@cs.ucla.edu>
12025
12026 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
12027 example, reported by Derek M Jones. Also, make the example even
12028 more outrageous, to better illustrate how bad the problem is.
12029
4c04c52a
PE
120302005-02-24 Paul Eggert <eggert@cs.ucla.edu>
12031
12032 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
12033 putsym. Typo reported by Sebastian Piping.
12034
a61e1620
PE
120352005-02-23 Paul Eggert <eggert@cs.ucla.edu>
12036
12037 * doc/bison.texinfo (Language and Grammar): some -> same
12038 (Epilogue): int he -> in the
12039 Typos reported by Sebastian Piping via Justin Pence.
12040
9ec93868
PE
120412005-02-07 Paul Eggert <eggert@cs.ucla.edu>
12042
12043 * tests/glr-regression.at (Improper handling of embedded actions
12044 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
12045 embedded actions and $-N in GLR parsers", work around an Autoconf bug
12046 with dollar signs in test names.
12047 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
12048 for a similar reason.
12049
73ce7e7e
PE
120502005-01-28 Paul Eggert <eggert@cs.ucla.edu>
12051
12052 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
12053 wants to redefine G_VIEW.
12054
2e72b98e
PE
120552005-01-27 Paul Eggert <eggert@cs.ucla.edu>
12056
12057 * src/vcg.c (get_view_str): Remove case for normal_view.
12058 Problem reported by twlevo@xs4all.nl.
12059
e0d634e5
PE
120602005-01-24 Paul Eggert <eggert@cs.ucla.edu>
12061
ccf830a4
PE
12062 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
12063 Problem reported by twlevo@xs4all.nl.
12064
e0d634e5
PE
12065 * doc/bison.texinfo: Change @dircategory from "GNU programming
12066 tools" to "Software development". Requested by Richard Stallman
12067 via Karl Berry.
12068
7bbc8cb0
PE
120692005-01-23 Paul Eggert <eggert@cs.ucla.edu>
12070
12071 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
12072 Problem reported by twlevo@xs4all.nl.
12073
08b770bc
PE
120742005-01-21 Paul Eggert <eggert@cs.ucla.edu>
12075
12076 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
12077 keyword; it's not needed with modern compilers, and it doesn't
12078 affect correctness with older compilers. Suggested by
12079 twlevo@xs4all.nl.
12080
95f22ad2
PE
120812005-01-17 Paul Eggert <eggert@cs.ucla.edu>
12082
12083 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
12084 gcc -Wswitch-default.
12085 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
12086 * data/yacc.c (yyparse): Likewise.
12087
d229d15c
PE
120882005-01-12 Paul Eggert <eggert@cs.ucla.edu>
12089
12090 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
12091 already. Let config.h define any nonstandard values.
12092
ecadd90f
PE
120932005-01-10 Paul Eggert <eggert@cs.ucla.edu>
12094
12095 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
12096 for the benefit of slower hosts. Problem reported by
12097 Nelson H. F. Beebe.
12098
213744b5
PE
120992005-01-07 Paul Eggert <eggert@cs.ucla.edu>
12100
12101 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
12102 being defined and not used.
12103 * data/lalr1.cc (yyparse): Likewise.
12104 Use "if (false)" rather than "if (0)".
12105
249d3236
PE
121062005-01-05 Paul Eggert <eggert@cs.ucla.edu>
12107
12108 * TODO: Mention that we should allow NUL bytes in tokens.
12109
987cc1fb
PE
121102005-01-02 Paul Eggert <eggert@cs.ucla.edu>
12111
12112 * src/scan-skel.l (<<EOF>>): Don't close standard output.
12113 Problem reported by Hans Aberg.
12114
08fe02d9
PE
121152005-01-01 Paul Eggert <eggert@cs.ucla.edu>
12116
12117 * src/getargs.c (version): Happy new year; update overall
12118 program copyright date from 2004 to 2005.
12119
12120 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
12121 Problem reported by Hans Aberg.
12122 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
12123 (Output file names.): Add a test for the case when standard output
12124 is closed.
12125
010c0266
PE
121262004-12-26 Paul Eggert <eggert@cs.ucla.edu>
12127
12128 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
12129 to fix an oversight in the Bison 2.0 manual.
12130
da12206a
PE
121312004-12-25 Paul Eggert <eggert@cs.ucla.edu>
12132
12133 * NEWS: Version 2.0. Reformat the existing news items since
12134 1.875, so that related items are grouped together.
3a4734aa 12135 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
12136 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
12137
c935d934
PE
12138 * tests/torture.at (Exploding the Stack Size with Alloca): Set
12139 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
12140 otherwise, we're not testing alloca. Unfortunately there's no
12141 simple way to consult HAVE_ALLOCA here.
12142
da12206a
PE
12143 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
12144 for yymsg, too.
12145
12146 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
12147 hand. This avoids a warning about comparing int to size_t when
12148 GCC warnings are enabled.
12149
0a2c5137
PE
121502004-12-22 Paul Eggert <eggert@cs.ucla.edu>
12151
d7e14fc0
PE
12152 * NEWS: Bison-generated parsers no longer default to using the
12153 alloca function (when available) to extend the parser stack, due
12154 to widespread problems in unchecked stack-overflow detection.
12155 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
12156 responsibility to set it to a positive value. This lets the user
12157 specify a value that is not a preprocessor constant.
12158 * data/yacc.c (YYMAXDEPTH): Likewise.
12159 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
12160 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
12161 to be a compile-time constant. However, explain the constraints on it.
12162 Also, explain the constraints on YYINITDEPTH.
12163 (Table of Symbols): Explain that alloca is no longer the default.
12164 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
12165 to 1.
12166
0a2c5137
PE
12167 * doc/bison.texinfo (Location Default Action): Mention that n must
12168 be zero when k is zero. Suggested by Frank Heckenbach.
12169
e019c247
AD
121702004-12-22 Akim Demaille <akim@epita.fr>
12171
12172 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
12173 (parser::state_type, parser::semantic_type, parser::location_type):
12174 Private, not public.
12175 (parser::parse): Return ints, not bool.
12176 Returning a bool introduces a problem: 0 corresponds to false, and
12177 it seems weird to return false on success. Returning true changes
12178 the conventions for yyparse.
12179 Alternatively we could return void and send an exception.
12180 There is no clear consensus (yet?).
12181 (state_stack, semantic_stack, location_stack): Rename as...
12182 (state_stack_type, semantic_stack_type, location_stack_type): these.
12183 Private, not public.
12184 * tests/c++.at: New.
12185 * tests/testsuite.at, tests/Makefile.am: Adjust.
12186
72731bb7
AD
121872004-12-21 Akim Demaille <akim@epita.fr>
12188
12189 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
12190
9a0d8bec
AD
121912004-12-21 Akim Demaille <akim@epita.fr>
12192
12193 Don't impose std::string for filenames.
12194
12195 * data/lalr1.cc (b4_filename_type): New.
12196 (position::filename): Use it.
12197 (parser.hh): Move the inclusion of stack.hh and location.hh below
12198 the user code, so that needed headers for the filename type can be
12199 included first.
72731bb7
AD
12200 Forward declare them before the user code.
12201 * tests/Makefile.am (check-local, installcheck-local): Pass
12202 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 12203
99880de5
AD
122042004-12-20 Akim Demaille <akim@epita.fr>
12205
12206 Use more STL like names: my_class instead of MyClass.
12207
12208 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
12209 (SemanticStack, SemanticType, StateStack, StateType)
12210 (TokenNumberType, Stack, Slice, Traits, Parser::location)
12211 (Parser::value): Rename as...
12212 (location_stack, location_type, rhs_number_type, semantic_stack)
12213 (semantic_type, state_stack, state_type, token_number_type, stack)
12214 (slice, traits, parser::yylloc, parser::yylval): these.
12215
12216 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
12217
9bec482e
PE
122182004-12-19 Paul Eggert <eggert@cs.ucla.edu>
12219
12220 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
12221 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
12222
f6fbd3da
PE
122232004-12-17 Paul Eggert <eggert@cs.ucla.edu>
12224
12225 Remove uses of 'short int' and 'unsigned short int'. This raises
12226 some arbitrary limits. It uses more memory but nowadays that's
12227 not much of an issue.
12228
12229 This change does not affect the generated parsers; that's a different
12230 task, as some users will want to conserve memory there.
12231
12232 Ideally we should use size_t to represent all object counts, and
12233 something like ptrdiff_t to represent signed differences of object
12234 counts; but that will require more code-cleanup than I have the
12235 time to do right now.
12236
12237 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
12238 Use size_t, not int or short int, to count objects.
12239 * src/closure.c (nritemset, closure): Likewise.
12240 * src/closure.h (nritemset, closure): Likewise.
12241 * src/nullable.c (nullable_compute): Likewise.
12242 * src/print.c (print_core): Likewise.
12243 * src/print_graph.c (print_core): Likewise.
12244 * src/state.c (state_compare, state_hash): Likewise.
12245 * src/state.h (struct state): Likewise.
12246 * src/tables.c (default_goto, goto_actions): Likewise.
12247
12248 * src/gram.h (rule_number, rule): Use int, not short int.
12249 * src/output.c (prepare_rules): Likewise.
12250 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
12251 errs, reductions): Likewise.
12252 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
12253 Likewise.
12254 * src/tables.c (vector_number, tally, action_number,
12255 ACTION_NUMBER_MINIMUM): Likewise.
12256 * src/output.c (muscle_insert_short_int_table): Remove.
12257
efeed023
AD
122582004-12-17 Akim Demaille <akim@epita.fr>
12259
12260 * data/lalr1.cc: Extensive Doxygenation.
12261 (error_): Rename as...
12262 (error): this, since it is visible to the user.
12263 Adjust callers.
12264 (Parser::message): Now an automatic variable from...
12265 (Parser::yyreport_syntax_error_): here.
12266 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
12267 Parser::error.
12268 * tests/input.at: Escape $.
12269
bc82c5a5
PE
122702004-12-16 Paul Eggert <eggert@cs.ucla.edu>
12271
12272 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
12273 Parenthesize rhs to avoid obscure problems with mistakes like
12274 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
12275 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12276 b4_rhs_location): Likewise.
12277 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
12278 b4_rhs_location): Likewise.
12279
fd19f271
AD
122802004-12-16 Akim Demaille <akim@epita.fr>
12281
12282 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
12283 yacc.c: be sure to stay within yycheck_.
12284 * tests/actions.at: Re-enable C++ tests.
12285
10454ea4
AD
122862004-12-16 Akim Demaille <akim@epita.fr>
12287
12288 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
12289 real.
12290
c5b95ccf
AD
122912004-12-16 Akim Demaille <akim@epita.fr>
12292
12293 Use #define to handle the %name-prefix.
12294
12295 * data/glr.c, data/yacc.c: Comment changes.
12296 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
12297 so that one can refer to yylex in the parser file, and have it
12298 renamed, as is the case with other skeletons.
12299
617a8f12
AD
123002004-12-16 Akim Demaille <akim@epita.fr>
12301
12302 Move lalr1.cc internals into yy*.
12303
12304 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
12305 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
12306 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
12307 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
12308 (empty_, final_, terror_, errcode_, ntokens_)
12309 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
12310 (looka_, ilooka_, error_range_, nerrs_):
12311 Rename as...
12312 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
12313 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
12314 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
12315 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
12316 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
12317 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
12318 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
12319 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
12320 these.
12321
1e547e6e
PE
123222004-12-15 Paul Eggert <eggert@cs.ucla.edu>
12323
12324 Fix some problems reported by twlevo at xs4all.
12325 * src/symtab.c (symbol_new): Report an error if the input grammar
12326 contains too many symbols. This is better than calling abort() later.
12327 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
12328 (struct node, struct graph):
12329 Rename member expand to stretch. All uses changed.
12330 (struct graph): Remove member layoutalgorithm. All uses removed.
12331 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
12332 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
12333 All uses changed.
12334 (N_STRETCH): Rename from N_EXPAND. All uses changed.
12335
735d6bd4
AD
123362004-12-15 Akim Demaille <akim@epita.fr>
12337
12338 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
12339 Add more Doxygen comments.
12340 (symprint_, stack_print_, reduce_print_, destruct_, pop)
12341 (report_syntax_error_, translate_): Rename as...
12342 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
12343 (yypop_, yyreport_syntax_error_, yytranslate_): this.
12344
2e1f5829
AD
123452004-12-15 Akim Demaille <akim@epita.fr>
12346
12347 * data/lalr1.cc (lex_): Rename as...
12348 (yylex_): this.
12349 Move the trace here.
12350 Take the %name-prefix into account.
12351 Reported by Alexandre Duret-Lutz.
12352
a3cb6248
AD
123532004-12-15 Akim Demaille <akim@epita.fr>
12354
12355 Simplify the C++ parser constructor.
12356
12357 * data/lalr1.cc (debug_): Rename as...
12358 (yydebug_): so that the parser's internals are always in the yy*
12359 pseudo namespace.
12360 Adjust uses.
12361 (b4_parse_param_decl): Remove the leading comma as it is now only
12362 called as unique argument list.
12363 (Parser::Parser): Remove the constructor accepting a location and
12364 an initial debugging level.
12365 Remove from the other ctor the argument for the debugging level.
12366 (debug_level_type, debug_level, set_debug_level): New.
12367
12368 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
12369 constructor calls.
12370
07fed891
AD
123712004-12-15 Akim Demaille <akim@epita.fr>
12372
12373 Remove b4_root related material: failure experiment
a3cb6248 12374 (which goal was to allow to derive from a class).
07fed891
AD
12375
12376 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
12377 definitions and uses.
12378
e603eaa5
PE
123792004-12-14 Paul Eggert <eggert@cs.ucla.edu>
12380
12381 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
12382 not 2, since it's not portable to subtract 1 from the start of an
12383 array. The new item 0 is never set or used. All uses changed.
12384
12385 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
12386 the default definition of YYLLOC_DEFAULT. Problem reported
12387 by Frank Heckenbach.
12388
fafb007d
PE
123892004-12-12 Paul Eggert <eggert@cs.ucla.edu>
12390
12391 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
12392 the normal case and one for the error case. Just use the
12393 first one uniformly. Problem reported by Frank Heckenbach.
12394 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
12395 use exactly the same macro in both places.
12396 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
12397 so that the normal-case YYRHSLOC works for the error case too.
12398 All uses changed.
12399 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
12400 (YYLLOC_DEFAULT): Use the same macro as glr.c.
12401 * doc/bison.texinfo (Location Default Action): Don't claim that
12402 we have an array of locations. Use the same macro for both glr
12403 and lalr parsers. Mention YYRHSLOC. Mention what happens when
12404 the index is 0.
12405
48814dcd
PE
124062004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12407
a4e1a53b
PE
12408 * HACKING: Update email addresses to send announcements to.
12409
48814dcd
PE
12410 * configure.ac (AC_INIT): Bump version to 1.875f.
12411
337116ba
PE
124122004-12-10 Paul Eggert <eggert@cs.ucla.edu>
12413
12414 * NEWS: Version 1.875e.
12415 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
12416
12417 * src/scan-skel.l: Include "complain.h", for "fatal".
12418
12419 * src/relation.h (relation_print, relation_digraph):
12420 Relation sizes are of type relation_node, not size_t (this is
12421 merely a doc fix, since the two types are equivalent).
12422 (relation_transpose): Relation sizes are of type relation_node,
12423 not int.
12424 * src/relation.c: Likewise.
12425 (top, infinity): Now of type relation_node, not int.
12426 (traverse, relation_transpose): Use relation_node, not int.
12427
12428 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
12429 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
12430 (yyparse): Remove unused local introduced in 2004-10-25 patch.
12431
12432 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 12433 specifying whether the test should be skipped. Use it tp
337116ba 12434 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 12435 fail on some hosts, and should be skipped.
337116ba 12436
da2a7671
PE
124372004-12-08 Paul Eggert <eggert@cs.ucla.edu>
12438
12439 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
12440 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
12441 unless otherwise specified below.
12442
12443 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
12444 to allocate kernel_base, kernel_items, kernel_size, since
12445 they needn't be initialized to 0.
12446 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
12447 * src/closure.c (new_closure): Likewise, for itemset.
12448 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
12449 * src/lalr.c (set_goto_map): Likewise, for temp_map.
12450 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
12451 (build_relations): Likewise for edge, states1, includes.
12452 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
12453 * src/reader.c (packgram): Likewise, for ritem, rules.
12454 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
12455 * src/relation.c (relation_digraph): Likewise for VERTICES.
12456 (relation_transpose): Likewise for new_R, end_R.
12457 * src/symtab.c (symbols_token_translations_init): Likewise for
12458 token_translations.
12459 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
12460 (token_actions): Likewise for yydefact, actrow, conflrow,
12461 conflict_list.
12462 (save_column): Likewise for froms[symno], tos[symno].
12463 (goto_actions): Likewise for state_count.
12464 (pack_table): Likewise for base, pos, check.
12465 (tables_generate): Likewise for width.
12466
12467 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
12468 for initial core. Just have a separate core, so we needn't worry
12469 about whether kernel_size and kernel_base are initialized.
12470
12471 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
12472 kernel_size, kernel_items): Remove unnecessary initialization.
12473 * src/conflicts.c (conflicts): Likewise.
12474 * src/derives.c (derives): Likewise.
12475 * src/muscle_tablc (muscle_insert): Likewise.
12476 * src/relation.c (relation_digraph): Likewise.
12477 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
12478 conflrow, conflict_table, conflict_list, table, check):
12479 Likewise.
12480
12481 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
12482 This is because all callers pass unsigned int.
12483 * src/closure.h (new_closure): Likewise.
12484
12485 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
12486 (build_relations): Initialize includes[i] in all cases.
12487 * src/reader.c (packgram): Always initialize rules[ruleno].prec
12488 and rules[ruleno].precsym. Initialize members in order.
12489 * src/relation.c (relation_transpose): Always initialize new_R[i]
12490 and end_R[i].
12491 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
12492
12493 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
12494 conflict_list[0] was always 0, but now it isn't initialized.
12495
12496 * src/table.c (table_grow): When conflict_table grew, the grown
12497 area wasn't cleared. Fix this.
12498
12499 * lib/.cvsignore: Add strdup.c, strdup.h.
12500 * m4/.cvsignore: Add strdup.m4.
12501
00baeeac
PE
125022004-12-07 Paul Eggert <eggert@cs.ucla.edu>
12503
12504 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
12505 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
12506 GOTO_NUMBER_MAXIMUM, since we occasionally compute
12507 ngotos + 1 without checking for overflow.
12508 (build_relations): Use END_NODE, not -1, to denote end of edges.
12509 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
12510 build_relations): Use goto_number, not int, for goto numbers.
12511 * src/tables.c (save_column, default_goto): Likewise.
12512
be3d9d42
AD
125132004-11-23 Akim Demaille <akim@epita.fr>
12514
12515 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
12516 of #defining from yystype.
12517 Don't typedef yystype, C++ does not need it.
12518 This lets it possible to forward declare it as union.
12519
78e526d5
PE
125202004-11-23 Paul Eggert <eggert@cs.ucla.edu>
12521
12522 * bootstrap (gnulib_modules): Add extensions.
12523 Problem reported by Jim Meyering.
12524
afbb696d
PE
125252004-11-22 Paul Eggert <eggert@cs.ucla.edu>
12526
12527 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
12528 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
12529 src/system.h, src/tables.c: XFREE -> free, to accommodate
12530 recent change to gnulib xalloc.h.
78e526d5 12531 Problem reported by Jim Meyering.
afbb696d 12532
c1f8f16a
AD
125332004-11-17 Akim Demaille <akim@epita.fr>
12534
12535 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
12536
db7e5eb5 125372004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
12538 Alexandre Duret-Lutz <adl@gnu.org>
12539
12540 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
12541 changes.
12542 (YYCDEBUG): Adjust.
12543 Use it instead of cdebug_.
12544 (Parser::debug_stream, Parser::set_debug_stream): New.
12545 (Parser::symprint_): Define cdebug_ for temporary backward
12546 compatibility.
12547 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
12548 debug_stream ().
12549
68e11668
AD
125502004-11-17 Akim Demaille <akim@epita.fr>
12551
12552 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
12553 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
12554 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
12555 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12556
97cbc73e
PE
125572004-10-27 Paul Eggert <eggert@cs.ucla.edu>
12558
12559 * data/glr.c (yyloc_default): Remove; not used.
12560 Problem reported by Frank Heckenbach.
12561
e342c3be
AD
125622004-10-25 Akim Demaille <akim@epita.fr>
12563
12564 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
12565 Introduce another definition to address simple location arrays.
12566 (yyGLRStack): New member: yyerror_range.
12567 (yyrecoverSyntaxError, yyparse): Update it.
12568 (yyrecoverSyntaxError): Use it when shifting the error token to
12569 have an accurate range, equivalent to the one computed by both
12570 yacc.c and lalr1.cc.
12571 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
12572 that column numbers start at column 0, as per GNU Coding
12573 Standards, the others tests, and the doc.
12574 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
12575 Adjust to the above change (first column is 0).
12576 And adjust the location of the "<error>", now covering the whole
12577 line.
12578
93602feb 125792004-10-22 Akim Demaille <akim@epita.fr>
04098407 12580 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
12581
12582 Remove some arbitrary limits on goto numbers and relations.
12583 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
12584 initial values, since they're never used.
12585 (set_goto_map): ngotos is now unsigned, so test for overflow
12586 by seeing whether it wraps around to zero.
12587 * src/lalr.h (goto_number): Now size_t, not short int.
12588 (GOTO_NUMBER_MAXIMUM): Remove.
12589 * src/relation.c (relation_print, traverse, relation_transpose):
12590 Check for END_NODE rather than looking at sign.
12591 * src/relation.h (END_NODE): New macro.
12592 (relation_node): Now size_t, not short int.
12593
dba08b04
PE
125942004-10-22 Paul Eggert <eggert@cs.ucla.edu>
12595
12596 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
12597 keyword, not an identifier. Problem reported by Baron Schwartz in
12598 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
12599
df09ef2e
AD
126002004-10-11 Akim Demaille <akim@epita.fr>
12601
12602 * src/symtab.c (symbol_check_alias_consistency): Also check
12603 type names, destructors, and printers.
12604 Reported by Alexandre Duret-Lutz.
12605 Recode the handling of associativity and precedence in terms
12606 of symbol_precedence_set.
12607 Accept no redeclaration at all, not even equal to the previous
12608 value.
12609 (redeclaration): New.
12610 Use it to factor redeclaration complaints.
12611 (symbol_make_alias): Don't set the type of the alias, let
12612 symbol_check_alias_consistency do it as for other features.
12613 * src/symtab.h (symbol): Add new member prec_location, and
12614 type_location.
12615 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
12616 * tests/input.at (Incompatible Aliases): New.
12617
146bc99d
PE
126182004-10-09 Paul Eggert <eggert@cs.ucla.edu>
12619
12620 .cvsignore fixes to accommodate gnulib changes,
12621 and the practice of naming build directories "_build".
12622 * .cvsignore: Add "_*". Sort.
12623 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
12624 * m4/.cvsignore: Add "*_gl.m4".
12625
e503aa60
AD
126262004-10-06 Akim Demaille <akim@epita.fr>
12627
12628 * src/parse-gram.y (add_param): Fix the truncation of trailing
12629 spaces.
12630
b4a20338
AD
126312004-10-05 Akim Demaille <akim@epita.fr>
12632
12633 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
12634 whether the reducion was empty or not. This leaves room to
12635 improve the use of YYLLOC_DEFAULT in such a case.
12636 lalr1.cc is still experimental, so changing this is acceptable.
12637 And finally, there are probably not many users who changed the
12638 handling of locations in GLR, so changing is admissible too.
12639
12640 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
12641 empty reduction, set @$ to an empty location ending the previously
12642 stacked symbol.
12643 Adjust uses to make sure the code is triggered on empty
12644 reductions.
12645 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
12646 expected output: empty reductions have empty locations.
12647
f85a5e6f
AD
126482004-09-29 Akim Demaille <akim@epita.fr>
12649
12650 * data/lalr1.cc: Move towards a more standard C++ coding style
12651 for templates: Class < T > -> Class<T>.
12652
b203fc2c
AD
126532004-09-29 Akim Demaille <akim@epita.fr>
12654
12655 * data/lalr1.cc: Reinstall the former ctor, for sake of
12656 compatibility, but warn it will be removed.
12657 Move towards a more standard C++ coding style (i.e., type *var ->
12658 type* var).
12659
5b7e1e73
PE
126602004-09-27 Paul Eggert <eggert@cs.ucla.edu>
12661
3fee967f
PE
12662 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
12663 since it's less likely to work if NULs are involved in the future.
5b7e1e73 12664
0dcca5c2
AD
126652004-09-27 Akim Demaille <akim@epita.fr>
12666
12667 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
12668
6dde1c82
AD
126692004-09-27 Akim Demaille <akim@epita.fr>
12670
12671 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 12672 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
12673 and argument names.
12674 (b4_cc_constructor_call): Likewise.
12675
b233d555
AD
126762004-09-24 Akim Demaille <akim@epita.fr>
12677
12678 * src/parse-gram.y (add_param): Strip the leading and trailing
12679 blanks from a formal argument declaration.
12680 (YY_LOCATION_PRINT): New.
12681
619404e3
AD
126822004-09-24 Akim Demaille <akim@epita.fr>
12683
12684 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
12685 after the location.
12686
dd8d9022
AD
126872004-09-24 Akim Demaille <akim@epita.fr>
12688
12689 * doc/bison.texinfo (Table of Symbols): Sort.
12690
0092f063
AD
126912004-09-21 Akim Demaille <akim@epita.fr>
12692
12693 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
12694 the useless parentheses.
12695 Suggested by Paul Eggert.
12696
451364ed
AD
126972004-09-20 Akim Demaille <akim@epita.fr>
12698
12699 Let the initial-action act on the look-ahead, and use it for the
12700 "initial push" (corresponding to an hypothetical beginning-of-file).
12701 And let lalr1.cc honor %initial-action.
12702
12703 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
12704 example.
12705 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
12706 (Parser::Parser): Remove the ctor that used to initialize it.
12707 (Parser::parse): Like in the other skeletons, issue the "starting
12708 parse" message before any action.
12709 Honor %initial-action.
12710 Initialize the stacks with the lookahead.
12711 * data/yacc.c: Let $$ and @$ in %initial-action designate the
12712 look-ahead.
12713 Push them in the stacks.
12714 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
12715
18d192f0
AD
127162004-09-20 Akim Demaille <akim@epita.fr>
12717
12718 * doc/bison.texinfo (Initial Action Decl): New.
12719
b8458aa5
AD
127202004-09-20 Akim Demaille <akim@epita.fr>
12721
12722 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
12723 clearer criterion to define it.
12724 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
12725 When reducing on an empty RHS, use the latest stacked location as
12726 location.
12727 yylloc is not always available.
12728 * data/glr.c: Likewise.
12729 Also, honor initial-actions.
12730
3fc16193
AD
127312004-09-20 Akim Demaille <akim@epita.fr>
12732
12733 * data/yacc.c (YY_LOCATION_PRINT): New.
12734 Define when we know YYLTYPE's structure, i.e., when the default
12735 YYLLOC_DEFAULT is used.
12736 * data/c.m4 (b4_yysymprint_generate): Use it.
12737 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
12738 value of the result.
12739 (error_start_): Replace with...
12740 (error_range_): this location array.
12741 This allows to replace code relying on the implementation of
12742 locations by portable code.
12743 * data/yacc.c (yylerrsp): Replace with...
12744 (yyerror_range): this.
12745 Every time a token is popped, update yyerror_range[0], to have an
12746 accurate location for the error token.
12747 * data/glr.c (YY_LOCATION_PRINT): New.
12748 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
12749 deference a pointer.
12750 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
12751 report the location in %printers.
12752
12753 * src/scan-skel.l: Instead of abort, report error messages to ease
12754 understanding skeleton scanning failures.
12755
ecfe33e7
AD
127562004-09-16 Akim Demaille <akim@epita.fr>
12757
12758 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
12759 (iterator, const_iterator): these, to be more in the C++ spirit.
12760 Also, return reverse iterators so that when displaying the stack
12761 we display its bottom first.
12762 (Parser::stack_print_, Parser::reduce_print_): Match the messages
12763 from yacc.c.
12764 We should probably use vector here though.
12765
1576d44d
AD
127662004-09-16 Akim Demaille <akim@epita.fr>
12767
12768 Have more complete shift traces.
12769
12770 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
12771 to report Shifts instead of ad hoc YYDPRINTF invocations,
12772 including for the error token.
12773 * data/lalr1.cc (symprint_): Output the location.
12774 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
12775 output the location within the %printer.
12776 Activate GLR tests, at least to make sure they compile properly.
12777 They still don't pass though.
12778 * tests/calc.at: Adjust expect verbose output, since now "Entering
12779 state..." is on a different line than the "Shifting" message.
12780
9c66f418
AD
127812004-09-08 Akim Demaille <akim@epita.fr>
12782
12783 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
12784 Bison directive from the Bison file to the invocation of this
12785 macro, so that these directives are passed to
12786 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
12787 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
12788 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
12789 the extra Bison directives instead of the whole series.
12790 Change the grammar so that there are recoverable errors, and
12791 unrecoverable errors. Now we can have the parser give up before
12792 consuming the whole input. As a result we now can observe that
12793 the lookahead is freed when needed.
12794 Change the parser source to parse argv[1] instead of a hard coded
12795 string.
12796 Simplify yylex, and give a value and location to EOF.
12797 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
12798 passed directives already coded in the file.
12799 Add some tests to check the location of "error".
12800 For some tests, the C++ parser is correct, and not yacc.c.
12801 For other tests, they provide different, but unsatisfying, values,
12802 so keep the C++ value so that at least one parser is "correct"
12803 according to the test suite.
12804 (Actions after errors): Remove, this is subsumed by the
12805 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
12806
52d5733f
AD
128072004-09-06 Akim Demaille <akim@epita.fr>
12808
12809 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 12810 (Parser::pop): New.
52d5733f
AD
12811 Use it.
12812
a0e68930
AD
128132004-09-06 Akim Demaille <akim@epita.fr>
12814
12815 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
12816 argument, an informative message.
12817 Call YY_SYMBOL_PRINT.
12818 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
12819 * data/lalr1.cc (destruct_): Likewise.
12820 In addition, no longer depend on b4_yysymprint_generate and
12821 b4_yydestruct_generate to generate these functions, do it "by
12822 hand".
12823
e757bb10
AD
128242004-09-03 Akim Demaille <akim@epita.fr>
12825
12826 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
12827 invoked, yydestruct the lookahead.
12828 * tests/calc.at (Calculator $1): Update the expected lengths of
12829 traces: there is an added line for the discarded lookahead.
12830 * doc/bison.texinfo (Destructor Decl): Some rewording.
12831 Define "discarded" symbols.
12832
0fe1f06d
AD
128332004-09-02 Akim Demaille <akim@epita.fr>
12834
12835 * data/lalr1.cc (translate_, destruct_): No reason to be static.
12836
284acc8b
AD
128372004-09-02 Akim Demaille <akim@epita.fr>
12838
12839 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
12840 (YYDSYMPRINTF): Rename as...
12841 (YY_SYMBOL_PRINT): this.
12842 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
12843 two.
12844 Use it instead of direct symprint_ calls.
12845 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
12846 one.
12847
a5eb1ed2
AD
128482004-09-02 Akim Demaille <akim@epita.fr>
12849
b7c72fe1
AD
12850 * data/lalr1.cc (b4_yysymprint_generate): New.
12851 (symprint_): New member function, defined when YYDEBUG.
12852 Use it consistently instead of token/nterm debugging output by
12853 hand.
a5eb1ed2
AD
12854 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
12855 %printer calls to use cdebug_ when using lalr1.cc.
12856
417141dd
AD
128572004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
12858
12859 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
12860 with #ifdef YYDEBUG.
12861
2fa09258
AD
128622004-08-26 Akim Demaille <akim@epita.fr>
12863
12864 * doc/bison.texinfo (Implementing Loops): Rename as...
12865 (Implementing Gotos/Loops): this.
12866
9378b508
PE
128672004-08-13 Paul Eggert <eggert@cs.ucla.edu>
12868
12869 Adjust to latest gnulib.
12870 * bootstrap (gnulib_modules): Add xalloc-die.
12871 Set LC_ALL=C so that file names sort consistently.
12872 Prefer the gnulib copies of gettext.m4, glibc21.m4,
12873 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
12874 uintmax_t.m4, ulonglong.m4.
12875 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
12876 po.m4 since we are now using _gl.m4 instead.
12877
87a8ad5c
PE
128782004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
12879
12880 * src/scan-action.l: Remove. Scanning of semantic actions is
12881 handled in scan-gram.l.
12882
dca81a78
PE
128832004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
12884
12885 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
12886
12887 * src/location.h (struct): The file member is a uniqstr.
12888 (equal_boundaries): Use UNIQSTR_EQ for comparison.
12889
c9cbf7c5
PE
128902004-07-22 Paul Eggert <eggert@cs.ucla.edu>
12891
12892 Fix bug with non-%union parsers that have printers or destructors,
12893 which led to a Bison core dump. Reported by Peter Fales in
12894 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 12895
c9cbf7c5
PE
12896 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
12897 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
12898 not to our own type.
12899 * src/output.c (symbol_destructors_output, symbol_printers_output):
12900 Don't assume %union.
12901 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
12902 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
12903 UNION-FLAG. All callers changed.
12904 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
12905 Use type char, not unsigned int, when declaring an array of char;
12906 this lets us remove a cast.
12907 (Printers and Destructors): Add non-%union test cases.
12908
fa7e68c3
PE
129092004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12910
12911 * doc/bison.texinfo: Minor editorial changes, mostly to the new
12912 GLR writeups. E.g., avoid frenchspacing and the future tense,
12913 change "lookahead" to "look-ahead", and change "wrt" to "with
12914 respect to".
2fa09258 12915
fa7e68c3
PE
129162004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12917
12918 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
12919 New sections, split off from the GLR Parsers section. Put the new
12920 Simple GLR Parser near the start of the GLR section, for clarity.
12921 Rewrite connective text.
12922
99a9344e
PE
129232004-06-21 Frank Heckenbach <frank@g-n-u.de>
12924
12925 * doc/bison.texinfo (Simple GLR Parsers): New section.
12926
8dd162d3
PE
129272004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12928
12929 * NEWS, TODO, doc/bison.texinfo:
12930 Use "look-ahead" instead of "lookahead", to be consistent.
12931 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
12932 while we're fixing "look-ahead".
12933 * src/conflicts.c (shift_set): Renamed from shiftset.
12934 (look_ahead_set): Renamed from lookaheadset.
12935 * src/print.c: Likewise.
12936 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12937 name for "lookahead".
12938 (report_types, usage): Likewise.
12939 * src/getargs.h (report_look_ahead_tokens): Renamed from
12940 report_lookaheads.
12941 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12942 compute_lookaheads.
12943 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12944 (look_ahead_tokens_print): Renamed from lookaheads_print.
12945 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12946 state_rule_lookaheads_print.
12947 * src/state.h: Likewise.
12948 (reductions.look_ahead_tokens): Renamed from lookaheads.
12949 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12950 AT_DATA_LOOKAHEADS_GRAMMAR.
12951
57a90331
PE
129522004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12953
12954 * README: Update location of patched M4 distribution.
12955
8ed3234a
PE
129562004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12957
12958 Don't assume the C++ compiler takes the same arguments as the C compiler
12959 (trivial change).
12960 * configure.ac (O0CXXFLAGS): New var.
12961 * tests/atlocal.in (CXXFLAGS): Use it.
12962
07971983
PE
129632004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12964
12965 Fix some "make check" problems with C++ reported by
12966 Albert Chin-A-Young for Tru64 C++ in this thread:
12967 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12968
12969 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12970 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12971 Output to a .cc file for C++, not to a .c file.
12972 * tests/calc.at (AT_CHECK_CALC): Likewise.
12973 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12974 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12975
29058652
PE
129762004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12977
12978 * tests/calc.at, tests/actions.at: Workaround for SGI
12979 C++ compiler. (trivial change)
12980
62cb8a99
PE
129812004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12982
fd418816
PE
12983 Spent a few hours checking out which prerequisite versions the
12984 current sources actually require. I went all the way back to
12985 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12986 a seemingly endless set of combinations of versions more recent
12987 than that. The bottom line is that the current sources require
12988 fairly recent versions of the build tools, and it'll be some work
12989 to change this.
12990 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12991 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12992 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12993 Add comments explaining why those particular versions are
12994 currently needed.
2fa09258 12995
62cb8a99
PE
12996 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12997 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 12998 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
12999
13000 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
13001 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
13002
caa52c10
PE
130032004-05-26 Paul Eggert <eggert@cs.ucla.edu>
13004
13005 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
13006 0.11.5. Suggested by Bruno Haible.
13007 * bootstrap: Remove gettext version checking.
13008
13009 * doc/bison.texinfo (Decl Summary): Also mention that %union
13010 can depend on prerequisite types. Problem reported by Tim
13011 Van Holder.
13012
4bfd5e4e
PE
130132004-05-25 Paul Eggert <eggert@cs.ucla.edu>
13014
2cef3017
PE
13015 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
13016 * README-alpha: Don't tell people not to package this.
13017
b9c85d5c
PE
13018 * bootstrap: Don't assume $(...) works; use `...` instead.
13019 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
13020 gettext better.
13021
4bfd5e4e
PE
13022 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
13023 put into the -d output file, and mention what to do if YYSTYPE is
13024 defined as a macro.
13025
6a36ff94
PE
130262004-05-24 Paul Eggert <eggert@cs.ucla.edu>
13027
6712933e
PE
13028 Undo change made earlier today: it caused autopoint to not bring
13029 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
13030 autopoint's.
13031
13032 * bootstrap: Check that gettext version matches what's in
13033 configure.ac. Warn users to ignore robots.txt ERROR 404.
13034 * bootstrap: Undo today's earlier change (logged below).
13035 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 13036
6a36ff94
PE
13037 The gettext version checking is causing more trouble than it's
13038 curing; remove it. Problem reported by Paul Hilfinger.
13039
13040 * bootstrap: Issue a warning that one can expect a message
13041 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
13042 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
13043
209ea708
PE
130442004-05-23 Paul Eggert <eggert@cs.ucla.edu>
13045
13046 Ensure that the C++ compiler used for testing actually works on a
13047 simple test program; if not, skip the C++-related tests. Problem
13048 reported by Vin Shelton in:
161a71f3 13049 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
13050
13051 * m4/cxx.m4: New file.
13052 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
13053 * tests/atlocal.in (BISON_CXX_WORKS): Add.
13054 * tests/local.at (AT_COMPILE_CXX): Use it.
13055
41ca2549
PE
130562004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13057
383e69dc
PE
13058 * data/glr.c (yylloc): Output this macro even if locations are not
13059 being generated, as the GLR parser needs it even in that case.
13060 Problem reported by Troy A. Johnson
13061 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
13062
41ca2549
PE
13063 * configure.ac (AC_INIT): Update to 1.875e.
13064
e476c87d
PE
130652004-05-21 Paul Eggert <eggert@cs.ucla.edu>
13066
13067 * NEWS: Version 1.875d.
13068 * configure.ac (AC_INIT): Likewise.
13069 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
13070
13071 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
13072 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
13073 lalr1.cc runs afoul of the first, and the last two are no longer
13074 supported by GCC 3.4.0.
13075 * README: Mention GNU m4 1.4 or later; mention m4 patches.
13076 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
13077
233a88ad
PE
130782004-05-06 Paul Eggert <eggert@cs.ucla.edu>
13079
13080 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
13081 unsigned int, for compatibility with latest gnulib hash module.
13082 * src/state.c (state_hash, state_hasher): Likewise.
13083 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
13084 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 13085
12ffdd28
PE
130862004-05-03 Paul Eggert <eggert@cs.ucla.edu>
13087
13088 * NEWS: Unescaped newlines are no longer allowed in char & strings.
13089
13090 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
13091 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
13092 character and string literals.
13093 (unexpected_end): New function.
13094 (unexpected_eof): Use it.
13095 (unexpected_newline): New function.
13096 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
13097 actions.
e476c87d 13098
12ffdd28
PE
13099 * NEWS: Document %expect-rr.
13100
13101 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
13102 Fix typo by replacing $1 with $option.
13103 Remove more 'intl'-related files.
9668e2be 13104 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
13105
13106 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
13107 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
13108 strtoul.c.
13109 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
13110 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
13111 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
13112 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
13113 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
13114 * src/.cvsignore: Add *.output.
13115
13116 * src/parse-gram.y: Put copyright notice inside %{ %} so it
13117 gets copied to the output file.
e476c87d 13118
1f65350a
PE
131192004-04-28 Paul Eggert <eggert@twinsun.com>
13120
13121 Get files from the gnulib and po repositories, instead of relying
13122 on them being in our CVS. Upgrade to latest versions of gnulib
13123 and Automake.
13124
13125 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
13126 * bootstrap: Bootstrap from gnulib and po repositories.
13127 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
13128 * README-cvs: Document these changes. Remove version numbers from
13129 mentions of build tools, since they change so often. Mention Flex.
13130
13131 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
13132 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
13133 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
13134 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 13135 does this for us.
12ffdd28
PE
13136 (AC_ISC_POSIX): Remove; we no longer support this
13137 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
13138 (AC_HEADER_STDC): Remove: we now assume C89 or better.
13139 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
13140 Do not check for C89 headers, except for locale.h which is used
13141 by the Yacc library and must port to K&R hosts.
13142 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
13143 Do not check for C89 functions, except for setlocale which is
13144 used by the Yacc library.
13145 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
13146 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
13147 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
13148 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
13149 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
13150 AM_GNU_GETTEXT): Remove; now done by:
13151 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
13152 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
13153 for us.
13154
13155 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
13156 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
13157 Define to empty, as gnulib.mk will do the rest for us.
13158 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
13159 for us.
13160 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
13161 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
13162
13163 * src/files.c: Include gnulib's xstrndup.h.
13164
13165 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
13166 (REALLOC): Use xnrealloc, for likewise.
13167 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
13168 (strnlen, memrchr): Remove decls; functions no longer used.
13169 Include <stpcpy.h>.
13170
13171 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
13172 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
13173 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
13174 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
13175 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
13176 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
13177 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
13178 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
13179 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
13180 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
13181 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
13182 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13183 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
13184 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
13185 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
13186 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
13187 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
13188 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
13189 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
13190 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
13191 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
13192 Remove, as these files are now generated automatically
13193 by bootstrap or automake.
13194
13195 * po/ChangeLog: Remove: all but one entry was a duplicate
13196 of this file, and I moved that 2000-11-02 entry here.
13197
13198 * config/.cvsignore: Add Makefile, depcomp, install-sh.
13199 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
13200 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
13201 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
13202 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
13203 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
13204 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
13205 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
13206 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
13207 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
13208 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
13209 xstrndup.h.
13210 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
13211 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
13212 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
13213 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
13214 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
13215 * src/.cvsignore: Remove *_.c.
13216
13217
13218 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
13219 support it. (The latest stable gzip doesn't.)
13220
132212004-04-27 Paul Eggert <eggert@twinsun.com>
13222
13223 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
13224 case, as stos_ is now used by destructors due to the 2004-02-09
13225 change.
13226
13227 Remove more K&R C support.
13228 * lib/libiberty.y (PARAMS): Remove. All uses removed.
13229 * lib/subpipe.c (errno): Remove decl.
13230 Include <stdlib.h> unconditionally.
13231 (EXIT_FAILURE): Remove macro.
13232 * src/complain.c (vfprintf, strerror): Remove.
13233 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
13234 unconditionally.
13235 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
13236 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
13237 (strchr, strspn, memchr): Remove decls.
13238 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
13239 unconditionally. Do not declare perror.
13240 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
13241 unconditionally.
13242
13243 * src/complain.c (_): Remove useless defn, as system.h defines this.
13244
13245 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
13246 with latest obstack.h.
13247 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
13248 to procedure types, as obstack.h now does that for us.
13249 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
13250
13251 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
13252 so that this include file can stand alone.
13253 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
13254 does this now. Include subpipe.h first after config.h, to
13255 test whether it can stand alone.
13256
13257 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
13258 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
13259 unused declaration.
13260
13261 * tests/synclines.at (%union synch line): Put a dummy member in
13262 the union, because empty unions aren't allowed in C. Caught
13263 by GCC 3.4.0.
13264
4f16766c
PE
132652004-04-13 Jim Meyering <jim@meyering.net>
13266
13267 * src/conflicts.c (conflicts_print): Correct format string typo:
13268 use `%%' to produce literal `%'. (trivial change)
13269
779e7ceb
PE
132702004-03-30 Paul Eggert <eggert@twinsun.com>
13271
13272 * src/getargs.c (version): Update copyright year to 2004.
13273
13274 * data/c.m4 (b4_int_type): Use 'short int' rather than
13275 'short', and similarly for 'long', 'unsigned', etc.
13276 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
13277 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
13278 yy_yypstack, yydumpstack): Likewise.
13279 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
13280 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
13281 Likewise.
13282 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
13283 yy_stack_print, yyparse): Likewise.
13284 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
13285 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
13286 * lib/bitset.c (bitset_print): Likewise.
13287 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
13288 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
13289 * lib/bitsetv.c (bitsetv_dump): Likewise.
13290 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
13291 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
13292 Likewise.
13293 * src/LR0.c (allocate_itemsets): Likewise.
13294 * src/gram.h (rule_number, rule): Likewise.
13295 * src/lalr.h (goto_number): Likewise.
13296 * src/nullable.c (nullable_compute): Likewise.
13297 * src/output.c (prepare_rules): Likewise.
13298 * src/relation.c (relation_print, relation_digraph): Likewise.
13299 * src/relation.h (relation_node): Likewise.
13300 * src/state.h (state_number, transitions, errs, reductions,
13301 struct state): Likewise.
13302 * src/symtab.h (symbol_number, struct symbol): Likewise.
13303 * src/tables.c (vector_number, tally, action_number,
13304 default_goto, goto_actions): Likewise.
13305 * tests/existing.at (GNU Cim Grammar): Likewise.
13306 * tests/regression.at (Web2c Actions): Likewise.
13307
13308 * src/output.c (muscle_insert_short_int_table): Renamed from
13309 muscle_insert_short_table. All uses changed.
13310
d6328241
PH
133112004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
13312
13313 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
13314 (declaration): Replace expected_conflicts with expected_sr_conflicts.
13315 Add %expect-rr rule.
4f16766c 13316
d6328241
PH
13317 * src/scan-gram.l: Recognize %expect-rr.
13318
4f16766c 13319 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 13320 expected_conflicts.
4f16766c 13321 (expected_rr_conflicts): Declare.
d6328241
PH
13322
13323 * src/conflicts.c (expected_sr_conflicts): Rename from
13324 expected_conflicts.
13325 (expected_rr_conflicts): Define.
13326 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
13327 for GLR parsers.
13328 Use expected_sr_conflicts in place of expected_conflicts.
13329 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 13330
d6328241 13331 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 13332
1452af69
PE
133332004-03-08 Paul Eggert <eggert@gnu.org>
13334
13335 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 13336 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
13337
13338 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
13339 in lalr1.cc.
13340 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
13341 * src/scan-gram.l (scan_integer): New function.
13342 ({int}): Use it.
13343 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
13344 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
13345 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
13346 Say "long int", not "long", for uniformity with GNU style.
13347
006d217d
PE
133482004-02-25 Paul Eggert <eggert@twinsun.com>
13349
13350 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
13351 compilers. This fixes a problem with Intel's C++ compiler being
13352 chatty, reported by Guido Trentalancia in
161a71f3 13353 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 13354
c2729758
ADL
133552004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
13356
13357 Support %destructor and merge error locations in lalr1.cc.
13358
13359 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
13360 (Parser::stos_): Define unconditionally.
13361 (Parser::destruct_): New method. Generate its body with
13362 b4_yydestruct_generate.
13363 (Parser::error_start_): New attribute.
13364 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
13365 token which are discarded.
13366 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
13367 error_start_ when erroneous token are discarded.
13368 (Parser::parse) <yyerrlab1>: Compute the location of the error
13369 token so that it covers all the discarded tokens.
13370 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
13371 it can be called with `%skeleton "lalr1.cc"', and do that.
13372
dd0e0635
PE
133732004-02-02 Paul Eggert <eggert@twinsun.com>
13374
13375 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
13376 $(top_srcdir)/lib and ../lib. This fixes a bug reported
13377 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
13378 There's no need to mention top_builddir since Automake does that
13379 for us.
13380 (INCLUDES): Remove, as Automake says it's obsolescent.
13381 Contents migrated into AM_CPPFLAGS as described above.
13382 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
13383
133842004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
13385
13386 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
13387 (yyreportSyntaxError): Handle case where lookahead token is
13388 YYEMPTY.
13389
be16239b
PH
133902004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13391
13392 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
13393 resulting parsers are compilable with C++.
13394
5fa90832
PE
133952003-12-23 Paul Eggert <eggert@twinsun.com>
13396
13397 * config/depcomp, config/install-sh: Sync with Automake 1.8.
13398 * src/output.c (output_skeleton): Rename local var.
13399 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
13400 Bison tokens, as this runs afoul of the 2003-10-07 change that
13401 disallowed NUL bytes in character constants or string literals.
13402
13403 * tests/local.at: Require Autoconf 2.59's Autotest.
13404 * tests/testsuite.at: Don't include local.at, since we now assume
13405 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
13406 including it.
13407 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
13408 multiple inclusion warnings.
dd0e0635 13409
b165c324
AD
134102003-12-02 Akim Demaille <akim@epita.fr>
13411
13412 * doc/bison.texinfo (How Can I Reset the Parser): More about start
13413 conditions.
13414 From Bruno Haible.
13415
26e06a21
ADL
134162003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
13417
13418 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
13419
92ac3705
PE
134202003-10-07 Paul Eggert <eggert@twinsun.com>
13421
6a5ecb38
PE
13422 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
13423 if testsuite doesn't exist.
13424
92ac3705
PE
13425 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
13426 literals, unfortunately.
13427 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
13428 Complain about NUL bytes in character constants or string literals.
13429
91d2c560
PE
134302003-10-05 Paul Eggert <eggert@twinsun.com>
13431
13432 * NEWS: Don't document %no-default-prec, as it's still
13433 too experimental.
13434 * doc/bison.texinfo: Document %no-default-prec only if
13435 the defaultprec flag is set. Normally it's not.
13436
0cc3da3a
PE
134372003-10-04 Paul Eggert <eggert@twinsun.com>
13438
13439 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
13440 non-modifiable lvalue, instead of a modifiable one.
13441 * doc/bison.texinfo (Actions): Document that $$ can
13442 be assigned to. Do not claim that $$ and $N are
13443 array element references: user code should not rely on this.
13444
22fccf95
PE
134452003-10-01 Paul Eggert <eggert@twinsun.com>
13446
13447 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
13448 (grammar_declaration): Use it.
13449 * src/scan-gram.l: New token %no-default-prec.
13450 * tests/conflicts.at: Revamp tests to use %no-default-prec.
13451 * NEWS, doc/bison.texinfo: Document the above.
13452
fc8f2965
AD
134532003-10-01 Akim Demaille <akim@epita.fr>
13454
13455 VCG no longer supports long_straight_phase.
13456
13457 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
13458 * src/print_graph.c (print_graph): Adjust.
13459
39a06c25
PE
134602003-09-30 Frank Heckenbach <frank@g-n-u.de>
13461 and Paul Eggert <eggert@twinsun.com>
13462
13463 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
13464 Table of Symbols): Document %default-prec.
13465 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
13466 (grammar_declaration): Set default_prec on %default-prec.
13467 * src/scan-gram.l (%default-prec): New token.
13468 * src/reader.h (default_prec): New flag.
13469 * src/reader.c: Likewise.
13470 (packgram): Handle it.
13471 * tests/conflicts.at (%default-prec without %prec,
13472 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 13473
39a06c25
PE
134742003-09-30 Paul Eggert <eggert@twinsun.com>
13475
13476 * tests/testsuite.at: Include local.at, not input.at, fixing
13477 a typo in the 2003-08-25 patch.
13478
62b6aef9
AD
134792003-08-27 Akim Demaille <akim@epita.fr>
13480
13481 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
13482 GCC warnings.
13483
89e1cc61
AD
134842003-08-26 Akim Demaille <akim@epita.fr>
13485
13486 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
13487 "<\#" to avoid magic from Gnus when posting parts of this script.
13488
a08460b0
AD
134892003-08-26 Akim Demaille <akim@epita.fr>
13490
13491 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
13492 (Parser::parse): here.
13493 Adjust: nerrs and errstatus is now replaced by...
13494 (Parser::nerrs_, Parser::errstatus_): New.
13495
603f1cfd
AD
134962003-08-25 Akim Demaille <akim@epita.fr>
13497
13498 * config/announce-gen, Makefile.cfg: New.
13499 * Makefile.am: Adjust.
13500 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
13501 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
13502
cd3684cf
AD
135032003-08-25 Akim Demaille <akim@epita.fr>
13504
13505 When reducing initial empty rules, Bison parser read an initial
13506 location that is not defined. This results in garbage, and that
13507 affects Bison's own parser. Therefore we need (i) to extend Bison
13508 to support a means to initialize this location, and (ii) to use
13509 this CVS Bison to fix CVS Bison's parser.
13510
13511 * src/reader.h, reader.c (epilogue_augment): Remove, replace
13512 with...
13513 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
13514 * src/parse-gram.y: Adjust.
13515 (%initial-action): New.
13516 (%error-verbose): Since we require CVS Bison, there is no reason
13517 not to use it.
13518 * src/scan-gram.l: Adjust.
13519 * src/Makefile.am (YACC): New, to make sure we use our own parser.
13520 * data/yacc.c (yyparse): Use b4_initial_action.
13521
4e03e201
AD
135222003-08-25 Akim Demaille <akim@epita.fr>
13523
13524 * doc/bison.texinfo: Don't promote stdout for error messages.
13525
8c182d05
AD
135262003-08-25 Akim Demaille <akim@epita.fr>
13527
13528 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
13529 From Alexandre Duret-Lutz.
13530
6a60c4cf
PE
135312003-08-25 Akim Demaille <akim@epita.fr>
13532
13533 Version 1.875c.
13534
25f66e1a
AD
135352003-08-25 Akim Demaille <akim@epita.fr>
13536
13537 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
13538 Use them.
13539
5348bfbe
AD
135402003-08-25 Akim Demaille <akim@epita.fr>
13541
13542 * data/lalr1.cc (Parser::reduce_print_): New.
13543 Use it.
13544
47301314
AD
135452003-08-25 Akim Demaille <akim@epita.fr>
13546
13547 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
13548 error recovery loops. This patch is based on
161a71f3 13549 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
13550 Also, augment the similarity between lalr1.cc and yacc.c.
13551 Note: the locations of error recovery rules are not correct yet.
13552
13553 * data/lalr1.cc: Comment changes to augment the similarity between
13554 lalr1.cc and yacc.c.
13555 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
13556 (yyerrlab1): Remove, but where it used to be (now the bottom part of
13557 yyerrlab), when hitting EOF, pop the whole stack here instead of
13558 merely falling thru the default error handling mechanism.
13559 (yyerrorlab): New label, with the old contents of YYERROR,
13560 plus the following change: pop the stack of rhs corresponding
13561 to the production that invoked YYERROR. That is how Yacc
13562 behaves (required by POSIX).
13563 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
13564 fail.
13565
1f7a61ff
AD
135662003-08-25 Akim Demaille <akim@epita.fr>
13567
13568 Tune local.at so that people can "autom4te -l autotest calc.at -o
13569 calc" for instance, to extract a sub test suite.
13570
13571 * tests/testsuite.at: Move the initialization, Autotest version
13572 requirement, and AT_TESTED invocation into...
13573 * tests/local.at: here.
13574 * tests/testsuite.at: Include it for compatibility with Autoconf
13575 2.57.
13576 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
13577 be ignore.
13578
327b5b56
PE
135792003-08-04 Paul Eggert <eggert@twinsun.com>
13580
13581 Rework code slightly to avoid gcc -Wtraditional warnings.
13582 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
13583 The returned value is now stored in *YY0. All callers changed.
13584 * src/output.c (merge_output): Adjust to the above change.
13585
0051e3ed
PE
135862003-07-26 Paul Eggert <eggert@twinsun.com>
13587
13588 * data/glr.c (YYASSERT): New macro.
13589 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
13590 yyresolveStates, yyprocessOneStack):
13591 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
13592 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 13593
137437c6
PE
135942003-07-25 Paul Eggert <eggert@twinsun.com>
13595
5b620e06
PE
13596 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
13597 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 13598 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
13599 by Frank Heckenbach, though I have omitted the structure-initialization
13600 part of his glr-knr.diff patch since I recall that the Portable
13601 C Compiler didn't require that change.
13602
137437c6
PE
13603 Let the user specify how to allocate and free memory.
13604 Derived from a suggestion by Frank Heckenbach in
161a71f3 13605 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
13606 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
13607 All uses of free, malloc, realloc changed to use these macros,
13608 and unnecessary casts removed.
13609 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
13610
ddb85ca5
PE
136112003-07-06 Matthias Mann <MatthiasMann@gmx.de>
13612
13613 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
13614 use s.empty() rather than s == "" to test for empty string; see
161a71f3 13615 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
13616 (trivial change)
13617
39910e09
AD
136182003-06-25 Akim Demaille <akim@epita.fr>
13619
13620 * config/depcomp, config/install-sh: Update from masters.
13621
0ae99356
PE
136222003-06-20 Paul Eggert <eggert@twinsun.com>
13623
13624 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
13625 and return properly parenthesized result.
13626 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
13627 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13628 Remove unnecessary parentheses from uses.
13629 * doc/bison.texinfo (Location Default Action): Describe the
13630 conventions for parentheses.
13631
cd05d13c
PE
136322003-06-19 Paul Eggert <eggert@twinsun.com>
13633
81fd08ca
PE
13634 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
13635 yyreportTree): Do not assume that size_t is the same width as int,
13636 when printing sizes. Print sizes using an unsigned format.
13637 Problem reported by Frank Heckenbach in
161a71f3 13638 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 13639
cd05d13c
PE
13640 Port to Forte Developer 7 C compiler.
13641 * data/glr.c (struct YYLTYPE): If locations are not being used,
13642 declare a single dummy member, as empty structs do not conform
13643 to the C standard.
13644 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
13645 the Forte Developer 7 C compiler complains that end-of-loop
13646 code is not reached.
13647
4dcf140b
PE
136482003-06-17 Paul Eggert <eggert@twinsun.com>
13649
13650 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
13651 avoid warnings from picky compilers about redefinition of PARAMS.
13652
8dd76bee
PE
136532003-06-17 Paul Eggert <eggert@twinsun.com>
13654
13655 Version 1.875b.
13656
13657 * NEWS: Document 1.875b.
13658
13659 * lib/bbitset.h: Do not include config.h; that's the includer's job.
13660 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
13661 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
13662 Don't use 'index' in comments, as it's a builtin fn on some hosts.
13663 * lib/bitset_stats.c: Include gettext.h unconditionally, as
13664 per recent gettext manual's suggestion.
13665 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
13666 Use prototypes, not old-style definitions.
13667 * lib/lbitset.c (lbitset_unused_clear): Likewise.
13668 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
13669 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
13670 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
13671 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
13672 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
13673 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
13674 vbitset_or_and_cmp, vbitset_copy): Likewise.
13675
13676 * lib/libiberty.h: Do not include config.h; that's the includer's job.
13677 Do not include <stdlib.h>.
13678 (PARAMS): Define unconditionally for C89.
13679 (ATTRIBUTE_NORETURN): Remove.
13680 (ATTRIBUTE_UNUSED): Define unconditionally.
13681
13682 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 13683 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
13684 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
13685 * lib/vbitset.c, lib/vbitset.h: New files.
13686 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13687 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
13688 from libbitset.
13689
13690 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
13691 `How Can I Reset @code{yyparse}', since texinfo does not allow
13692 arbitrary @ in node names.
13693
13694 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
13695 shouldn't be needed according to the gettext 0.12.1 documentation
13696 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 13697 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 13698 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 13699 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 13700
8dd76bee
PE
13701 * lib/.cvsignore: Add stdbool.h.
13702 * m4/.cvsignore: Add nls.m4, po.m4.
13703
13704 Upgrade to CVS gnulib.
13705 * stdbool_.h: File renamed from stdbool.h.in.
13706 * configure.ac (AM_STDBOOL_H): Invoke this instead of
13707 AC_HEADER_STDBOOL.
13708 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
13709 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
13710 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
13711 (MOSTLYCLEANFILES): New var.
13712 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
13713 (stdbool.h): New rule.
13714 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
13715 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
13716 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
13717 m4/quote.m4: Upgrade to today's gnulib.
13718
13719 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
13720 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
13721 the tests right now.
13722 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
13723 yyerror are declared before use; C99 requires this.
13724
25005f6a
PH
137252003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13726
13727 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
13728 first.
13729 (yyrecoverSyntaxError): Correct the logic for setting and testing
13730 yyerrState.
13731 Correct comment on handling EOF.
13732 Allow states with only a default reduction, rather than failing
8dd76bee 13733 (I can't quite reconstruct why these were not allowed before).
25005f6a 13734
137437c6 13735 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 13736 buffer overruns, corrupting state.
8dd76bee
PE
13737
13738 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
13739 definition.
13740 * src/reader.h (max_left_semantic_context): New variable declaration.
13741 * src/scan-gram.l (max_left_semantic_context): Define.
13742 (handle_action_dollar): Update max_left_semantic_context.
13743 * data/glr.c (YYMAXLEFT): New definition.
13744 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
13745 (yyresolveAction): Ditto.
13746
13747 Fixes to problems with location handling in GLR parsers reported by
13748 Frank Heckenbach (2003/06/05).
13749
13750 * data/glr.c (YYLTYPE): Make trivial if locations not used.
13751 (YYRHSLOC): Add parentheses, and define only if locations used.
13752 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
13753 locations not used.
13754 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
13755 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 13756
25005f6a
PH
13757 * tests/cxx-type.at: Exercise location information; update tests
13758 to differentiate output with and without locations.
8dd76bee 13759 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
13760 because default YYLTYPE not yet defined.
13761 Change semantic actions to compute strings, rather than printing
13762 them directly (to test proper passing of semantics values). Change
13763 output to prefix notation and update test data and expected results.
13764 (yylex): Track locations.
13765 (stmtMerge): Return value rather than printing, and include arguments
13766 in value.
8dd76bee 13767
711f40b7
PE
137682003-06-03 Paul Eggert <eggert@twinsun.com>
13769
13770 Avoid warnings generated by GCC 2.95.4 when Bison is
13771 configured with --enable-gcc-warnings.
13772 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
13773 yy::]b4_parser_class_name[::translate_,
13774 yy::Stack::operator[] (unsigned),
13775 yy::Stack::operator[] (unsigned) const,
13776 yy::Slice::operator[] (unsigned),
13777 yy::Slice::operator[] (unsigned) const):
13778 Rename local vars to avoid warnings.
13779 * tests/glr-regression.at (Improper handling of embedded actions
13780 and $-N in GLR parsers): Remove unused local variable from yylex.
13781 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
13782 (void) as arg when not pure, since we now assume C89 when building
13783 Bison. Pacify GCC by using parameter.
13784
ac695f7d
PE
137852003-06-02 Paul Eggert <eggert@twinsun.com>
13786
13787 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
13788 yy::Location::lines, yy::Location::columns): Rename arguments
13789 to avoid shadowing; this removes a warning generated by GCC 3.3.
13790
26ec81e0
PE
137912003-06-01 Paul Eggert <eggert@twinsun.com>
13792
13793 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
13794 to g++, as GCC 3.3 complains if you do it.
13795 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
13796 everything that WARNING_CFLAGS has, except omit warnings
13797 not suitable for C++.
13798 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
13799 * tests/atlocal.in (CXXFLAGS): New var.
13800 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
13801
13802 Fix a GLR parser bug I reported in February; see
161a71f3 13803 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
13804 The problem was that GLR parsers did not conform to the C standard,
13805 because actions like { $1 = $2 + $3; } expanded to expressions
13806 that invoked YYFILL in separate subexpressions, and YYFILL assigned
13807 to a local variable. The C standard says that expressions
13808 like (var = f ()) + (var = f ()) have undefined behavior.
13809 Another problem was that GCC sometimes issues warnings that
13810 yyfill and its parameters are unused.
13811
13812 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
13813 as possibly unused.
13814 (yyfill): New function.
13815 (YYFILL): Use it.
13816 (yyuserAction): Change type of yynormal to bool, so that it matches
13817 the new yyfill signature. Mark it as possibly unused.
13818
13819
13820 Follow up on a bug I reported in February, where a Bison-generated
13821 parser can loop. Provide a test case and a fix for yacc.c. I
13822 don't have a fix for lalr1.cc or for glr.c, unfortunately.
13823 The original bug report is in:
161a71f3 13824 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
13825
13826 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
13827 macro's size was becoming unwieldy.
13828 (yyerrlab): Do not discard an empty lookahead symbol, as this
13829 might destroy garbage.
13830 (yyerrorlab): New label, with the old contents of YYERROR,
13831 plus the following change: pop the stack of rhs corresponding
13832 to the production that invoked YYERROR. That is how Yacc
13833 behaves, and POSIX requires this behavior.
13834 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
13835 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
13836 Define 'alarm' to do nothing if unistd.h is not available.
13837 Add a new rule "exp: '-' error;" to test the above change to
13838 data/yacc.c. Use 'alarm' to abort any test taking longer than
13839 10 seconds, as it's probably looping.
13840 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
13841 Also, the new yacc.c generates two fewer diagnostics for an
13842 existing test.
13843
d0829076
PE
138442003-05-24 Paul Eggert <eggert@twinsun.com>
13845
c6ae27df
PE
13846 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
13847 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
13848 This fixes a problem reported by John Bowman when the Compaq/HP
13849 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
13850 -ansi -Wall -gall).
13851 * data/yacc.c (union yyalloc): Likewise.
13852 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 13853
d0829076
PE
13854 Switch from 'int' to 'bool' where that makes sense.
13855
13856 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
13857 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
13858 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
13859 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
13860 Return or accept bool, not int. All callers changed.
13861 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
13862 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
13863 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
13864 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
13865 bitset_or_and_cmp_): Likewise.
13866 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
13867 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
13868 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
13869 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
13870 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
13871 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
13872 bitset_stats_or_and_cmp): Likewise.
13873 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
13874 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
13875 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
13876 ebitset_xor_cmp): Likewise.
13877 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
13878 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
13879 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
13880 lbitset_xor_cmp): Likewise.
13881 * lib/bbitset.h: Include <stdbool.h>.
13882 (struct bitset_vtable): The following members now return bool, not
13883 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
13884 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
13885 or_and_cmp).
13886 * src/conflicts.c (count_rr_conflicts): Likewise.
13887 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
13888 All uses changed.
13889 * lib/ebitset.c (ebitset_obstack_init): Likewise.
13890 * lib/lbitset.c (lbitset_obstack_init): Likewise.
13891 * src/getargs.c (debug_flag, defines_flag, locations_flag,
13892 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13893 graph_flag): Likewise.
13894 * src/getargs.h (debug_flag, defines_flag, locations_flag,
13895 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13896 graph_flag): Likewise.
13897 * src/output.c (error_verbose): Likewise.
13898 * src/output.h (error_verbose): Likewise.
13899 * src/reader.c (start_flag, typed): Likewise.
13900 * src/reader.h (typed): Likewise.
13901 * src/getargs.c (LOCATIONS_OPTION): New constant.
13902 (long_options, getargs): Use it.
13903 * src/lalr.c (build_relations): Use bool, not int.
13904 * src/nullable.c (nullable_compute): Likewise.
13905 * src/print.c (print_reductions): Likewise.
13906 * src/tables.c (action_row, pack_vector): Likewise.
13907 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
13908 * src/output.c (prepare): Use it.
13909 * src/output.c (token_definitions_output,
13910 symbol_destructors_output, symbol_destructors_output): Use string,
13911 not boolean integer, to keep track of whether to output separator.
13912 * src/print_graph.c (print_core): Likewise.
13913 * src/state.c (state_rule_lookaheads_print): Likewise.
13914
13915 * config/install-sh: Sync from automake 1.7.5.
13916
6b2584b7
PE
139172003-05-14 Paul Eggert <eggert@twinsun.com>
13918
13919 * src/parse-gram.y (rules_or_grammar_declaration): Require a
13920 semicolon after a grammar declaration, in the interest of possible
13921 future changes to the Bison input language.
13922 Do not allow a stray semicolon at the start of the grammar.
13923 (rhses.1): Allow one or more semicolons after any rule, including
13924 just before "|" as required by POSIX.
13925 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
13926 grammar.
13927
caf37a36
ADL
139282003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
13929
13930 %parse-param support for lalr1.cc.
13931
13932 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13933 b4_cc_constructor_calls, b4_cc_constructor_call,
13934 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13935 definitions.
13936 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13937 parse-param arguments.
13938 (yy::b4_parser_class_name): Declare instance variables to
13939 hold parse-param arguments.
13940 * tests/calc.at: s/value/semantic_value/ because value clashes
13941 with a member of yy::b4_parser_class_name. Adjust C++ code
13942 to handle %parse-param. Enable %parse-param test in C++.
13943
3ab37077
PE
139442003-05-12 Paul Eggert <eggert@twinsun.com>
13945
13946 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13947 English a bit. Fix fclose typo. Change "const char" to "char
13948 const", and use ANSI C rather than K&R for "main". Suggest
13949 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13950 and suggest yy_switch_to_buffer.
13951
139522003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
13953
13954 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13955 C89. This avoids a diagnostic on compilers that define __STDC__
13956 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 13957 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 13958
e743727f
PE
139592003-05-03 Paul Eggert <eggert@twinsun.com>
13960
13961 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13962 Do not overrun array bounds.
13963 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 13964 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 13965
916708d5
AD
139662003-04-29 Akim Demaille <akim@epita.fr>
13967
13968 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13969 * src/getargs.c, src/getargs.h: here, as bool, not int.
13970 (nondeterministic_parser): New.
13971 * src/parse-gram.y, src/scan-gram.l: Support
13972 %nondeterministic-parser.
13973 * src/output.c (prepare): Use nondeterministic_parser instead
13974 of glr_parser where appropriate.
13975 * src/tables.c (conflict_row, action_row, save_row)
13976 (token_actions, token_actions, pack_vector): Ditto.
13977
a06ea4aa
AD
139782003-04-29 Akim Demaille <akim@epita.fr>
13979
13980 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13981
211074ca
AD
139822003-04-29 Akim Demaille <akim@epita.fr>
13983
13984 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13985 with %pure-parser and %locations to exercise the patch from Yakov
13986 Markovitch below.
13987
6175ffe3
PE
139882003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13989
13990 * data/yacc.c: (b4_lex_param): Corrected for the case where
13991 %lex-param is provided and %pure-parser isn't.
13992
b1e95857
PE
139932003-04-27 Paul Eggert <eggert@twinsun.com>
13994
13995 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 13996 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
13997 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13998 if it is not defined.
13999 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
14000
acda9df6
PE
140012003-04-26 Paul Eggert <eggert@twinsun.com>
14002
3470c57b
PE
14003 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
14004 Declare to be of type suitable for the ninf value itself, not of
14005 type suitable for the corresponding table, since the latter might
14006 be unsigned but the ninf value might be negative. This fixes a
14007 bug reported by Alexandre Duret-Lutz in
161a71f3 14008 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 14009
acda9df6
PE
14010 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
14011 invokes it. We shouldn't invoke it twice because it will attempt
14012 to put error.o in the archive twice. This fixes a glitch reported
14013 by Martin Mokrejs in
161a71f3 14014 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 14015
b5250f26
PE
140162003-04-21 Paul Eggert <eggert@twinsun.com>
14017
14018 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
14019 to gnulib.
14020
089ac0f1
PE
140212003-04-21 Yakov Markovitch <Markovitch@iso.ru>
14022
14023 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
14024 Fix obvious typo that results in uncompilable GLR parsers
14025 when both %pure-parser and %locations are used. (trivial change)
14026
5ededac6
PE
140272003-04-17 Paul Eggert <eggert@twinsun.com>
14028
1b8f2fff
PE
14029 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
14030 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
14031 Do not insert the expected token via unput, as this runs afoul
14032 of a POSIX-compatibility bug in flex 2.5.31.
14033 All uses changed to BEGIN the parent state,
14034 since we no longer insert the expected token via unput.
14035 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
14036 that is no longer emitted after the above change.
14037
5ededac6
PE
14038 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
14039 the first one. This change is from Paul Hilfinger, and it fixes
14040 regression reported by Werner Lemberg in
161a71f3 14041 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
14042
14043 (resolve_sr_conflict): Don't invoke state_errs_set
14044 unless one or more tokens have been explicitly made errors.
14045 Otherwise, the above change causes Bison to abort.
14046
14047 * tests/existing.at (GNU pic Grammar): New test case, taken from
14048 Lemberg's email.
14049
b8be9132
AD
140502003-03-31 Akim Demaille <akim@epita.fr>
14051
14052 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
14053
d423d460
AD
140542003-03-31 Akim Demaille <akim@epita.fr>
14055
14056 * src/output.c (prepare_symbols): Avoid trailing spaces in the
14057 output.
14058
c7e441b4
AD
140592003-03-31 Akim Demaille <akim@epita.fr>
14060
14061 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
14062 From Paul Hilfinger.
14063
231897ad
AD
140642003-03-29 Akim Demaille <akim@epita.fr>
14065
14066 * m4/error.m4: Do not put under dynamic conditions some code which
14067 expansion is under static control.
14068
5b066063
AD
140692003-03-29 Akim Demaille <akim@epita.fr>
14070
14071 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
14072
22a74fec
AD
140732003-03-29 Akim Demaille <akim@epita.fr>
14074
14075 * doc/bison.texinfo (Strings are Destroyed): New.
14076
0eee27e7
PE
140772003-03-13 Paul Eggert <eggert@twinsun.com>
14078
14079 * .cvsignore: Add configure.lineno.
14080 * src/.cvsignore: Add yacc.
14081 * tests/.cvsignore: Add testsuite.log.
14082 * doc/fdl.texi: Sync with latest FSF version.
14083
f61aad93
PE
140842003-03-12 Paul Eggert <eggert@twinsun.com>
14085
537636c7
PE
14086 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
14087 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
14088 cursor, instead of leaving it undefined. This fixes a bug
14089 reported by Tim Van Holder in
161a71f3 14090 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
14091 * tests/input.at (Torturing the Scanner): Test the scanner on
14092 an empty input file, which was Tim Van Holder's test case.
14093
14094 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
14095 <sys/resource.h> can be included, include sys/time.h and
14096 sys/times.h first, if available. This works around the SunOS
14097 4.1.4 porting bug reported by Bruce Becker in
161a71f3 14098 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
14099
14100 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
14101 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
14102 AC_HEADER_SYS_WAIT.
14103
f61aad93
PE
14104 Merge changes from gnulib. This was prompted because the CVS
14105 snapshot didn't build on Solaris 7 due to strnlen problems.
14106
14107 These changes need to be merged back into gnulib:
14108 * lib/hash.c: Include <stdbool.h> unconditionally.
14109 * m4/onceonly.m4 (m4_quote): New macro.
14110 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
14111 Quote AC_FOREACH variable-expansions properly.
14112 The 2003-01-03 obstack.h change also needs merging.
14113 {end of changes requiring merging}
5b066063 14114
f61aad93
PE
14115 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
14116 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
14117 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
14118 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
14119 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
14120 New files, imported from gnulib.
14121 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
14122 above.
14123
14124 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
14125 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
14126 gnulib sources.
14127
14128 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
14129 Add.
14130 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
14131 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
14132 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
14133 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
14134 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
14135 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
14136 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
14137 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
14138 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
14139 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
14140 (jm_PREREQ_ARGMATCH): Remove.
14141 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
14142 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
14143
14144 * src/system.h: Include <stdbool.h> unconditionally.
14145
14146 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
14147 assuming at least C89 in the bitset code for some time now.
14148
d2ffe116
AD
141492003-03-03 Akim Demaille <akim@epita.fr>
14150
14151 * ro.po: New.
14152
052826fd
AD
141532003-03-02 Akim Demaille <akim@epita.fr>
14154
14155 * doc/bison.texinfo (Table of Symbols): Reactivate the
14156 documentation for %lex-param, and %parse-param.
14157
c4749565
AD
141582003-03-02 Akim Demaille <akim@epita.fr>
14159
14160 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
14161 generate verbose error messages.
14162 Use the number of tokens as an upper bound in yytname, as it
14163 cannot be a non terminal.
14164
d5286af1
AD
141652003-03-02 Akim Demaille <akim@epita.fr>
14166
14167 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
14168 message.
14169
22e304a6
AD
141702003-03-02 Akim Demaille <akim@epita.fr>
14171
22e304a6
AD
14172 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
14173 Use them to exercise yycheck overrun.
14174 Based on Andrew Suffield's grammar.
14175
67a25fed
AD
141762003-03-02 Akim Demaille <akim@epita.fr>
14177
14178 Create tests/local.at for Bison generic testing macros.
14179
14180 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
14181 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
14182 This new file.
14183 * tests/calc.at (AT_CHECK_CALC): Adjust.
14184 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
14185 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
14186 * tests/local.at: here.
14187 (AT_COMPILE_CXX): Tags the tests using it as c++.
14188 Ignore the test if CXX is not functional.
14189
9c2b381f
PE
141902003-03-01 Paul Eggert <eggert@twinsun.com>
14191
14192 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
14193 not loc->end, since loc->end might contain garbage and this leads
14194 to undefined behavior on some platforms.
14195 (id_loc, token_start): Use (IF_LINTed) initial values that do not
14196 depend on *loc, so that the reader doesn't give the the false
14197 impression that *loc is initialized.
14198 (<INITIAL>"%%"): Do not bother setting code_start, since its value
14199 does not survive the return.
14200
0433ba88
AD
142012003-03-01 Akim Demaille <akim@epita.fr>
14202
14203 * src/scan-gram.l (code_start): Always initialize it when entering
14204 into yylex, as SC_EPILOGUE is activated *before* the corresponding
14205 yylex invocation. An alternative would be making it static, but
14206 then it starts with the second %%'s beginning, instead of its end.
14207
b305ea69
PE
142082003-02-28 Paul Eggert <eggert@twinsun.com>
14209
14210 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
14211 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 14212 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 14213
c3d25e01
PE
142142003-02-26 Paul Eggert <eggert@twinsun.com>
14215
14216 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
14217 Remove Sequent/Pyramid discussion (nobody uses them any more).
14218 Merge VMS and MS-DOS discussion; these ports may well be dead
14219 but let's keep mentioning them for now. Put <> around email
14220 addresses. Add copyright notice.
14221
c267ffbc
PE
142222003-02-24 Paul Eggert <eggert@twinsun.com>
14223
14224 * data/glr.c (yy_reduce_print): yylineno -> yylno,
14225 to avoid collision with flex use of yylineno.
14226 Problem reported by Bruce Lilly in
161a71f3 14227 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
14228 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
14229 * data/yacc.c (yy_reduce_print): Likewise.
14230
14231 * config/depcomp: Sync with Automake 1.7.3.
14232
f939fc12
AD
142332003-02-21 Akim Demaille <akim@epita.fr>
14234
14235 * data/lalr1.cc: Use temporary variables instead of casts to
14236 change integer types.
14237 Suggested by Paul Eggert.
14238
95923bd6
AD
142392003-02-21 Akim Demaille <akim@epita.fr>
14240
14241 * doc/bison.texinfo: Use "location" consistently to refer to @n,
14242 to avoid confusions with lalr1.cc's notion of Position.
14243 Suggested by Paul Eggert.
14244
2cdc240e
AD
142452003-02-20 Akim Demaille <akim@epita.fr>
14246
14247 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
14248 before initial_columns.
14249 (location.hh): Use consistent variable names when defining the
14250 operator<<.
14251 Use "last" so that we subtract from Positions, not from unsigned.
14252
5d003116
AD
142532003-02-20 Akim Demaille <akim@epita.fr>
14254
14255 * data/lalr1.cc (position.hh): New subfile, including the extended
14256 and Doxygen'ed documentation of class Position.
14257 (location.hh): Use it.
14258 Document a` la Doxygen.
ba1ecc07 14259 With the help of Benoit Perrot.
5d003116 14260
d02b25f9
AD
142612003-02-20 Akim Demaille <akim@epita.fr>
14262
14263 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
14264 AT_YACC_IF.
14265 Redefine AT_YYERROR_SEES_LOC_IF using it.
14266 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
14267 not defined.
14268 Don't use the location in yy::Parser::error_ and
14269 yy::Parser::print_ when not %locations.
14270 Activate more lalr1.cc tests.
14271
0d1c3a04
AD
142722003-02-19 Akim Demaille <akim@epita.fr>
14273
14274 * data/lalr1.cc: When displaying a line number, be sure to make it
14275 an int.
14276
60a777aa
AD
142772003-02-19 Akim Demaille <akim@epita.fr>
14278
14279 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
14280 Remove, useless.
14281 (YYABORT, YYACCEPT, YYERROR): New.
14282 * tests/calc.at: Renable the lalr1.cc test.
14283
0b86fc41
AD
142842003-02-19 Akim Demaille <akim@epita.fr>
14285
14286 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
14287 error recovery, mixing with/without pops and discarding of the
14288 lookahead.
14289 Exercise YYERROR.
14290 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
14291
da99a5dc
PE
142922003-02-17 Paul Eggert <eggert@twinsun.com>
14293
14294 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
14295 * tests/testsuite.at (AT_COMPILE): Use them.
14296 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 14297 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 14298
93b8c255
PE
142992003-02-12 Paul Eggert <eggert@twinsun.com>
14300
14301 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
14302 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 14303 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
14304 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
14305 Check for malloc failure, for consistency with yacc.c.
14306 (yytname_size): Remove, for consistency with yacc.c.
14307
14308 The bug still remains in data/lalr1.cc, as I didn't have time
14309 to fix it there.
14310
7548fed2
AD
143112003-02-06 Akim Demaille <akim@epita.fr>
14312
14313 * configure.ac (GXX): Rename as...
14314 (CXX): this, to keep the original Autoconf semantics.
14315 Require 2.57.
14316 * data/lalr1.cc: Fix b4_copyright invocations.
14317 If YYDEBUG is not defined, don't depend upon name_ being defined.
14318 (location.hh): Include string and iostream.
14319 (Position::filename): New member.
14320 (Position::Position ()): New.
14321 (operator<< (Position)): New.
14322 (operator- (Position, int)): New.
14323 (Location::first, Location::last): Rename as...
14324 (Location::begin, Location::end): these, to mock the conventional
14325 iterator names.
14326 (operator<< (Location)): New.
14327 * tests/atlocal.in (CXX): New.
14328 * tests/testsuite.at (AT_COMPILE_CXX): New.
14329 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
14330 locations in a more synthetic way.
14331 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
14332 lalr1.cc is used.
14333 Adjust the C locations to match those from Emacs: first column is
14334 column 0.
14335 Change all the expected results.
14336 Conform to the GCS: simplify the locations when applicable.
14337 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
14338 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
14339 these CPP macros with the m4 macros new defined by...
14340 (AT_CHECK_PUSHDEFS): this, i.e.:
14341 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 14342 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
14343 New macros.
14344 (AT_CHECK_POPDEFS): Undefine them.
14345 (AT_CHECK_CALC_LALR1_CC): New.
14346 Use it for the first lalr1.cc test.
14347
43a176ef
AD
143482003-02-04 Akim Demaille <akim@epita.fr>
14349
14350 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
14351 Location as is defined.
14352
fc049e9c
AD
143532003-02-04 Akim Demaille <akim@epita.fr>
14354
14355 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
14356 name_ being defined.
14357
a737b216
PE
143582003-02-03 Paul Eggert <eggert@twinsun.com>
14359
14360 * src/gram.h (start_symbol): Remove unused decl.
14361
14362 Use more-consistent naming conventions for local vars.
14363
14364 * src/derives.c (derives_compute): Change type of local var from
14365 int to rule_number.
14366 * src/gram.c (grammar_rules_partial_print): Likewise.
14367 * src/print.c (print_core): Likewise.
14368 * src/reduce.c (reduce_grammar_tables): Likewise.
14369
14370 * src/gram.c (grammar_dump): Change name of item_number *
14371 local var from r to rp.
14372 * src/nullable.c (nullable_compute): Likewise.
14373
14374 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
14375
14376 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
14377 for symbol or symbol_number var.
14378 * src/reader.c (grammar_start_symbol_set): Likewise.
14379 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
14380 Likewise.
14381 * src/state.c (transitions_to): Likewise.
14382 * src/state.h: Likewise.
14383 * src/tables.c (symbol_number_to_vector_number): Likewise.
14384
14385 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
14386 char * var.
14387
14388 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
14389 var.
14390
14391 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
14392 var.
14393
14394 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
14395 Use str, not s, for char * var. Use ch, not c, for character var.
14396 Use size for size var.
14397
14398 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
14399 char * var.
14400 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
14401 uniqstr var.
14402 * src/uniqstr.h: Likewise.
14403
14404 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14405 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14406 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
14407 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
14408 param to have same name as that of enum, so that we don't use
14409 "s" to stand for a non-state.
14410
68e93ad5
AD
144112003-02-02 Akim Demaille <akim@epita.fr>
14412
14413 * src/scan-skel.l: Scan more than one inert character per yylex
14414 invocation.
14415
92898986
PE
144162003-02-01 Paul Eggert <eggert@twinsun.com>
14417
14418 Version 1.875a.
14419
1d9d5d71
PE
14420 * po/LINGUAS: Add ms.
14421
0435d061
AD
144222003-01-30 Akim Demaille <akim@epita.fr>
14423
14424 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
14425
6029a57f
PH
144262003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14427
14428 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
14429 of $1.
0435d061
AD
14430
14431 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 14432 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 14433 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 14434
6029a57f
PH
14435 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
14436 (b4_rhs_location): Ditto.
0435d061 14437 (yyfill): New function to copy from stack tree into array
6029a57f 14438 incrementally.
0435d061
AD
14439 (yyuserAction): Modify to allow incremental move of semantic values
14440 to rhs array when in GLR mode.
14441 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
14442 as needed.
14443 Remove dummy use of yystack, as there is now a guaranteed use.
14444 (yydoAction): Modify to allow incremental move of semantic values
14445 to rhs array when in GLR mode.
14446 (yyresolveAction): Ditto.
14447 (yyglrShiftDefer): Update comment.
0435d061 14448 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
14449 (yyglrReduce): Ditto.
14450 (yydoAction): Ditto
0435d061 14451
6029a57f
PH
14452 * tests/glr-regr1.at: Rename to ...
14453 * tests/glr-regression.at: Add new regression test for the problems
14454 described above (adapted from S. Eken).
14455 Update copyright notice.
14456 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
14457 * tests/Makefile.am: Ditto.
14458
6cee6297
PE
144592003-01-28 Paul Eggert <eggert@twinsun.com>
14460
14461 * data/lalr1.cc: Do not use @output_header_name@ unless
14462 b4_defines_flag is set. This fixes two bugs reported by
14463 Tim Van Holder in
161a71f3
PE
14464 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
14465 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 14466
b2a836b5
PE
144672003-01-21 Paul Eggert <eggert@twinsun.com>
14468
14469 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
14470 we don't need to worry about yyerrlab1 being reported as an
14471 "unused label" by non-GCC C compilers. The downside is that if
14472 locations are used then a couple of statements are duplicated each
14473 time YYERROR is invoked, but the upside is that the warnings
14474 should vanish.
14475 (yyerrlab1): Move code to YERROR.
14476 (yyerrlab2): Remove. Change uses back to yyerrlab1.
14477 This reverts some of the 2002-12-27 change.
14478
4196b931
PE
144792003-01-17 Paul Eggert <eggert@twinsun.com>
14480
14481 * src/output.c (symbol_printers_output): Fix typo that led
14482 to core dump. Problem reported by Antonio Rus in
161a71f3 14483 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 14484
3ae831b4
AD
144852003-01-13 Akim Demaille <akim@epita.fr>,
14486 Quoc Peyrot <chojin@lrde.epita.fr>,
14487 Robert Anisko <anisko_r@lrde.epita.fr>
14488
14489 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
14490 when the stacks contain one element, as the loop would otherwise
14491 free the last state, and then use the top state (the one we just
14492 popped). This means that the initial elements will not be freed
14493 explicitly, as is the case in yacc.c; it is not a problem, as
14494 these elements have fake values.
14495
e3aa65c5
PE
144962003-01-11 Paul Eggert <eggert@twinsun.com>
14497
14498 * NEWS: %expect-violations are now just warnings, reverting
14499 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
14500 bootstrapping problem reported by Matthias Klose; see
161a71f3 14501 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
14502 * src/conflicts.c (conflicts_print): Likewise.
14503 * tests/conflicts.at (%expect not enough, %expect too much,
14504 %expect with reduce conflicts): Likewise.
14505 * doc/bison.texinfo (Expect Decl): Document this. Also mention
14506 that the warning is enabled if the number of conflicts changes
14507 (not necessarily increases).
14508
14509 * src/getargs.c (version): Update copyright year.
14510
f0057011
AD
145112003-01-09 Akim Demaille <akim@epita.fr>
14512
14513 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
14514
1ee6d2a0
PE
145152003-01-08 Paul Eggert <eggert@twinsun.com>
14516
14517 * Makefile.maint (WGETFLAGS):
14518 New macro, containing "-C off" to disable proxy caches.
14519 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
14520 (rel-check): Use $(WGET) instead of wget.
14521
d4fd77c4
PE
145222003-01-06 Paul Eggert <eggert@twinsun.com>
14523
14524 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
14525 the GLR paper of Scott, Johnstone and Hussain.
14526
464c6927
PE
145272003-01-04 Paul Eggert <eggert@twinsun.com>
14528
d600ee67
PE
14529 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
14530 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
14531 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
14532 (EXTRA_LIBRARIES): New var, for liby.a.
14533 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
14534 (EXTRA_SCRIPTS): New var, for yacc.
14535
464c6927
PE
14536 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
14537 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
14538 Problem reported by Nelson H. F. Beebe.
14539
145402003-01-03 Paul Eggert <eggert@twinsun.com>
14541
14542 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
14543 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
14544 when compiling Bison 1.875's `bitset bset = obstack_alloc
14545 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
14546
14547 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
14548 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
14549 grow to a huge size with typical invocation.
d600ee67 14550
464c6927
PE
14551 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
14552 Use the pattern recommended by Autoconf 2.57, except also protect
14553 against double-definition.
14554 * src/system.h: Likewise.
14555 Portability issues reported by Nelson H. F. Beebe.
d600ee67 14556
464c6927
PE
14557 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
14558 All uses changed. Provide a definition in both C and C++.
14559 (yytrue, yyfalse): Define even if defined (__cplusplus).
14560
14561 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
14562 Reported by Nelson H. F. Beebe.
d600ee67 14563
464c6927
PE
14564 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
14565
0f42c7d5
PE
145662003-01-02 Paul Eggert <eggert@twinsun.com>
14567
14568 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
14569 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
14570 Bug reported by Nelson H. F. Beebe.
14571
dc546b0f
PE
145722003-01-01 Paul Eggert <eggert@twinsun.com>
14573
14574 * Version 1.875.
14575
2c09b6a7
PE
145762002-12-30 Paul Eggert <eggert@twinsun.com>
14577
14578 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
14579 Moved here from...
14580 (<INITIAL>","): Here. This causes stray "," to be treated
14581 more uniformly.
14582
dc546b0f 14583 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
14584 last brace in braced code when not in Yacc mode, for compatibility
14585 with Bison 1.35. This resurrects the 2001-12-15 patch to
14586 src/reader.c.
14587
14588 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
14589 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
14590
535c0f63
PE
145912002-12-28 Paul Eggert <eggert@twinsun.com>
14592
14593 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
14594 that of SYM's type. This fixes Debian bug 168069, reported by
14595 Thomas Olsson.
d600ee67 14596
963fcc17
PE
145972002-12-28 Paul Eggert <eggert@twinsun.com>
14598
14599 Version 1.75f.
14600
14601 Switch back to the Yacc style of conflict reports, undoing some
14602 of the 2002-07-30 change.
14603 * doc/bison.texinfo (Understanding): Use Yacc style for
14604 conflict reports. Also, use new way of locating rules.
14605 * src/conflicts.c (conflict_report):
14606 Renamed from conflict_report_yacc, removing the old
14607 'conflict_report'. Translate the entire conflict report at once,
14608 so that we don't assume that "," has the same interpretation in
14609 all languages.
14610 (conflicts_output): Use Yacc-style conflict report for each state,
14611 instead of our more-complicated style.
14612 (conflicts_print): Use Yacc-style conflict report, except print
14613 the input file name when not emulating Yacc.
14614 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
14615 Conflicted Reduction, %expect not enough, %expect too much,
14616 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
14617 * tests/existing.at (GNU Cim Grammar): Likewise.
14618 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
14619
14620 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
14621 fatal): Don't invoke fflush; it's not needed and it might even be
14622 harmful for stdout, as stdout might not be open.
14623 * src/reduce.c (reduce_print): Likewise.
14624
b1efe548
PE
146252002-12-27 Paul Eggert <eggert@twinsun.com>
14626
14627 Fix a bug where error locations were not being recorded correctly.
14628 This problem was originally reported by Paul Hilfinger in
161a71f3 14629 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
14630
14631 * data/yacc.c (yyparse): New local var yylerrsp, to record the
14632 top of the location stack's error locations.
14633 (yyerrlab): Set it. When discarding a token, push its location
14634 onto yylerrsp so that we don't lose track of the error's end.
14635 (yyerrlab1): Now is only the target of YYERROR, so that we can
14636 properly record the location of the action that failed. For GCC
14637 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
14638 GCC warning about yyerrlab1 being unused if YYERROR is unused.
14639 (yyerrlab2): New label, which yyerrlab now falls through to.
14640 Compute the error's location by applying YYLLOC_DEFAULT to
14641 the locations of all the symbols that went into the error.
14642 * doc/bison.texinfo (Location Default Action): Mention that
14643 YYLLOC_DEFAULT is also invoked for syntax errors.
14644 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14645 Error locations include the locations of all the tokens that were
14646 discarded, not just the last token.
d600ee67 14647
983c5c2c
PE
146482002-12-26 Paul Eggert <eggert@twinsun.com>
14649
b1efe548
PE
14650 * src/files.c: Include quote.h.
14651 (compute_output_file_names): Warn if we detect conflicting
14652 outputs to the same file. This should catch the misunderstanding
14653 exemplified by Debian Bug 165349, reported by Bruce Stephens..
14654
14655 * src/conflicts.c (conflicts_print): If the user specifies
14656 "%expect N", report an error if there are any reduce/reduce
14657 conflicts. This is what the manual says should happen.
14658 This fixes Debian bug 130890, reported by Anthony DeRobertis.
14659 * tests/conflicts.at (%expect with reduce conflicts): New test.
14660
983c5c2c
PE
14661 Don't use m4_include on relative file names, as it doesn't work as
14662 desired if there happens to be a file with that name under ".".
d600ee67 14663
983c5c2c
PE
14664 * m4sugar/version.m4: Remove; it was included but it wasn't used.
14665 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
14666 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
14667 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
14668 * src/output.c (output_skeleton): Use full path names when
14669 specifying a file to include; don't rely on include path, as
14670 it's unreliable when the working file contains a file with
14671 that name.
d600ee67 14672
983c5c2c
PE
146732002-12-25 Paul Eggert <eggert@twinsun.com>
14674
14675 Remove obsolete references to bison.simple and bison.hairy.
14676 Problem mentioned by Aubin Mahe in
161a71f3 14677 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
14678 * data/glr.c: Comment fix.
14679 * doc/bison.1: Remove references. Also, mention "yacc".
14680
14681 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
14682 with -g option.
14683
14684 * src/parse-gram.y (declaration): Use enum "report_states" rather
14685 than its numeric value 1.
14686
14687 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
14688 opening a new one. This fixes Debian bug 165349, reported by
14689 Bruce Stephens.
14690
23f2d9dc
PE
146912002-12-24 Paul Eggert <eggert@twinsun.com>
14692
14693 Version 1.75e.
14694
14695 * Makefile.maint (cvs-update): Don't assume that the shell
14696 supports $(...), as Solaris sh doesn't.
14697
14698 * src/parse-gram.y (lloc_default): Remove test for empty
14699 nonterminals at the end, since it didn't change the result.
14700
147012002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
14702
14703 If the user does not define YYSTYPE as a macro, Bison now declares it
14704 using typedef instead of defining it as a macro. POSIX requires this.
14705 For consistency, YYLTYPE is also declared instead of defined.
14706
14707 %union directives can now have a tag before the `{', e.g., the
14708 directive `%union foo {...}' now generates the C code
14709 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
14710 The default union tag is `YYSTYPE', for compatibility with Solaris 9
14711 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
14712 instead of `yyltype'.
14713
14714 `yystype' and `yyltype' are now obsolescent macros instead of being
14715 typedefs or tags; they are no longer documented and will be
14716 withdrawn in a future release.
14717
14718 * data/glr.c (b4_location_type): Remove.
14719 (YYSTYPE): Renamed from yystype.
14720 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
14721 (struct YYLTYPE): Renamed from struct yyltype.
14722 (YYLTYPE): Renamed from yyltype.
14723 (yyltype, yystype): New (and obsolescent) macros,
14724 for backward compatibility.
14725 * data/yacc.c: Likewise.
14726
14727 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
14728 does not specify a union tag. This is for compatibility with
14729 Solaris 9 yacc.
14730
14731 * src/parse-gram.y (add_param): 2nd arg is now char * not char
14732 const *, since it is now modified by stripping surrounding { }.
14733 (current_braced_code): Remove.
14734 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
14735 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
14736 trailing " {...}". Now of type <chars>.
14737 (grammar_declaration): Adjust to bundled tokens.
14738 (code_content): Remove; stripping is now done by add_param.
14739 (print_token_value): Print contents of bundled tokens.
14740 (token_name): New function.
14741
14742 * src/reader.h (braced_code, current_braced_code): Remove.
14743 (token_name): New decl.
14744
14745 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
14746 token_type, not braced_code code_kind. All uses changed.
14747 (SC_PRE_CODE): New state, for scanning after a keyword that
14748 has (or usually has) an immediately-following braced code.
14749 (token_type): New local var, to keep track of which token type
14750 to return when scanning braced code.
14751 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 14752 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
14753 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
14754 instead of returning a token type immediately.
14755 (<INITIAL>"{"): Set token type.
14756 (<SC_BRACED_CODE>"}"): Use it.
14757 (handle_action_dollar, handle_action_at): Now returns bool
14758 indicating success. Fail if ! current_rule; this prevents a core dump.
14759 (handle_symbol_code_dollar, handle_symbol_code_at):
14760 Remove; merge body into caller.
14761 (handle_dollar, handle_at): Complain in invalid contexts.
14762
14763 * NEWS, doc/bison.texinfo: Document the above.
14764 * NEWS: Fix years and program names in copyright notice.
14765
879ca4f8
PE
147662002-12-17 Paul Eggert <eggert@twinsun.com>
14767
14768 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
14769 Reporting, Table of Symbols): Omit mentions of %lex-param and
14770 %parse-param from the documentation for now.
14771
1c5fe69d
PE
147722002-12-15 Paul Eggert <eggert@twinsun.com>
14773
14774 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
14775 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
14776 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
14777 disagreed with the Bison documentation. Bug
14778 reported by Andrew Walrond.
d600ee67 14779
1c5fe69d
PE
14780 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
14781 as the caller now does that.
14782 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
14783 (YYEMPTY): Parenthesize right hand side, since others use it.
14784 (yyparse): Don't assume that our generated code is the only code
14785 that sets yychar.
14786
d1de5372
PE
147872002-12-13 Paul Eggert <eggert@twinsun.com>
14788
14789 Version 1.75d.
14790
14791 POSIX requires a "yacc" command.
14792 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
14793 (MOSTLYCLEANFILES): Add yacc.
14794 (yacc): New rule.
1c5fe69d 14795 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
14796 as an alias for bison y.
14797
14798 * po/LINGUAS: Add da.
d600ee67 14799
d1de5372
PE
14800 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
14801 problem with latest <getopt.h>.
14802 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
14803
14804 * doc/fdl.texi: Upgrade to 1.2.
14805 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
14806 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
14807 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
14808 gnulib.
14809 * config/install-sh: Sync with autotools.
14810
14811 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 14812 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
14813 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
14814 locations are requested.
14815 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
14816 locations are requested.
14817
d0f3fe23
PE
148182002-12-12 Paul Eggert <eggert@twinsun.com>
14819
14820 Remove unportable casts and storage allocation tricks.
14821 While we're at it, remove almost all casts, since they
14822 usually aren't needed and are a sign of trouble.
14823
14824 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
14825
14826 * src/derives.c (derives_compute): Do not subtract NTOKENS from
14827 the pointer DSET returned by malloc; this isn't portable.
14828 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
14829 Similarly for DERIVES.
14830 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
14831 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
14832 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
14833
14834 * src/derives.c (derives_compute): Do not bother invoking
14835 int_of_rule_number, since rule numbers are integers.
14836
14837 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
14838 rather than XMALLOC (char, N).
14839
14840 * src/files.c (filename_split): Rewrite to avoid cast.
14841
14842 * src/gram.h (symbol_number_as_item_number,
14843 item_number_as_symbol_number, rule_number_as_item_number,
14844 item_number_as_rule_number):
14845 Now inline functions rather than macros, to avoid casts.
14846 * src/state.h (state_number_as_int): Likewise.
14847 * src/tables.c (state_number_to_vector_number,
14848 symbol_number_to_vector_number): Likewise.
14849
14850 * src/gram.h (int_of_rule_number): Remove; no longer used.
14851
14852 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
14853 since the resulting storage is always stored into.
14854
14855 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
14856 where it's needed.
14857
14858 * src/muscle_tab.c (muscle_m4_output):
14859 Now inline. Return bool, not int.
14860 * src/state.c (state_compare): Likewise.
14861 * src/symtab.c (symbol_check_defined,
14862 symbol_check_alias_consistency, symbol_pack, symbol_translation,
14863 hash_compare_symbol, hash_symbol):
14864 Likewise.
14865 * src/uniqstr.c (uniqstr_print): Likewise.
14866 * src/muscle_tab.c (muscle_m4_output_processor):
14867 New function, to avoid casts.
14868 * src/state.c (state_comparator, stage_hasher): Likewise.
14869 * src/symtab.c (symbol_check_defined_processor,
14870 symbol_check_alias_consistency_processor, symbol_pack_processor,
14871 symbol_translation_processor, hash_symbol_comparator,
14872 hash_symbol_hasher): Likewise.
14873 * src/uniqstr.c (uniqstr_print_processor): Likewise.
14874 * src/muscle_tab.c (muscles_m4_output):
14875 Use new functions instead of casting old functions unportably.
14876 * src/state.c (state_hash_new): Likewise.
14877 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
14878 symbols_token_translations_init):
14879 Likewise.
14880 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
14881
14882 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
14883 var instead of casting to long, to avoid casts.
14884 (prepare_states): Use MALLOC rather than alloca, so that we don't
14885 have to worry about alloca.
14886 * src/state.c (state_hash_lookup): Likewise.
14887
14888 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
14889 local var instead of casting to unsigned char, to avoid casts.
14890
14891 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
14892 STATE_ALLOC): Remove.
14893 (transitions_new, errs_new, reductions_new, state_new): Use malloc
14894 rather than calloc, and use offsetof to avoid allocating slightly
14895 too much storage.
14896 (state_new): Initialize all members.
14897
14898 * src/state.c (state_hash): Use unsigned accumulator, not signed.
14899
14900 * src/symtab.c (symbol_free): Remove; unused.
14901 (symbol_get): Remove cast in lhs of assignment.
14902 (symbols_do): Now static. Accept generic arguments, not
14903 hashing-related ones.
14904
14905 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
14906 (symbol_processor): Remove.
14907 (symbols_do): Remove decl; now static.
14908
14909 * src/system.h (alloca): Remove; decl no longer needed.
14910 (<stddef.h>): Include, for offsetof.
14911 (<inttypes.>, <stdint.h>): Include if available.
14912 (uintptr_t): New type, if system lacks it.
14913 (CALLOC, MALLOC, REALLOC): New macros.
14914 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
14915 new macros.
14916
14917 * src/tables.c (table_size): Now int, to pacify GCC.
14918 (table_grow, table_ninf_remap): Use signed table size.
14919 (save_row): Don't bother initializing locals when not needed.
14920 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
14921 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
14922
14923 * src/vcg.h: Correct misspellings.
14924
14925 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
14926
14927
14928 * src/getargs.c (getargs): Don't assume EOF == -1.
14929
26b4a969
PE
149302002-12-09 Paul Eggert <eggert@twinsun.com>
14931
14932 Change identifier spellings to avoid collisions with names
14933 that are reserved by POSIX.
14934
14935 Don't use names ending in _t, since POSIX reserves them.
14936 For consistency, remove _e and _s endings -- they're weren't
14937 needed to remove ambiguity. All uses changed.
14938 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14939 turn was just renamed from struniq_t.
14940 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14941 which in turn was just renamed from struniq_processor_t.
14942 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14943 in turn was renamed from hash_compare_struniq_t.
14944 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14945 (state_list): Renamed from state_list_t.
14946 * src/assoc.h (assoc): Renamed from assoc_t.
14947 * src/conflicts.c (enum conflict_resolution): Renamed from
14948 enum conflict_resolution_e.
14949 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14950 (rule_list): Renamed from rule_list_t.
14951 * src/getargs.h (enum trace): Renamed from enum trace_e.
14952 (enum report): Renamed from enum report_e.
14953 * src/gram.h (item_number): Renamed from item_number_t.
14954 (rule_number): Renamed from rule_number_t.
14955 (struct rule_s): Remove the "rule_s" part; not used.
14956 (rule): Renamed from rule_t.
14957 (rule_filter): Renamed from rule_filter_t.
14958 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14959 (goto_list): Renamed from goto_list_t.
14960 * src/lalr.h (goto_number): Renamed from goto_number_t.
14961 * src/location.h (location): Renamed from location_t.
14962 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14963 and moved here from:
14964 * src/muscle_tab.h (muscle_entry_t): here.
14965 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14966 (rule_list): Renamed from rule_list_t.
14967 * src/print_graph.c (static_graph): Renamed from graph.
14968 * src/reader.h (braced_code): Renamed from braced_code_t.
14969 Remove brace_code_e tag.
14970 * src/relation.h (relation_node): Renamed from relation_node_t.
14971 (relation_nodes): Renamed from relation_nodes_t.
14972 (relation): Renamed from relation_t.
14973 * src/state.h (state_number): Renamed from state_number_t.
14974 (struct state): Renamed from struct state_s.
14975 (state): Renamed from state_t.
14976 (transitions): Renamed from transitions_t. Unused (and
14977 misspelled) transtion_s tag removed.
14978 (errs): Renamed from errs_t. Unused errs_s tag removed.
14979 (reductions): Renamed from reductions_t. Unused tag
14980 reductions_s removed.
14981 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14982 (struct symbol_list): Renamed from struct symbol_list_s.
14983 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14984 (struct symbol): Renamed from struct symbol_s.
14985 (symbol): Renamed from symbol_t.
14986 * src/tables.c (vector_number): Renamed from vector_number_t.
14987 (action_number): Renamed from action_t.
14988 * src/tables.h (base_number): Renamed from base_t.
14989 * src/vcg.h (enum color): Renamed from enum color_e.
14990 (enum textmode): Renamed from enum textmode_e.
14991 (enum shape): Renamed from enum shape_e.
14992 (struct colorentry): Renamed from struct colorentry_s.
14993 (struct classname): Renamed from struct classname_s.
14994 (struct infoname): Renamed from struct infoname_s.
14995 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14996 (enum decision): Renamed from enum decision_e.
14997 (enum orientation): Renamed from enum orientation_e.
14998 (enum alignment): Renamed from enum alignment_e.
14999 (enum arrow_mode): Renamed from enum arrow_mode_e.
15000 (enum crossing_type): Renamed from enum crossing_type_e.
15001 (enum view): Renamed from enum view_e.
15002 (struct node): Renamed from struct node_s.
15003 (node): Renamed from node_t.
15004 (enum linestyle): Renamed from enum linestyle_e.
15005 (enum arrowstyle): Renamed from enum arrowstyle_e.
15006 (struct edge): Renamed from struct edge.
15007 (edge): Renamed from edge_t.
15008 (struct graph): Renamed from struct graph_s.
15009 (graph): Renamed from graph_t.
15010 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
15011 Rename value_t -> value.
15012 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
15013 value_t_as_yystype -> value_as_yystype.
15014
15015 Don't include <errno.h> in the mainstream code, since it
15016 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
15017 * lib/get-errno.c, lib/get-errno.h: New files.
15018 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
15019 get-errno.c.
15020 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
15021 * src/output.c (output_skeleton): Likewise.
15022 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
15023 instead of errno.
15024 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
15025 Likewise.
15026 (handle_action_dollar, handle_action_at): Likewise.
15027 * src/system.h: Do not include <errno.h>.
15028 (TAB_EXT): Renamed from EXT_TAB.
15029 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
15030
15031 Avoid str[a-z]*, since <string.h> reserves that name space.
15032 Change all instances of "struniq" in names to "uniqstr", and
15033 likewise for "STRUNIQ" and "UNIQSTR".
15034 * src/uniqstr.c: Renamed from src/struniq.c.
15035 * src/uniqstr.h: Renamed from src/struniq.h.
15036 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
15037 * src/files.c (strsuffix): Remove; unused.
15038 (concat2): Renamed from stringappend. Now static.
15039 * src/files.h (strsuffix, stringappend): Remove; unused.
15040 * src/parse-gram.y (<chars>): Renamed from <string>.
15041 (<uniqstr>): Renamed from <struniq>.
15042 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
15043 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
15044 (struct graph_s.expand): Renamed from struct graph_s.stretch.
15045 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
15046 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
15047 (N_EXPAND): Renamed from N_STRETCH.
15048
15049 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
15050 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
15051 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
15052 Remove; unused.
15053 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
15054 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
15055 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
15056 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
15057 (BASE_MAXIMUM): Renamed from BASE_MAX.
15058 (BASE_MINIMUM): Renamed from BASE_MIN.
15059 (ACTION_MAX): Remove; unused.
15060 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
15061 Unnecessary casts removed from above defines.
15062
15063
15064 Fix misspelling in names.
15065 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
15066 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
15067 G_NODE_ALIGNEMENT.
15068
15069
15070 * lib/timevar.c (timevar_report): Renamed from time_report,
15071 for consistency with other names.
15072 * lib/timevar.h (timevar_report): New decl.
15073 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
15074
15075
15076 Sort include-file uses.
15077
15078 Reorder all include files under src to be in the order "system.h".
15079 then the ../lib include files in angle brackets (alphabetized),
15080 then the . include files in double-quotes (alphabetized). Fix
15081 dependency breakages encountered in this process, as follows:
15082 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
15083 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
15084 * src/state.h: Include "symtab.h".
15085
996b1c7e
PE
150862002-12-08 Paul Eggert <eggert@twinsun.com>
15087
15088 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
15089 since this causes problems when __file__ contains character
15090 sequences like "@" that are treated specially by src/scan-skel.l.
15091 Instead, just use the file's basename. This fixes the bug
15092 reported by Martin Mokrejs in
161a71f3 15093 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 15094
e19c4e5d
PE
150952002-12-06 Paul Eggert <eggert@twinsun.com>
15096
15097 Add support for rules that do not have trailing semicolons, as
15098 POSIX requires. Improve the quality of locations in Bison
15099 diagnostics.
26b4a969 15100
e19c4e5d
PE
15101 * src/location.c: Include <quotearg.h>.
15102 (empty_location): Now const.
15103 (location_print): New function. Follow the recommendation of the
15104 GNU Coding Standards for locations that span file boundaries.
15105 * src/location.h: Do not include <quotearg.h>; no longer needed.
15106 (boundary): New type.
15107 (location_t): Use it. This allows locations to span file boundaries.
15108 All member uses changed: file -> start.file or end.file (as needed),
15109 first_line -> start.line, first_column -> start.column,
15110 last_line -> end.line, last_column -> end.column.
15111 (equal_boundaries): New function.
15112 (LOCATION_RESET, LOCATION_STEP): Remove.
15113 (LOCATION_PRINT): Remove. All callers changed to use location_print.
15114 (empty_location): Now const.
15115 (location_print): New decl.
15116 * src/parse-gram.y (lloc_default): New function, which handles
15117 empty locations more accurately.
15118 (YYLLOC_DEFAULT): Use it.
15119 (%token COLON): Remove.
15120 (%token ID_COLON): New token.
26b4a969 15121 (rules): Use it.
e19c4e5d
PE
15122 (declarations, rules): Remove trailing semicolon.
15123 (declaration, rules_or_grammar_declaration):
15124 Allow empty (";") declaration.
15125 (symbol_def): Remove empty actions; no longer needed.
15126 (rules_or_grammar_declaration): Remove trailing semicolon.
15127 (semi_colon.opt): Remove.
15128 * src/reader.h: Include location.h.
15129 (scanner_cursor): New decl.
15130 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
15131 rolling our own.
15132 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
15133 of *loc.
15134 (STEP): Remove. No longer needed, now that adjust_location does
15135 the work. All uses removed.
15136 (scanner_cursor): New var.
15137 (adjust_location): Renamed from extend_location. It now sets
15138 *loc and adjusts the scanner cursor. All uses changed.
15139 Don't bother testing for CR.
15140 (handle_syncline): Remove location arg; now updates scanner cursor.
15141 All callers changed.
15142 (unexpected_end_of_file): Now accepts start boundary of token or
15143 comment, not location. All callers changed. Update scanner cursor,
15144 not the location.
15145 (SC_AFTER_IDENTIFIER): New state.
15146 (context_state): Renamed from c_context. All uses changed.
15147 (id_loc, code_start, token_start): New local vars.
15148 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
15149 processing of Yacc white space and equivalents here.
15150 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
15151 instead of returning ID immediately, since we need to search for
15152 a subsequent colon.
15153 (<INITIAL>"'", "\""): Save token_start.
15154 (<INITIAL>"%{", "{", "%%"): Save code_start.
15155 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
15156 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
15157 BEGIN context_state at end, not INITIAL.
15158 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
15159 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
15160 Return correct token start.
15161 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
15162 the start of a character, string or multiline comment is found.
15163 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
15164 Reduction): Adjust reported locations to match the more-precise
15165 results now expected.
15166 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
15167 * tests/reduce.at (Useless Rules, Reduced Automaton,
15168 Underivable Rules): Likewise.
15169 * tests/regression.at (Invalid inputs): No longer `expecting ";"
15170 or "|"' now that so many other tokens are allowed by the new grammar.
15171
15172 * src/complain.h (current_file): Remove duplicate decl;
15173 current_file is now owned by files.h.
15174 * src/complain.c, src/scan-gram.l: Include files.h.
15175
151762002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 15177
e19c4e5d
PE
15178 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
15179 promotes to int; it might be unsigned int.
15180 * data/yacc.c (yy_reduce_print): Likewise.
15181
15182 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
15183 be #defined in the prologue, not in the Bison declarations.
15184 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 15185
b64755e3
PE
151862002-12-02 Paul Eggert <eggert@twinsun.com>
15187
15188 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
15189 * lib/strtoul.c: New file, from gnulib.
15190 This fixes a porting bug reported by Peter Klein in
161a71f3 15191 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 15192
6e746484
PE
151932002-11-30 Paul Eggert <eggert@twinsun.com>
15194
b64755e3
PE
15195 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
15196 and put only a forward declaration in the prologue. This is for
15197 consistency with the other scanner helper functions.
15198
6ba55592
PE
15199 Type clashes now generate warnings, not errors, since it
15200 appears that POSIX may allow some grammars with type clashes.
15201 * src/reader.c (grammar_current_rule_check): Warn about
15202 type clashes instead of complaining.
15203 * tests/input.at (Type Clashes): Expect warnings, not complaints.
15204
6e746484
PE
15205 Add Yacc library, since POSIX requires it.
15206 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
15207 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
15208 * lib/main.c, lib/yyerror.c: New files.
15209
15210 gram_error can be static; it need not be extern.
15211 * src/reader.h (gram_error): Remove decl.
15212 * src/parse-gram.y (gram_error): Now static. Add static decl.
15213 (print_token_value): Omit parameter names from forward decl,
15214 for consistency.
15215
88510f9c
PE
152162002-11-29 Paul Eggert <eggert@twinsun.com>
15217
6e746484
PE
15218 * doc/bison.texinfo: Emphasize that yylex and yyerror must
15219 be declared before being used. E.g., one should typically
15220 declare them in the prologue. Use GNU coding style in examples.
15221 Put "const" consistently after the type it modifies. Mention
15222 that C99 supports "inline". Mention that yyerror traditionally
15223 returns "int".
15224
88510f9c
PE
15225 %parse-param and %lex-param now take just one argument, the
15226 declaration; the argument name is deduced from the declaration.
15227
15228 * doc/bison.texinfo (Parser Function, Pure Calling, Error
15229 Reporting, Table of Symbols): Document this.
15230 * src/parse-gram.y (add_param): New function.
15231 (COMMA): Remove.
15232 (declaration): Implement new rule for %parse-param and %lex-param.
15233 * src/scan-gram.l: "," now elicits a warning, rather than being
15234 a token; this is more compatible with byacc.
15235 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
15236
bb92250c
PE
152372002-11-27 Paul Eggert <eggert@twinsun.com>
15238
15239 Rename identifiers to avoid real and potential collisions.
15240
15241 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
15242 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 15243 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
15244 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
15245 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
15246 * src/parse-gram.y (print_token_value): Renamed from yyprint.
15247 All uses changed.
15248 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
15249 The name "yycontrol" violates the name space rules, and this stuff
15250 wasn't being used anyway.
15251 (input): Remove action; this stuff wasn't being used.
15252 (gram_error): Rename local variable yylloc -> loc.
15253 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
15254 (YY_DECL): Don't use "yy" at start of local variables.
15255 All uses changed, e.g., yylloc -> loc.
15256 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
15257 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
15258 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
15259 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
15260
15261 * src/parse-gram.y (gram_error): loc is now const *.
15262 * src/reader.h (gram_error): Likewise.
15263
3af4feb2
PE
152642002-11-24 Paul Eggert <eggert@twinsun.com>
15265
15266 Version 1.75c.
15267
15268 * tests/actions.at (Actions after errors): Use an output format
15269 more similar to that of the Printers and Destructors test.
15270 Test the position of the ';' token too.
15271 (Printers and Destructors): Likewise.
15272 (Printers and Destructors: %glr-parser): Remove for now, to avoid
15273 unnecessarily alarming people when the test fails.
15274
15275 * data/yacc.c (yyerrlab1): Move this label down, so that the
15276 parser does not discard the lookahead token if the user code
15277 invokes YYERROR. This change is required for POSIX conformance.
15278
15279 * lib/error.c: Sync with gnulib.
15280
152812002-11-22 Paul Eggert <eggert@twinsun.com>
15282
15283 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
15284 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
15285 * lib/xmalloc.c: Likewise.
26b4a969 15286
58004308
PE
152872002-11-20 Paul Eggert <eggert@twinsun.com>
15288
15289 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
15290
152912002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 15292
58004308
PE
15293 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
15294 should use `if (! x) abort ();' rather than `assert (x);', and
15295 anyway it's one less thing to worry about configuring.
15296
15297 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
15298 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
15299 and replace all instances of assert with abort.
15300 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
15301 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
15302
15303 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
15304 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
15305 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
15306 hash_find_entry, hash_rehash, hash_insert): Likewise.
15307 * src/conflicts.c (resolve_sr_conflict): Likewise.
15308 * src/lalr.c (set_goto_map, map_goto): Likewise.
15309 * src/nullable.c (nullable_compute): Likewise.
15310 * src/output.c (prepare_rules, token_definitions_output): Likewise.
15311 * src/reader.c (packgram, reader): Likewise.
15312 * src/state.c (state_new, state_free, state_transitions_set,
15313 state_reduction_find): Likewise.
15314 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
15315 symbol_pack): Likewise.
15316 * src/tables.c (conflict_row, pack_vector): Likewise.
15317 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
15318 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
15319 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
15320 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
15321
15322 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
15323 (ARGMATCH_CONSTRAINT): New macro.
15324 (ARGMATCH_ASSERT): Use it.
15325
15326 * src/system.h (verify): New macro.
15327 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
15328 rather than assert.
15329 * src/tables.c (tables_generate): Likewise.
15330
15331 * src/struniq.c (struniq_assert): Now returns void, and aborts
15332 if the assertion is false.
15333 (struniq_assert_p): Remove.
15334 * src/struniq.h: Likewise.
15335
76ae8198
PE
153362002-11-18 Paul Eggert <eggert@twinsun.com>
15337
15338 * data/glr.c (yygetLRActions): Replace `yyindex' with
15339 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
15340 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 15341 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 15342
d3c4e709
AD
153432002-11-18 Akim Demaille <akim@epita.fr>
15344
15345 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
15346 space.
15347 From Tim Van Holder.
15348
8d8a7238
PE
153492002-11-17 Paul Eggert <eggert@twinsun.com>
15350
15351 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
15352 to "SyntaxError" for consistency with my 2002-11-15 change.
15353
15354 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
15355 not define to {}, since this breaks the common use of `YYDPRINTF
15356 ((...));' if a single statement is desired (e.g. before `else').
15357 Work around GCC warnings by surrounding corresponding calls with
15358 {} if needed.
15359 (yyhasResolvedValue): Remove unused function.
15360 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
15361 loop body.
15362 (yyreportSyntaxError): Renamed from yyreportParseError.
15363 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
15364 All uses changed.
15365 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
15366 extern when possible. Remove unused initializations.
15367
b0937b22
AD
153682002-11-16 Akim Demaille <akim@epita.fr>
15369
15370 Augment the similarity between GLR and LALR traces.
15371
15372 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
15373 (YY_REDUCE_PRINT): New.
15374 (yyparse): Use them.
15375 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
15376 YYDPRINT here.
15377 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
15378 state reached after the reduction/recovery, since...
15379 (yyparse, yyprocessOneStack): Report the state we are entering in.
15380
c5e3e510
AD
153812002-11-16 Akim Demaille <akim@epita.fr>
15382
15383 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
15384 Add support for --trace=skeleton.
15385 * src/scan-skel.l: %option debug.
15386 Scan strings of non-@ or \n instead of character by character.
15387 (scan_skel): Handle trace_skeleton.
15388 (QPUTS): New.
15389 (@output_parser_name@, @output_header_name@): ``Restore'' their
15390 support (used to be M4 macros).
15391 * data/yacc.c: Quote larger chunks, a la glr.c.
15392 * data/lalr1.cc: Likewise.
15393 The header guards are no longer available, so use some other
15394 string than `YYLSP_NEEDED'.
15395
4c6cc1db
AD
153962002-11-16 Akim Demaille <akim@epita.fr>
15397
15398 Make the ``Printers and Destructors'' test more verbose, taking
15399 `yacc.c''s behavior as (possibly wrong) reference.
15400
15401 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
15402 instead of fprint on stdout.
15403 Set and report the last_line of the symbols.
15404 Consistently display values and locations.
15405
6d9e8019
PE
154062002-11-16 Paul Eggert <eggert@twinsun.com>
15407
15408 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
15409
6e649e65
PE
154102002-11-15 Paul Eggert <eggert@twinsun.com>
15411
b25d88f6
PE
15412 * tests/actions.at (Actions after errors): New test case.
15413
6e649e65
PE
15414 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
15415 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
15416 tests/action.at, tests/calc.at, tests/conflicts.at,
15417 tests/cxx-type.at, tests/regression.at:
15418 "parse error" -> "syntax error" for POSIX compatibility.
15419 "parsing stack overflow..." -> "parser stack overflow" so
15420 that code matches Bison documentation.
15421
0f39aab9
AD
154222002-11-15 Akim Demaille <akim@epita.fr>
15423
15424 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
15425 take two BRACED_CODE, not two string_content.
15426 Free the scanner's obstack when we are done.
15427 (code_content): New.
15428 * tests/calc.at: Adjust.
15429 * doc/bison.texinfo: Adjust.
15430 Also, make sure to include the `,' for these declarations.
15431
761c1926
AD
154322002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
15433
15434 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
15435 definition; avoids potential autoreconf problems.
15436
b0f98b10
AD
154372002-11-15 Akim Demaille <akim@epita.fr>
15438
15439 Always check the value returned by yyparse.
15440
15441 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
15442 returned by yyparse.
15443 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
15444 Adjust calls.
15445 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
15446 returned by yyparse.
15447
970785f1
PH
154482002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15449
15450 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
15451 on input.at test.
15452
8fcc7db1
PE
154532002-11-14 Paul Eggert <eggert@twinsun.com>
15454
7ec1b48e
PE
15455 * src/output.c (output_skeleton): Call xfopen instead of
15456 duplicating xfopen's body.
15457
cfff7583 15458 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 15459 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 15460
8fcc7db1
PE
15461 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
15462 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
15463 Group compiler. Instead, use "$CC -E bar.c". Include the .h
15464 file twice in the grammar, as an extra check.
15465
15466 * tests/input.at (Torturing the Scanner): Surround the
15467 backslash-newline tests with "#if 0", to make it less likely that
15468 we'll run into compiler bugs. Bring back solitary \ inside
15469 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 15470 test backslash-newline in C character constant.
8fcc7db1 15471
4e8d992c
AD
154722002-11-14 Akim Demaille <akim@epita.fr>
15473
15474 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
15475 status of the compiler.
f32b346d 15476 Calling `exit 1' is no longer needed.
4e8d992c
AD
15477 Reported by Nelson H. F. Beebe.
15478
9501dc6e
AD
154792002-11-14 Akim Demaille <akim@epita.fr>
15480
15481 * tests/atlocal.in (CPPFLAGS): We have config.h.
15482 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
15483 New.
15484 * tests/actions.at, tests/calc.at, tests/conflicts.at,
15485 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
15486 * tests/regression.at, tests/torture.at: Use them for all the
15487 grammars that are to be compiled.
15488 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
15489 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
15490 * doc/bison.texinfo (GLR Parsers): Document `inline'.
15491
18b519c0
AD
154922002-11-14 Akim Demaille <akim@epita.fr>
15493
15494 * doc/bison.texinfo: Various formatting changes (alignments in
15495 samples, additional @group/@end group, GCS in samples.
15496 Use @deffn instead of simple @table to define the directives,
15497 macros, variables etc.
15498
9a86cdb9
PE
154992002-11-13 Paul Eggert <eggert@twinsun.com>
15500
daa33def 15501 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 15502 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 15503
daa33def 15504 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 15505 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
15506 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
15507 * tests/headers.at (export YYLTYPE): Likewise.
15508
15509 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 15510 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 15511
9a86cdb9
PE
15512 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
15513 comments, since they're not portable. Use GNU coding style.
15514
9c1e26bd
AD
155152002-11-13 Akim Demaille <akim@epita.fr>
15516
15517 * data/yacc.c: Leave bigger chunks of quoted text.
15518 (YYDSYMPRINTF): New.
15519 Use it to report symbol activities.
15520 * data/glr.c (YYDSYMPRINTF): New.
15521 Use it.
15522
87f721cc
PE
155232002-11-12 Paul Eggert <eggert@twinsun.com>
15524
15525 Version 1.75b.
15526
15527 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
15528 (yyglrReduce): Return yyok, not 0.
15529 This should avoid the enumerated-type warnings reported
464c6927 15530 by Nelson H. F. Beebe in
161a71f3 15531 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
15532
15533 * lib/bbitset.h (BITSET_INLINE): Remove.
15534 * lib/bitset.h [! BITSET_INLINE]: Remove.
15535 (bitset_set, bitset_reset, bitset_test): Rename local vars
15536 to avoid shadowing warnings by GCC.
15537
15538 * data/glr.c (inline): Remove #define. It's the user's
15539 responsibility to #define it away, just like 'const'.
464c6927 15540 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 15541 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 15542
87f721cc
PE
15543 * Makefile.maint (po-check): Scan .l and .y files instead of the
15544 .c and the .h files that they generate. This fixes the bug
15545 reported by Tim Van Holder in:
161a71f3 15546 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
15547 Look for N_ as well as for _. Try to avoid matching #define for
15548 N_ and _.
15549 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
15550 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
15551 * src/scan-gram.l: Revamp regular expressions so that " and '
15552 do not confuse xgettext.
15553
15554 * src/struniq.h (struniq_new): Do not declare the return type
15555 to be 'const'; this violates the C standard.
15556 * src/struniq.c (struniq_new): Likewise.
15557
be14ade5
AD
155582002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
15559
15560 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
15561 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
15562 linker.
15563
05291fbc
AD
155642002-11-12 Akim Demaille <akim@epita.fr>
15565
15566 * Makefile.maint: Sync with Autoconf:
15567 (local_updates): New.
15568
1f5fd52e
AD
155692002-11-12 Akim Demaille <akim@epita.fr>
15570
15571 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
15572
283f1e64
AD
155732002-11-12 Akim Demaille <akim@epita.fr>
15574
15575 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
15576 locations.
15577
886b69d1
AD
155782002-11-12 Akim Demaille <akim@epita.fr>
15579
15580 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
15581 not yyvalue.
15582
3df37415
AD
155832002-11-12 Akim Demaille <akim@epita.fr>
15584
15585 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
15586 Use it to test the GLR parser.
15587
7bd6c77e
AD
155882002-11-12 Akim Demaille <akim@epita.fr>
15589
15590 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
15591 defines it.
15592 * data/glr.c (yystos): New.
15593 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
15594 (YYDSYMPRINT): New.
15595 (yyval): Don't define it, it is handled via M4.
15596 (yyrecoverParseError): Free verbosely the discarded symbols.
15597 * data/yacc.c (yysymprint): Remove, rather...
15598 (b4_yysymprint_generate): invoke.
15599 * data/c.m4 (b4_yysymprint_generate): New.
15600 Accept pointers as arguments, as opposed to the version from
15601 yacc.c.
15602 (b4_yydestruct_generate): Likewise.
15603 * tests/cations.at (Printers and Destructors): Use Bison directives
15604 instead of CPP macros.
15605 Don't rely on internal details.
15606
b0400cc6
AD
156072002-11-12 Akim Demaille <akim@epita.fr>
15608
15609 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
15610 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
15611 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
15612 it against YYEMPTY and so forth), work on yytoken (i.e., set
15613 it to YYEMPTY etc.).
15614 (yydestruct): Replace with a b4_yydestruct_generate invocation.
15615 (b4_symbol_actions): Remove.
15616 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
15617 for 0, end-of-input.
15618
72f889cc
AD
156192002-11-12 Akim Demaille <akim@epita.fr>
15620
15621 * doc/bison.texinfo (Destructor Decl): New.
15622
b1ae9233
AD
156232002-11-12 Akim Demaille <akim@epita.fr>
15624
15625 * src/tables.c (tables_generate): Use free for pointers that
15626 cannot be NULL, not XFREE.
15627 (pack_vector): Use assert, not fatal, for bound violations.
15628 * src/state.c (state_new): Likewise.
15629 * src/reader.c (reader): Likewise.
15630 * src/lalr.c (set_goto_map): Likewise.
72f889cc 15631 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
15632 the file name.
15633
7ec2d4cd
AD
156342002-11-12 Akim Demaille <akim@epita.fr>
15635
15636 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
15637 Restore.
15638 * src/scan-gram.l (last_string): Is global to the file, not to
15639 yylex.
15640 * src/parse-gram.y (input): Don't append the epilogue here,
15641 (epilogue.opt): do it here, and free the scanner's obstack.
15642 * src/reader.c (epilogue_set): Rename as...
15643 (epilogue_augment): this.
15644 * data/c.m4 (b4_epilogue): Defaults to empty.
15645
573a6cd3
AD
156462002-11-12 Akim Demaille <akim@epita.fr>
15647
15648 * src/getargs.c (long_options): Remove duplicates.
15649 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
15650 Remove.
15651 * doc/bison.rnh: Remove.
15652 * doc/bison.texinfo (VMS Invocation): Remove.
15653
95612cfa
AD
156542002-11-12 Akim Demaille <akim@epita.fr>
15655
15656 * src/struniq.h, src/struniq.c (struniq_t): Is const.
15657 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
15658
15659 Use struniq for symbols.
15660
15661 * src/symtab.h (symbol_t): The tag member is a struniq.
15662 (symbol_type_set): Adjust.
15663 * src/symtab.c (symbol_new): Takes a struniq.
15664 (symbol_free): Don't free the tag member.
15665 (hash_compare_symbol_t, hash_symbol_t): Rename as...
15666 (hash_compare_symbol, hash_symbol): these.
15667 Use the fact that tags as struniqs.
15668 (symbol_get): Use struniq_new.
15669 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
15670 Returns a strniq.
15671 * src/reader.h (merger_list, grammar_currentmerge_set): The name
15672 and type members are struniqs.
15673 * src/reader.c (get_merge_function)
15674 (grammar_current_rule_merge_set): Adjust.
15675 (TYPE, current_type): Are struniq.
15676
15677 Use struniq for file names.
15678
15679 * src/files.h, src/files.c (infile): Split into...
15680 (grammar_file, current_file): these.
15681 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
15682 * src/reduce.c (reduce_print): Likewise.
15683 * src/getargs.c (getargs): Likewise.
15684 * src/complain.h, src/complain.c: Likewise.
15685 * src/main.c (main): Call struniqs_new early enough to use it for
15686 file names.
15687 Don't free the input file name.
15688
3e6656f9
AD
156892002-11-12 Akim Demaille <akim@epita.fr>
15690
15691 * src/symtab.c (symbol_free): Remove dead deactivated code:
15692 type_name are properly removed.
15693 Don't use XFREE to free items that cannot be NULL.
15694 * src/struniq.h, src/struniq.c: New.
15695 * src/main.c (main): Initialize/free struniqs.
15696 * src/parse-gram.y (%union): Add astruniq member.
15697 (yyprint): Adjust.
15698 * src/scan-gram.l (<{tag}>): Return a struniq.
15699 Free the obstack bit that used to store it.
15700 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
15701
7672019c
PE
157022002-11-11 Paul Eggert <eggert@twinsun.com>
15703
15704 Revamp to fix many (but not all) of the C- and M4-related quoting
15705 problems. Among other things, this fixes the Bison bug reported
15706 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 15707 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
15708
15709 Use new @ escapes consistently. Represent brackets with @{ and @}
15710 rather than @<:@ and @:>@, since this works a bit better with dumb
15711 editors like vi. Represent @ with @@, since @ is now consistently
15712 an escape. Use @oline@ and @ofile@ rather than __oline__ and
15713 __ofile__, to avoid unexpected expansions. Similarly, use @output
15714 rather than #output.
15715
15716 * data/c.m4 (b4_copyright): Omit file name from comment, since
15717 the file name could contain "*/".
15718 (b4_synclines_flag): Don't quote the 2nd argument; it should already
15719 be quoted. All uses changed.
15720
15721 * data/glr.c: Use new @ escapes consistently.
15722 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
15723 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
15724 Remove, since they couldn't handle arbitrary characters in file
15725 names.
15726 * data/lalr1.cc: Likewise.
15727 * data/yacc.c: Likewise.
15728
15729 * src/files.c (output_infix): Remove; all uses removed.
15730 * src/files.h: Likewise.
15731
15732 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
15733 mishandled funny characters in file names, and anyway it isn't
15734 needed any more.
15735 * data/yacc.c: Likewise.
15736 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
15737
15738 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
15739 * data/yacc.c: Likewise.
15740
15741 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
15742 strings now.
15743 (muscle_init): Quote filename as a C string.
15744 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
15745 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
15746 * src/output.c (escaped_file_name_output): New function.
15747 (prepare_symbols): Quote tokens for M4.
15748 (prepare): Don't insert output_infix, output_prefix,
15749 output_parser_name, output_header_name; this is now down by scan-skel.
15750 Insert skeleton as a C string.
15751
15752 * src/output.c (user_actions_output, symbol_destructors_output,
15753 symbol_printers_output): Quote filenames for C and M4.
15754 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15755
15756 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
15757 escapes other than \\ and \'; this simplifies the code.
15758 (<SC_STRING>): Likewise, for \\ and \".
15759 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
15760 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
15761 Use new escapes @{ and @} for [ and ].
15762
15763 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
15764 them with auto vars.
15765 Switch to new escape scheme, where @ is the escape character uniformly.
15766 Abort if a stray escape character is found. Avoid unbounded input
15767 buffer when parsing non-escaped text.
15768
15769 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
15770 __oline__, #output, $@, and @{ do not have unintended meanings.
15771
acea4f3b
PE
157722002-11-09 Paul Eggert <eggert@twinsun.com>
15773
15774 Fix the test failure due to GCC warnings described in
161a71f3 15775 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
15776 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
15777 evaluate to 0 if it's impossible for NINF to be in the respective
15778 table.
15779 (yygetLRActions, yyrecoverParseError): Use them.
15780
15781 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
15782 counted in the token inserted at end of file. Now takes
15783 location_t *, not location_t, so that the location can be
15784 adjusted. All uses changed.
15785
15786 * tests/regression.at (Invalid inputs): Adjust wording in
15787 diagnostic to match the new behavior.
15788
15789 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
15790 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
15791 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
15792 abort ();'. This reduces the runtime of the "Many lookaheads"
15793 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
15794 GCC 3.2.
15795
20ef1ad5
PE
157962002-11-07 Paul Eggert <eggert@twinsun.com>
15797
15798 * src/parse-gram.y (CHARACTER): Remove unused token.
15799 All uses removed.
15800
15801 * src/scan-gram.l: Remove stack option. We no longer use the
15802 stack, since the stack was never deeper than 1; instead, use the
15803 new auto var c_context to record the stacked value.
15804
15805 Remove nounput option. At an unexpected end of file, we now unput
15806 the minimal input necessary to end cleanly; this simplifies the
15807 code.
15808
15809 Avoid unbounded token sizes where this is easy.
15810
15811 (unexpected_end_of_file): New function.
15812 Use it to systematize the error message on unexpected EOF.
15813 (last-string): Now auto, not static.
15814 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
15815 (scanner_last_string_free): Remove; not used.
15816 (percent_percent_count): Move decl to just before use.
15817 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
15818 not the (never otherwised-used) CHARACTER.
15819
93724f13
AD
158202002-11-07 Akim Demaille <akim@epita.fr>
15821
15822 Let yyerror always receive the msg as last argument, so that
15823 yyerror can be variadic.
15824
15825 * data/yacc.c (b4_yyerror_args): New.
15826 Use it when calling yyerror.
15827 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
15828 Use it when calling yyerror.
15829 * doc/bison.texinfo (Error Reporting): Adjust.
15830 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
15831 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
15832
6e40b4eb
AD
158332002-11-06 Akim Demaille <akim@epita.fr>
15834
15835 #line should have quoted strings.
15836 Ideally, this should be done by m4_quotearg.
15837
15838 * src/scan-skel.l: Include quotearg.h.
15839 Quote __ofile__.
15840 * src/output.c (symbol_printers_output)
15841 (symbol_destructors_output): Quote the file name.
15842
2dfbfc12
AD
158432002-11-06 Akim Demaille <akim@epita.fr>
15844
15845 * tests/regression.at (Invalid inputs): Adjust to the recent
15846 messages.
15847
437c2d80
AD
158482002-11-06 Akim Demaille <akim@epita.fr>
15849
15850 Restore --no-lines.
15851 Reported by Jim Kent.
15852
15853 * data/c.m4 (b4_syncline): New.
15854 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
15855 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
15856 * src/output.c (user_actions_output): Likewise.
15857 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 15858 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 15859
900c5db5
AD
158602002-11-06 Akim Demaille <akim@epita.fr>
15861
15862 * src/main.c (main): Free `infile'.
15863 * src/scan-gram.l (handle_syncline): New.
15864 Recognize `#line'.
15865 * src/output.c (user_actions_output, symbol_destructors_output)
15866 (symbol_printers_output): Use the location's file name, not
15867 infile.
15868 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15869
e183b123 158702002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 15871
e183b123 15872 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 15873 either has GLR conflict entries.
e183b123 15874
193eb6b7
PE
158752002-11-05 Paul Eggert <eggert@twinsun.com>
15876
e183b123
PE
15877 * src/scan-gram.l: Use more accurate diagnostics, e.g.
15878 "integer out of range" rather than "invalid value".
15879 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
15880 accordingly.
15881
193eb6b7
PE
15882 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
15883 Also, remove one static variable in the scanner.
15884
15885 * src/scan-gram.l (braces_level): Now auto, not static.
15886 Initialize to zero if the compiler is being picky.
15887 (INITIAL): Clear braces_level instead of incrementing it.
15888 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
15889 as POSIX 1003.1-2001 requires.
15890 * src/system.h (IF_LINT): New macro, taken from coreutils.
15891 * configure.ac: Define "lint" if --enable-gcc-warnings.
15892
29c01725
AD
158932002-11-05 Akim Demaille <akim@epita.fr>
15894
15895 * src/scan-gram.l: When it starts with `%', complain about the
15896 whole directive, not just that `invalid character: %'.
15897
8aeac3ca
AD
158982002-11-04 Akim Demaille <akim@epita.fr>
15899
15900 * Makefile.maint: Update from Autoconf.
15901 (update, cvs-update, po-update, do-po-update): New.
15902
793a58bb
AD
159032002-11-04 Akim Demaille <akim@epita.fr>
15904
15905 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
15906 and yyerror.
15907 Have yyerror `use' its arguments.
15908 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
15909 returns true when location & yacc & pure & parse-param.
15910 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
15911
c4d720cd
AD
159122002-11-04 Akim Demaille <akim@epita.fr>
15913
15914 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
15915 clashes.
15916 * src/scan-gram.l: Use [\'] instead of ['] to pacify
15917 font-lock-mode.
15918 Use complain_at.
15919 Use quote, not quote_n since LOCATION_PRINT no longer uses the
15920 slot 0.
15921
613a0dc5
PE
159222002-11-03 Paul Eggert <eggert@twinsun.com>
15923
15924 * src/reader.c (get_merge_function, grammar_current_rule_check):
15925 Use consistent diagnostics for reporting type name clashes.
15926 Quote the types with <>, for consistency with Yacc.
15927 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
15928
2a8d363a
AD
159292002-11-03 Akim Demaille <akim@epita.fr>
15930
15931 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
15932 New.
15933 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15934 (b4_parse_param): Remove.
15935 Use b4_identification.
15936 Propagate b4_pure_args where needed to pass them to yyerror.
15937 * data/glr.m4 (b4_parse_param): Remove.
15938 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15939 (b4_lpure_formals): New.
15940 Use b4_identification.
15941 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15942 b4_user_formals and b4_user_args.
15943 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15944 (yyreportAmbiguity): When using a pure parser, also need
15945 the location, and the parse-params.
15946 Adjust callers.
15947 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15948 When using a pure parser, also need the parse-params.
15949 Adjust callers.
15950 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15951 (%pure-parser + %parse-param) LALR and GLR parsers.
15952 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15953 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15954 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15955 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15956 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15957 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15958 * doc/bison.texinfo: Untabify the whole file.
15959 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15960 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15961 (Error Reporting): Adjust to these new directives.
15962 Document %error-verbose, deprecate YYERROR_VERBOSE.
15963
9e32add8
AD
159642002-11-03 Akim Demaille <akim@epita.fr>
15965
15966 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15967 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15968 command line options.
15969 * tests/cxx-type.at: Formatting changes.
15970
b02d90a5
PE
159712002-11-03 Paul Eggert <eggert@twinsun.com>
15972
15973 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15974 to count columns correctly, and to check for invalid inputs.
9e32add8 15975
b02d90a5
PE
15976 Use mbsnwidth to count columns correctly. Account for tabs, too.
15977 Include mbswidth.h.
15978 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15979 (extend_location): New function.
15980 (YY_LINES): Remove.
15981
15982 Handle CRLF in C code rather than in Lex code.
15983 (YY_INPUT): New macro.
15984 (no_cr_read): New function.
15985
15986 Scan UCNs, even though we don't fully handle them yet.
15987 (convert_ucn_to_byte): New function.
15988
15989 Handle backslash-newline correctly in C code.
15990 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15991 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15992 all uses changed.
15993 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15994 Use {splice} wherever C allows backslash-newline.
15995 YY_STEP after space, newline, vertical-tab.
15996 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 15997
b02d90a5
PE
15998 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15999
16000 ({int}, handle_action_dollar, handle_action_at): Check for integer
16001 overflow.
9e32add8 16002
b02d90a5
PE
16003 (YY_STEP): Omit trailing semicolon, so that it's more like C.
16004
16005 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
16006 as well as \000. Check for UCHAR_MAX, not 255.
16007 Allow \x with an arbitrary positive number of digits, as in C.
16008 Check for overflow here.
16009 Allow \? and UCNs, for compatibility with C.
16010
16011 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
16012 with quote slot used by complain_at.
16013
16014 * tests/input.at: Add tests for backslash-newline, m4 quotes
16015 in symbols, long literals, and funny escapes in strings.
16016
16017 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
16018 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
16019 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
16020 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
16021 * m4/mbswidth.m4: New file, from GNU coreutils.
16022
16023 * doc/bison.texinfo (Grammar Outline): Document // comments.
16024 (Symbols): Document that trigraphs have no special meaning in Bison,
16025 nor is backslash-newline allowed.
16026 (Actions): Document that trigraphs have no special meaning.
16027
16028 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
16029 no longer used.
16030
160312002-11-02 Paul Eggert <eggert@twinsun.com>
16032
16033 * src/reader.c: Don't include quote.h; not needed.
16034 (get_merge_function): Reword warning to be consistent with
16035 type clash diagnostic in grammar_current_rule_check.
16036
16037 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
16038 bug in trigraph handling.
16039
16040 * src/output.c (prepare_symbols): When printing token names,
16041 escape "[" as "@<:@" and likewise for "]".
16042
16043 * src/system.h (errno): Remove declaration, as we are now
16044 assuming C89 or better, and C89 guarantees errno.
16045
762b212b
PE
160462002-10-30 Paul Eggert <eggert@twinsun.com>
16047
16048 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
16049 Check for close failures.
16050 * src/files.h (xfclose): Return void, not int, since it always
16051 returned zero.
16052 * src/files.c (xfclose): Likewise. Report I/O error if ferror
16053 indicates one.
16054 * src/output.c (output_skeleton): Use xfclose rather than fclose
16055 and ferror. xfclose now checks ferror.
16056
16057 * data/glr.c (YYLEFTMOST_STATE): Remove.
16058 (yyreportTree): Use a stack-based leftmost state. This avoids
16059 our continuing battles with bogus warnings about initializers.
16060
56100c60
AD
160612002-10-30 Akim Demaille <akim@epita.fr>
16062
16063 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
16064 #if.
16065
51b4a04c
PH
160662002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
16067
16068 * tests/glr-regr1.at: New test for reported regressions.
16069 * tests/testsuite.at: Add glr-regr1.at test.
16070 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 16071
bf1ebda2
PE
160722002-10-24 Paul Eggert <eggert@twinsun.com>
16073
5c16c6b1
PE
16074 Version 1.75a.
16075
bf1ebda2
PE
16076 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
16077 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
16078 we use malloc. Don't assume 'A' through 'Z' are contiguous.
16079 Don't assume strdup exists; POSIX says its an XSI extension.
16080 Check for buffer overflow on input.
16081
b526ee61
AD
160822002-10-24 Akim Demaille <akim@epita.fr>
16083
16084 * src/output.c (output_skeleton): Don't disable M4sugar comments
16085 too soon: it results in comments being expanded.
16086 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
16087 first output.
16088
f1886bb2
AD
160892002-10-24 Akim Demaille <akim@epita.fr>
16090
16091 * data/yacc.c (m4_int_type): New.
16092 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
16093 char' as only yacc.c wants K&R portability.
16094 * data/glr.c (yysigned_char): Remove.
16095 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
16096 Reported by Quoc Peyrot.
16097
c5576256
PE
160982002-10-23 Paul Eggert <eggert@twinsun.com>
16099
16100 * src/main.c (main): With --trace=time, report times even if a
16101 non-fatal error occurs. Formerly, the times were reported in some
16102 such cases but not in others.
16103 * src/reader.c (reader): Just return if a complaint has been issued,
16104 instead of exiting, so that 'main' can report times.
16105
27b0ffea
AD
161062002-10-22 Akim Demaille <akim@epita.fr>
16107
16108 * src/system.h: Include sys/types.
16109 Reported by Bert Deknuydt.
16110
223a7883
PE
161112002-10-23 Paul Eggert <eggert@twinsun.com>
16112
16113 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
16114 Suggested by Art Haas.
16115
161162002-10-22 Paul Eggert <eggert@twinsun.com>
16117
16118 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
16119 decl; not needed any more.
16120 * src/main.c (main): Use return to exit, undoing yesterday's change.
16121 The last OS that we could find where this wouldn't work is
16122 SunOS 3.5, and that's too old to worry about now.
16123
16124 * data/glr.c (struct yyltype): Define members even when not
16125 doing locations. This is more consistent with yacc.c, and it
16126 works around the following bug reports:
161a71f3
PE
16127 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
16128 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 16129
223a7883
PE
16130 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
16131 @acronym consistently. Standardize on "Yacc" instead of "YACC",
16132 "Algol" instead of "ALGOL". Give a bit more history about BNF.
16133
8b76775a
AD
161342002-10-22 Akim Demaille <akim@epita.fr>
16135
16136 * data/README: New.
16137
6db10d14
PE
161382002-10-21 Paul Eggert <eggert@twinsun.com>
16139
16140 Be consistent about 'bool'; the old code used an enum in one
16141 module and an int in another, and this violates the C standard.
16142 * m4/stdbool.m4: New file, from coreutils 4.5.3.
16143 * configure.ac (AC_HEADER_STDBOOL): Add.
16144 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
16145 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
16146 * src/symtab.c (hash_compare_symbol_t): Likewise.
16147 * src/system.h (bool, false, true): Use a definition consistent
16148 with ../lib/hash.c. All uses changed.
16149
16150 * src/complain.c (warning_issued): Renamed from warn_message_count,
16151 so that we needn't worry about integer overflow (!).
16152 Now of type bool. All uses changed.
16153 (complaint_issued): Renamed from complain_message_count; likewise.
16154
16155 * src/main.c (main): Use exit to exit with failure.
27b0ffea 16156
6db10d14
PE
16157 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
16158 rather than 1 and 0.
16159 * src/main.c (main): Likewise.
16160 * src/getargs.c (getargs): Likewise.
16161 * src/reader.c (reader): Likewise.
16162
16163 * src/getarg.c (getargs): Remove duplicate code for
16164 "Try `bison --help'".
16165
16166 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
16167 What was that "2" for?
16168
16169 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
16170 * src/getargs.c (usage): Likewise.
16171
16172 * src/getargs.c (getargs): When there are too few operands, report
16173 the last one. When there are too many, report the first extra
16174 one. This is how diffutils does it.
16175
92a060fd
PE
161762002-10-20 Paul Eggert <eggert@twinsun.com>
16177
16178 Remove K&R vestiges.
16179 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
16180 * src/complain.c (VA_START): Remove. Assume prototypes.
16181 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
16182 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
16183 fatal): Assume prototypes.
16184 * src/complain.h: Assume prototypes.
16185 * src/system.h (PARAMS): Remove.
16186 Include <limits.h> unconditionally, since it's guaranteeed even
16187 for a freestanding C89 compiler.
16188 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
16189 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 16190
e7cb57c0
AD
161912002-10-20 Akim Demaille <akim@epita.fr>
16192
16193 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
16194 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
16195 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
16196 (yyresolveStates, yyresolveAction, yyresolveStack)
16197 (yyprocessOneStack): Use them.
16198 (yy_reduce_print): New.
16199 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
16200
0245f82d
AD
162012002-10-20 Akim Demaille <akim@epita.fr>
16202
16203 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
16204 arguments and output `void'.
16205 (b4_c_function): Rename as...
16206 (b4_c_function_def): this.
16207 (b4_c_function_decl, b4_c_ansi_function_def)
16208 (b4_c_ansi_function_decl): New.
16209 Change the interpretation of the arguments: before `int, foo', now
16210 `int foo, foo'.
16211 * data/yacc.c (yyparse): Prototype and define thanks to these.
16212 Adjust b4_c_function_def uses.
16213 * data/glr.c (yyparse): Likewise, but ANSI only.
16214
39912f52
AD
162152002-10-20 Akim Demaille <akim@epita.fr>
16216
16217 * src/output.c (prepare): Move the definition of `tokens_number',
16218 `nterms_number', `undef_token_number', `user_token_number_max'
16219 to...
16220 (prepare_tokens): Here.
16221 (prepare_tokens): Rename as...
16222 (prepare_symbols): this.
16223 (prepare): Move the definition of `rules_number' to...
16224 (prepare_rules): here.
16225 (prepare): Move the definition of `last', `final_state_number',
16226 `states_number' to...
16227 (prepare_states): here.
16228 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
16229
20c1e2ad
AD
162302002-10-20 Akim Demaille <akim@epita.fr>
16231
16232 * src/tables.h, src/tables.c, src/output.c: Comment changes.
16233
21964f43
AD
162342002-10-20 Akim Demaille <akim@epita.fr>
16235
16236 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
16237 * data/c.m4: here.
16238
66d30cd4
AD
162392002-10-20 Akim Demaille <akim@epita.fr>
16240
16241 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
16242 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
16243 `pair'.
16244 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
16245 `name' to...
16246 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
16247 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
16248 These.
16249
95f2c9fe
PE
162502002-10-19 Paul Eggert <eggert@twinsun.com>
16251
16252 Do not create a temporary file, as that involves security and
16253 cleanup headaches. Instead, use a pair of pipes.
16254 Derived from a suggestion by Florian Krohm.
16255 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
16256 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
16257 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
16258 (BISON_PREREQ_SUBPIPE): Add.
16259 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
16260 Add subpipe.h, subpipe.c.
16261 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
16262 * po/POTFILES.in: Add lib/subpipe.c.
16263 * src/output.c: Include "subpipe.h".
16264 (m4_invoke): Remove decl.
16265 (scan_skel): New decl.
16266 (output_skeleton): Use pipe rather than temporary file for m4 input.
16267 Check that m4sugar.m4 is readable, to avoid deadlock.
16268 Check for pipe I/O error.
16269 * src/scan-skel.l (readpipe): Remove decl.
16270 (scan_skel): New function, to be used in place of m4_invoke.
16271 Read from stream rather than file.
66d30cd4 16272
95f2c9fe
PE
16273 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
16274 float, as this generates a warning on Solaris 8 + GCC 3.2 with
16275 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
16276 this generates a more-accurate value anyway.
16277
16278 * lib/timevar.c (timervar_accumulate): Rename locals to
16279 avoid confusion with similarly-named more-global.
16280 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
16281
16282 * src/output.c (prepare): Use xstrdup to convert char const *
16283 to char *, to avoid GCC warning.
16284
c19988b7
AD
162852002-10-19 Akim Demaille <akim@epita.fr>
16286
16287 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
16288 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
16289 Use them to have `calc.y' ready for %pure-parser.
16290 * data/yacc.c (YYLEX): Pass a yylex return type to
16291 b4_c_function_call.
16292
ae7453f2
AD
162932002-10-19 Akim Demaille <akim@epita.fr>
16294
16295 Prototype support of %lex-param and %parse-param.
16296
16297 * src/parse-gram.y: Add the definition of the %lex-param and
16298 %parse-param tokens, plus their rules.
16299 Drop the `_' version of %glr-parser.
16300 Add the "," token.
16301 * src/scan-gram.l (INITIAL): Scan them.
16302 * src/muscle_tab.c: Comment changes.
16303 (muscle_insert, muscle_find): Rename `pair' as `probe'.
16304 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
16305 (muscle_entry_s): The `value' member is no longer const.
16306 Adjust all dependencies.
16307 * src/muscle_tab.c (muscle_init): Adjust: use
16308 MUSCLE_INSERT_STRING.
16309 Initialize the obstack earlier.
16310 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
16311 (muscle_pair_list_grow): New.
16312 * data/c.m4 (b4_c_function_call, b4_c_args): New.
16313 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
16314 * tests/calc.at: Use %locations, not --locations.
16315 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
16316
0e575721
AD
163172002-10-19 Akim Demaille <akim@epita.fr>
16318
16319 * src/getargs.c (usage): Take status as argument and exit
16320 accordingly.
16321 Report the traditional `Try ... --help' message when status != 0.
16322 (usage, version): Don't take a FILE * as arg, it is pointless.
16323 (getargs): When there is an incorrect number of arguments, make it
16324 an error, and report it GNUlically thanks to `usage ()'.
16325
724ce7f5
PE
163262002-10-18 Paul Eggert <eggert@twinsun.com>
16327
3a781eb2
PE
16328 * data/glr.c (yyreportParseError): Don't assume that sprintf
16329 yields the length of the printed string, as this is not true
16330 on SunOS 4.1.4. Reported by Peter Klein.
16331
724ce7f5
PE
16332 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
16333 * tests/conflicts.at (%nonassoc and eof): Likewise.
16334 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
16335
473d0a75
AD
163362002-10-17 Akim Demaille <akim@epita.fr>
16337
16338 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
16339 * src/getargs.c (trace_types, trace_args): Adjust.
16340 * src/reader.c (grammar_current_rule_prec_set)
16341 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
16342 Standardize error messages.
16343 And s/@prec/%prec/!
16344 (reader): Use trace_flag to enable scanner/parser debugging,
16345 instead of an adhoc scheme.
16346 * src/scan-gram.l: Remove trailing debugging code.
16347
e76d2469
PE
163482002-10-16 Paul Eggert <eggert@twinsun.com>
16349
93e2236a
PE
16350 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
16351 MUSCLE_TAB_H.
16352
e76d2469
PE
16353 * NEWS: Officially drop support for building Bison with K&R C,
16354 since it didn't work anyway and it's not worth worrying about.
16355 * Makefile.maint (wget_files): Remove ansi2knr.c.
16356 (ansi2knr.c-url_prefix): Remove.
16357 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
16358 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16359 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
16360
5bd1c419
PE
163612002-10-15 Paul Eggert <eggert@twinsun.com>
16362
16363 Stop using the "enum_" trick for K&R-style function definitions;
16364 it confused me, and I was the author! Instead, assume that people
16365 who want to use K&R C compilers (when using these modules in GCC,
16366 perhaps?) will run ansi2knr.
16367
16368 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
16369 All uses of "enum_" changed to "enum ".
16370 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16371 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 16372
5bd1c419
PE
16373 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
16374 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
16375 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
16376 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
16377 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
16378 abitset_not, abitset_ones, abitset_or, abitset_or_and,
16379 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
16380 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
16381 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
16382 Use function prototypes; this removes the need for declaring
16383 static functions simply to provide their prototypes.
16384 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
16385 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
16386 bitset_count_, bitset_create, bitset_dump, bitset_first,
16387 bitset_free, bitset_init, bitset_last, bitset_next,
16388 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
16389 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
16390 bitset_print, bitset_release_memory, bitset_toggle_,
16391 bitset_type_choose, bitset_type_get, bitset_type_name_get,
16392 debug_bitset): Likewise.
16393 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
16394 * lib/bitset_stats.c (bitset_log_histogram_print,
16395 bitset_percent_histogram_print, bitset_stats_and,
16396 bitset_stats_and_cmp, bitset_stats_and_or,
16397 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
16398 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
16399 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
16400 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
16401 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
16402 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
16403 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
16404 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
16405 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
16406 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
16407 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
16408 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
16409 bitset_stats_zero): Likewise.
16410 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16411 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16412 bitsetv_dump, debug_bitsetv): Likewise.
16413 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
16414 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
16415 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
16416 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
16417 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
16418 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
16419 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
16420 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
16421 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
16422 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
16423 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
16424 Likewise.
16425 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
16426 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
16427 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
16428 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
16429 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
16430 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
16431 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
16432 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
16433 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
16434 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
16435 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 16436
ae26e1f0
AD
164372002-10-14 Akim Demaille <akim@epita.fr>
16438
16439 Version 1.75.
16440
d43baf71
AD
164412002-10-14 Akim Demaille <akim@epita.fr>
16442
16443 * tests/Makefile.am (maintainer-check-posix): New.
16444
7ebc83e3
AD
164452002-10-14 Akim Demaille <akim@epita.fr>
16446
16447 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
16448 member.
16449
05846dae
AD
164502002-10-14 Akim Demaille <akim@epita.fr>
16451
16452 * src/tables.c (table_ninf_remap): base -> tab.
16453 Reported by Matt Rosing.
16454
1318e37d
PE
164552002-10-14 Paul Eggert <eggert@twinsun.com>
16456
447fbb17
PE
16457 * tests/action.at, tests/calc.at, tests/conflicts.at,
16458 tests/cxx-type.at, tests/headers.at, tests/input.at,
16459 tests/regression.at, tests/synclines.at, tests/torture.at:
16460 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
16461 so that the tests still work even if POSIXLY_CORRECT is set.
16462 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 16463
1318e37d
PE
16464 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
16465 for portability to K&R hosts. Fix typo: signed char is guaranteed
16466 only to 127, not to 128.
16467 * data/glr.c (yysigned_char): New type.
16468 * data/yacc.c (yysigned_char): Likewise.
16469 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
16470
cc0f0794
PE
164712002-10-13 Paul Eggert <eggert@twinsun.com>
16472
5038f418
PE
16473 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
16474 true due to limited range of data type" warning from GCC.
16475
cc0f0794
PE
16476 * data/c.m4 (b4_token_defines): Protect against double-inclusion
16477 by wrapping enum yytokentype's definition inside #ifndef
16478 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
16479
6fed0802
AD
164802002-10-13 Akim Demaille <akim@epita.fr>
16481
16482 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
16483 Un yy- yyrhs to avoid the name clash with the global YYRHS.
16484
32f0598d
AD
164852002-10-13 Akim Demaille <akim@epita.fr>
16486
16487 * Makefile.maint: Update from Autoconf 2.54.
16488 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
16489
7ea9a33f
AD
164902002-10-13 Akim Demaille <akim@epita.fr>
16491
16492 * src/print.c (print_state): Separate the list of solved conflicts
16493 from the other items.
16494 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
16495
ea99527d
AD
164962002-10-13 Akim Demaille <akim@epita.fr>
16497
16498 Let nondeterministic skeletons be usable with deterministic
16499 tables.
16500
16501 With the patch, GAWK compiled by GCC without -O2 passes its test
16502 suite using a GLR parser driven by LALR tables. It fails with -O2
16503 because `struct stat' gives two different answers on my machine:
16504 88 (definition of an auto var) and later 96 (memset on this var).
16505 Hence the stack is badly corrumpted. The headers inclusion is to
16506 blame: if I move the awk.h inclusion before GLR's system header
16507 inclusion, the two struct stat have the same size.
16508
16509 * src/tables.c (pack_table): Always create conflict_table.
16510 (token_actions): Always create conflict_list.
16511 * data/glr.c (YYFLAG): Remove, unused.
16512
f377f69f
AD
165132002-10-13 Akim Demaille <akim@epita.fr>
16514
16515 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
16516 (O0FLAGS): New.
16517 (VALGRIND, GXX): New.
16518 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
16519 * tests/bison.in: Run $PREBISON a pre-command.
16520 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
16521 (maintainer-check-g++): New.
16522 * Makefile.am (maintainer-check): New.
16523
2a1fe6ed
AD
165242002-10-13 Akim Demaille <akim@epita.fr>
16525
16526 * data/glr.c: Formatting changes.
16527 Tweak some trace messages to match yacc.c's.
16528
f50adbbd
AD
165292002-10-13 Akim Demaille <akim@epita.fr>
16530
16531 GLR parsers sometimes raise parse errors instead of performing the
16532 default reduction.
16533 Reported by Charles-Henry de Boysson.
16534
16535 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 16536 check the length of the traces when %glr.
f50adbbd
AD
16537 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
16538 GLR's traces.
16539 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
16540 Test GLR parsers.
16541 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
16542 (yyltype): Remove the yy prefix from the member names.
16543 (yytable): Complete its comment.
16544 (yygetLRActions): Map error action number from YYTABLE from
16545 YYTABLE_NINF to 0.
16546 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
16547 (which was a bug: it should have been YYTABEL_NINF, and yet it was
16548 not satisfying as we could compare an YYACTION computed from
16549 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
16550 only value for error actions.
16551 (yyreportParseError): In verbose parse error messages, don't issue
16552 `error' in the list of expected tokens.
16553 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
16554 next action to perform to match glr.c's decoding.
16555 (yytable): Complete its comment.
16556
bcbad5b9
PE
165572002-10-13 Paul Eggert <eggert@twinsun.com>
16558
16559 Fix problem reported by Henrik Grubbstroem in
161a71f3 16560 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
16561 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
16562 because the Bison parser reads the second action before reducing
16563 the first one.
16564 * src/scan-gram.l (rule_length): New static var.
16565 Use it to keep track of the rule length in the scanner, since
16566 we can't expect the parser to be in lock-step sync with the scanner.
16567 (handle_action_dollar, handle_action_at): Use this var.
16568 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 16569
14904b89
PE
165702002-10-12 Paul Eggert <eggert@twinsun.com>
16571
1fe611e5
PE
16572 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
16573 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
16574 Include <sys/time.h> when checking for clock_t and struct tms.
16575 Use same include order as source.
16576 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 16577 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 16578
1fe611e5
PE
16579 * lib/timevar.c: Update copyright date and clarify comments.
16580 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 16581
1fe611e5
PE
16582 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
16583 GCC version as of today, then merge Bison's changes.
16584 Change "GCC" to "Bison" in copyright notice. timevar.def's
16585 author is Akim, so change that too.
16586
98194095
PE
16587 * src/reader.c (grammar_current_rule_check):
16588 Don't worry about the default action if $$ is untyped.
16589 Prevents bogus warnings reported by Jim Gifford in
161a71f3 16590 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 16591
14904b89
PE
16592 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
16593 * data/glr.c, data/lalr1.cc, data/yacc.c:
16594 Output token definitions before the first part of user declarations.
16595 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 16596 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 16597
ff6dca18
PE
165982002-10-11 Paul Eggert <eggert@twinsun.com>
16599
16600 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
16601 (yyparse): here. This undoes some of the 2002-07-25 change.
16602 Compatibility problem reported by Ralf S. Engelschall with
16603 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
16604
eb714592
AD
166052002-10-11 Akim Demaille <akim@epita.fr>
16606
16607 * tests/regression.at Characters Escapes): New.
16608 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
16609 characters.
16610 Reported by Jan Nieuwenhuizen.
16611
b7195100
AD
166122002-10-11 Akim Demaille <akim@epita.fr>
16613
16614 * po/id.po: New.
16615
f28a0f2d
PE
166162002-10-10 Paul Eggert <eggert@twinsun.com>
16617
16618 Portability fixes for bitsets; this also avoids several GCC
16619 warnings.
16620
16621 * lib/abitset.c: Include <stddef.h>, for offsetof.
16622 * lib/lbitset.c: Likewise.
16623
16624 * lib/abitset.c (abitset_bytes): Return a size that is aligned
16625 properly for vectors of objects. Do not assume that adding a
16626 header size to a multiple of a word size yields a value that is
16627 properly aligned for the whole union.
16628 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16629
16630 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
16631 unique names for structures.
16632 * lib/ebitset.c (ebitset_bytes): Likewise.
16633 * lib/lbitset.c (lbitset_bytes): Likewise.
16634
16635 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
16636 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
16637 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
16638 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
16639 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
16640 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
16641 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
16642 to improve the type-checking that GCC can do.
16643 * lib/bitset.c (bitset_op4_cmp): Likewise.
16644 * lib/bitset_stats.c (bitset_stats_count,
16645 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
16646 bitset_stats_copy, bitset_stats_disjoint_p,
16647 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
16648 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
16649 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
16650 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
16651 bitset_stats_and_or_cmp, bitset_stats_andn_or,
16652 bitset_stats_andn_or_cmp, bitset_stats_or_and,
16653 bitset_stats_or_and_cmp): Likewise.
16654 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
16655 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
16656 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
16657 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
16658
16659 * lib/abitset.h: Include bitset.h, not bbitset.h.
16660 * lib/ebitset.h: Likewise.
16661 * lib/lbitset.h: Likewise.
16662
16663 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
16664 All instances of parameters of type enum bitset_opts are now of
16665 type enum_bitset_opts, to conform to the C Standard, and similarly
16666 for enum_bitset_type.
16667 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16668 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16669
16670 Do not use "struct bitset_struct" to mean different things in
16671 different modules. Not only is this confusing, it violates
16672 the C Standard, which requires that structure types in different
16673 modules must be compatible if one is to be passed to the other.
16674 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
16675 All instances of "struct bitset_struct *" replaced with "bitset".
16676 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
16677 (union bitset_union, struct abitset_struct, struct ebitset_struct,
16678 struct lbitset_struct, struct bitset_stats_struct): New types.
16679 All uses of struct bitset_struct changed to union bitset_union,
16680 etc.
ba0fe3c7 16681 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
16682 struct bitset_struct): Remove.
16683 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
16684 struct bitset_struct): Remove.
16685 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
16686 bitset_struct): Remove.
16687 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
16688 Likewise.
16689
16690 Do not call a function of type T using a call that assumes the
16691 function is of a different type U. Standard C requires that a
16692 function must be called with a type that is compatible with its
16693 definition.
16694 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16695 New decls.
16696 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16697 New functions.
16698 * lib/ebitset.c (PFV): Remove.
16699 * lib/lbitset.c (PFV): Likewise.
16700 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
16701 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
16702 decls.
16703 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
16704 (ebitset_vtable): Use them.
16705 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
16706 lbitset_xor): New functions.
16707 (lbitset_vtable): Use them.
16708
16709 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
16710 Declare.
16711
16712 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
16713 GCC warning.
16714 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
16715 Use offsetof, for simplicity.
16716
6fbe4984
PE
167172002-10-06 Paul Eggert <eggert@twinsun.com>
16718
16719 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
16720 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 16721 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
16722 which was inadvertently undone by the 2002-09-30 patch.
16723 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
16724 the same width as int.
16725
420f93c8
PE
167262002-10-04 Paul Eggert <eggert@twinsun.com>
16727
16728 Version 1.50.
16729
16730 * configure.ac (AC_INIT), NEWS: Increment version number.
16731
16732 * doc/bison.texinfo: Minor spelling, grammar, and white space
16733 fixes.
16734 (Symbols): Mention that any negative value returned from yylex
16735 signifies end-of-input. Warn about negative chars. Mention
16736 the portable Standard C character set.
16737
16738 The GNU coding standard says CFLAGS and YFLAGS are reserved
16739 for the installer to set.
16740 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
16741 * src/Makefile.am (AM_CFLAGS): Likewise.
16742 (AM_YFLAGS): Renamed from YFLAGS.
16743
16744 Fix some MAX and MIN problems.
16745 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
16746 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
16747 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
16748 * src/reader.c (reader): Use it.
16749
16750 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
16751 POSIX 1003.1-2001 has removed fgrep.
16752
167532002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
16754
16755 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
16756 interpreted as signed.
16757 * lib/ebitset.c (ebitset_list): Fix bug.
16758
ff68026d
PE
167592002-10-01 Paul Eggert <eggert@twinsun.com>
16760
16761 More fixes for 64-bit hosts and large bitsets.
16762
16763 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
16764 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
16765 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
16766 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
16767 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
16768 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
16769 bitset_count_): Likewise.
16770 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
16771 bitset_first, bitset_last): Likewise.
16772 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
16773 bitset_stats_list_reverse, bitset_stats_size,
16774 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
16775 Likewise.
16776 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16777 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16778 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16779 bitsetv_reflexive_transitive_closure): Likewise.
16780 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
16781 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
16782 Likewise.
16783 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
16784 Likewise.
420f93c8 16785
ff68026d
PE
16786 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
16787 Use size_t, not unsigned int, to count bytes.
16788 * lib/abitset.h (abitset_bytes): Likewise.
16789 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
16790 Likewise.
16791 * lib/bitset.h (bitset_bytes): Likewise.
16792 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
16793 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
16794 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16795 * lib/ebitset.c (ebitset_bytes): Likewise.
16796 * lib/ebitset.h (ebitset_bytes): Likewise.
16797 * lib/lbitset.c (lbitset_bytes): Likewise.
16798 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 16799
ff68026d
PE
16800 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
16801 abitset_subset_p, abitset_disjoint_p, abitset_and,
16802 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
16803 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
16804 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
16805 abitset_or_and, abitset_or_and_cmp):
16806 Use bitset_windex instead of unsigned int.
16807 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16808 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
16809 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
16810 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
16811 Likewise.
16812 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 16813
ff68026d
PE
16814 * lib/bitset.c (bitset_print):
16815 Use proper printf formats for widths of integer types.
16816 * lib/bitset_stats.c (bitset_percent_histogram_print,
16817 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
16818 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16819 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16820 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 16821
ff68026d
PE
16822 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
16823 BITSET_SIZE_MAX): New macros.
16824 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
16825 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
16826 to BITSET_WINDEX_MAX.
16827
16828 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
16829 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
16830 since we now return the bitset_bindex type (not int).
16831
16832 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
16833 when computing sizes.
16834 * lib/ebitset.c (ebitset_elts_grow): Likewise.
16835
16836 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
16837 and avoid cast to unsigned.
16838
6aa452a6
AD
168392002-09-30 Akim Demaille <akim@epita.fr>
16840
16841 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
16842 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
16843 Updates from Michael Hayes.
16844
927f7817
AD
168452002-09-30 Art Haas <ahaas@neosoft.com>
16846
16847 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
16848 invocations.
16849 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
16850 defined.
16851
9738f41e
AD
168522002-09-27 Akim Demaille <akim@epita.fr>
16853
16854 Version 1.49c.
16855
a5c75d7f
AD
168562002-09-27 Akim Demaille <akim@epita.fr>
16857
16858 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
16859 (Because of AC_LIBSOURCE).
16860
8280e179
AD
168612002-09-27 Akim Demaille <akim@epita.fr>
16862
16863 Playing with Autoscan.
16864
16865 * configure.ac: Remove the old LIBOBJ tweaks.
16866 (AC_REPLACE_FUNCS): Add strrchr and strtol.
16867 * lib/strrchr.c: New.
16868 * lib/strtol.c: New, from the Coreutils 4.5.1.
16869
ae64af35
AD
168702002-09-27 Akim Demaille <akim@epita.fr>
16871
16872 Playing with Autoscan.
16873
16874 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
16875 * lib/Makefile.am (libbison_a_SOURCES): No longer include
16876 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
16877 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
16878 Coreutils 4.5.1.
16879
d1a1114f
AD
168802002-09-24 Akim Demaille <akim@epita.fr>
16881
16882 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
16883 (Frequently Asked Questions, Parser Stack Overflow): New.
16884
b906441c
AD
168852002-09-13 Akim Demaille <akim@epita.fr>
16886
16887 Playing with autoscan.
16888
16889 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
16890 * src/files.c (skeleton_find): Remove, unused.
16891 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
16892 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
16893
bd701811
AD
168942002-09-13 Akim Demaille <akim@epita.fr>
16895
16896 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
16897 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
16898
e0a13e7b
AD
168992002-09-13 Akim Demaille <akim@epita.fr>
16900
16901 * configure.ac: Require 2.54.
16902 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
16903 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
16904 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
16905 Remove, provided by Autoconf macros.
16906
c97011bf
AD
169072002-09-12 Akim Demaille <akim@epita.fr>
16908
16909 * m4/prereq.m4: Update, from Coreutils 4.5.1.
16910
d862b1be
AD
169112002-09-12 Akim Demaille <akim@epita.fr>
16912
16913 * m4/prereq.m4: Update, from Fileutils 4.1.5.
16914 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
16915 Reported by Martin Mokrejs.
16916
3d38c03a
AD
169172002-09-10 Akim Demaille <akim@epita.fr>
16918
16919 * src/parse-gram.y: Associate a human readable string to each
16920 token type.
16921 * tests/regression.at (Invalid inputs): Adjust.
16922
b6347355
AD
169232002-09-10 Gary V. Vaughan <gary@gnu.org>
16924
16925 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
16926 with an Autoconf-2.5x style configure.ac.
16927
09ba4ab2
PE
169282002-09-06 Paul Eggert <eggert@twinsun.com>
16929
16930 * doc/bison.texinfo (Conditions): Make explicit that the GPL
16931 exception applies only to yacc.c. This is a modification of a
16932 patch originally suggested by Akim Demaille.
16933
21846f69
AD
169342002-09-06 Akim Demaille <akim@epita.fr>
16935
09ba4ab2
PE
16936 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16937 here to...
16938 * data/yacc.c: here.
16939
21846f69
AD
16940 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16941 LocationType.
16942 (b4_ltype): Default to yy::Location from location.hh.
16943
c0ad8bf3
AD
169442002-09-04 Jim Meyering <jim@meyering.net>
16945
16946 * data/yacc.c: Guard the declaration of yytoknum also with
16947 `#ifdef YYPRINT', so it is declared only when used.
16948
3a93251e
AD
169492002-09-04 Akim Demaille <akim@epita.fr>
16950
16951 * configure.in: Rename as...
16952 * configure.ac: this.
16953 Bump to 1.49c.
16954
427c0dda
AD
169552002-09-04 Akim Demaille <akim@epita.fr>
16956
16957 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16958 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16959 translate maintainer only messages.
16960
6a254321
PE
169612002-08-12 Paul Eggert <eggert@twinsun.com>
16962
645e30d1
PE
16963 Version 1.49b.
16964
6a254321
PE
16965 * Makefile.am (SUBDIRS): Remove intl.
16966 (DISTCLEANFILES): Remove.
16967 * NEWS: Mention that GNU M4 is now required. Clarify what is
16968 meant by "larger grammars". Mention the pt_BR translation.
16969 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16970 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16971 Bump version from 0.11.2 to 0.11.5.
16972 (BISON_PREREQ_STAGE): Remove.
16973 (AM_GNU_GETTEXT): Use external gettext.
16974 (AC_OUTPUT): Remove intl/Makefile.
16975
16976 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16977
16978 * data/glr.c: Include string.h, for strlen.
16979 (yyreportParseError): Use size_t for yysize.
16980 (yy_yypstack): No longer nested inside yypstates, as nested
16981 functions are not portable. Do not assume size_t is the
16982 same width as int.
16983 (yypstates): Do not assume that ptrdiff_t is the same width
16984 as int, and similarly for yyposn and YYINDEX.
16985
16986 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16987
16988 * lib/Makefile.am (INCLUDES): Do not include from the intl
16989 directory, which has been removed.
16990 * src/Makefile.am (INCLUDES): Likewise.
16991
16992 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16993 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16994 New vars.
16995
16996 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16997 * tests/Makefile.am (EXTRA_DIST): Likewise.
16998
16999 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
17000 Do not assume that bitset_windex is the same width as unsigned.
17001
17002 * lib/abitset.c (abitset_unused_clear): Do not assume that
17003 bitset_word is the same width as int.
17004 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
17005 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
17006 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
17007 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
17008 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
17009
17010 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
17011 portability to one's complement hosts!).
17012 * lib/ebitset.c (ebitset_op1): Likewise.
17013 * lib/lbitset.c (lbitset_op1): Likewise.
17014
17015 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
17016 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
17017 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
17018 Sync with fileutils.
17019 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
17020 lib/gettext.h: Sync with diffutils.
17021
17022 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
17023 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
17024
17025 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
17026 PROTOTYPES to check for prototypes, and "defined __STDC__" to
17027 check for void *.
17028
17029 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
17030 size_t; the old version tried to do this but casted improperly.
17031 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
17032 (bitset_test): Now returns int, not unsigned long.
17033
17034 * lib/bitset_stats.c: Include "gettext.h".
17035 (_): New macro.
17036 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
17037 name locals "index", as it generates unnecessary warnings on some
17038 hosts that have an "index" function.
17039
17040 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
17041 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
17042 they need translation.
17043 * src/LR0.c (state_list_append, new_itemsets, get_state,
17044 append_states, generate_states): Likewise.
17045 * src/assoc.c (assoc_to_string): Likewise.
17046 * src/closure.c (print_closure, set_firsts, closure): Likewise.
17047 * src/gram.c (grammar_dump): Likewise.
17048 * src/injections.c (injections_compute): Likewise.
17049 * src/lalr.c (lookaheads_print): Likewise.
17050 * src/relation.c (relation_transpose): Likewise.
17051 * src/scan-gram.l: Likewise.
17052 * src/tables.c (table_grow, pack_vector): Likewise.
17053
17054 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
17055 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
17056 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
17057 * m4/mbstate_t.m4: Sync with fileutils.
17058 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
17059
17060 * po/LINGUAS: Add pt_BR.
17061 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
17062 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
17063 lib/timevar.c.
17064 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
17065 manual recommends.
17066 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
17067
17068 * src/complain.c (strerror_r): Remove decl; not needed.
17069 (strerror): Use same pattern as ../lib/error.c.
17070
17071 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
17072
17073 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
17074
17075 * src/main.c (main): Cast result of bindtextdomain and textdomain
17076 to void, to avoid a GCC warning when --disable-nls is in effect.
17077
17078 * src/scan-gram.l: Use strings rather than escapes when possible,
17079 to minimize the number of warnings from xgettext.
17080 (handle_action_dollar, handle_action_at): Don't use isdigit,
17081 as it mishandles negative chars and it may not work as expected
17082 outside the C locale.
17083
17084 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
17085 this is a GCC extension and is not portable to other compilers.
17086
17087 * src/system.h (alloca): Use same pattern as ../lib/error.c.
17088 Do not include <ctype.h>; no longer needed.
17089 Do not include <malloc.h>; no longer needed (and generates
17090 warnings on OpenBSD 3.0).
17091
17092 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
17093 it's not portable.
17094
17095 * tests/regression.at: Do not use 'cc -c input.c -o input';
17096 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
17097
17098 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
17099 exit status as failure, not just exit status 1. Sun C exits
17100 with status 2 sometimes.
17101
17102 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
17103 Use it for the two large tests.
17104
c8f002c7
AD
171052002-08-02 Akim Demaille <akim@epita.fr>
17106
17107 * src/conflicts.c (conflicts_output): Don't output rules never
17108 reduced here, since anyway that computation doesn't work.
17109 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
17110 (rule_useless_p, rule_never_reduced_p): New.
17111 (grammar_rules_partial_print): Use a filter instead of a range.
17112 Display the title only if needed.
17113 (grammar_rules_print): Adjust.
17114 (grammar_rules_never_reduced_report): New.
17115 * src/tables.c (action_row): Move the computation of rules never
17116 reduced to...
17117 (token_actions): here.
17118 * src/main.c (main): Make the parser before making the report, so
17119 that rules never reduced are computed.
17120 Call grammar_rules_never_reduced_report.
17121 * src/print.c (print_results): Report rules never reduced.
17122 * tests/conflicts.at, tests/reduce.at: Adjust.
17123
cd08e51e
AD
171242002-08-01 Akim Demaille <akim@epita.fr>
17125
17126 Instead of attaching lookaheads and duplicating the rules being
17127 reduced by a state, attach the lookaheads to the reductions.
17128
17129 * src/state.h (state_t): Remove the `lookaheads',
17130 `lookaheads_rule' member.
17131 (reductions_t): Add a `lookaheads' member.
17132 Use a regular array for the `rules'.
17133 * src/state.c (reductions_new): Initialize the lookaheads member
17134 to 0.
17135 (state_rule_lookaheads_print): Adjust.
17136 * src/state.h, src/state.c (state_reductions_find): New.
17137 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
17138 (count_rr_conflicts): Adjust.
17139 * src/lalr.c (LArule): Remove.
17140 (add_lookback_edge): Adjust.
17141 (state_lookaheads_count): New.
17142 (states_lookaheads_initialize): Merge into...
17143 (initialize_LA): this.
17144 (lalr_free): Adjust.
17145 * src/main.c (main): Don't free nullable and derives too early: it
17146 is used by --verbose.
17147 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
17148
bb0027a9
AD
171492002-08-01 Akim Demaille <akim@epita.fr>
17150
17151 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
17152 `rule_number_t**'.
17153 (set_derives, free_derives): Rename as...
17154 (derives_compute, derives_free): this.
17155 Adjust all dependencies.
17156 * src/nullable.c (set_nullable, free_nullable): Rename as...
17157 (nullable_compute, nullable_free): these.
17158 (rule_list_t): Store rule_t *, not rule_number_t.
17159 * src/state.c (state_rule_lookaheads_print): Directly compare rule
17160 pointers, instead of their numbers.
17161 * src/main.c (main): Call nullable_free, and derives_free earlier,
17162 as they were lo longer used.
17163
3325ddc4
AD
171642002-08-01 Akim Demaille <akim@epita.fr>
17165
17166 * lib/timevar.c (get_time): Include children time.
17167 * src/lalr.h (LA, LArule): Don't export them: used with the
17168 state_t.
17169 * src/lalr.c (LA, LArule): Static.
17170 * src/lalr.h, src/lalr.c (lalr_free): New.
17171 * src/main.c (main): Call it.
17172 * src/tables.c (pack_vector): Check whether loc is >= to the
17173 table_size, not >.
17174 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
17175 (tables_generate): do it, since that's also it which allocates
17176 them.
17177 Don't free LA and LArule, main does.
17178
c6f1a33c
AD
171792002-07-31 Akim Demaille <akim@epita.fr>
17180
17181 Separate parser tables computation and output.
17182
17183 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
17184 (conflict_list, conflict_list_cnt, table, check, table_ninf)
17185 (yydefgoto, yydefact, high): Move to...
17186 * src/tables.h, src/tables.c: here.
17187 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17188 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17189 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
17190 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
17191 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
17192 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
17193 (action_row, save_row, token_actions, save_column, default_goto)
17194 (goto_actions, sort_actions, matching_state, pack_vector)
17195 (table_ninf_remap, pack_table, prepare_actions): Move to...
17196 * src/tables.c: here.
17197 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
17198 * src/output.c (token_actions, output_base, output_conflicts)
17199 (output_check): Merge into...
17200 (prepare_actions): this.
17201 (actions_output): Rename as...
17202 (user_actions_output): this.
17203 * src/main.c (main): Call tables_generate and tables_free.
17204
1509d42f
AD
172052002-07-31 Akim Demaille <akim@epita.fr>
17206
17207 Steal GCC's --time-report support.
17208
17209 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
17210 stolen/adjusted from GCC.
17211 * m4/stage.m4: Remove time related checks.
17212 * m4/timevar.m4: New.
17213 * configure.in: Adjust.
17214 * src/system.h: Adjust to using timevar.h.
17215 * src/getargs.h, src/getargs.c: Support trace_time for
17216 --trace=time.
17217 * src/main.c (stage): Remove.
17218 (main): Replace `stage' invocations with timevar calls.
17219 * src/output.c: Insert pertinent timevar calls.
17220
273a74fa
AD
172212002-07-31 Akim Demaille <akim@epita.fr>
17222
17223 Let --trace have arguments.
17224
17225 * src/getargs.h (enum trace_e): New.
17226 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
17227 (long_options, short_options): --trace/-T takes an optional
17228 argument.
17229 Change all the uses of trace_flag to reflect the new flags.
17230 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
17231
17232 Strengthen `stage' portability.
17233
17234 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
17235 * configure.in: Use it.
17236 Don't check for malloc.h and sys/times.h.
17237 * src/system.h: Include them when appropriate.
17238 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
17239 times and struct tms are available.
17240
217598da
AD
172412002-07-30 Akim Demaille <akim@epita.fr>
17242
17243 In verbose parse error message, don't report `error' as an
17244 expected token.
17245 * tests/actions.at (Printers and Destructors): Adjust.
17246 * tests/calc.at (Calculator $1): Adjust.
17247 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
17248 error message, do not report the parser accepts the error token in
17249 that state.
17250
52489d44
AD
172512002-07-30 Akim Demaille <akim@epita.fr>
17252
17253 Normalize conflict related messages.
17254
17255 * src/complain.h, src/complain.c (warn, complain): New.
17256 * src/conflicts.c (conflicts_print): Use them.
17257 (conflict_report_yacc): New, extracted from...
17258 (conflicts_print): here.
17259 * tests/conflicts.at, tests/existing.at: Adjust.
17260
e8832397
AD
172612002-07-30 Akim Demaille <akim@epita.fr>
17262
17263 Report rules which are never reduced by the parser: those hidden
17264 by conflicts.
17265
17266 * src/LR0.c (save_reductions): Don't make the final state too
17267 different: save its reduction (accept) instead of having a state
17268 without any action (no shift or goto, no reduce).
17269 Note: the final state is now a ``regular'' state, i.e., the
17270 parsers now contain `reduce 0' as default reduction.
17271 Nevertheless, since they decide to `accept' when yystate =
17272 final_state, they still will not reduce rule 0.
17273 * src/print.c (print_actions, print_reduction): Adjust.
17274 * src/output.c (action_row): Track reduced rules.
17275 (token_actions): Report rules never reduced.
17276 * tests/conflicts.at, tests/regression.at: Adjust.
17277
caf23d24
AD
172782002-07-30 Akim Demaille <akim@epita.fr>
17279
17280 `stage' was accidently included in a previous patch.
17281 Initiate its autoconfiscation.
17282
17283 * configure.in: Look for malloc.h and sys/times.h.
17284 * src/main.c (stage): Adjust.
17285 Report only when trace_flag.
17286
640748ee
AD
172872002-07-29 Akim Demaille <akim@epita.fr>
17288
17289 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
17290 state_number_t.
17291 (errs_t): symbol_t*, not symbol_number_t.
17292 (reductions_t): rule_t*, not rule_number_t.
17293 (FOR_EACH_SHIFT): New.
17294 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
17295 * src/print.c, src/print_graph.c: Adjust.
17296
88bce5a2
AD
172972002-07-29 Akim Demaille <akim@epita.fr>
17298
17299 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
17300
17301 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
17302 (endtoken, accept): these.
17303 * src/reader.c (reader): Set endtoken's default tag to "$end".
17304 Set undeftoken's tag to "$undefined" instead of "$undefined.".
17305 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
17306 Adjust.
17307
1bfb97db
AD
173082002-07-29 Akim Demaille <akim@epita.fr>
17309
17310 * src/reduce.c (reduce_grammar): When the language is empty,
17311 complain about the start symbol, not the axiom.
17312 Use its location.
17313 * tests/reduce.at (Empty Language): New.
17314
fc5734fe
AD
173152002-07-26 Akim Demaille <akim@epita.fr>
17316
17317 * src/reader.h, src/reader.c (gram_error): ... can't get
17318 yycontrol without making too strong assumptions on the parser
17319 itself.
17320 * src/output.c (prepare_tokens): Use the real 0th value of
17321 token_translations instead of `0'.
17322 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
17323 visible here.
17324 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
17325 for the time being: %locations ought to provide it to yyerror.
17326
3650b4b8
AD
173272002-07-25 Akim Demaille <akim@epita.fr>
17328
17329 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
17330 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
17331 * tests/regression.at (Web2c Actions): Adjust.
17332
4b3d3a8e
AD
173332002-07-25 Akim Demaille <akim@epita.fr>
17334
17335 Stop storing rules from 1 to nrules + 1.
17336
17337 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
17338 * src/nullable.c, src/output.c, src/print.c, src/reader.c
17339 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
17340 Iterate from 0 to nrules.
17341 Use rule_number_as_item_number and item_number_as_rule_number.
17342 Adjust to `derive' now containing possibly 0.
17343 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
17344 Handle the `- 1' part in rule numbers from/to item numbers.
17345 * src/conflicts.c (log_resolution): Fix the message which reversed
17346 shift and reduce.
17347 * src/output.c (action_row): Initialize default_rule to -1.
17348 (token_actions): Adjust.
17349 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
17350 expected output.
17351 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
17352
4a2a22f4
AD
173532002-07-25 Akim Demaille <akim@epita.fr>
17354
17355 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
17356 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
17357 (b4_c_knr_arg_decl): New.
17358 * data/yacc.c: Use it to define yysymprint, yydestruct, and
17359 yyreport_parse_error.
17360
b8df3223
AD
173612002-07-25 Akim Demaille <akim@epita.fr>
17362
17363 * data/yacc.c (yyreport_parse_error): New, extracted from...
17364 (yyparse): here.
17365 (yydestruct, yysymprint): Move above yyparse.
17366 Be K&R compliant.
17367
a762e609
AD
173682002-07-25 Akim Demaille <akim@epita.fr>
17369
17370 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
17371 replace...
17372 (b4_sint_type, b4_uint_type): these.
17373 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
17374 * tests/regression.at (Web2c Actions): Adjust.
17375
12b0043a
AD
173762002-07-25 Akim Demaille <akim@epita.fr>
17377
17378 * src/gram.h (TIEM_NUMBER_MAX): New.
17379 (item_number_of_rule_number, rule_number_of_item_number): Rename
17380 as...
17381 (rule_number_as_item_number, item_number_as_rule_number): these.
17382 Adjust dependencies.
17383 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
17384 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
17385 (symbol_number_to_vector_number): New.
17386 (order): Of vector_number_t* type.
17387 (base_t, BASE_MAX, BASE_MIN): New.
17388 (froms, tos, width, pos, check): Of base_t type.
17389 (action_number_t, ACTION_MIN, ACTION_MAX): New.
17390 (actrow): Of action_number_t type.
17391 (conflrow): Of unsigned int type.
17392 (table_ninf, base_ninf): New.
17393 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
17394 (muscle_insert_int_table, muscle_insert_base_table)
17395 (muscle_insert_rule_number_table): New.
17396 (prepare_tokens): Output `toknum' as int_table.
17397 (action_row): Returns a rule_number_t.
17398 Use ACTION_MIN, not SHRT_MIN.
17399 (token_actions): yydefact is rule_number_t*.
17400 (table_ninf_remap): New.
17401 (pack_table): Use it for `base' and `table'.
17402 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
17403 replaced with...
17404 (YYPACT_NINF, YYTABLE_NINF): these.
17405 (yypact, yytable): Compute their types instead of hard-coded
17406 `short'.
17407 * tests/regression.at (Web2c Actions): Adjust.
17408
5dde258a
AD
174092002-07-19 Akim Demaille <akim@epita.fr>
17410
17411 * src/scan-gram.l (id): Can start with an underscore.
17412
a945ec39
AD
174132002-07-16 Akim Demaille <akim@epita.fr>
17414
17415 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
17416 Adjust all former `associativity' dependencies.
17417 * src/symtab.c (symbol_new): Default associativity is `undef', not
17418 `right'.
17419 (symbol_check_alias_consistence): Adjust.
17420
fae437e8
AD
174212002-07-09 Akim Demaille <akim@epita.fr>
17422
17423 * doc/bison.texinfo: Properly set the ``header'' part.
17424 Use @dircategory ``GNU programming tools'' as per Texinfo's
17425 documentation.
17426 Use @copying.
17427
1a715ef2
AD
174282002-07-09 Akim Demaille <akim@epita.fr>
17429
17430 * lib/quotearg.h: Protect against multiple inclusions.
17431 * src/location.h (location_t): Add a `file' member.
17432 (LOCATION_RESET, LOCATION_PRINT): Adjust.
17433 * src/complain.c (warn_at, complain_at, fatal_at): Drop
17434 `error_one_per_line' support.
17435
a5d50994
AD
174362002-07-09 Akim Demaille <akim@epita.fr>
17437
17438 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
17439 * src/reader.c (lineno): Remove.
17440 Adjust all dependencies.
17441 (get_merge_function): Take a location and use complain_at.
17442 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
17443 * tests/regression.at (Invalid inputs, Mixing %token styles):
17444 Adjust.
17445
b275314e
AD
174462002-07-09 Akim Demaille <akim@epita.fr>
17447
17448 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
17449 recovery rule, and forbid extensions when --yacc.
17450 (gram_error): Use complain_at.
17451 * src/reader.c (reader): Exit if there were parse errors.
17452
865b9df1
AD
174532002-07-09 Akim Demaille <akim@epita.fr>
17454
17455 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
17456 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
17457 Reported by R Blake <blakers@mac.com>.
17458
c76e14da
AD
174592002-07-09 Akim Demaille <akim@epita.fr>
17460
17461 * data/yacc.c: Output the copyright notive in the header.
17462
7db2ed2d
AD
174632002-07-03 Akim Demaille <akim@epita.fr>
17464
17465 * src/output.c (froms, tos): Are state_number_t.
17466 (save_column): sp, sp1, and sp2 are state_number_t.
17467 (prepare): Rename `final' as `final_state_number', `nnts' as
17468 `nterms_number', `nrules' as `rules_number', `nstates' as
17469 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
17470 unused.
17471 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
17472 * data/lalr1.cc (nsym_): Remove, unused.
17473
e68e0410
AD
174742002-07-03 Akim Demaille <akim@epita.fr>
17475
17476 * src/lalr.h, src/lalr.c (goto_number_t): New.
17477 * src/lalr.c (goto_list_t): New.
17478 Propagate them.
17479 * src/nullable.c (rule_list_t): New.
17480 Propagate.
17481 * src/types.h: Remove.
17482
e1a4f3a4
AD
174832002-07-03 Akim Demaille <akim@epita.fr>
17484
17485 * src/closure.c (print_fderives): Use rule_rhs_print.
17486 * src/derives.c (print_derives): Use rule_rhs_print.
17487 (rule_list_t): New, replaces `shorts'.
17488 (set_derives): Add comments.
17489 * tests/sets.at (Nullable, Firsts): Adjust.
17490
536545f3
AD
174912002-07-03 Akim Demaille <akim@epita.fr>
17492
17493 * src/output.c (prepare_actions): Free `tally' and `width'.
17494 (prepare_actions): Allocate and free `order'.
17495 * src/symtab.c (symbols_free): Free `symbols'.
17496 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
17497 * src/output.c (m4_invoke): Move to...
17498 * src/scan-skel.l: here.
17499 (<<EOF>>): Close yyout, and free its name.
17500
8b752b00
AD
175012002-07-03 Akim Demaille <akim@epita.fr>
17502
17503 Fix some memory leaks, and fix a bug: state 0 was examined twice.
17504
17505 * src/LR0.c (new_state): Merge into...
17506 (state_list_append): this.
17507 (new_states): Merge into...
17508 (generate_states): here.
17509 (set_states): Don't ensure a proper `errs' state member here, do it...
17510 * src/conflicts.c (conflicts_solve): here.
17511 * src/state.h, src/state.c: Comment changes.
17512 (state_t): Rename member `shifts' as `transitions'.
17513 Adjust all dependencies.
17514 (errs_new): For consistency, also take the values as argument.
17515 (errs_dup): Remove.
17516 (state_errs_set): New.
17517 (state_reductions_set, state_transitions_set): Assert that no
17518 previous value was assigned.
17519 (state_free): New.
17520 (states_free): Use it.
17521 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
17522 temporary storage: use `errs' and `nerrs' as elsewhere.
17523 (set_conflicts): Allocate and free this `errs'.
17524
613f5e1a
AD
175252002-07-02 Akim Demaille <akim@epita.fr>
17526
17527 * lib/libiberty.h: New.
17528 * lib: Update the bitset implementation from upstream.
17529 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
17530 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
17531 * src/main.c: Adjust bitset stats calls.
17532
26e0cadc
PE
175332002-07-01 Paul Eggert <eggert@twinsun.com>
17534
17535 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
17536 char, so that negative chars don't collide with $.
17537
1154cced
AD
175382002-06-30 Akim Demaille <akim@epita.fr>
17539
17540 Have the GLR tests be `warning' checked, and fix the warnings.
17541
17542 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
17543 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
17544 (yyremoveDeletes): `yyi' and `yyj' are size_t.
17545 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
17546 (yyaddDeferredAction): static.
17547 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
17548 (yyreportParseError): yyprefix is const.
17549 yytokenp is used only when verbose.
17550 (yy__GNUC__): Replace with __GNUC__.
17551 (yypdumpstack): yyi is size_t.
17552 (yypreference): Un-yy local variables and arguments, to avoid
17553 clashes with `yyr1'. Anyway, we are not in the user name space.
17554 (yytname_size): be an int, as is compared with ints.
17555 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
17556 Use them.
17557 * tests/cxx-gram.at: Use quotation to protect $1.
17558 Use AT_COMPILE to enable warnings hunts.
17559 Prototype yylex and yyerror.
17560 `Use' argc.
17561 Include `string.h', not `strings.h'.
17562 Produce and prototype stmtMerge only when used.
17563 yylex takes a location.
17564
97650f4e
AD
175652002-06-30 Akim Demaille <akim@epita.fr>
17566
17567 We spend a lot of time in quotearg, in particular when --verbose.
17568
17569 * src/symtab.c (symbol_get): Store a quoted version of the key.
17570 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
17571 Adjust all callers.
17572
d2576365
AD
175732002-06-30 Akim Demaille <akim@epita.fr>
17574
17575 * src/state.h (reductions_t): Rename member `nreds' as num.
17576 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
17577 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
17578
ccaf65bc
AD
175792002-06-30 Akim Demaille <akim@epita.fr>
17580
17581 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
17582 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
17583 (shifts_to): Rename as...
17584 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
17585 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
17586 (TRANSITION_IS_DISABLED, transitions_to): these.
17587
87675353
AD
175882002-06-30 Akim Demaille <akim@epita.fr>
17589
17590 * src/print.c (print_shifts, print_gotos): Merge into...
17591 (print_transitions): this.
17592 (print_transitions, print_errs, print_reductions): Align the
17593 lookaheads columns.
17594 (print_core, print_transitions, print_errs, print_state,
17595 print_grammar): Output empty lines separator before, not after.
17596 (state_default_rule_compute): Rename as...
17597 (state_default_rule): this.
17598 * tests/conflicts.at (Defaulted Conflicted Reduction),
17599 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
17600 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
17601
ce4ccb4b
AD
176022002-06-30 Akim Demaille <akim@epita.fr>
17603
17604 Display items as we display rules.
17605
17606 * src/gram.h, src/gram.c (rule_lhs_print): New.
17607 * src/gram.c (grammar_rules_partial_print): Use it.
17608 * src/print.c (print_core): Likewise.
17609 * tests/conflicts.at (Defaulted Conflicted Reduction),
17610 (Unresolved SR Conflicts): Adjust.
17611 (Unresolved SR Conflicts): Adjust and rename as...
17612 (Resolved SR Conflicts): this, as was meant.
17613 * tests/regression.at (Web2c Report): Adjust.
17614
bc933ef1
AD
176152002-06-30 Akim Demaille <akim@epita.fr>
17616
17617 * src/print.c (state_default_rule_compute): New, extracted from...
17618 (print_reductions): here.
17619 Pessimize, but clarify the code.
17620 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
17621
53d4308d
AD
176222002-06-30 Akim Demaille <akim@epita.fr>
17623
17624 * src/output.c (action_row): Let default_rule be always a rule
17625 number.
17626
574fb2d5
AD
176272002-06-30 Akim Demaille <akim@epita.fr>
17628
17629 * src/closure.c (print_firsts, print_fderives, closure):
17630 Use BITSET_EXECUTE.
17631 * src/lalr.c (lookaheads_print): Likewise.
17632 * src/state.c (state_rule_lookaheads_print): Likewise.
17633 * src/print_graph.c (print_core): Likewise.
17634 * src/print.c (print_reductions): Likewise.
17635 * src/output.c (action_row): Likewise.
17636 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
17637
05811fd7
AD
176382002-06-30 Akim Demaille <akim@epita.fr>
17639
17640 * src/print_graph.c: Use report_flag.
17641
0e4d5753
AD
176422002-06-30 Akim Demaille <akim@epita.fr>
17643
17644 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
17645 to...
17646 * src/relation.h, src/relation.c (traverse, relation_digraph)
17647 (relation_print, relation_transpose): New.
17648
24c7d800
AD
176492002-06-30 Akim Demaille <akim@epita.fr>
17650
17651 * src/state.h, src/state.c (shifts_to): New.
17652 * src/lalr.c (build_relations): Use it.
17653
9222837b
AD
176542002-06-30 Akim Demaille <akim@epita.fr>
17655
17656 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
17657 (item_number_of_rule_number, rule_number_of_item_number): New.
17658 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
17659 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17660 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
17661 Propagate their use.
17662 Much remains to be done, in particular wrt `shorts' from types.h.
17663
260008e5
AD
176642002-06-30 Akim Demaille <akim@epita.fr>
17665
17666 * src/symtab.c (symbol_new): Initialize the `printer' member.
17667
8a731ca8
AD
176682002-06-30 Akim Demaille <akim@epita.fr>
17669
17670 * src/LR0.c (save_reductions): Remove, replaced by...
17671 * src/state.h, src/state.c (state_reductions_set): New.
17672 (reductions, errs): Rename as...
17673 (reductions_t, errs_t): these.
17674 Adjust all dependencies.
17675
32e1e0a4
AD
176762002-06-30 Akim Demaille <akim@epita.fr>
17677
17678 * src/LR0.c (state_list_t, state_list_append): New.
17679 (first_state, last_state): Now symbol_list_t.
17680 (this_state): Remove.
17681 (new_itemsets, append_states, save_reductions): Take a state_t as
17682 argument.
17683 (set_states, generate_states): Adjust.
17684 (save_shifts): Remove, replaced by...
17685 * src/state.h, src/state.c (state_shifts_set): New.
17686 (shifts): Rename as...
17687 (shifts_t): this.
17688 Adjust all dependencies.
17689 * src/state.h (state_t): Remove the `next' member.
17690
e5fb6710
AD
176912002-06-30 Akim Demaille <akim@epita.fr>
17692
17693 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
17694 escaped in slot 0.
17695
c7ca99d4
AD
176962002-06-30 Akim Demaille <akim@epita.fr>
17697
17698 Use hash.h for the state hash table.
17699
17700 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
17701 (allocate_storage): Use state_hash_new.
17702 (free_storage): Use state_hash_free.
17703 (new_state, get_state): Adjust.
17704 * src/lalr.h, src/lalr.c (states): Move to...
17705 * src/states.h (state_t): Remove the `link' member, no longer
17706 used.
17707 * src/states.h, src/states.c: here.
17708 (state_hash_new, state_hash_free, state_hash_lookup)
17709 (state_hash_insert, states_free): New.
17710 * src/states.c (state_table, state_compare, state_hash): New.
17711 * src/output.c (output_actions): Do not free states now, since we
17712 still need to know the final_state number in `prepare', called
17713 afterwards. Do it...
17714 * src/main.c (main): here: call states_free after `output'.
17715
df0e7316
AD
177162002-06-30 Akim Demaille <akim@epita.fr>
17717
17718 * src/state.h, src/state.c (state_new): New, extracted from...
17719 * src/LR0.c (new_state): here.
17720 * src/state.h (STATE_ALLOC): Move to...
17721 * src/state.c: here.
17722 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
17723 * src/state.h, src/state.c: here.
17724
39f41916
AD
177252002-06-30 Akim Demaille <akim@epita.fr>
17726
17727 * src/reader.c (gensym): Rename as...
17728 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
17729 (getsym): Rename as...
17730 (symbol_get): this.
17731
d57650a5
AD
177322002-06-30 Akim Demaille <akim@epita.fr>
17733
17734 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
17735 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
17736 * src/output.c, src/print.c, src/print_graph.c: Propagate.
17737 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
17738
5a08f1ce
AD
177392002-06-30 Akim Demaille <akim@epita.fr>
17740
17741 Make the test suite pass with warnings checked.
17742
17743 * tests/actions.at (Printers and Destructors): Improve.
17744 Avoid unsigned vs. signed issues.
17745 * tests/calc.at: Don't exercise the scanner here, do it...
17746 * tests/input.at (Torturing the Scanner): here.
17747
720623af
PH
177482002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17749
88e7e941 17750 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
17751 reorganize first lines parallel to yacc.c.
17752
fb8135fa
AD
177532002-06-28 Akim Demaille <akim@epita.fr>
17754
17755 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
17756 (b4_token_enum, b4_token_defines): New, factored from...
17757 * data/lalr1.cc, data/yacc.c, glr.c: here.
17758
41442480
AD
177592002-06-28 Akim Demaille <akim@epita.fr>
17760
17761 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
17762 unused variables.
17763 * src/output.c (merger_output): static.
17764
e0e5bf84
AD
177652002-06-28 Akim Demaille <akim@epita.fr>
17766
ba0fe3c7 17767 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
17768 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
17769 pacify GCC.
17770 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 17771
676385e2
PH
177722002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17773
17774 Accumulated changelog for new GLR parsing features.
17775
6a254321 17776 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
17777 conflicts_total_count.
17778 * src/conflicts.h: Ditto.
17779 * src/output.c (token_actions): Use the new name.
17780 (output_conflicts): Change conflp => conflict_list_heads, and
17781 confl => conflict_list for better readability.
17782 * data/glr.c: Use the new names.
17783 * NEWS: Add self to GLR announcement.
e0e5bf84 17784
676385e2
PH
17785 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
17786
17787 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
17788 Akim Demaille.
17789
17790 * data/bison.glr: Change name to glr.c
17791 * data/glr.c: Renamed from bison.glr.
17792 * data/Makefile.am: Add glr.c
e0e5bf84
AD
17793
17794 * src/getargs.c:
17795
676385e2 17796 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 17797 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 17798
676385e2
PH
17799 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17800
17801 * data/bison.glr: Be sure to restore the
17802 current #line when returning to the skeleton contents after having
17803 exposed the input file's #line.
17804
17805 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17806
17807 * data/bison.glr: Bring up to date with changes to bison.simple.
17808
17809 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17810
17811 * data/bison.glr: Correct definitions that use b4_prefix.
17812 Various reformatting.
17813 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
17814 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
17815 yytokenp argument; now part of stack.
17816 (yychar): Define to behave as documented.
17817 (yyclearin): Ditto.
e0e5bf84 17818
676385e2
PH
17819 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17820
17821 * src/reader.h: Add declaration for free_merger_functions.
17822
17823 * src/reader.c (merge_functions): New variable.
17824 (get_merge_function): New function.
17825 (free_merger_functions): New function.
17826 (readgram): Check for %prec that is not followed by a symbol.
17827 Handle %dprec and %merge declarations.
17828 (packgram): Initialize dprec and merger fields in rules array.
17829
17830 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
17831 conflict_list_cnt, conflict_list_free): New variables.
17832 (table_grow): Also grow conflict_table.
e0e5bf84 17833 (prepare_rules): Output dprec and merger tables.
676385e2 17834 (conflict_row): New function.
e0e5bf84 17835 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
17836 default reduction in conflicted states for GLR parser so that there
17837 are spaces for the conflict lists.
17838 (save_row): Also save conflict information.
17839 (token_actions): Allocate conflict list.
17840 (merger_output): New function.
17841 (pack_vector): Pack conflict table, too.
17842 (output_conflicts): New function to output yyconflp and yyconfl.
17843 (output_check): Allocate conflict_tos.
17844 (output_actions): Output conflict tables, also.
17845 (output_skeleton): Output b4_mergers definition.
17846 (prepare): Output b4_max_rhs_length definition.
17847 Use 'bison.glr' as default skeleton for GLR parsers.
17848
17849 * src/gram.c (glr_parser): New flag.
17850 (grammar_free): Call free_merger_functions.
17851
17852 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
17853 all pairs of conflicting reductions, rather than just all tokens
17854 causing conflicts. Needed to size conflict tables.
e0e5bf84 17855 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
17856 interface.
17857 (conflicts_print): Ditto.
17858 (count_total_conflicts): New function.
17859
17860 * src/reader.h (merger_list): New type.
17861 (merge_functions): New variable.
17862
17863 * src/lex.h (tok_dprec, tok_merge): New token types.
17864
17865 * src/gram.h (rule_s): Add dprec and merger fields.
17866 (glr_parser): New flag.
17867
17868 * src/conflicts.h (count_total_conflicts): New function.
17869
17870 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
17871
17872 * doc/bison.texinfo (Generalized LR Parsing): New section.
17873 (GLR Parsers): New section.
17874 (Language and Grammar): Mention GLR parsing.
17875 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
17876 Correct typo ("tge" -> "the").
17877
17878 * data/bison.glr: New skeleton for GLR parsing.
17879
17880 * tests/cxx-gram.at: New tests for GLR parsing.
17881
17882 * tests/testsuite.at: Include cxx-gram.at.
17883
17884 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 17885
676385e2
PH
17886 * src/parse-gram.y:
17887
17888 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
17889
17890 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 17891
b5480d74 178922002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
17893
17894 * src/options.h, src/options.c: Remove.
17895 * src/getargs.c (short_options, long_options): New.
17896
60491a94
AD
178972002-06-27 Akim Demaille <akim@epita.fr>
17898
17899 * data/bison.simple, data/bison.c++: Rename as...
17900 * data/yacc.c, data/lalr1.cc: these.
17901 * doc/bison.texinfo (Environment Variables): Remove.
17902
9be0c25b
AD
179032002-06-25 Raja R Harinath <harinath@cs.umn.edu>
17904
17905 * src/getargs.c (report_argmatch): Initialize strtok().
17906
1ae72863
AD
179072002-06-20 Akim Demaille <akim@epita.fr>
17908
17909 * data/bison.simple (b4_symbol_actions): New, replaces...
17910 (b4_symbol_destructor, b4_symbol_printer): these.
17911 (yysymprint): Be sure to call YYPRINT only for tokens, and using
17912 user token numbers.
17913
87542d29
AD
179142002-06-20 Akim Demaille <akim@epita.fr>
17915
17916 * data/bison.simple (yydestructor): Rename as...
17917 (yydestruct): this.
17918
1a31ed21
AD
179192002-06-20 Akim Demaille <akim@epita.fr>
17920
17921 * src/symtab.h, src/symtab.c (symbol_type_set)
17922 (symbol_destructor_set, symbol_precedence_set): The location is
17923 the last argument.
17924 Adjust all callers.
17925
e776192e
AD
179262002-06-20 Akim Demaille <akim@epita.fr>
17927
17928 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
17929 internals.
17930 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
17931 Takes a location.
17932 * src/symtab.h, src/symtab.c (symbol_class_set)
17933 (symbol_user_token_number_set): Likewise.
17934 Adjust all callers.
17935 Promote complain_at.
17936 * tests/input.at (Type Clashes): Adjust.
17937
5c1180b3
AD
179382002-06-20 Akim Demaille <akim@epita.fr>
17939
17940 * data/bison.simple (YYLEX): Fix the declaration when
17941 %pure-parser.
17942
e3170060
AD
179432002-06-20 Akim Demaille <akim@epita.fr>
17944
17945 * data/bison.simple (yysymprint): Don't print the token number,
17946 just its name.
17947 * tests/actions.at (Destructors): Rename as...
17948 (Printers and Destructors): this.
17949 Also exercise %printer.
17950
253862fd
AD
179512002-06-20 Akim Demaille <akim@epita.fr>
17952
17953 * data/bison.simple (YYDSYMPRINT): New.
17954 Use it to remove many of the #if YYDEBUG/if (yydebug).
17955
366eea36
AD
179562002-06-20 Akim Demaille <akim@epita.fr>
17957
17958 * src/symtab.h, src/symtab.c (symbol_t): printer and
17959 printer_location are new members.
17960 (symbol_printer_set): New.
17961 * src/parse-gram.y (PERCENT_PRINTER): New token.
17962 Handle its associated rule.
17963 * src/scan-gram.l: Adjust.
17964 (handle_destructor_at, handle_destructor_dollar): Rename as...
17965 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17966 * src/output.c (symbol_printers_output): New.
17967 (output_skeleton): Call it.
17968 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17969 since there are already many grammar files with a user `yyprint'.
17970 Replace the calls to YYPRINT to calls to yysymprint.
17971 * tests/calc.at: Adjust.
17972 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17973 taking advantage of parser very internal details (stack size!).
17974
4f25ebb0
AD
179752002-06-20 Akim Demaille <akim@epita.fr>
17976
17977 * src/scan-gram.l: Complete the scanner with the missing patterns
17978 to pacify Flex.
17979 Use `quote' and `symbol_tag_get' where appropriate.
17980
93b68a0e
AD
179812002-06-19 Akim Demaille <akim@epita.fr>
17982
17983 * tests/actions.at (Destructors): Augment to test locations.
17984 * data/bison.simple (yydestructor): Pass it the current location
17985 if locations are enabled.
17986 Prototype only when __STDC__ or C++.
17987 Change the argument names to move into the yy name space: there is
17988 user code here.
17989
58612f1d
AD
179902002-06-19 Akim Demaille <akim@epita.fr>
17991
74310291
AD
17992 * data/bison.simple (b4_pure_if): New.
17993 Use it instead of #ifdef YYPURE.
17994
179952002-06-19 Akim Demaille <akim@epita.fr>
17996
17997 * data/bison.simple (b4_location_if): New.
58612f1d
AD
17998 Use it instead of #ifdef YYLSP_NEEDED.
17999
f25bfb75
AD
180002002-06-19 Akim Demaille <akim@epita.fr>
18001
18002 Prepare @$ in %destructor, but currently don't bind it in the
18003 skeleton, as %location use is not cleaned up yet.
18004
18005 * src/scan-gram.l (handle_dollar, handle_destructor_at)
18006 (handle_action_at): New.
18007 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
18008 a braced_code_t and a location as additional arguments.
18009 (handle_destructor_dollar): Instead of requiring `b4_eval', just
18010 unquote one when outputting `b4_dollar_dollar'.
18011 Adjust callers.
18012 * data/bison.simple (b4_eval): Remove.
18013 (b4_symbol_destructor): Adjust.
18014 * tests/input.at (Invalid @n): Adjust.
18015
c732d2c6
AD
180162002-06-19 Zack Weinberg <zack@codesourcery.com>
18017
18018 * doc/bison.texinfo: Document ability to have multiple
18019 prologue sections.
18020
8c165d89
AD
180212002-06-18 Akim Demaille <akim@epita.fr>
18022
18023 * src/files.c (compute_base_names): When computing the output file
18024 names from the input file name, strip the directory part.
18025
ca98bf57
AD
180262002-06-18 Akim Demaille <akim@epita.fr>
18027
18028 * data/bison.simple.new: Comment changes.
18029 Reported by Andreas Schwab.
18030
0bfb02ff
AD
180312002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
18032
18033 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
18034 there are no `label `yyoverflowlab' defined but not used' warnings
18035 when yyoverflow is defined.
18036
24c0aad7
AD
180372002-06-18 Akim Demaille <akim@epita.fr>
18038
18039 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
18040 new member.
18041 (symbol_destructor_set): Adjust.
18042 * src/output.c (symbol_destructors_output): Output the destructor
18043 locations.
18044 Output the symbol name.
18045 * data/bison.simple (b4_symbol_destructor): Adjust.
18046
5719c109
AD
180472002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
18048 and Akim Demaille <akim@epita.fr>
18049
18050 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
18051 what's left on the stack when the error recovery hits EOF.
18052 * tests/actions.at (Destructors): Complete to exercise this case.
18053
9280d3ef
AD
180542002-06-17 Akim Demaille <akim@epita.fr>
18055
18056 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
18057 arguments is really empty, not only equal to `[]'.
18058 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
18059 member.
18060 (symbol_destructor_set): New.
18061 * src/output.c (symbol_destructors_output): New.
18062 * src/reader.h (brace_code_t, current_braced_code): New.
18063 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
18064 (handle_dollar): Rename as...
18065 (handle_action_dollar): this.
18066 (handle_destructor_dollar): New.
18067 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
18068 (grammar_declaration): Use it.
18069 * data/bison.simple (yystos): Is always defined.
18070 (yydestructor): New.
18071 * tests/actions.at (Destructors): New.
18072 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
18073
dafdc66f
AD
180742002-06-17 Akim Demaille <akim@epita.fr>
18075
18076 * src/symlist.h, src/symlist.c (symbol_list_length): New.
18077 * src/scan-gram.l (handle_dollar, handle_at): Compute the
18078 rule_length only when needed.
18079 * src/output.c (actions_output, token_definitions_output): Output
18080 the full M4 block.
18081 * src/symtab.c: Don't access directly to the symbol tag, use
18082 symbol_tag_get.
18083 * src/parse-gram.y: Use symbol_list_free.
18084
56c47203
AD
180852002-06-17 Akim Demaille <akim@epita.fr>
18086
18087 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
18088 (symbol_list_prepend, get_type_name): Move to...
18089 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
18090 (symbol_list_prepend, symbol_list_n_type_name_get): here.
18091 Adjust all callers.
18092 (symbol_list_free): New.
18093 * src/scan-gram.l (handle_dollar): Takes a location.
18094 * tests/input.at (Invalid $n): Adjust.
18095
1e0bab92
AD
180962002-06-17 Akim Demaille <akim@epita.fr>
18097
18098 * src/reader.h, src/reader.c (symbol_list_new): Export it.
18099 (symbol_list_prepend): New.
18100 * src/parse-gram.y (%union): `list' is a new member.
18101 (symbols.1): New, replaces...
18102 (terms_to_prec.1, nterms_to_type.1): these.
18103 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
18104 Take a location as additional argument.
18105 Adjust all callers.
18106
04e60654
AD
181072002-06-15 Akim Demaille <akim@epita.fr>
18108
18109 * src/parse-gram.y: Move %token in the declaration section so that
18110 we don't depend upon CVS Bison.
18111
10e5b8bd
AD
181122002-06-15 Akim Demaille <akim@epita.fr>
18113
18114 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
18115 * src/print.c (print_core): Use it.
18116
9801d40c
AD
181172002-06-15 Akim Demaille <akim@epita.fr>
18118
18119 * src/conflicts.c (log_resolution): Accept the rule involved in
18120 the sr conflicts instead of the lookahead number that points to
18121 that rule.
18122 (flush_reduce): Accept the current lookahead vector as argument,
18123 instead of the index in LA.
18124 (resolve_sr_conflict): Accept the current number of lookahead
18125 bitset to consider for the STATE, instead of the index in LA.
18126 (set_conflicts): Adjust.
18127 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
18128
c0263492
AD
181292002-06-15 Akim Demaille <akim@epita.fr>
18130
18131 * src/state.h (state_t): Replace the `lookaheadsp' member, a
18132 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
18133 Adjust all dependencies.
18134 * src/lalr.c (initialize_lookaheads): Split into...
18135 (states_lookaheads_count, states_lookaheads_initialize): these.
18136 (lalr): Adjust.
18137
9757c359
AD
181382002-06-15 Akim Demaille <akim@epita.fr>
18139
18140 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
18141 out of...
18142 (grammar_rules_print): here.
18143 * src/reduce.c (reduce_output): Use it.
18144 * tests/reduce.at (Useless Rules, Reduced Automaton)
18145 (Underivable Rules): Adjust.
18146
6b98e4b5
AD
181472002-06-15 Akim Demaille <akim@epita.fr>
18148
18149 Copy BYacc's nice way to report the grammar.
18150
18151 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
18152 New.
18153 Don't print the rules' location, it is confusing and useless.
18154 (rule_print): Use grammar_rhs_print.
18155 * src/print.c (print_grammar): Use grammar_rules_print.
18156
6b98e4b5
AD
181572002-06-15 Akim Demaille <akim@epita.fr>
18158
18159 Complete and rationalize `useless thing' warnings.
18160
18161 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
18162 (symbol_tag_print): New.
18163 Use them everywhere in place of accessing directly the tag member.
18164 * src/gram.h, src/gram.c (rule_print): New.
18165 Use it where a rule used to be printed `by hand'.
18166 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
18167 (reduce_grammar_tables): Report the useless rules.
18168 (reduce_print): Useless things are a warning, not an error.
18169 Report it as such.
18170 * tests/reduce.at (Useless Nonterminals, Useless Rules):
18171 (Reduced Automaton, Underivable Rules): Adjust.
18172 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
18173 * tests/conflicts.at (Unresolved SR Conflicts)
18174 (Solved SR Conflicts): Adjust.
18175
ee000ba4
AD
181762002-06-15 Akim Demaille <akim@epita.fr>
18177
18178 Let symbols have a location.
18179
18180 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
18181 (getsym): Adjust.
18182 Adjust all callers.
18183 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
18184 Use location_t, not int.
18185 * src/symtab.c (symbol_check_defined): Take advantage of the
18186 location.
18187 * tests/regression.at (Invalid inputs): Adjust.
18188
8efe435c
AD
181892002-06-15 Akim Demaille <akim@epita.fr>
18190
18191 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
18192 (input): Don't try to initialize yylloc here, do it in the
18193 scanner.
18194 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
18195 * src/gram.h (rule_t): Change line and action_line into location
18196 and action_location, of location_t type.
18197 Adjust all dependencies.
18198 * src/location.h, src/location.c (empty_location): New.
18199 * src/reader.h, src/reader.c (grammar_start_symbol_set)
18200 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
18201 (grammar_current_rule_symbol_append)
18202 (grammar_current_rule_action_append): Expect a location as argument.
18203 * src/reader.c (grammar_midrule_action): Adjust to attach an
18204 action's location as dummy symbol location.
18205 * src/symtab.h, src/symtab.c (startsymbol_location): New.
18206 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
18207 the line numbers.
18208
1921f1d7
AD
182092002-06-14 Akim Demaille <akim@epita.fr>
18210
18211 Grammar declarations may be found in the grammar section.
18212
18213 * src/parse-gram.y (rules_or_grammar_declaration): New.
18214 (declarations): Each declaration may end with a semicolon, not
18215 just...
18216 (grammar_declaration): `"%union"'.
18217 (grammar): Branch to rules_or_grammar_declaration.
18218
4515534c
AD
182192002-06-14 Akim Demaille <akim@epita.fr>
18220
18221 * src/main.c (main): Invoke scanner_free.
18222
f958596b
AD
182232002-06-14 Akim Demaille <akim@epita.fr>
18224
18225 * src/output.c (m4_invoke): Extracted from...
18226 (output_skeleton): here.
18227 Free tempfile.
18228
2c569025
AD
182292002-06-14 Akim Demaille <akim@epita.fr>
18230
18231 * src/parse-gram.y (directives, directive, gram)
18232 (grammar_directives, precedence_directives, precedence_directive):
18233 Rename as...
18234 (declarations, declaration, grammar, grammar_declaration)
18235 (precedence_declaration, precedence_declarator): these.
18236 (symbol_declaration): New.
18237
592e8d4d
AD
182382002-06-14 Akim Demaille <akim@epita.fr>
18239
18240 * src/files.c (action_obstack): Remove, unused.
18241 (output_obstack): Remove it, and all its dependencies, as it is no
18242 longer needed.
18243 * src/reader.c (epilogue_set): Build the epilogue in the
18244 muscle_obstack.
18245 * src/output.h, src/output.c (muscle_obstack): Move to...
18246 * src/muscle_tab.h, src/muscle_tab.h: here.
18247 (muscle_init): Initialize muscle_obstack.
18248 (muscle_free): New.
18249 * src/main.c (main): Call it.
18250
0c15323d
AD
182512002-06-14 Akim Demaille <akim@epita.fr>
18252
18253 * src/location.h: New, extracted from...
18254 * src/reader.h: here.
18255 * src/Makefile.am (noinst_HEADERS): Merge into
18256 (bison_SOURCES): this.
18257 Add location.h.
18258 * src/parse-gram.y: Use location_t instead of Bison's.
18259 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
18260 Use location_t instead of ints.
18261
e96c9728
AD
182622002-06-14 Akim Demaille <akim@epita.fr>
18263
18264 * data/bison.simple, data/bison.c++: Be sure to restore the
18265 current #line when returning to the skeleton contents after having
18266 exposed the input file's #line.
18267
75d1fe16
AD
182682002-06-12 Akim Demaille <akim@epita.fr>
18269
18270 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
18271 eager.
18272 * tests/actions.at (Exotic Dollars): New.
18273
6c35d22c
AD
182742002-06-12 Akim Demaille <akim@epita.fr>
18275
18276 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
18277 ['"/] too eagerly.
18278 * tests/input.at (Torturing the Scanner): New.
18279
1d6412ad
AD
182802002-06-11 Akim Demaille <akim@epita.fr>
18281
18282 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
18283 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
18284 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
18285 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
18286 * src/reader.c (reader): Use it.
18287
4cdb01db
AD
182882002-06-11 Akim Demaille <akim@epita.fr>
18289
18290 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
18291 Adjust all callers.
18292 (scanner_last_string_free): New.
18293
44995b2e
AD
182942002-06-11 Akim Demaille <akim@epita.fr>
18295
18296 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
18297 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
18298 (last_string, YY_OBS_FREE): New.
18299 Use them when returning an ID.
18300
e9955c83
AD
183012002-06-11 Akim Demaille <akim@epita.fr>
18302
18303 Have Bison grammars parsed by a Bison grammar.
18304
18305 * src/reader.c, src/reader.h (prologue_augment): New.
18306 * src/reader.c (copy_definition): Remove.
18307
18308 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
18309 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
18310 (grammar_current_rule_prec_set, grammar_current_rule_check)
18311 (grammar_current_rule_symbol_append)
18312 (grammar_current_rule_action_append): Export.
18313 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
18314 (symbol_list_action_append): Remove.
18315 Hook the routines from reader.
18316 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
18317 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
18318
18319 * src/reader.c (read_declarations): Remove, unused.
18320
18321 * src/parse-gram.y: Handle the epilogue.
18322 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
18323 (grammar_start_symbol_set): this.
18324 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
18325 * src/reader.c (readgram): Remove, unused.
18326 (reader): Adjust to insert eoftoken and axiom where appropriate.
18327
18328 * src/reader.c (copy_dollar): Replace with...
18329 * src/scan-gram.h (handle_dollar): this.
18330 * src/parse-gram.y: Remove `%thong'.
18331
18332 * src/reader.c (copy_at): Replace with...
18333 * src/scan-gram.h (handle_at): this.
18334
18335 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
18336 New.
18337
18338 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
18339 time being.
18340
18341 * src/reader.h, src/reader.c (grammar_rule_end): New.
18342
18343 * src/parse.y (current_type, current_class): New.
18344 Implement `%nterm', `%token' support.
18345 Merge `%term' into `%token'.
18346 (string_as_id): New.
18347 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
18348 type name.
18349
18350 * src/parse-gram.y: Be sure to handle properly the beginning of
18351 rules.
18352
18353 * src/parse-gram.y: Handle %type.
18354 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
18355
18356 * src/parse-gram.y: More directives support.
18357 * src/options.c: No longer handle source directives.
18358
18359 * src/parse-gram.y: Fix %output.
18360
18361 * src/parse-gram.y: Handle %union.
18362 Use the prologue locations.
18363 * src/reader.c (parse_union_decl): Remove.
18364
18365 * src/reader.h, src/reader.c (epilogue_set): New.
18366 * src/parse-gram.y: Use it.
18367
18368 * data/bison.simple, data/bison.c++: b4_stype is now either not
18369 defined, then default to int, or to the contents of %union,
18370 without `union' itself.
18371 Adjust.
18372 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
18373
18374 * src/output.c (actions_output): Don't output braces, as they are
18375 already handled by the scanner.
18376
18377 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
18378 characters to themselves.
18379
18380 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
18381 that the epilogue has a proper #line.
18382
18383 * src/parse-gram.y: Handle precedence/associativity.
18384
18385 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
18386 a terminal.
18387 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
18388 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
18389 at all to define terminals that cannot be emitted.
18390
18391 * src/scan-gram.l: Escape M4 characters.
18392
18393 * src/scan-gram.l: Working properly with escapes in user
18394 strings/characters.
18395
18396 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
18397 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
18398 grammar.
18399 Use more modest sizes, as for the time being the parser does not
18400 release memory, and therefore the process swallows a huge amount
18401 of memory.
18402
18403 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
18404 stricter %token grammar.
18405
18406 * src/symtab.h (associativity): Add `undef_assoc'.
18407 (symbol_precedence_set): Do nothing when passed an undef_assoc.
18408 * src/symtab.c (symbol_check_alias_consistence): Adjust.
18409
18410 * tests/regression.at (Invalid %directive): Remove, as it is now
18411 meaningless.
18412 (Invalid inputs): Adjust to the new error messages.
18413 (Token definitions): The new grammar doesn't allow too many
18414 eccentricities.
18415
18416 * src/lex.h, src/lex.c: Remove.
18417 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
18418 (copy_character, copy_string2, copy_string, copy_identifier)
18419 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
18420 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
18421 (parse_action): Remove.
18422 * po/POTFILES.in: Adjust.
18423
2e047461
AD
184242002-06-11 Akim Demaille <akim@epita.fr>
18425
cd05d13c 18426 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
18427 rule's action member: return the action as a string.
18428 Don't require `rule_length' as an argument: compute it.
18429 (grammar_current_rule_symbol_append)
18430 (grammar_current_rule_action_append): New, eved out from
18431 (readgram): here.
18432 Remove `action_flag', `rulelength', unused now.
18433
9af3fbce
AD
184342002-06-11 Akim Demaille <akim@epita.fr>
18435
18436 * src/reader.c (grammar_current_rule_prec_set).
18437 (grammar_current_rule_check): New, eved out from...
18438 (readgram): here.
18439 Remove `xaction', `first_rhs': useless.
18440 * tests/input.at (Type clashes): New.
18441 * tests/existing.at (GNU Cim Grammar): Adjust.
18442
1485e106
AD
184432002-06-11 Akim Demaille <akim@epita.fr>
18444
18445 * src/reader.c (grammar_midrule_action): New, Eved out from
18446 (readgram): here.
18447
da4160c3
AD
184482002-06-11 Akim Demaille <akim@epita.fr>
18449
18450 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
18451 New.
18452 (readgram): Use them as replacement of inlined code, crule and
18453 crule1.
18454
f6d0f937
AD
184552002-06-11 Akim Demaille <akim@epita.fr>
18456
18457 * src/reader.c (grammar_end, grammar_symbol_append): New.
18458 (readgram): Use them.
18459 Make the use of `p' as local as possible.
18460
69078d4b
AD
184612002-06-10 Akim Demaille <akim@epita.fr>
18462
18463 GCJ's parser requires the tokens to be defined before the prologue.
18464
18465 * data/bison.simple: Output the token definition before the user's
18466 prologue.
18467 * tests/regression.at (Braces parsing, Duplicate string)
18468 (Mixing %token styles): Check the output from bison.
18469 (Early token definitions): New.
18470
5e424082
AD
184712002-06-10 Akim Demaille <akim@epita.fr>
18472
18473 * src/symtab.c (symbol_user_token_number_set): Don't complain when
18474 assigning twice the same user number to a token, so that we can
18475 use it in...
18476 * src/lex.c (lex): here.
18477 Also use `symbol_class_set' instead of hand written code.
18478 * src/reader.c (parse_assoc_decl): Likewise.
18479
44536b35
AD
184802002-06-10 Akim Demaille <akim@epita.fr>
18481
18482 * src/symtab.c, src/symtab.c (symbol_class_set)
18483 (symbol_user_token_number_set): New.
18484 * src/reader.c (parse_token_decl): Use them.
18485 Use a switch instead of ifs.
18486 Use a single argument.
18487
8b9f2372
AD
184882002-06-10 Akim Demaille <akim@epita.fr>
18489
18490 Remove `%thong' support as it is undocumented, unused, duplicates
18491 `%token's job, and creates useless e-mail traffic with people who
18492 want to know what it is, why it is undocumented, unused, and
18493 duplicates `%token's job.
18494
18495 * src/reader.c (parse_thong_decl): Remove.
18496 * src/options.c (option_table): Remove "thong".
18497 * src/lex.h (tok_thong): Remove.
18498
3ae2b51f
AD
184992002-06-10 Akim Demaille <akim@epita.fr>
18500
18501 * src/symtab.c, src/symtab.c (symbol_type_set)
18502 (symbol_precedence_set): New.
18503 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
18504 (value_components_used): Remove, unused.
18505
2f1afb73
AD
185062002-06-09 Akim Demaille <akim@epita.fr>
18507
18508 Move symbols handling code out of the reader.
18509
18510 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
18511 (axiom): Move to...
18512 * src/symtab.h, src/symtab.c: here.
18513
18514 * src/gram.c (start_symbol): Remove: use startsymbol->number.
18515 * src/reader.c (startval): Rename as...
18516 * src/symtab.h, src/symtab.c (startsymbol): this.
18517 * src/reader.c: Adjust.
18518
18519 * src/reader.c (symbol_check_defined, symbol_make_alias)
18520 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18521 (token_translations_init)
18522 Move to...
18523 * src/symtab.c: here.
18524 * src/reader.c (packsymbols): Move to...
18525 * src/symtab.h, src/symtab.c (symbols_pack): here.
18526 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
18527 argument.
18528
e9bca3ad
AD
185292002-06-03 Akim Demaille <akim@epita.fr>
18530
18531 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
18532 then statements.
18533
86eff183
AD
185342002-06-03 Akim Demaille <akim@epita.fr>
18535
18536 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
18537 structs with non literals.
18538 * src/scan-skel.l: never-interactive.
18539 * src/conflicts.c (enum conflict_resolution_e): No trailing
18540 comma.
18541 * src/getargs.c (usage): Split long literal strings.
18542 Reported by Hans Aberg.
18543
717be197
AD
185442002-05-28 Akim Demaille <akim@epita.fr>
18545
18546 * data/bison.c++: Use C++ ostreams.
18547 (cdebug_): New member.
18548
670ddffd
AD
185492002-05-28 Akim Demaille <akim@epita.fr>
18550
18551 * src/output.c (output_skeleton): Be sure to allocate enough room
18552 for `/' _and_ for `\0' in full_skeleton.
18553
769b430f
AD
185542002-05-28 Akim Demaille <akim@epita.fr>
18555
18556 * data/bison.c++: Catch up with bison.simple:
18557 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18558 and Paul Eggert <eggert@twinsun.com>: `error' handing.
18559 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
18560 and popping traces.
18561
7067cb36
PH
185622002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18563
18564 * src/output.c (output_skeleton): Put an explicit path in front of
18565 the skeleton file name, rather than relying on the -I directory,
18566 to partially alleviate effects of having a skeleton file lying around
18567 in the current directory.
769b430f 18568
4a713ec2
PH
185692002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18570
769b430f 18571 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
18572 obstack_printf should be obstack_fgrow1.
18573
b408954b
AD
185742002-05-26 Akim Demaille <akim@epita.fr>
18575
18576 * src/state.h (state_t): `solved_conflicts' is a new member.
18577 * src/LR0.c (new_state): Set it to 0.
18578 * src/conflicts.h, src/conflicts.c (print_conflicts)
18579 (free_conflicts, solve_conflicts): Rename as...
18580 (conflicts_print, conflicts_free, conflicts_solve): these.
18581 Adjust callers.
18582 * src/conflicts.c (enum conflict_resolution_e)
18583 (solved_conflicts_obstack): New, used by...
18584 (log_resolution): this.
18585 Adjust to attach the conflict resolution to each state.
18586 Complete the description with the precedence/associativity
18587 information.
18588 (resolve_sr_conflict): Adjust.
18589 * src/print.c (print_state): Output its solved_conflicts.
18590 * tests/conflicts.at (Unresolved SR Conflicts)
18591 (Solved SR Conflicts): Exercise --report=all.
18592
a49aecd5
AD
185932002-05-26 Akim Demaille <akim@epita.fr>
18594
18595 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18596 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18597 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
18598 (token_number_t, item_number_as_token_number)
18599 (token_number_as_item_number, muscle_insert_token_number_table):
18600 Rename as...
18601 (symbol_number_t, item_number_as_symbol_number)
18602 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
18603 these, since it is more appropriate.
18604
5504898e
AD
186052002-05-26 Akim Demaille <akim@epita.fr>
18606
18607 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
18608 `Error:' lines.
18609 * data/bison.simple (yystos) [YYDEBUG]: New.
18610 (yyparse) [YYDEBUG]: Display the symbols which are popped during
18611 error recovery.
18612 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
18613
ec3bc396
AD
186142002-05-25 Akim Demaille <akim@epita.fr>
18615
18616 * doc/bison.texinfo (Debugging): Split into...
18617 (Tracing): this new section, its former contents, and...
18618 (Understanding): this new section.
18619 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
18620 by...
18621 (report_flag): this.
18622 Adjust all dependencies.
18623 (report_args, report_types, report_argmatch): New.
18624 (usage, getargs): Report/support -r, --report.
18625 * src/options.h
18626 (struct option_table_struct): Rename as..,
18627 (struct option_table_s): this.
18628 Rename the `set_flag' member to `flag' to match with getopt_long's
18629 struct.
18630 * src/options.c (option_table): Split verbose into an entry for
18631 %verbose, and another for --verbose.
18632 Support --report/-r, so remove -r from the obsolete --raw.
18633 * src/print.c: Attach full item sets and lookaheads reports to
18634 report_flag instead of trace_flag.
18635 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
18636
78df8250
PE
186372002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18638 and Paul Eggert <eggert@twinsun.com>
769b430f 18639
78df8250
PE
18640 * data/bison.simple (yyparse): Correct error handling to conform to
18641 POSIX and yacc. Specifically, after syntax error is discovered,
18642 do not reduce further before shifting the error token.
18643 Clean up the code a bit by removing the labels yyerrdefault,
18644 yyerrhandle, yyerrpop.
18645 * NEWS: Document the above.
18646
c0c9ea05
PH
186472002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18648
18649 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
18650 type; it isn't always big enough, since it doesn't necessarily
18651 include non-terminals.
769b430f 18652 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
18653 the latter can be removed.
18654 (yy_token_number_type): Remove, only one use.
18655 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
18656 don't use TokenNumberType as element type.
769b430f 18657
c0c9ea05
PH
18658 * tests/regression.at: Modify expected output to agree with change
18659 to yyr1 and yytranslate.
769b430f 18660
6390a83f
FK
186612002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
18662
18663 * src/reader.c (parse_action): Use copy_character instead of
18664 obstack_1grow.
18665
db7c8e9a
AD
186662002-05-13 Akim Demaille <akim@epita.fr>
18667
18668 * tests/regression.at (Token definitions): Prototype yylex and
18669 yyerror.
18670
fcc61800
PH
186712002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18672
158c687b 18673 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
18674 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
18675 32-bit arithmetic.
18676 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
18677
5683e9b2
AD
186782002-05-07 Akim Demaille <akim@epita.fr>
18679
18680 * tests/synclines.at: Be sure to prototype yylex and yyerror to
18681 avoid GCC warnings.
18682
0c2d3f4c
AD
186832002-05-07 Akim Demaille <akim@epita.fr>
18684
18685 Kill GCC warnings.
18686
18687 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
18688 over the RHS of each rule.
18689 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
18690 * src/state.h (state_t): Member `nitems' is unsigned short.
18691 * src/LR0.c (get_state): Adjust.
18692 * src/reader.c (packgram): Likewise.
18693 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
18694 `Type'.
18695 (muscle_insert_int_table): Remove, unused.
18696 (prepare_rules): Remove `max'.
18697
1565b720
AD
186982002-05-06 Akim Demaille <akim@epita.fr>
18699
18700 * src/closure.c (print_firsts): Display of the symbol tags.
18701 (bitmatrix_print): Move to...
18702 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
18703 here.
18704 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
18705
cfaee611
AD
187062002-05-06 Akim Demaille <akim@epita.fr>
18707
18708 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
18709 hash_do_for_each.
18710
458be8e0
AD
187112002-05-06 Akim Demaille <akim@epita.fr>
18712
18713 * src/LR0.c (new_state, get_state): Instead of using the global
18714 `kernel_size' and `kernel_base', have two new arguments:
18715 `core_size' and `core'.
18716 Adjust callers.
18717
a900a624
AD
187182002-05-06 Akim Demaille <akim@epita.fr>
18719
18720 * src/reader.c (packgram): No longer end `ritem' with a 0
18721 sentinel: it is not used.
18722
d4e7d3a1
AD
187232002-05-05 Akim Demaille <akim@epita.fr>
18724
18725 New experimental feature: display the lookaheads in the report and
18726 graph.
18727
18728 * src/print (print_core): When --trace-flag, display the rules
18729 lookaheads.
18730 * src/print_graph.c (print_core): Likewise.
18731 Swap the arguments.
18732 Adjust caller.
18733
39ceb25b
AD
187342002-05-05 Akim Demaille <akim@epita.fr>
18735
18736 * tests/torture.at (Many lookaheads): New test.
18737
5372019f
AD
187382002-05-05 Akim Demaille <akim@epita.fr>
18739
18740 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
18741 (GENERATE_MUSCLE_INSERT_TABLE): this.
18742 (output_int_table, output_unsigned_int_table, output_short_table)
18743 (output_token_number_table, output_item_number_table): Replace with...
18744 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
18745 (muscle_insert_short_table, muscle_insert_token_number_table)
18746 (muscle_insert_item_number_table): these.
18747 Adjust all callers.
18748 (prepare_tokens): Don't free `translations', since...
18749 * src/reader.h, src/reader.c (grammar_free): do it.
18750 Move to...
18751 * src/gram.h, src/gram.c (grammar_free): here.
18752 * data/bison.simple, data/bison.c++: b4_token_number_max is now
18753 b4_translate_max.
18754
5df5f6d5
AD
187552002-05-05 Akim Demaille <akim@epita.fr>
18756
18757 * src/output.c (output_unsigned_int_table): New.
18758 (prepare_rules): `i' is unsigned.
18759 `prhs', `rline', `r2' are unsigned int.
18760 Rename muscle `rhs_number_max' as `rhs_max'.
18761 Output muscles `prhs_max', `rline_max', and `r2_max'.
18762 Free rline and r1.
18763 * data/bison.simple, data/bison.c++: Adjust to use these muscles
18764 to compute types instead of constant types.
18765 * tests/regression.at (Web2c Actions): Adjust.
18766
b87f8b21
AD
187672002-05-04 Akim Demaille <akim@epita.fr>
18768
18769 * src/symtab.h (SALIAS, SUNDEF): Rename as...
18770 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
18771 Adjust dependencies.
18772 * src/output.c (token_definitions_output): Be sure not to output a
18773 `#define 'a'' when fed with `%token 'a' "a"'.
18774 * tests/regression.at (Token definitions): New.
18775
8bb936e4
PE
187762002-05-03 Paul Eggert <eggert@twinsun.com>
18777
18778 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
18779 for K&R C.
18780
187812002-05-03 gettextize <bug-gnu-gettext@gnu.org>
18782
18783 * Makefile.am (SUBDIRS): Remove intl.
18784 (EXTRA_DIST): Add config/config.rpath.
18785
53c71a12
AD
187862002-05-03 Akim Demaille <akim@epita.fr>
18787
18788 * data/bison.simple (m4_if): Don't output empty enums.
18789 And actually, output valid enum definitions :(.
18790
289dd0cf
AD
187912002-05-03 Akim Demaille <akim@epita.fr>
18792
18793 * configure.bat: Remove, completely obsolete.
18794 * Makefile.am (EXTRA_DIST): Adjust.
18795 Don't distribute config.rpath...
18796 * config/Makefile.am (EXTRA_DIST): Do it.
18797
db85e524
AD
187982002-05-03 Akim Demaille <akim@epita.fr>
18799
18800 * configure.in (GETTEXT_VERSION): New.
18801 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
18802
83ccf991
AD
188032002-05-03 Akim Demaille <akim@epita.fr>
18804
18805 * data/bison.simple (b4_token_enum): New.
18806 (b4_token_defines): Use it to output tokens both as #define and
18807 enums.
18808 Suggested by Paul Eggert.
18809 * src/output.c (token_definitions_output): Don't output spurious
18810 white spaces.
18811
1f418995
AD
188122002-05-03 Akim Demaille <akim@epita.fr>
18813
18814 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18815
45119f04
RA
188162002-05-02 Robert Anisko <robert@lrde.epita.fr>
18817
18818 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
18819 Update the stack class, give a try to deque as the default container.
18820
b2d52318
AD
188212002-05-02 Akim Demaille <akim@epita.fr>
18822
18823 * data/bison.simple (yyparse): Do not implement @$ = @1.
18824 (YYLLOC_DEFAULT): Adjust to do it.
18825 * doc/bison.texinfo (Location Default Action): Fix.
18826
3a8b4109
AD
188272002-05-02 Akim Demaille <akim@epita.fr>
18828
18829 * src/reader.c (parse_braces): Merge into...
18830 (parse_action): this.
18831
84614e13
AD
188322002-05-02 Akim Demaille <akim@epita.fr>
18833
18834 * configure.in (ALL_LINGUAS): Remove.
18835 * po/LINGUAS, hr.po: New.
18836
fdbcd8e2
AD
188372002-05-02 Akim Demaille <akim@epita.fr>
18838
18839 Remove the so called hairy (semantic) parsers.
18840
18841 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
18842 * src/gram.h, src/gram.c (semantic_parser): Remove.
18843 (rule_t): Remove the guard and guard_line members.
18844 * src/lex.h (token_t): remove tok_guard.
18845 * src/options.c (option_table): Remove %guard and %semantic_parser
18846 support.
18847 * src/output.c, src/output.h (guards_output): Remove.
18848 (prepare): Adjust.
18849 (token_definitions_output): Don't output the `T'
18850 tokens (???).
18851 (output_skeleton): Don't output the guards.
18852 * src/files.c, src/files.c (attrsfile): Remove.
18853 * src/reader.c (symbol_list): Remove the guard and guard_line
18854 members.
18855 Adjust dependencies.
18856 (parse_guard): Remove.
18857 * data/bison.hairy: Remove.
18858 * doc/bison.texinfo (Environment Variables): Remove occurrences of
18859 BISON_HAIRY.
18860
82b6cb3f
AD
188612002-05-02 Akim Demaille <akim@epita.fr>
18862
18863 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
18864 (parse_guard): Rename the formal argument `stack_offset' as
18865 `rule_length', which is more readable.
18866 Adjust callers.
18867 (copy_at, copy_dollar): Instead of outputting the hard coded
18868 values of $$, $n and so forth, output invocation to b4_lhs_value,
18869 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
18870 Note: this patch partially drops `semantic-parser' support: it
18871 always does `rule_length - n', where semantic parsers ought to
18872 always use `-n'.
82b6cb3f
AD
18873 * data/bison.simple, data/bison.c++ (b4_lhs_value)
18874 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
18875
6cbfbcc5
AD
188762002-05-02 Akim Demaille <akim@epita.fr>
18877
18878 * configure.in (AC_INIT): Bump to 1.49b.
18879 (AM_INIT_AUTOMAKE): Short invocation.
18880
b8548114
AD
188812002-05-02 Akim Demaille <akim@epita.fr>
18882
18883 Version 1.49a.
18884
c20cd1fa
AD
188852002-05-01 Akim Demaille <akim@epita.fr>
18886
18887 * src/skeleton.h: Remove.
18888
8a9566d4
AD
188892002-05-01 Akim Demaille <akim@epita.fr>
18890
18891 * src/skeleton.h: Fix the #endif.
18892 Reported by Magnus Fromreide.
18893
8c6d399a
PE
188942002-04-26 Paul Eggert <eggert@twinsun.com>
18895
18896 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
18897 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 18898 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 18899
2b7ed18a
RA
189002002-04-25 Robert Anisko <robert@lrde.epita.fr>
18901
18902 * src/scan-skel.l: Postprocess quadrigraphs.
18903
18904 * src/reader.c (copy_character): New function, used to output
18905 single characters while replacing `[' and `]' with quadrigraphs, to
18906 avoid troubles with M4 quotes.
18907 (copy_comment): Output characters with copy_character.
18908 (read_additionnal_code): Likewise.
18909 (copy_string2): Likewise.
18910 (copy_definition): Likewise.
18911
18912 * tests/calc.at: Exercise M4 quoting.
18913
34a89c50
AD
189142002-04-25 Akim Demaille <akim@epita.fr>
18915
18916 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
18917 between `!' and the command.
18918 Reported by Paul Eggert.
18919
0dd1580a
RA
189202002-04-24 Robert Anisko <robert@lrde.epita.fr>
18921
18922 * tests/calc.at: Exercise prologue splitting.
18923
18924 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
18925 `b4_post_prologue' instead of `b4_prologue'.
18926
18927 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
18928 muscles.
18929 (output): Free pre_prologue_obstack and post_prologue_obstack.
18930 * src/files.h, src/files.c (attrs_obstack): Remove.
18931 (pre_prologue_obstack, post_prologue_obstack): New.
18932 * src/reader.c (copy_definition): Add a parameter to specify the
18933 obstack to fill, instead of using attrs_obstack unconditionally.
18934 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18935 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18936
83c1796f
PE
189372002-04-23 Paul Eggert <eggert@twinsun.com>
18938
18939 * data/bison.simple: Remove unnecessary commentary and white
18940 space differences from 1_29-branch.
18941 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18942
18943 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18944 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18945 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18946 constructors or destructors.
18947
18948 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18949
1207eeac
AD
189502002-04-23 Akim Demaille <akim@epita.fr>
18951
18952 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18953 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18954 location with columns.
18955 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18956 All reported by Paul Eggert.
18957
78ab8f67
AD
189582002-04-22 Akim Demaille <akim@epita.fr>
18959
18960 * src/reduce.c (dump_grammar): Move to...
18961 * src/gram.h, src/gram.c (grammar_dump): here.
18962 Be sure to separate long item numbers.
18963 Don't read the members of a rule's prec if its nil.
18964
133c20e2
AD
189652002-04-22 Akim Demaille <akim@epita.fr>
18966
18967 * src/output.c (table_size, table_grow): New.
18968 (MAXTABLE): Remove, replace uses with table_size.
18969 (pack_vector): Instead of dying when the table is too big, grow it.
18970
9515e8a7
AD
189712002-04-22 Akim Demaille <akim@epita.fr>
18972
18973 * data/bison.simple (yyr1): Its type is that of a token number.
18974 * data/bison.c++ (r1_): Likewise.
18975 * tests/regression.at (Web2c Actions): Adjust.
18976
23c5a174
AD
189772002-04-22 Akim Demaille <akim@epita.fr>
18978
18979 * src/reader.c (token_translations_init): 256 is now the default
18980 value for the error token, i.e., it will be assigned another
18981 number if the user assigned 256 to one of her tokens.
18982 (reader): Don't force 256 to error.
18983 * doc/bison.texinfo (Symbols): Adjust.
18984 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18985 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18986 etc. instead of 10, 20, 30 (which was used to `jump' over error
18987 (256) and undefined (2)).
18988
5fbb0954
AD
189892002-04-22 Akim Demaille <akim@epita.fr>
18990
18991 Propagate more token_number_t.
18992
18993 * src/gram.h (token_number_as_item_number)
18994 (item_number_as_token_number): New.
18995 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18996 Use it to create output_item_number_table and
18997 output_token_number_table.
18998 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18999 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
19000 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
19001 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
19002
4f940944
AD
190032002-04-22 Akim Demaille <akim@epita.fr>
19004
19005 * src/output.h, src/output.c (get_lines_number): Remove.
19006
3ded9a63
AD
190072002-04-19 Akim Demaille <akim@epita.fr>
19008
19009 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
19010 as Lex/Flex'.
19011 (Debugging): More details about enabling the debugging features.
19012 (Table of Symbols): Describe $$, $n, @$, and @n.
19013 Suggested by Tim Josling.
19014
e0c471a9
AD
190152002-04-19 Akim Demaille <akim@epita.fr>
19016
19017 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
19018
fecc10cd
AD
190192002-04-10 Akim Demaille <akim@epita.fr>
19020
19021 * src/system.h: Rely on HAVE_LIMITS_H.
19022 Suggested by Paul Eggert.
19023
51dec47b
AD
190242002-04-09 Akim Demaille <akim@epita.fr>
19025
19026 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
19027 full stderr, and strip it according to the bison options, instead
19028 of composing the error message from different bits.
19029 This makes it easier to check for several error messages.
19030 Adjust all the invocations.
19031 Add an invocation exercising the error token.
19032 Add an invocation demonstrating a stupid error message.
19033 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
19034 Adjust the tests.
19035 Error message are for stderr, not stdout.
19036
007a50a4
AD
190372002-04-09 Akim Demaille <akim@epita.fr>
19038
19039 * src/gram.h, src/gram.c (error_token_number): Remove, use
19040 errtoken->number.
19041 * src/reader.c (reader): Don't specify the user token number (2)
19042 for $undefined, as it uselessly prevents using it.
19043 * src/gram.h (token_number_t): Move to...
19044 * src/symtab.h: here.
19045 (state_t.number): Is a token_number_t.
19046 * src/print.c, src/reader.c: Use undeftoken->number instead of
19047 hard coded 2.
19048 (Even though this 2 is not the same as above: the number of the
19049 undeftoken remains being 2, it is its user token number which
19050 might not be 2).
19051 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
19052 `user_token_number_max'.
19053 Output `undef_token_number'.
19054 * data/bison.simple, data/bison.c++: Use them.
19055 Be sure to map invalid yylex return values to
19056 `undef_token_number'. This saves us from gratuitous SEGV.
19057
19058 * tests/conflicts.at (Solved SR Conflicts)
19059 (Unresolved SR Conflicts): Adjust.
19060 * tests/regression.at (Web2c Actions): Adjust.
19061
06446ccf
AD
190622002-04-08 Akim Demaille <akim@epita.fr>
19063
19064 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
19065 Adding #line.
19066 Remove the duplicate `typedefs'.
19067 (RhsNumberType): Fix the declaration and various other typos.
19068 Use __ofile__.
19069 * data/bison.simple: Use __ofile__.
19070 * src/scan-skel.l: Handle __ofile__.
19071
62a3e4f0
AD
190722002-04-08 Akim Demaille <akim@epita.fr>
19073
19074 * src/gram.h (item_number_t): New, the type of item numbers in
19075 RITEM. Note that it must be able to code symbol numbers as
19076 positive number, and the negation of rule numbers as negative
19077 numbers.
19078 Adjust all dependencies (pretty many).
19079 * src/reduce.c (rule): Remove this `short *' pointer: use
19080 item_number_t.
19081 * src/system.h (MINSHORT, MAXSHORT): Remove.
19082 Include `limits.h'.
19083 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
19084 (shortcpy): Remove.
19085 (MAXTABLE): Move to...
19086 * src/output.c (MAXTABLE): here.
19087 (prepare_rules): Use output_int_table to output rhs.
19088 * data/bison.simple, data/bison.c++: Adjust.
19089 * tests/torture.at (Big triangle): Move the limit from 254 to
19090 500.
19091 * tests/regression.at (Web2c Actions): Ajust.
19092
19093 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
19094 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
19095 passes, but produces negative #line number, once fixed, GCC is
19096 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
19097 C), it passes.
19098 * src/state.h (state_h): Code input lines on ints, not shorts.
19099
bb88b0fc
AD
191002002-04-08 Akim Demaille <akim@epita.fr>
19101
19102 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
19103 and then the grammar.
19104
9a636f47
AD
191052002-04-08 Akim Demaille <akim@epita.fr>
19106
19107 * src/system.h: No longer using strndup.
19108
680e8701
AD
191092002-04-07 Akim Demaille <akim@epita.fr>
19110
19111 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
19112 * src/output.c (output_table_data): Return the longest number.
19113 (prepare_tokens): Output `token_number_max').
19114 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
19115 New.
19116 Use them to define yy_token_number_type/TokenNumberType.
19117 Use this type for yytranslate.
19118 * tests/torture.at (Big triangle): Push the limit from 124 to
19119 253.
19120 * tests/regression.at (Web2c Actions): Adjust.
19121
817e9f41
AD
191222002-04-07 Akim Demaille <akim@epita.fr>
19123
19124 * tests/torture.at (Big triangle): New.
19125 (GNU AWK Grammar, GNU Cim Grammar): Move to...
19126 * tests/existing.at: here.
19127
5123689b
AD
191282002-04-07 Akim Demaille <akim@epita.fr>
19129
19130 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
19131 nritems.
19132 Adjust dependencies.
19133
f3849179
AD
191342002-04-07 Akim Demaille <akim@epita.fr>
19135
19136 * src/reader.c: Normalize increments to prefix form.
19137
bd02036a
AD
191382002-04-07 Akim Demaille <akim@epita.fr>
19139
19140 * src/reader.c, symtab.c: Remove debugging code.
19141
db8837cb
AD
191422002-04-07 Akim Demaille <akim@epita.fr>
19143
19144 Rename all the `bucket's as `symbol_t'.
19145
19146 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
19147 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
19148 * src/symtab.c, src/symtab.h (bucket): Rename as...
19149 (symbol_t): this.
19150 (symbol_list_new, bucket_check_defined, bucket_make_alias)
19151 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
19152 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19153 (buckets_new, buckets_free, buckets_do): Rename as...
19154 (symbol_list_new, symbol_check_defined, symbol_make_alias)
19155 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
19156 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
19157 (symbols_new, symbols_free, symbols_do): these.
19158
72a23c97
AD
191592002-04-07 Akim Demaille <akim@epita.fr>
19160
19161 Use lib/hash for the symbol table.
19162
19163 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
19164 EOF.
19165 * src/lex.c (lex): Set the `number' member of new terminals.
19166 * src/reader.c (bucket_check_defined, bucket_make_alias)
19167 (bucket_check_alias_consistence, bucket_translation): New.
19168 (reader, grammar_free, readgram, token_translations_init)
19169 (packsymbols): Adjust.
19170 (reader): Number the predefined tokens.
19171 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
19172 for predefined tokens.
19173 * src/symtab.h (bucket): Remove all the hash table related
19174 members.
19175 * src/symtab.c (symtab): Replace by...
19176 (bucket_table): this.
19177 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
19178 (buckets_new, buckets_do): New.
19179
280a38c3
AD
191802002-04-07 Akim Demaille <akim@epita.fr>
19181
19182 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
19183 (start_symbol, max_user_token_number, semantic_parser)
19184 (error_token_number): Initialize.
19185 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
19186 Initialize.
19187 (reader): Don't.
19188 (errtoken, eoftoken, undeftoken, axiom): Extern.
19189
03b31c0c
AD
191902002-04-07 Akim Demaille <akim@epita.fr>
19191
19192 * src/gram.h (rule_s): prec and precsym are now pointers
19193 to the bucket giving the priority/associativity.
19194 Member `associativity' removed: useless.
19195 * src/reduce.c, src/conflicts.c: Adjust.
19196
8b3df748
AD
191972002-04-07 Akim Demaille <akim@epita.fr>
19198
19199 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
19200 Properly escape the symbols' TAG when outputting them.
19201
e601aa1d
AD
192022002-04-07 Akim Demaille <akim@epita.fr>
19203
19204 * src/lalr.h (LA): Is a bitsetv, not bitset*.
19205
b0299a2e
AD
192062002-04-07 Akim Demaille <akim@epita.fr>
19207
19208 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
19209 (LArule): this, which is an array to rule_t*.
19210 * src/print.c, src/conflicts.c: Adjust.
19211
d7e1f00c
AD
192122002-04-07 Akim Demaille <akim@epita.fr>
19213
19214 * src/gram.h (rule_t): Rename `number' as `user_number'.
19215 `number' is a new member.
19216 Adjust dependencies.
19217 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
19218
cc9305dd
AD
192192002-04-07 Akim Demaille <akim@epita.fr>
19220
19221 As a result of the previous patch, it is no longer needed
19222 to reorder ritem itself.
19223
19224 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
19225
b0940840
AD
192262002-04-07 Akim Demaille <akim@epita.fr>
19227
19228 Be sure never to walk through RITEMS, but use only data related to
19229 the rules themselves. RITEMS should be banished.
19230
19231 * src/output.c (output_token_translations): Rename as...
19232 (prepare_tokens): this.
19233 In addition to `translate', prepare the muscles `tname' and
19234 `toknum', which were handled by...
19235 (output_rule_data): this.
19236 Remove, and move the remainder of its outputs into...
19237 (prepare_rules): this new routines, which also merges content from
19238 (output_gram): this.
19239 (prepare_rules): Be sure never to walk through RITEMS.
19240 (output_stos): Rename as...
19241 (prepare_stos): this.
19242 (output): Always invoke prepare_states, after all, just don't use it
19243 in the output if you don't need it.
19244
643a5994
AD
192452002-04-07 Akim Demaille <akim@epita.fr>
19246
19247 * src/LR0.c (new_state): Display `nstates' as the name of the
19248 newly created state.
19249 Adjust to initialize first_state and last_state if needed.
19250 Be sure to distinguish the initial from the final state.
19251 (new_states): Create the itemset of the initial state, and use
19252 new_state.
19253 * src/closure.c (closure): Now that the initial state has its
19254 items properly set, there is no need for a special case when
19255 creating `ruleset'.
19256
19257 As a result, now the rule 0, reducing to $axiom, is visible in the
19258 outputs. Adjust the test suite.
19259
19260 * tests/conflicts.at (Solved SR Conflicts)
19261 (Unresolved SR Conflicts): Adjust.
19262 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
19263 * tests/conflicts.at (S/R in initial): New.
19264
b4c4ccc2
AD
192652002-04-07 Akim Demaille <akim@epita.fr>
19266
19267 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
19268 the RHS of the rules.
19269 * src/output.c (output_gram): Likewise.
19270
bba97eb2
AD
192712002-04-07 Akim Demaille <akim@epita.fr>
19272
19273 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
19274 bucket.
19275 Adjust all dependencies.
19276 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
19277 `number' of the buckets too.
19278 * src/gram.h: Include `symtab.h'.
19279 (associativity): Move to...
19280 * src/symtab.h: here.
19281 No longer include `gram.h'.
19282
c3b407f4
AD
192832002-04-07 Akim Demaille <akim@epita.fr>
19284
19285 * src/gram.h, src/gram.c (rules_rhs_length): New.
19286 (ritem_longest_rhs): Use it.
19287 * src/gram.h (rule_t): `number' is a new member.
19288 * src/reader.c (packgram): Set it.
19289 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
19290 the end of `rules', and count them out of `nrules'.
19291 (reduce_output, dump_grammar): Adjust.
19292 * src/print.c (print_grammar): It is no longer needed to check for
19293 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
19294 * tests/reduce.at (Reduced Automaton): New test.
19295
11652ab3
AD
192962002-04-07 Akim Demaille <akim@epita.fr>
19297
19298 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
19299 lacking `+ 1' to nrules, Bison reported as useless a token if it
19300 was used solely to set the precedence of the last rule...
19301
26b23c1a
AD
193022002-04-07 Akim Demaille <akim@epita.fr>
19303
19304 * data/bison.c++, data/bison.simple: Don't output the current file
19305 name in #line, to avoid useless diffs between two identical
19306 outputs under different names.
19307
18bcecb0
AD
193082002-04-07 Akim Demaille <akim@epita.fr>
19309
19310 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
19311 Normalize loops to using `< nrules + 1', not `<= nrules'.
19312
fa770c86
AD
193132002-04-07 Akim Demaille <akim@epita.fr>
19314
19315 * TODO: Update.
19316
d9b739c3
AD
193172002-04-07 Akim Demaille <akim@epita.fr>
19318
19319 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
19320 bucket.value as bucket.number.
19321
99013900
AD
193222002-04-07 Akim Demaille <akim@epita.fr>
19323
19324 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
19325 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
19326 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
19327 RHS, instead of being an index in RITEMS.
19328
e966383b
PE
193292002-04-04 Paul Eggert <eggert@twinsun.com>
19330
19331 * doc/bison.texinfo: Update copyright date.
19332 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
19333 (Symbols): Warn about running Bison in one character set,
19334 but compiling and/or running in an incompatible one.
19335 Warn about character code 256, too.
19336
193372002-04-03 Paul Eggert <eggert@twinsun.com>
19338
19339 * src/bison.data (YYSTACK_ALLOC): Depend on whether
19340 YYERROR_VERBOSE is nonzero, not whether it is defined.
19341
19342 Merge changes from bison-1_29-branch.
c307773e 19343
8d6c48b9
PE
193442002-03-20 Paul Eggert <eggert@twinsun.com>
19345
19346 Merge fixes from Debian bison_1.34-1.diff.
19347
19348 * configure.in (AC_PREREQ): 2.53.
19349
e53c6322
AD
193502002-03-20 Akim Demaille <akim@epita.fr>
19351
19352 * src/conflicts.c (log_resolution): Argument `resolution' is const.
19353
9ffbeca7
PE
193542002-03-19 Paul Eggert <eggert@twinsun.com>
19355
21db0b2a
PE
19356 * src/bison.simple (YYCOPY): New macro.
19357 (YYSTACK_RELOCATE): Use it.
19358 Remove Type arg; no longer needed. All callers changed.
19359 (yymemcpy): Remove; no longer needed.
19360
9ffbeca7
PE
19361 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
19362 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
19363
642cb8f8
AD
193642002-03-19 Akim Demaille <akim@epita.fr>
19365
19366 Test and fix the #line outputs.
19367
19368 * tests/atlocal.at (GCC): New.
19369 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 19370 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
19371 (Action synch line, Epilogue synch line): New tests.
19372 * src/reader.c (parse_union_decl): Define the muscle stype_line.
19373 * data/bison.simple, data/bison.c++: Use it.
19374
3c31a486
AD
193752002-03-19 Akim Demaille <akim@epita.fr>
19376
19377 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
19378 (Solved SR Conflicts, %expect not enough, %expect right)
19379 (%expect too much): Move to...
19380 * tests/conflicts.at: this new file.
19381
0d8bed56
AD
193822002-03-19 Akim Demaille <akim@epita.fr>
19383
19384 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
19385 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
19386 that we can move to enums for instance.
19387 * src/output.c (token_definitions_output): Output a list of
19388 `token-name, token-number' instead of the #define.
19389 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
19390
9208d17f
AD
193912002-03-14 Akim Demaille <akim@epita.fr>
19392
19393 Use Gettext 0.11.1.
19394
af27eacb
RA
193952002-03-09 Robert Anisko <robert@lrde.epita.fr>
19396
19397 * data/bison.c++: Make the user able to add members to the generated
19398 parser by subclassing.
19399
9101a310
RA
194002002-03-05 Robert Anisko <robert@lrde.epita.fr>
19401
19402 * src/reader.c (read_additionnal_code): `c' should be an integer, not
19403 a character.
19404 Reported by Nicolas Tisserand and Nicolas Burrus.
19405
fff9bf0b
RA
194062002-03-04 Robert Anisko <robert@lrde.epita.fr>
19407
19408 * src/reader.c: Warn about lacking semi-colons, do not complain.
19409
64dba31e
RA
194102002-03-04 Robert Anisko <robert@lrde.epita.fr>
19411
19412 * data/bison.c++: Remove a debug line.
19413
374f5a14
RA
194142002-03-04 Robert Anisko <robert@lrde.epita.fr>
19415
19416 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
19417 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
19418 provide a default implementation.
19419
bfcf1f3a
AD
194202002-03-04 Akim Demaille <akim@epita.fr>
19421
19422 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
19423 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
19424 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
19425 * tests/semantic.at (Parsing Guards): Similarly.
19426 * src/reader.at (readgram): Complain if the last rule is not ended
19427 with a semi-colon.
19428
65ccf9fc
AD
194292002-03-04 Akim Demaille <akim@epita.fr>
19430
19431 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
19432 * src/closure.c: here.
19433 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
19434 RTC.
19435 * src/warshall.h, src/warshall.c: Remove.
19436 * tests/sets.at (Broken Closure): Adjust.
19437
d0039cbc
AD
194382002-03-04 Akim Demaille <akim@epita.fr>
19439
19440 * src/output.c (output_skeleton): tempdir is const.
19441 bytes_read is unused.
19442
345cea78
AD
194432002-03-04 Akim Demaille <akim@epita.fr>
19444
19445 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19446 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
19447 Update.
19448 From Michael Hayes.
19449
564801f7
AD
194502002-03-04 Akim Demaille <akim@epita.fr>
19451
19452 * src/closure.c (closure): `r' is unused.
19453
e5352bc7
AD
194542002-03-04 Akim Demaille <akim@epita.fr>
19455
19456 * tests/sets.at (Broken Closure): Add the ending `;'.
19457 * src/reader.at (readgram): Complain if a rule is not ended with a
19458 semi-colon.
19459
914feea9
AD
194602002-03-04 Akim Demaille <akim@epita.fr>
19461
19462 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
19463 (count_sr_conflicts): Use bitset_count.
19464 * src/reduce.c (inaccessable_symbols): Ditto.
19465 (bits_size): Remove.
19466 * src/warshall.h, src/warshall.c: Convert to bitsetv.
19467
f0250de6
AD
194682002-03-04 Akim Demaille <akim@epita.fr>
19469
19470 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
19471 * src/reduce.c: Remove the `bitset_zero's following the
19472 `bitset_create's, as now it is performed by the latter.
19473
ef017502
AD
194742002-03-04 Akim Demaille <akim@epita.fr>
19475
19476 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
19477 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
19478 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
19479 latest sources from Michael.
19480
76514394
AD
194812002-03-04 Akim Demaille <akim@epita.fr>
19482
19483 * src/output.c (output): Don't free the grammar.
19484 * src/reader.c (grammar_free): New.
19485 * src/main.c (main): Call it and don't free symtab here.
19486
55024580
AD
194872002-03-04 Akim Demaille <akim@epita.fr>
19488
19489 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
19490 before returning.
19491 Reported by Benoit Perrot.
19492
f9abaa2c
AD
194932002-03-04 Akim Demaille <akim@epita.fr>
19494
19495 Use bitset operations when possible, not loops over bits.
19496
19497 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
19498 bitset_or.
19499 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
19500 * src/reduce.c (useless_nonterminals): Formatting changes.
19501 * src/warshall.c (TC): Use bitset_or.
19502
0e721e75
AD
195032002-03-04 Akim Demaille <akim@epita.fr>
19504
19505 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
19506 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
19507 Ditto.
19508
0fb1ffb1
AD
195092002-03-04 Akim Demaille <akim@epita.fr>
19510
19511 * src/lalr.c (F): Now a bitset*.
19512 Adjust all dependencies.
19513
b86796bf
AD
195142002-03-04 Akim Demaille <akim@epita.fr>
19515
19516 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
19517 Adjust all dependencies.
19518
602bbf31
AD
195192002-03-04 Akim Demaille <akim@epita.fr>
19520
19521 * src/L0.c, src/LR0.h (nstates): Be size_t.
19522 Adjust comparisons (signed vs unsigned).
19523 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
19524 bitset*.
19525 Adjust all dependencies.
19526
d8a0245c
AD
195272002-03-04 Akim Demaille <akim@epita.fr>
19528
19529 * src/closure.c (firsts): Now, also a bitset.
19530 Adjust all dependencies.
19531 (varsetsize): Remove, now unused.
19532 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
19533
34ba9743
AD
195342002-03-04 Akim Demaille <akim@epita.fr>
19535
19536 * src/print.c: Convert to use bitset.h, not hand coded iterations
19537 over ints.
19538
ed86e78c
AD
195392002-03-04 Akim Demaille <akim@epita.fr>
19540
19541 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
19542
dfdb1797
AD
195432002-03-04 Akim Demaille <akim@epita.fr>
19544
19545 * src/closure.c (ruleset): Be a bitset.
19546 (rulesetsize): Remove.
19547
7086e707
AD
195482002-03-04 Akim Demaille <akim@epita.fr>
19549
19550 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19551 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
19552 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
19553 * src/closure.c (fderives): Be an array of bitsets.
19554
98254360
RA
195552002-02-28 Robert Anisko <robert@lrde.epita.fr>
19556
19557 * data/bison.c++: Merge the two generated headers. Insert a copyright
19558 notice in each output file.
19559
a75c057f
AD
195602002-02-28 Akim Demaille <akim@epita.fr>
19561
19562 * data/bison.c++: Copy the prologue of bison.simple to fetch
19563 useful M4 definitions, such as b4_header_guard.
19564
06b00abc
AD
195652002-02-25 Akim Demaille <akim@epita.fr>
19566
19567 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
19568 translator friendly scheme for the bgr
19569 copyright notice.
06b00abc 19570
70e7d534
AD
195712002-02-25 Akim Demaille <akim@epita.fr>
19572
19573 * src/output.c (header_output): Remove, now handled completely via
19574 M4.
19575
abe017f6
AD
195762002-02-25 Akim Demaille <akim@epita.fr>
19577
19578 * m4/m4.m4: New, from CVS Autoconf.
19579 * configure.in: Invoke it.
19580 * src/output.c (output_skeleton): Use its result instead of the
19581 hard coded name.
19582
381fb12e
AD
195832002-02-25 Akim Demaille <akim@epita.fr>
19584
19585 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
19586 Fileutils 4.1.5.
19587 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
19588 * src/output.c (output_skeleton): Use mkstemp to create a real
19589 temporary file.
19590 Move the filling of `skeleton' and its muscle to...
19591 (prepare): here.
19592 (output): Move the definition of the prologue muscle to...
19593 (prepare): here.
19594 * src/system.h (DEFAULT_TMPDIR): New.
19595
6f38107f
PE
195962002-02-14 Paul Eggert <eggert@twinsun.com>
19597
19598 Remove the support for C++ namespace cleanliness; it was
19599 causing more problems than it was curing, since it didn't work
19600 properly on some nonstandard C++ compilers. This can wait
19601 for a proper C++ parser.
19602
19603 * NEWS: Document this.
19604 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
19605 of C++, as it's treated like C now.
19606 * src/bison.simple (YYSTD): Remove.
19607 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
19608 Treat C++ just like Standard C instead of trying to support
19609 namespace cleanliness.
19610
80cce3da
AD
196112002-02-14 Akim Demaille <akim@epita.fr>
19612
19613 * tests/regression.at (else): Adjust to Andreas' change.
19614
842e8679
AD
196152002-02-14 Akim Demaille <akim@epita.fr>
19616
19617 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
19618
4bda3f10
AD
196192002-02-13 Andreas Schwab <schwab@suse.de>
19620
19621 * src/output.c (output_rule_data): Don't output NULL, it might
19622 not be defined yet.
19623
4162fa07 196242002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 19625
4162fa07
RA
19626 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
19627 (Copyright notice): Update.
b418ecd8 19628
bd16a5dc
AD
196292002-02-11 Akim Demaille <akim@epita.fr>
19630
19631 * tests/regression.at (%nonassoc and eof): Don't include
19632 nonportable headers.
19633
8d69a1a3
RA
196342002-02-08 Robert Anisko <robert@lrde.epita.fr>
19635
19636 * data/bison.c++: Correct error recovery. Make the user able to
19637 initialize the starting location.
19638
9b2d0677
AD
196392002-02-07 Akim Demaille <akim@epita.fr>
19640
19641 * tests/input.at: New.
19642
69e2658b
RA
196432002-02-07 Robert Anisko <robert@lrde.epita.fr>
19644
19645 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 19646 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
19647 directives around tables only needed for debugging.
19648
4aacc3a7
RA
196492002-02-07 Robert Anisko <robert@lrde.epita.fr>
19650
19651 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
19652 C++ parsers.
19653 (yy::b4_name::parse): Use print_.
19654
762a801e
RA
196552002-02-07 Robert Anisko <robert@lrde.epita.fr>
19656
19657 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
19658
4bb2bc3f
RA
196592002-02-07 Robert Anisko <robert@lrde.epita.fr>
19660
19661 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
19662 C++ parsers.
19663 (yy::b4_name::parse): Build verbose error messages, and use error_.
19664
6b45a3ca
RA
196652002-02-06 Robert Anisko <robert@lrde.epita.fr>
19666
19667 * data/bison.c++: Fix m4 quoting in comments.
19668
50997c6e
RA
196692002-02-06 Robert Anisko <robert@lrde.epita.fr>
19670
19671 * data/bison.c++: Adjust the parser code. Fix some muscles that were
19672 not expanded by m4.
19673
3f3eed27
AD
196742002-02-05 Akim Demaille <akim@epita.fr>
19675
19676 * data/bison.c++: Adjust to the M4 back end.
19677 More is certainly needed.
19678
be2a1a68
AD
196792002-02-05 Akim Demaille <akim@epita.fr>
19680
19681 Give a try to M4 as a back end.
19682
19683 * lib/readpipe.c: New, from wdiff.
19684 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
19685 BISON_HAIRY.
19686 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
19687 specific values. Now it is m4 that performs the lookup.
19688 * src/parse-skel.y: Remove.
19689 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
19690 * src/output.c (actions_output, guards_output)
19691 (token_definitions_output): No longer keeps track of the output
19692 line number, hence remove the second argument.
19693 (guards_output): Check against the guard member of a rule, not the
19694 action member.
19695 Adjust callers.
19696 (output_skeleton): Don't look for the skeleton location, let m4 do
19697 that.
19698 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
19699 file will be used.
19700 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
19701 (prepare): Given that for the time being changesyntax is not
19702 usable in M4, rename the muscles using `-' to `_'.
19703 Define `defines_flag', `output_parser_name' and `output_header_name'.
19704 * src/output.h (actions_output, guards_output)
19705 (token_definitions_output): Adjust prototypes.
19706 * src/scan-skel.l: Instead of scanning the skeletons, it now
19707 processes the output of m4: `__oline__' and `#output'.
19708 * data/bison.simple: Adjust to be used by M4(sugar).
19709 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
19710 to date.
19711 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
19712 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
19713 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
19714 shamelessly stolen from CVS Autoconf.
19715
beda758b
AD
197162002-02-05 Akim Demaille <akim@epita.fr>
19717
19718 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
19719 * configure.in: Check for the declarations of free and malloc.
19720 * src/muscle_tab.c: Adjust.
19721
5ece6d43
AD
197222002-02-05 Akim Demaille <akim@epita.fr>
19723
19724 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
19725 which have no values.
19726
5bb18f9a
AD
197272002-02-05 Akim Demaille <akim@epita.fr>
19728
19729 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
19730 * data/: here.
19731
894dd62e
PE
197322002-01-29 Paul Eggert <eggert@twinsun.com>
19733
19734 * src/bison.simple (YYSIZE_T): Do not define merely because
19735 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
19736 On some platforms, <alloca.h> does not declare YYSTD (size_t).
19737
82841af7
AD
197382002-01-27 Akim Demaille <akim@epita.fr>
19739
19740 Fix `%nonassoc and eof'.
19741
19742 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
19743 which were not properly copied! Replace
19744 memcpy (res->errs, src->errs, src->nerrs);
19745 with
19746 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
19747 !!!
19748 * tests/regression.at (%nonassoc and eof): Adjust to newest
19749 Autotest: `.' is not in the PATH.
19750
318b76e9
AD
197512002-01-27 Akim Demaille <akim@epita.fr>
19752
19753 * tests/sets.at (AT_EXTRACT_SETS): New.
19754 (Nullable): Use it.
19755 (Firsts): New.
19756
30d2f3d5
AD
197572002-01-26 Akim Demaille <akim@epita.fr>
19758
19759 * tests/actions.at, tests/calc.at, tests/headers.at,
19760 * tests/torture.at: Adjust to the newest Autotest which no longer
19761 forces `.' in the PATH.
19762
30f8c395
AD
197632002-01-25 Akim Demaille <akim@epita.fr>
19764
19765 * tests/regression.at (%nonassoc and eof): New.
19766 Suggested by Robert Anisko.
19767
29ae55f1
AD
197682002-01-24 Akim Demaille <akim@epita.fr>
19769
19770 Bison dumps core when trying to complain about broken input files.
19771 Reported by Cris van Pelt.
19772
19773 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
19774 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
19775 into...
19776 (Invalid inputs): Strengthen: exercise parse_percent_token.
19777
2b548aa6
RA
197782002-01-24 Robert Anisko <robert.anisko@epita.fr>
19779
19780 * src/Makefile.am: Add bison.c++.
19781 * src/bison.c++: New skeleton.
19782
bb0146c2
AD
197832002-01-21 Paolo Bonzini <bonzini@gnu.org>
19784
19785 * po/it.po: New.
19786
bec30531
AD
197872002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
19788
19789 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
19790
fc6edc45
MA
197912002-01-20 Marc Autret <marc@gnu.org>
19792
19793 * src/files.c (compute_output_file_names): Fix
19794
5e5d5415
MA
197952002-01-20 Marc Autret <marc@gnu.org>
19796
19797 * tests/output.at: New test.
19798 * src/files.c (compute_base_names): Don't map extensions when
19799 the YACC flag is set, use defaults.
19800 Reported by Evgeny Stambulchik.
19801
44ea3fbd
MA
198022002-01-20 Marc Autret <marc@gnu.org>
19803
ba0fe3c7
PE
19804 * src/system.h: Need to define __attribute__ away for non-GCC
19805 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
19806 Suggested by Albert Chin-A-Young.
19807
338963d1
TVH
198082002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
19809
19810 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
19811 canonical definition.
19812 * src/system.h: Use the canonical definition for PARAMS (avoids
19813 a conflict with the macro from lib/hash.h).
19814
c57b2479
AD
198152002-01-11 Akim Demaille <akim@epita.fr>
19816
19817 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 19818 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 19819
b85810ae
AD
198202002-01-09 Akim Demaille <akim@epita.fr>
19821
19822 * src/files.c, src/files.h (output_infix): New.
19823 (tab_extension): Remove.
19824 (compute_base_names): Compute the former, drop the latter.
19825 * src/output.c (prepare): Insert the muscles `output-infix', and
19826 `output-suffix'.
19827 * src/parse-skel.y (string, string.1): New.
19828 (section.header): Use it.
19829 (section.yacc): Remove.
19830 (prefix): Remove too.
19831 * src/scan-skel.l: Adjust.
19832 * src/bison.simple, src/bison.hairy: Adjust.
19833
cae60122
AD
198342002-01-09 Akim Demaille <akim@epita.fr>
19835
19836 * configure.in (WERROR_CFLAGS): Compute it.
19837 * src/Makefile.am (CFLAGS): Pass it.
19838 * tests/atlocal.in (CFLAGS): Idem.
19839 * src/files.c: Fix a few warnings.
19840 (get_extension_index): Remove, unused.
19841
ae404801
AD
198422002-01-08 Akim Demaille <akim@epita.fr>
19843
19844 * src/getargs.c (AS_FILE_NAME): New.
19845 (getargs): Use it to convert DOSish file names.
19846 * src/files.c (base_name): Rename as full_base_name to avoid
19847 clashes with `base_name ()'.
19848 (filename_split): New.
19849 (compute_base_names): N-th rewrite, using filename_split.
19850
22312b71
AD
198512002-01-08 Akim Demaille <akim@epita.fr>
19852
19853 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
19854 New, stolen from the Fileutils 4.1.
19855 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19856 * configure.in: Check for the presence of memrchr, and of its
19857 prototype.
19858
a67cef01
TVH
198592002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
19860
19861 * lib/hash.h (__P): Added definition for this macro.
19862 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
19863 BUILT_SOURCES, to ensure they are generated first.
19864 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
19865 %error-verbose to allow bootstrapping with bison 1.30x.
19866
2b25d624
AD
198672002-01-06 Akim Demaille <akim@epita.fr>
19868
19869 * src/reader.c (parse_braces): Don't fetch the next char, the
19870 convention is to fetch on entry.
19871 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
19872 'switch' without a following semicolon.
19873 * tests/regression.at (braces parsing): New.
19874
3460813b
AD
198752002-01-06 Akim Demaille <akim@epita.fr>
19876
19877 Bison is dead wrong in its RR conflict reports.
19878
19879 * tests/torture.at (GNU Cim Grammar): New.
19880 * src/conflicts.c (count_rr_conflicts): Fix.
19881
73784c64
AD
198822002-01-06 Akim Demaille <akim@epita.fr>
19883
19884 Creating package.m4 from configure.ac causes too many problems.
19885
19886 * tests/Makefile.am (package.m4): Create it by hand,
19887 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
19888
25d81090
AD
198892002-01-06 Akim Demaille <akim@epita.fr>
19890
19891 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
19892 skeleton.h.
19893
a9b8959e
PE
198942002-01-04 Paul Eggert <eggert@twinsun.com>
19895
19896 * doc/bison.texinfo (Debugging):
19897 Remove YYSTDERR; it's no longer defined or used.
19898 Also, s/cstdio.h/cstdio/.
19899
25d81090
AD
199002002-01-03 Akim Demaille <akim@epita.fr>
19901
19902 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
19903
1109455c
AD
199042002-01-03 Akim Demaille <akim@epita.fr>
19905
19906 * src/parse-skel.y (process_skeleton): Don't bind the parser's
19907 tracing code to --trace, wait for a better --trace option, with
19908 args.
19909
7ea5e977
AD
199102002-01-03 Akim Demaille <akim@epita.fr>
19911
19912 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
19913 The ISO C++ standard is extremely clear about it: stderr is
19914 considered a macro, not a regular symbol (see table 94 `Header
19915 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
19916 Therefore std:: does not apply to it. It still does with fprintf.
19917 Also, s/cstdio.h/cstdio/.
19918
fab5b110
AD
199192002-01-03 Akim Demaille <akim@epita.fr>
19920
19921 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
19922 for non system headers.
19923
aed7fd9b
AD
199242002-01-02 Akim Demaille <akim@epita.fr>
19925
19926 Equip the skeleton chain with location tracking, runtime trace,
19927 pure parser and scanner.
19928
19929 * src/parse-skel.y: Request a pure parser, locations, and prefix
19930 renaming.
19931 (%union): Having several members with the same type does not help
19932 type mismatches, simplify.
19933 (YYPRINT, yyprint): New.
19934 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19935 (skel_error): this.
19936 Handle locations.
19937 * src/scan-skel.l: Adjust to these changes.
19938 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19939 (LOCATION_PRINT, skel_control_t): New.
19940
24fad99e
AD
199412001-12-30 Akim Demaille <akim@epita.fr>
19942
19943 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19944 replace `gb' with BLANKS.
19945 * src/scan-skel.l: Adjust.
19946
a4b36db4
AD
199472001-12-30 Akim Demaille <akim@epita.fr>
19948
19949 * src/system.h: We don't need nor want bcopy.
19950 Throw away MS-DOS crap: we don't need getpid.
19951 * configure.in: We don't need strndup. It was even causing
19952 problems: because Flex includes the headers *before* us,
19953 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19954 not visible.
19955 * lib/xstrndup.c: New.
19956 * src/scan-skel.l: Use it.
19957 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19958 * src/parse-skel.y: Use %directives instead of #defines.
19959
1239777d
AD
199602001-12-30 Akim Demaille <akim@epita.fr>
19961
19962 * src/skeleton.h: New.
19963 * src/output.c (output_parser, output_master_parser): Remove, dead
19964 code.
19965 * src/output.h (get_lines_number, actions_output, guards_output)
19966 (token_definitions_output): Prototype them.
19967 * src/parse-skel.y: Add the license notice.
19968 Include output.h and skeleton.h.
19969 (process_skeleton): Returns void, and takes a single parameter.
19970 * src/scan-skel.l: Add the license notice.
19971 Include skeleton.h.
19972 Don't use %option yylineno: it seems that then Flex imagines
19973 REJECT has been used, and therefore it won't reallocate its
19974 buffers (which makes no other sense to me than a bug). It results
19975 in warnings for `unused: yy_flex_realloc'.
19976
9b3add5b
RA
199772001-12-30 Robert Anisko <robert.anisko@epita.fr>
19978
19979 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19980 (MUSCLE_INSERT_PREFIX): ...to there.
19981 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19982 (MUSCLE_INSERT_PREFIX): Move from here...
19983
19984 * src/bison.hairy: Add a section directive. Put braces around muscle
19985 names. This parser skeleton is still broken, but Bison should not
19986 choke on a bad muscle 'syntax'.
19987 * src/bison.simple: Add a section directive. Put braces around muscle
19988 names.
19989
19990 * src/files.h (strsuffix, stringappend): Add declarations.
19991 (tab_extension): Add declaration.
19992 (short_base_name): Add declaration.
19993
19994 * src/files.c (strsuffix, stringappend): No longer static. These
19995 functions are used in the skeleton parser.
19996 (tab_extension): New.
19997 (compute_base_names): Use the computations done in this function
fab5b110 19998 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
19999 names.
20000 (short_base_name): No longer static.
20001
20002 * src/output.c (output_skeleton): New.
20003 (output): Disable call to output_master_parser, and give a try to
20004 a new skeleton handling system.
20005 (guards_output, actions_output): No longer static.
20006 (token_definitions_output, get_lines_number): No longer static.
20007
20008 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
20009
fab5b110 20010 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
20011 parse-skel.y.
20012
20013 * src/parse-skel.y: New file.
20014 * src/scan-skel.l: New file.
20015
b5b61c61
AD
200162001-12-29 Akim Demaille <akim@epita.fr>
20017
20018 %name-prefix is broken.
20019
20020 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
20021 Adjust all dependencies.
20022 * tests/headers.at (export YYLTYPE): Strengthen this test: use
20023 %name-prefix.
20024
20025 Renaming yylval but not yylloc is not consistent. Now we do.
20026
20027 * src/bison.simple: Prefix yylloc if used.
20028 * doc/bison.texinfo (Decl Summary): Document that.
20029
8c9a50be
AD
200302001-12-29 Akim Demaille <akim@epita.fr>
20031
20032 * doc/bison.texinfo: Promote `%long-directive' over
20033 `%long_directive'.
20034 Remove all references to fixed-output-files, yacc is enough.
20035
d99361e6
AD
200362001-12-29 Akim Demaille <akim@epita.fr>
20037
20038 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
20039 user prologue. These are defaults.
20040 * tests/actions.at (Mid-rule actions): Make sure the user can
20041 define YYDEBUG and YYERROR_VERBOSE.
20042
b9cecb91
AD
200432001-12-29 Akim Demaille <akim@epita.fr>
20044
20045 * src/output.c (header_output): Don't forget to export YYLTYPE and
20046 yylloc.
20047 * tests/headers.at (export YYLTYPE): New, make sure it does.
20048 * tests/regression.at (%union and --defines, Invalid CPP headers):
20049 Move to...
20050 * tests/headers.at: here.
20051
aea13e97
AD
200522001-12-29 Akim Demaille <akim@epita.fr>
20053
20054 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
20055
931394cb
AD
200562001-12-29 Akim Demaille <akim@epita.fr>
20057
20058 * tests/actions.at (Mid-rule actions): Output on a single line
20059 instead of several.
20060
704a47c4
AD
200612001-12-29 Akim Demaille <akim@epita.fr>
20062
20063 * doc/bison.texinfo: Formatting changes.
20064
091e20bb
AD
200652001-12-29 Akim Demaille <akim@epita.fr>
20066
20067 Don't store the token defs in a muscle, just be ready to output it
20068 on command. Now possible via `symbols'. Fixes a memory leak.
20069
20070 * src/output.c (token_definitions_output): New.
20071 (output_parser, header_output): Use it.
20072 * src/reader.c (symbols_save): Remove.
20073
cce71710
AD
200742001-12-29 Akim Demaille <akim@epita.fr>
20075
20076 * src/bison.simple: Do not provide a default for YYSTYPE and
20077 YYLTYPE before the user's prologue. Otherwise it's hardly... a
20078 default.
20079
82c035a8
AD
200802001-12-29 Akim Demaille <akim@epita.fr>
20081
20082 Mid-rule actions are simply... ignored!
20083
20084 * src/reader.c (readgram): Be sure to attach mid-rule actions to
20085 the empty-rule associated to the dummy symbol, not to the host
20086 rule.
20087 * tests/actions.at (Mid-rule actions): New.
20088
8419d367
AD
200892001-12-29 Akim Demaille <akim@epita.fr>
20090
20091 Memory leak.
20092
20093 * src/reader.c (reader): Free grammar.
20094
375d5806
AD
200952001-12-29 Akim Demaille <akim@epita.fr>
20096
20097 Memory leak.
20098
20099 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
20100 since it allocates it for each state, although only one is needed.
20101 (allocate_storage): Do it here.
20102
f51cb8ff
AD
201032001-12-29 Akim Demaille <akim@epita.fr>
20104
20105 * src/options.h, src/options.c (create_long_option_table): Rename
20106 as...
20107 (long_option_table_new): this, with a clearer prototype.
20108 (percent_table): Remove, unused,
20109 * src/getargs.c (getargs): Adjust.
20110
29e88316
AD
201112001-12-29 Akim Demaille <akim@epita.fr>
20112
20113 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
20114 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
20115 as states.
20116
b9f71f19
AD
201172001-12-29 Akim Demaille <akim@epita.fr>
20118
20119 * src/lalr.c (build_relations): Rename `states' as `states1'.
20120 Sorry, I don't understand exactly what it is, no better name...
20121
1a2b5d37
AD
201222001-12-29 Akim Demaille <akim@epita.fr>
20123
20124 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
20125 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
20126 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
20127 as rules.
20128
1cca533e
AD
201292001-12-29 Akim Demaille <akim@epita.fr>
20130
20131 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
20132 ago.
20133
c03ae966
AD
201342001-12-29 Akim Demaille <akim@epita.fr>
20135
20136 * src/reader.c, src/reader.h (user_toknums): Remove.
20137 Adjust all users to use symbols[i]->user_token_number.
20138
5a670b1e
AD
201392001-12-29 Akim Demaille <akim@epita.fr>
20140
20141 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
20142 Adjust all users to use symbols[i]->prec or ->assoc.
20143
ad949da9
AD
201442001-12-29 Akim Demaille <akim@epita.fr>
20145
20146 * src/reader.c, src/reader.h (tags): Remove.
20147 Adjust all users to use symbols[i]->tag.
20148
0e78e603
AD
201492001-12-29 Akim Demaille <akim@epita.fr>
20150
20151 * src/gram.h, src/gram.c (symbols): New, similar to state_table
20152 and rule_table.
20153 * src/reader.c (packsymbols): Fill this table.
20154 Drop sprec.
20155 * src/conflicts.c (resolve_sr_conflict): Adjust.
20156 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
20157 single table.
20158 Use symbols[i]->tag instead of tags[i].
20159
213e640e
AD
201602001-12-29 Akim Demaille <akim@epita.fr>
20161
20162 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
20163 In addition, put a comment in there, to replace...
20164 * tests/regression.at (%union and C comments): Remove.
20165
e7b8bef1
AD
201662001-12-29 Akim Demaille <akim@epita.fr>
20167
20168 * tests/regression.at (Web2c Actions): Blindly move the actual
20169 output as expected output. The contents *seem* right to me, but I
20170 can't pretend reading perfectly parser tables... Nonetheless, all
20171 the other tests pass correctly, the table look OK, even though the
20172 presence of `$axiom' is to be noted: AFAICS it is useless (but
20173 harmless).
20174
b68e7744
AD
201752001-12-29 Akim Demaille <akim@epita.fr>
20176
20177 * src/reader.c (readgram): Don't add the rule 0 if there were no
20178 rules read. In other words, add it _after_ having performed
20179 grammar sanity checks.
20180 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
20181
78d5bae9
AD
201822001-12-29 Akim Demaille <akim@epita.fr>
20183
20184 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
20185 visible, and some states have now a different number.
20186
ff442794
AD
201872001-12-29 Akim Demaille <akim@epita.fr>
20188
20189 * src/reader.c (readgram): Bind the initial rule's lineno to that
20190 of the first rule.
20191 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
20192 (Solved SR Conflicts): Adjust rule 0's line number.
20193
610ab194
AD
201942001-12-29 Akim Demaille <akim@epita.fr>
20195
20196 Fix the `GAWK Grammar' failure.
20197
20198 * src/LR0.c (final_state): Initialize to -1 so that we do compute
20199 the reductions of the first state which was mistakenly confused
20200 with the final state because precisely final_state was initialized
20201 to 0.
20202 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
20203 now noticed by Bison.
20204 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
20205 have a reduction on $default.
20206
29d29c8f
AD
202072001-12-29 Akim Demaille <akim@epita.fr>
20208
20209 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
20210 rule line numbers.
20211 * src/closure.c (print_closure): Likewise.
20212 * src/derives.c (print_derives): Likewise.
20213 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
20214 now.
20215
7c6b64d0
AD
202162001-12-29 Akim Demaille <akim@epita.fr>
20217
20218 * src/lalr.c (lookaheads_print): New.
20219 (lalr): Call it when --trace-flag.
20220 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
20221 are dumped.
20222
3d4daee3
AD
202232001-12-29 Akim Demaille <akim@epita.fr>
20224
20225 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
20226 when walking through ritem, even via rule->rhs.
20227 * src/reduce.c (dump_grammar, useful_production, reduce_output)
20228 (useful_production, useless_nonterminals): Likewise.
20229 (reduce_grammar_tables): Likewise, plus update nritems.
20230 * src/nullable.c (set_nullable): Likewise.
20231 * src/lalr.c (build_relations): Likewise.
20232 * tests/sets.at (Nullable): Adjust.
20233 Fortunately, now, the $axiom is no longer nullable.
20234
9e7f6bbd
AD
202352001-12-29 Akim Demaille <akim@epita.fr>
20236
20237 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
20238 the 0-sentinel.
20239 * src/gram.c (ritem_longest_rhs): Likewise.
20240 * src/reduce.c (nonterminals_reduce): Likewise.
20241 * src/print_graph.c (print_graph): Likewise.
20242 * src/output.c (output_rule_data): Likewise.
20243 * src/nullable.c (set_nullable): Likewise.
20244
255ef638
AD
202452001-12-29 Akim Demaille <akim@epita.fr>
20246
20247 * src/output.c: Comment changes.
20248
0d8a7363
AD
202492001-12-27 Paul Eggert <eggert@twinsun.com>
20250
20251 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
20252 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
20253 Sparc, as they were causing more porting problems than the
20254 (minor) performance improvement was worth.
20255
20256 Also, catch up with 1.31's YYSTD.
20257
3db472b9
AD
202582001-12-27 Akim Demaille <akim@epita.fr>
20259
20260 * src/output.c (output_gram): Rely on nritems, not the
20261 0-sentinel. See below.
20262 Use -1 as separator, not 0.
20263 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
20264 Rely on -1 as separator in yyrhs, instead of 0.
20265 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
20266 twice `Now at end of input', therefore there are two lines less to
20267 expect.
20268
b365aa05
AD
202692001-12-27 Akim Demaille <akim@epita.fr>
20270
20271 * tests/regression.at (Unresolved SR Conflicts):
20272 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
20273 below.
20274
30171f79
AD
202752001-12-27 Akim Demaille <akim@epita.fr>
20276
20277 * src/LR0.c (new_state): Recognize the final state by the fact it
20278 is reached by eoftoken.
20279 (insert_start_shifting_state, insert_eof_shifting_state)
20280 (insert_accepting_state, augment_automaton): Remove, since now
20281 these states are automatically computed from the initial state.
20282 (generate_states): Adjust.
20283 * src/print.c: When reporting a rule number to the user, substract
20284 1, so that the axiom rule is rule 0, and the first user rule is 1.
20285 * src/reduce.c: Likewise.
20286 * src/print_graph.c (print_core): For the time being, just as for
20287 the report, depend upon --trace-flags to dump the full set of
20288 items.
20289 * src/reader.c (readgram): Once the grammar read, insert the rule
20290 0: `$axiom: START-SYMBOL $'.
20291 * tests/set.at: Adjust: rule 0 is now displayed, and since the
20292 number of the states has changed (the final state is no longer
20293 necessarily the last), catch up.
20294
75142d45
AD
202952001-12-27 Akim Demaille <akim@epita.fr>
20296
20297 Try to make the use of the eoftoken valid. Given that its value
20298 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
20299 is used instead of > 0 where appropriate, (ii), depend upon nritems
20300 instead of the 0-sentinel.
20301
20302 * src/gram.h, src/gram.c (nritems): New.
20303 Expected to be duplication of nitems, but for the time being...
20304 * src/reader.c (packgram): Assert nritems and nitems are equal.
20305 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
20306 * src/closure.c (print_closure, print_fderives): Likewise.
20307 * src/gram.c (ritem_print): Likewise.
20308 * src/print.c (print_core, print_grammar): Likewise.
20309 * src/print_graph.c: Likewise.
20310
b7c49edf
AD
203112001-12-27 Akim Demaille <akim@epita.fr>
20312
20313 * src/main.c (main): If there are complains after grammar
20314 reductions, then output the report anyway if requested, then die.
20315 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
20316 * src/reader.c (eoftoken): New.
20317 (parse_token_decl): If the token being defined has value `0', it
20318 is the eoftoken.
20319 (packsymbols): No longer hack `tags' to insert `$' by hand.
20320 Be sure to preserve the value of the eoftoken.
20321 (reader): Make sure eoftoken is defined.
20322 Initialize nsyms to 0: now eoftoken is created just like the others.
20323 * src/print.c (print_grammar): Don't special case the eof token.
20324 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
20325 lie anyway, albeit pleasant.
20326 * tests/calc.at: Exercise error messages with eoftoken.
20327 Change the grammar so that empty input is invalid.
20328 Adjust expectations.
20329 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
20330
ec2da99f
AD
203312001-12-27 Akim Demaille <akim@epita.fr>
20332
20333 * configure.in: Check the protos of strchr ans strspn.
20334 Replace strchr if needed.
20335 * src/system.h: Provide the protos of strchr, strspn and memchr if
20336 missing.
20337 * lib/strchr.c: New.
20338 * src/reader.c (symbols_save): Use strchr.
20339
8adfa272
AD
203402001-12-27 Akim Demaille <akim@epita.fr>
20341
20342 * src/print.c, src/print_graph.c (escape): New.
20343 Use it to quote the TAGS outputs.
20344 * src/print_graph.c (print_state): Now errors are in red, and
20345 reductions in green.
20346 Prefer high to wide: output the state number on a line of its own.
20347
80dac38c
AD
203482001-12-27 Akim Demaille <akim@epita.fr>
20349
20350 * src/state.h, src/state.c (reductions_new): New.
20351 * src/LR0.c (set_state_table): Let all the states have a
20352 `reductions', even if reduced to 0.
20353 (save_reductions): Adjust.
20354 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
20355 * src/print.c (print_reductions, print_actions): Adjust.
20356 * src/output.c (action_row): Adjust.
20357
2cec70b9
AD
203582001-12-27 Akim Demaille <akim@epita.fr>
20359
20360 * src/state.h, src/state.c (errs_new, errs_dup): New.
20361 * src/LR0.c (set_state_table): Let all the states have an errs,
20362 even if reduced to 0.
20363 * src/print.c (print_errs, print_reductions): Adjust.
20364 * src/output.c (output_actions, action_row): Adjust.
20365 * src/conflicts.c (resolve_sr_conflict): Adjust.
20366
13ca549a
AD
203672001-12-27 Akim Demaille <akim@epita.fr>
20368
20369 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
20370
5092aba5
AD
203712001-12-27 Akim Demaille <akim@epita.fr>
20372
20373 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
20374 * src/print.c: here.
20375 (lookaheadset, shiftset): New, used as additional storage by
20376 print_reductions.
20377 (print_results): Adjust.
20378 (print_shifts, print_gotos, print_errs): New, extracted from...
20379 (print_actions): here.
20380 * src/print_graph.c (print_actions): Remove dead code.
20381
11e2beca
AD
203822001-12-27 Akim Demaille <akim@epita.fr>
20383
20384 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
20385 `$n' and `@n'.
20386
dac3c910
AD
203872001-12-27 Akim Demaille <akim@epita.fr>
20388
20389 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
20390 (build_relations): Adjust.
20391
d0b0fefa
AD
203922001-12-27 Akim Demaille <akim@epita.fr>
20393
20394 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
20395 duplication.
20396
adc8c848
AD
203972001-12-27 Akim Demaille <akim@epita.fr>
20398
20399 * src/reader.c (packgram): Catch nitems overflows.
20400
14d293ac
AD
204012001-12-27 Akim Demaille <akim@epita.fr>
20402
20403 * src/files.c, src/files.h (guard_obstack): Remove.
20404 * src/output.c (output): Adjust.
20405 * src/reader.c (parse_braces): New, factoring...
20406 (copy_action, copy_guard): these two which are renamed as...
20407 (parse_action, parse_guard): these.
20408 As a voluntary consequence, using braces around guards is now
20409 mandatory.
20410
f499b062
AD
204112001-12-27 Akim Demaille <akim@epita.fr>
20412
20413 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
20414 * src/reader.c (symbol_list): `guard' and `guard_line' are new
20415 members.
20416 (symbol_list_new): Adjust.
20417 (copy_action): action_line is the first line, not the last.
20418 (copy_guard): Just as for actions, store the `action' only, not
20419 the switch/case/break flesh.
20420 Don't parse the user action that might follow the guard, let...
20421 (readgram): do it, i.e., now, there can be an action after a
20422 guard.
20423 In other words the guard is just explicitly optional.
20424 (packgram): Adjust.
20425 * src/output.c (guards_output): New.
20426 (output_parser): Call it when needed.
20427 (output): Also free the guard and attrs obstacks.
20428 * src/files.c, src/files.h (obstack_save): Remove.
20429 (output_files): Remove.
20430 As a result, if one needs the former `.act' file, using an
20431 appropriate skeleton which requires actions and guards is now
20432 required.
20433 * src/main.c (main): Adjust.
20434 * tests/semantic.at: New.
20435 * tests/regression.at: Use `input.y' as input file name.
20436 Avoid 8+3 problems by requiring input.c when the test needs the
20437 parser.
20438
d945f5cd
AD
204392001-12-27 Akim Demaille <akim@epita.fr>
20440
20441 * src/reader.c (symbol_list_new): Be sure to initialize all the
20442 fields.
20443
d200e455
AD
204442001-12-27 Akim Demaille <akim@epita.fr>
20445
20446 All the hacks using a final pseudo state are now useless.
20447
20448 * src/LR0.c (set_state_table): state_table holds exactly nstates.
20449 * src/lalr.c (nLA): New.
20450 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
20451 instead of lookaheadsp from the pseudo state (nstate + 1).
20452
f9507c28
AD
204532001-12-27 Akim Demaille <akim@epita.fr>
20454
20455 * src/output.c (action_row, token_actions): Use a state_t instead
20456 of a integer, and nlookaheads instead of the following state's
20457 lookaheadsp.
20458
065fbd27
AD
204592001-12-27 Akim Demaille <akim@epita.fr>
20460
20461 * src/conflicts.c (log_resolution, flush_shift)
20462 (resolve_sr_conflict, set_conflicts, solve_conflicts)
20463 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
20464 (conflicts_print, print_reductions): Use a state_t instead of an
20465 integer when referring to a state.
20466 As much as possible, depend upon nlookaheads, instead of the
20467 `lookaheadsp' member of the following state (since lookaheads of
20468 successive states are successive, the difference between state n + 1
20469 and n served as the number of lookaheads for state n).
20470 * src/lalr.c (add_lookback_edge): Likewise.
20471 * src/print.c (print_core, print_actions, print_state)
20472 (print_results): Likewise.
20473 * src/print_graph.c (print_core, print_actions, print_state)
20474 (print_graph): Likewise.
20475 * src/conflicts.h: Adjust.
20476
1b177bd7
AD
204772001-12-27 Akim Demaille <akim@epita.fr>
20478
20479 * src/bison.hairy: Formatting/comment changes.
20480 ANSIfy.
20481 Remove `register' indications.
20482 Add plenty of `static'.
20483
7742ddeb
AD
204842001-12-27 Akim Demaille <akim@epita.fr>
20485
20486 * src/output.c (prepare): Drop the muscle `ntbase' which
20487 duplicates ntokens.
20488 * src/bison.simple: Formatting/comment changes.
20489 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
20490 is an undocumented synonym.
20491
1fa14068
AD
204922001-12-22 Akim Demaille <akim@epita.fr>
20493
20494 * src/output.c (output_table_data): Change the prototype to use
20495 `int' for array ranges: some invocations do pass an int, not a
20496 short.
20497 Reported by Wayne Green.
20498
b9752825
AD
204992001-12-22 Akim Demaille <akim@epita.fr>
20500
20501 Some actions of web2c.y are improperly triggered.
20502 Reported by Mike Castle.
20503
20504 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
20505 * tests/regression.at (Web2c): Rename as...
20506 (Web2c Report): this.
20507 (Web2c Actions): New.
20508
776209d6
AD
205092001-12-22 Akim Demaille <akim@epita.fr>
20510
20511 Reductions in web2c.y are improperly reported.
20512 Reported by Mike Castle.
20513
20514 * src/conflicts.c (print_reductions): Fix.
20515 * tests/regression.at (Web2c): New.
20516
275fc3ad
AD
205172001-12-18 Akim Demaille <akim@epita.fr>
20518
20519 Some host fail on `assert (!"foo")', which expands to
20520 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
20521 Reported by Nelson Beebee.
20522
20523 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
20524 `#define it_succeeded 0' and `assert (it_succeeded)'.
20525
897668ee
MA
205262001-12-17 Marc Autret <autret_m@epita.fr>
20527
20528 * src/bison.simple: Don't hard code the skeleton line and filename.
20529 * src/output.c (output_parser): Rename 'line' as 'output_line'.
20530 New line counter 'skeleton_line' (skeleton-line muscle).
20531
ab3399e0
PE
205322001-12-17 Paul Eggert <eggert@twinsun.com>
20533
20534 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
20535 YYDEBUG must be defined to a nonzero value.
20536
20537 * src/bison.simple (yytname): Do not assume that the user defines
20538 YYDEBUG to a properly parenthesized expression.
20539
3877f72b
AD
205402001-12-17 Akim Demaille <akim@epita.fr>
20541
20542 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
20543 nlookaheads is a new member.
20544 Adjust all users.
20545 * src/lalr.h (nlookaheads): Remove this orphan declaration.
20546 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
20547 state.
776209d6 20548
331dbc1b
AD
205492001-12-17 Akim Demaille <akim@epita.fr>
20550
20551 * src/files.h, src/files.c (open_files, close_files): Remove.
20552 * src/main.c (main): Don't open/close files, nor invoke lex_free,
20553 let...
20554 * src/reader.c (reader): Do it.
776209d6 20555
be750e4c
AD
205562001-12-17 Akim Demaille <akim@epita.fr>
20557
20558 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 20559
709ae8c6
AD
205602001-12-17 Akim Demaille <akim@epita.fr>
20561
20562 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
20563 (flush_reduce): New.
20564 (resolve_sr_conflict): Adjust.
776209d6 20565
f87685c3
AD
205662001-12-17 Akim Demaille <akim@epita.fr>
20567
20568 * src/output.c (output_obstack): Be static and rename as...
20569 (format_obstack): this, to avoid any confusion with files.c's
20570 output_obstack.
20571 * src/reader.h (muscle_obstack): Move to...
20572 * src/output.h: here, since it's defined in output.c.
20573
837491d8
AD
205742001-12-17 Akim Demaille <akim@epita.fr>
20575
20576 * src/output.c (action_row, save_column, default_goto)
20577 (sort_actions, matching_state, pack_vector): Better variable
20578 locality.
20579
796d61fb
AD
205802001-12-17 Akim Demaille <akim@epita.fr>
20581
20582 * src/output.c: Various formatting changes.
776209d6 20583
64d15509
AD
205842001-12-17 Akim Demaille <akim@epita.fr>
20585
20586 * src/files.c (output_files): Free the output_obstack.
20587 * src/main.c (main): Call print and print_graph conditionally.
20588 * src/print.c (print): Work unconditionally.
20589 * src/print_graph.c (print_graph): Work unconditionally.
20590 * src/conflicts.c (log_resolution): Output only if verbose_flag.
20591
fbc8ecb7
MA
205922001-12-16 Marc Autret <autret_m@epita.fr>
20593
20594 * src/output.c (actions_output): Fix. When we use %no-lines,
20595 there is one less line per action.
20596
f0440388
MA
205972001-12-16 Marc Autret <autret_m@epita.fr>
20598
20599 * src/bison.simple: Remove a useless #line directive.
20600 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
20601 * src/output.c (get_lines_number): New.
776209d6 20602 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
20603 output muscles.
20604 Fix line numbering.
20605 (actions_output): Computes the number of lines taken by actions.
20606 (output_master_parser): Insert new skeleton which is the name of
20607 the output parser file name.
20608
a79986b8
MA
206092001-12-15 Marc Autret <autret_m@epita.fr>
20610
20611 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
20612
4ec8e00f
MA
206132001-12-15 Marc Autret <autret_m@epita.fr>
20614
20615 * src/output.c (output_gram): Keep track of the hairy one.
20616
1a4648ff
AD
206172001-12-15 Akim Demaille <akim@epita.fr>
20618
20619 Make `make distcheck' work.
20620
20621 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
20622 system.h which uses libgettext.h.
20623
9c2c67e6
AD
206242001-12-15 Akim Demaille <akim@epita.fr>
20625
20626 * src/nullable.c (set_nullable): Useless rules must be skipped,
20627 otherwise, since we range over their symbols, we might look at a
20628 nonterminal which no longer ``exists'', i.e., it is not counted in
20629 `nvars', hence we overflow our arrays.
20630
93ede233
AD
206312001-12-15 Akim Demaille <akim@epita.fr>
20632
20633 The header can also be produced directly, without any obstack!
20634 Yahoo!
20635
20636 * src/files.c, src/files.h (defines_obstack): Remove.
20637 (compute_header_macro): Global.
20638 (defines_obstack_save): Remove.
20639 * src/reader.c (parse_union_decl): No longer output to
20640 defines_obstack: its content can be found in the `stype' muscle
20641 anyway.
20642 (output_token_translations): Merge into...
20643 (symbols_output): this.
20644 Rename as...
20645 (symbols_save): this.
20646 (reader): Adjust.
20647 * src/output.c (header_output): New.
20648 (output): Call it.
20649
2666f928
AD
206502001-12-15 Akim Demaille <akim@epita.fr>
20651
20652 * src/reader.c (parse_union_decl): Instead of handling two obstack
20653 simultaneously, use one to define the `stype' muscle, and use the
20654 value of the latter to fill defines_obstack.
20655 (copy_comment): Remove.
20656 (copy_comment2): Work for a single obstack.
20657 Rename as...
20658 (copy_comment): this.
20659
428046f8
AD
206602001-12-15 Akim Demaille <akim@epita.fr>
20661
20662 * src/lex.c, src/lex.h (xgetc): No longer static.
20663 * src/reader.c (parse_union_decl): Revamp.
20664
ea52d706
AD
206652001-12-15 Akim Demaille <akim@epita.fr>
20666
20667 Still making progress in separating Bison into (i) input, (ii)
20668 process, (iii) output: now we can directly output the parser file
20669 without using table_obstack at all.
20670
20671 * src/files.c, src/files.h (table_obstack): Bye bye.
20672 (parser_file_name): New.
20673 * src/files.c (compute_output_file_names): Compute it.
20674 * src/output.c (actions_output, output_parser)
20675 (output_master_parser): To a file instead of an obstack.
20676
3f96f4dc
AD
206772001-12-15 Akim Demaille <akim@epita.fr>
20678
20679 Attach actions to rules, instead of pre-outputting them to
20680 actions_obstack.
20681
20682 * src/gram.h (rule_t): action and action_line are new members.
20683 * src/reader.c (symbol_list): Likewise.
20684 (copy_action): Save the actions within the rule.
20685 (packgram): Save them in rule_table.
20686 * src/output.c (actions_output): New.
20687 (output_parser): Use it on `%%actions'.
20688 (output_rule_data): Don't free rule_table.
20689 (output): Do it.
20690 (prepare): Don't save the `action' muscle.
20691 * src/bison.simple: s/%%action/%%actions/.
20692
51576fb3
AD
206932001-12-15 Akim Demaille <akim@epita.fr>
20694
20695 * src/reader.c (copy_action): When --yacc, don't append a `;'
20696 to the user action: let it fail if lacking.
dee049eb 20697 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 20698
2648a72d
AD
206992001-12-14 Akim Demaille <akim@epita.fr>
20700
20701 * src/lex.c (literalchar): Simply return the char you decoded, non
20702 longer mess around with obstacks and int pointers.
20703 Adjust all callers.
20704
92790e5b
AD
207052001-12-14 Akim Demaille <akim@epita.fr>
20706
20707 * src/lex.c (literalchar): Don't escape the special characters,
20708 just decode them, and keep them as char (before, eol was output as
20709 the 2 char string `\n' etc.).
20710 * src/output.c (output_rule_data): Use quotearg to output the
20711 token strings.
20712
927c1557
PE
207132001-12-13 Paul Eggert <eggert@twinsun.com>
20714
20715 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
20716 Do not infringe on the global user namespace when using C++.
20717 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
20718 All uses of `fprintf' and `stderr' changed.
20719
20720 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
20721
ed8e1f68
AD
207222001-12-13 Akim Demaille <akim@epita.fr>
20723
20724 The computation of nullable is broken: it doesn't handle empty
20725 RHS's properly.
20726
20727 * tests/torture.at (GNU AWK Grammar): New.
20728 * tests/sets.at (Nullable): New.
20729 * src/nullable.c (set_nullable): Instead of blindly looping over
20730 `ritems', loop over the rules, and then over their rhs's.
20731
20732 Work around Autotest bugs.
20733
20734 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
20735 frame, because Autotest understand lines starting with a `+' as
20736 traces from the shell. Then, they are not processed properly.
20737 Admittedly an Autotest bug, but we don't have time to wait for
20738 Autotest to catch up.
20739 * tests/regression.at (Broken Closure): Adjust to the new table
20740 frames.
20741 Move to...
20742 * tests/sets.at: here.
20743
cb581495
AD
207442001-12-13 Akim Demaille <akim@epita.fr>
20745
20746 * src/closure.c (closure): Use nrules instead of playing tricks
20747 with BITS_PER_WORD.
20748
2e729273
AD
207492001-12-13 Akim Demaille <akim@epita.fr>
20750
20751 * src/print.c (print_actions): Output the handling of `$' as the
20752 traces do: shifting the token EOF. Before EOF was treated as a
20753 nonterminal.
20754 * tests/regression.at: Adjust some tests.
20755 * src/print_graph.c (print_core): Complete the set of items via
20756 closure. The next-to-final and final states are still unsatisfying,
20757 but that's to be addressed elsewhere.
20758 No longer output the rule numbers, but do output the state number.
20759 A single loop for the shifts + gotos is enough, but picked a
20760 distinct color for each.
20761 (print_graph): Initialize and finalize closure.
20762
107f7dfb
AD
207632001-12-13 Akim Demaille <akim@epita.fr>
20764
20765 * src/reader.c (readgram): Remove dead code, an strip useless
20766 braces.
20767 (get_type): Remove, unused.
20768
9b53a24f
AD
207692001-12-12 Akim Demaille <akim@epita.fr>
20770
20771 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
20772 on that of lib/error.c.
20773
dbfb6dcd
AD
207742001-12-12 Akim Demaille <akim@epita.fr>
20775
20776 Some hosts don't like `/' in includes.
20777
20778 * src/system.h: Include libgettext.h without qualifying the path.
20779 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
20780 $(top_srcdir).
20781
c25fb648
MA
207822001-12-11 Marc Autret <autret_m@epita.fr>
20783
20784 * src/output.c (output_parser): Remove useless muscle.
20785
710ddc4f
MA
207862001-12-11 Marc Autret <autret_m@epita.fr>
20787
20788 * src/bison.simple: Remove #line just before %%epilogue. It
20789 is now handled in ...
20790 * src/reader.c (read_additionnal_code): Add the output of a
20791 #line for the epilogue.
20792
e83d80b8
MA
207932001-12-10 Marc Autret <autret_m@epita.fr>
20794
927c1557 20795 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
20796 replace precedent remove.
20797 * src/bison.simple: Remove #line before %%prologue because
20798 %%input-line is wrong at this time.
20799
971d5158
MA
208002001-12-10 Marc Autret <autret_m@epita.fr>
20801
20802 * src/reader.c (symbols_output): Clean up.
927c1557 20803 * src/output.c (output_gram, output): Clean up.
971d5158 20804
5edafffd
AD
208052001-12-10 Akim Demaille <akim@epita.fr>
20806
20807 * src/lalr.c (initialize_lookaheads): New. Extracted from...
20808 * src/LR0.c (set_state_table): here.
20809 * src/lalr.c (lalr): Call it.
20810
0279f8e9
AD
208112001-12-10 Akim Demaille <akim@epita.fr>
20812
20813 * src/state.h (shifts): Remove the `number' member: shifts are
20814 attached to state, hence no longer need to be labelled with a
20815 state number.
20816
190c4f5f
AD
208172001-12-10 Akim Demaille <akim@epita.fr>
20818
20819 Now that states have a complete set of members, the linked list of
20820 shifts is useless: just fill directly the state's shifts member.
20821
20822 * src/state.h (shifts): Remove the `next' member.
20823 * src/LR0.c (first_state, last_state): Remove.
20824 Adjust the callers.
20825 (augment_automaton): Don't look for the shifts that must be added
20826 a shift on EOF: it is those of the state we looked for! But now,
20827 since shifts are attached, it is no longer needed to looking
20828 merely by its id: its number.
20829
2a73b93d
AD
208302001-12-10 Akim Demaille <akim@epita.fr>
20831
20832 * src/LR0.c (augment_automaton): Better variable locality.
20833 Remove an impossible branch: if there is a state corresponding to
20834 the start symbol being shifted, then there is shift for the start
20835 symbol from the initial state.
20836
74392f6a
AD
208372001-12-10 Akim Demaille <akim@epita.fr>
20838
20839 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
20840 only when appropriate: when insert_start_shifting_state' is not
20841 invoked.
20842 * tests/regression.at (Rule Line Numbers): Adjust.
20843
37c82725
AD
208442001-12-10 Akim Demaille <akim@epita.fr>
20845
20846 * src/LR0.c (augment_automaton): Now that all states have shifts,
20847 merge the two cases addition shifts to the initial state.
20848
6a164e0c
AD
208492001-12-10 Akim Demaille <akim@epita.fr>
20850
20851 * src/lalr.c (set_state_table): Move to...
20852 * src/LR0.c: here.
20853 * src/lalr.c (lalr): Don't call it...
20854 * src/LR0.c (generate_states): do it.
20855 * src/LR0.h (first_state): Remove, only the table is used.
20856
7215de24
AD
208572001-12-10 Akim Demaille <akim@epita.fr>
20858
20859 * src/LR0.h (first_shift, first_reduction): Remove.
20860 * src/lalr.c: Don't use first_shift: find shifts through the
20861 states.
20862
80e25d4d
AD
208632001-12-10 Akim Demaille <akim@epita.fr>
20864
20865 * src/LR0.c: Attach shifts to states as soon as they are
20866 computed.
20867 * src/lalr.c (set_state_table): Instead of assigning shifts to
20868 state, just assert that the mapping was properly done.
20869
0ab3728b
AD
208702001-12-10 Akim Demaille <akim@epita.fr>
20871
20872 * src/LR0.c (insert_start_shift): Rename as...
20873 (insert_start_shifting_state): this.
20874 (insert_eof_shifting_state, insert_accepting_state): New.
20875 (augment_automaton): Adjust.
20876 Better locality of the variables.
20877 When looking if the start_symbol is shifted from the initial
20878 state, using `while (... symbol != start_symbol ...)' sounds
20879 better than `while (... symbol < start_symbol ...)': If fail
20880 to see how the order between symbols could be relevant!
20881
78af9bbc
AD
208822001-12-10 Akim Demaille <akim@epita.fr>
20883
20884 * src/getargs.h: Don't declare `spec_name_prefix' and
20885 `spec_file_prefix', declared by src/files.h.
20886 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
20887 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
20888 * src/output.c (prepare): Adjust.
20889 * src/reader.c (symbols_output): Likewise.
20890 * src/vmsgetargs.c: Vaguely adjust, but who cares?
20891
bdef2a41
AD
208922001-12-10 Akim Demaille <akim@epita.fr>
20893
20894 * src/muscle_tab.c (muscle_init): NULL is a better default than
20895 `"0"'.
20896
3735969c
AD
208972001-12-10 Akim Demaille <akim@epita.fr>
20898
20899 * src/reader.c (reader): Calling symbols_output once is enough.
20900
49701457
AD
209012001-12-10 Akim Demaille <akim@epita.fr>
20902
20903 Now that states have a complete set of members, the linked list of
20904 reductions is useless: just fill directly the state's reductions
20905 member.
20906
20907 * src/state.h (struct reductions): Remove member `number' and
20908 `next'.
20909 * src/LR0.c (first_reduction, last_reduction): Remove.
20910 (save_reductions): Don't link the new reductions, store them in
20911 this_state.
20912 * src/lalr.c (set_state_table): No need to attach reductions to
20913 states, it's already done.
20914 * src/output.c (output_actions): No longer free the shifts, then
20915 the reductions, then the states: free all the states and their
20916 members.
20917
0edad749
AD
209182001-12-10 Akim Demaille <akim@epita.fr>
20919
20920 * src/options.c (OPTN, DRTV, BOTH): New.
20921 (option_table): Use them.
20922
0edad749
AD
20923 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
20924 the job of system.h.
20925 * src/options.c: Don't include stdio.h and xalloc.h for the same
20926 reasons.
20927
5449dd0f
AD
209282001-12-10 Akim Demaille <akim@epita.fr>
20929
20930 * src/output.c (output, prepare): Make sure the values of the
20931 muscles `action' and `prologue' are 0-terminated.
20932
a870c567
AD
209332001-12-10 Akim Demaille <akim@epita.fr>
20934
20935 Clean up GCC warnings.
20936
20937 * src/reader.c (copy_action): `buf' is not used.
20938 (parse_skel_decl): Be static.
20939 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20940 * src/options.h (create_long_option_table): Have a real prototype.
20941 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20942 (hash_delete_at): Return const void *.
20943 Adjust casts to preserve the const.
20944
80df8768
AD
209452001-12-10 Akim Demaille <akim@epita.fr>
20946
20947 * configure.in: Require 2.52g.
20948 M4 is not needed, but AUTOM4TE is.
20949 * m4/m4.m4: Remove.
20950 * tests/Makefile.am: Adjust.
20951
f693ad14
AD
209522001-12-10 Akim Demaille <akim@epita.fr>
20953
20954 One structure for states is enough, even though theoretically
20955 there are LR(0) states and LALR(1) states.
20956
20957 * src/lalr.h (state_t): Remove.
20958 (state_table): Be state_t **, not state_t *.
20959 * src/state.h (core, CORE_ALLOC): Rename as...
20960 (state_t, STATE_ALLOC): this.
20961 Add the LALR(1) members: shifts, reductions, errs.
20962 * src/LR0.c (state_table): Rename as...
20963 (state_hash): this, to avoid name clashes with the global
20964 `state_table'.
20965 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20966 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20967
74ffbcb6
AD
209682001-12-10 Akim Demaille <akim@epita.fr>
20969
20970 Bison dumps core on bash.y.
20971 Reported by Pascal Bart.
20972
20973 * src/warshall.c (bitmatrix_print): New.
20974 (TC): Use it.
ba0fe3c7 20975 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
20976 j must be the outer loop.
20977 * tests/regression.at (Broken Closure): New.
20978
07708e19
AD
209792001-12-05 Akim Demaille <akim@epita.fr>
20980
20981 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20982 its argument.
ba1ecc07 20983 Reported by Peter Hamorsky.
07708e19 20984
92b16366
AD
209852001-12-05 Akim Demaille <akim@epita.fr>
20986
20987 * src/conflicts.c (err_table): Remove.
20988 (resolve_sr_conflict): Adjust.
20989 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20990 Rename as...
20991 (state_t.reductions, state_t.shifts): this.
20992
076ab033
AD
209932001-12-05 Akim Demaille <akim@epita.fr>
20994
20995 * src/reduce.c (reduce_grammar_tables): No longer disable the
20996 removal of useless rules via CPP but via `if (0)', so that the
20997 compiler still check the code is valid.
20998 For instance, it should have noticed `rline' no longer exists: use
20999 the `line' member of rule_t.
21000 * src/gram.c (dummy, rline): Remove, unused.
21001
3843c413
AD
210022001-12-05 Akim Demaille <akim@epita.fr>
21003
21004 * src/output.c (pack_vector): Use assert, not berror.
21005 * src/main.c (berror): Remove, unused.
21006
43168960
AD
210072001-12-05 Akim Demaille <akim@epita.fr>
21008
21009 New experimental feature: if --verbose --trace output all the
21010 items of a state, not only its kernel.
21011
21012 * src/print.c (print_core): If `trace_flag', then invoke closure
21013 before outputting the items of the state (print_core is no longer
21014 a correct name them).
21015 (print_results): Invoke new_closure/free_closure if needed.
21016
b2872512
AD
210172001-12-05 Akim Demaille <akim@epita.fr>
21018
21019 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
21020 * src/closure.c, src/closure.h (itemsetsize): Rename as...
21021 (nitemset): for consistency with the rest of the project.
21022
23cbcc6c
AD
210232001-12-05 Akim Demaille <akim@epita.fr>
21024
21025 * src/closure.c (print_closure): Improve.
21026 (closure): Use it for printing input and output.
21027
03ec521c
AD
210282001-12-05 Akim Demaille <akim@epita.fr>
21029
21030 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
21031 indexed by nonterminals.
21032
3a7456dd
AD
210332001-12-05 Akim Demaille <akim@epita.fr>
21034
21035 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
21036 what it was!).
21037 * src/warshall.h: Remove accidental duplication of the content.
21038
1cbcf2e7
AD
210392001-12-05 Akim Demaille <akim@epita.fr>
21040
21041 * src/closure.c (set_fderives): De-obfuscate.
21042
84182270
AD
210432001-12-05 Akim Demaille <akim@epita.fr>
21044
21045 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
21046
3f6f053c
AD
210472001-12-05 Akim Demaille <akim@epita.fr>
21048
21049 * src/closure.c (set_firsts): De-obfuscate.
21050
7a5350ba
AD
210512001-12-05 Akim Demaille <akim@epita.fr>
21052
21053 * src/output.c (action_row): De-obfuscate
21054 using the good o' techniques: arrays not pointers, variable
21055 locality, BITISSET, RESETBIT etc.
21056
d954473d
AD
210572001-12-05 Akim Demaille <akim@epita.fr>
21058
21059 Pessimize the code to simplify it: from now on, all the states
21060 have a valid SHIFTS, which NSHIFTS is possibly 0.
21061
21062 * src/LR0.c (shifts_new): Be global and move to..
21063 * src/state.c, src/state.h: here.
21064 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
21065 * src/print_graph: Adjust.
21066
9839bbe5
AD
210672001-12-05 Akim Demaille <akim@epita.fr>
21068
21069 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
21070 * src/conflicts.c: Use it.
21071 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
21072 incorrectly ``simplified''.
21073
9f136c07
AD
210742001-12-05 Akim Demaille <akim@epita.fr>
21075
21076 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
21077 using the good o' techniques: arrays not pointers, variable
21078 locality, BITISSET, RESETBIT etc.
21079
b608206e
AD
210802001-12-05 Akim Demaille <akim@epita.fr>
21081
21082 * src/state.h (SHIFT_SYMBOL): New.
21083 * src/conflicts.c: Use it to deobfuscate.
21084
52afa962
AD
210852001-12-05 Akim Demaille <akim@epita.fr>
21086
21087 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
21088 (print_reductions): De-obfuscate using the good o' techniques:
21089 arrays not pointers, variable locality, BITISSET.
21090
e74dc321
AD
210912001-12-05 Akim Demaille <akim@epita.fr>
21092
21093 * src/conflicts.c (print_reductions): Arrays, not pointers.
21094 Use BITISSET.
21095
768fca83
AD
210962001-12-05 Akim Demaille <akim@epita.fr>
21097
21098 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21099
a17e599f
AD
211002001-12-05 Akim Demaille <akim@epita.fr>
21101
21102 * src/conflicts.c (print_reductions): Improve variable locality.
21103
a04bc341
AD
211042001-12-05 Akim Demaille <akim@epita.fr>
21105
21106 * src/conflicts.c (print_reductions): Pessimize, but clarify.
21107
c8ea038e
AD
211082001-12-05 Akim Demaille <akim@epita.fr>
21109
21110 * src/conflicts.c (print_reductions): Improve variable locality.
21111
aa2aab3c
AD
211122001-12-05 Akim Demaille <akim@epita.fr>
21113
21114 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
21115 * src/lalr.c: Use them.
21116
b178c8cc
AD
211172001-12-05 Akim Demaille <akim@epita.fr>
21118
21119 * src/LR0.c (augment_automaton): Formatting changes.
21120 Better variable locality.
21121
f67d13aa
AD
211222001-12-05 Akim Demaille <akim@epita.fr>
21123
21124 * src/lalr.c (matrix_print): New.
21125 (transpose): Use it.
21126 Use arrays instead of pointers.
21127
c2713865
AD
211282001-12-05 Akim Demaille <akim@epita.fr>
21129
21130 * src/lalr.c (maxrhs): Move to...
21131 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
21132 * src/lalr.c (build_relations): Adjust.
21133
9887c18a
AD
211342001-12-05 Akim Demaille <akim@epita.fr>
21135
21136 * src/lalr.c (transpose): Free the memory allocated to the
21137 argument, as it is replaced by the results by the unique caller.
21138 (build_relations): Merely invoke transpose: it handles the memory
21139 deallocation.
21140 Improve variable locality.
21141 Avoid variables used as mere abbreviations.
21142 (compute_lookaheads): Use arrays instead of pointers.
21143
4d4f699c
AD
211442001-12-05 Akim Demaille <akim@epita.fr>
21145
21146 * src/lalr.c (initialize_F): Improve variable locality.
21147 Avoid variables used as mere abbreviations.
21148
80a69750
AD
211492001-12-05 Akim Demaille <akim@epita.fr>
21150
21151 * src/derives.c (print_derives): Display the ruleno.
21152 * src/lalr.c (initialize_F, transpose): Better variable locality
21153 to improve readability.
21154 Avoid variables used as mere abbreviations.
21155
fe961097
AD
211562001-12-05 Akim Demaille <akim@epita.fr>
21157
21158 * src/lalr.c (traverse): Use arrays instead of pointers.
21159
e3e4e814
AD
211602001-12-05 Akim Demaille <akim@epita.fr>
21161
21162 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
21163 the handling of squeue.
21164 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21165
630e182b
AD
211662001-12-05 Akim Demaille <akim@epita.fr>
21167
21168 Because useless nonterminals are now kept alive (instead of being
21169 `destroyed'), we now sometimes examine them, and store information
21170 related to them. Hence we need to know their number, and adjust
21171 memory allocations.
21172
21173 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
21174 static.
21175 * src/LR0.c (allocate_itemsets): The memory allocated to
21176 `symbol_count' was used for two different purpose: once to count
21177 the number of occurrences of each symbol, and later reassigned to
21178 `shift_symbol', containing the symbol that can be shifted from a
21179 given state.
21180 Deobfuscate, i.e., allocate, use and free `symbol_count' here
21181 only, and...
21182 (new_itemsets): Allocate `shift_symbol' here.
21183 (allocate_itemsets): symbol_count includes useless nonterminals.
21184 Make room for them.
21185 (free_storage): Use `free', not `XFREE', for pointers that cannot
21186 be null.
21187
81b51460
AD
211882001-12-05 Akim Demaille <akim@epita.fr>
21189
21190 * src/nullable.c (set_nullable): Deobfuscate the handling of
21191 ritem.
21192 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
21193
3067fbef
AD
211942001-12-05 Akim Demaille <akim@epita.fr>
21195
21196 * src/gram.c, src/gram.h (ritem_print): New.
21197 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
21198 (This useless function was defined only to work around VMS linkers
21199 that can't handle compilation units with variables only).
21200 * src/reduce.c (dump_grammar): Use it to trace the construction of
21201 ritem.
21202
c2bea5f9
PE
212032001-12-04 Paul Eggert <eggert@twinsun.com>
21204
7d27c823
PE
21205 * src/bison.simple (union yyalloc): Change member names
21206 to be the same as the stack names.
21207 (yyparse): yyptr is now union yyalloc *, not char *.
21208 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
21209 and may generate better code on some machines.
c2bea5f9
PE
21210 (yystpcpy): Use prototype if __STDC__ is defined, not just
21211 if __cplusplus is defined.
35687a9d 21212
2c8a9dfa
AD
212132001-11-30 Akim Demaille <akim@epita.fr>
21214
21215 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
21216 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
21217 Gettext doesn't compile cleanly, and dies with -Werror.
21218 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
21219 Include WARNING_CFLAGS here.
21220 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
21221 before being defined.
21222
f4e421e6
AD
212232001-11-27 Paul Eggert <eggert@twinsun.com>
21224
21225 * lib/quotearg.h (quotearg_n, quotearg_n_style):
21226 First arg is int, not unsigned.
21227 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
21228 (SIZE_MAX, UINT_MAX): New macros.
21229 (quotearg_n_options): Abort if N is negative.
21230 Avoid overflow check on hosts where size_t is 64 bits and int
21231 is 32 bits, as overflow is impossible there.
21232 Fix off-by-one typo that caused unnecessary reallocation.
21233
7093d0f5
AD
212342001-11-29 Paul Eggert <eggert@twinsun.com>
21235
21236 Name space cleanup in generated parser.
21237
21238 * doc/bison.texinfo (Bison Parser): Discuss system headers
21239 and their effect on the user name space.
21240
21241 * src/bison.simple:
21242 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
21243 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
21244 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
21245
21246 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
21247 on user names when possible.
21248
21249 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
21250 Simplify test for whather <alloca.h> exists.
21251
21252 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
21253
21254 (<stdio.h>): Include if YYDEBUG.
21255
21256 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
21257 ! defined (yyoverflow) && ! defined (yymemcpy).
21258
21259 (yymemcpy, yyparse): Rename local variables as needed so that
21260 they all begin with 'yy'.
21261
21262 (yystrlen, yystpcpy): New functions.
21263
21264 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
21265 All uses changed.
21266
21267 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
21268 instead of relying on string.h functions. Use YYSTACK_ALLOC
21269 and YYSTACK_FREE instead of malloc and free.
21270
fd51e5ff
AD
212712001-11-30 Akim Demaille <akim@epita.fr>
21272
21273 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
21274 before their first uses.
21275 (YYBISON, YYPURE): Move to the top of the output.
21276
7d13ff5f
AD
212772001-11-30 Akim Demaille <akim@epita.fr>
21278
21279 * tests/reduce.at (Useless Nonterminals): Fix.
21280
892a3995
AD
212812001-11-30 Akim Demaille <akim@epita.fr>
21282
21283 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
21284 if body instead of `;' to pacify GCC's warnings.
21285
68f1e3ed
AD
212862001-11-30 Akim Demaille <akim@epita.fr>
21287
21288 Instead of mapping the LHS of unused rules to -1, keep the LHS
21289 valid, but flag the rules as invalid.
21290
21291 * src/gram.h (rule_t): `useful' is a new member.
21292 * src/print.c (print_grammar): Adjust.
21293 * src/derives.c (set_derives): Likewise.
21294 * src/reader.c (packgram, reduce_output): Likewise.
21295 * src/reduce.c (reduce_grammar_tables): Likewise.
21296 * tests/reduce.at (Underivable Rules, Useless Rules): New.
21297
d2d1b42b
AD
212982001-11-30 Akim Demaille <akim@epita.fr>
21299
21300 * src/reduce.c (reduce_output): Formatting changes.
21301 * src/print.c (print_results, print_grammar): Likewise.
21302 * tests/regression.at (Rule Line Numbers)
21303 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
21304
760b53a8
AD
213052001-11-30 Akim Demaille <akim@epita.fr>
21306
21307 * src/reduce.c (nonterminals_reduce): Instead of throwing away
21308 useless nonterminals, move them at the end of the symbol arrays.
21309 (reduce_output): Adjust.
21310 * tests/reduce.at (Useless Nonterminals): Adjust.
21311
00238958
AD
213122001-11-30 Akim Demaille <akim@epita.fr>
21313
21314 * src/reduce.c: Various comment/formatting changes.
21315 (nonterminals_reduce): New, extracted from...
21316 (reduce_grammar_tables): here.
21317 (reduce_grammar): Call nonterminals_reduce.
21318
396452de
PE
213192001-11-29 Paul Eggert <eggert@twinsun.com>
21320
21321 * src/bison.simple (YYSTACK_REALLOC): Remove.
21322 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
21323 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
21324 New macros.
21325 (union yyalloc): New type.
21326 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
21327 an arbitrary restriction on hosts where size_t is wider than int.
21328
21329 (yyparse): Don't dump core if alloca or malloc fails; instead, report
21330 a parser stack overflow. Allocate just one block of memory for all
21331 three stacks, instead of allocating three blocks; this typically is
21332 faster and reduces fragmentation.
21333
21334 Do not limit the number of items in the stack to a value that fits
21335 in 'int', as this is an arbitrary limit on hosts with 64-bit
21336 size_t and 32-bit int.
21337
147e184c
MA
213382001-11-29 Marc Autret <autret_m@epita.fr>
21339
21340 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
21341 of defining YYERROR_VERBOSE.
21342 [AT_DATA]: $4 is now out of C declarations in the prologue.
21343
426cf563
MA
213442001-11-28 Marc Autret <autret_m@epita.fr>
21345
21346 * src/reader.c (parse_dquoted_param): New.
21347 (parse_skel_decl): Use it.
21348 * src/lex.h: Add its prototype.
21349 * src/lex.c (literalchar): Become not static.
21350
c7925b99
MA
213512001-11-28 Marc Autret <autret_m@epita.fr>
21352
21353 * src/output.h: And put its extern declaration here.
21354 * src/output.c (error_verbose): Define here.
21355 (prepare): Echo name modification.
21356 * src/getargs.h: Clean its extern declaration.
21357 * src/getargs.c (error_verbose_flag): Remove.
21358 (getargs): Remove case 'e'.
21359 * src/options.c (option_table): 'error-verbose' is now seen as simple
21360 percent option.
21361 Include output.h.
21362
21363 * src/reader.c (read_declarations): Remove case tok_include.
21364 (parse_include_decl): Remove.
21365 * src/lex.h (token_t): Remove tok_include.
21366 * src/options.c (option_table): 'include' is now a simple command line
21367 option.
21368
5b5d1929
MA
213692001-11-28 Marc Autret <autret_m@epita.fr>
21370
21371 * src/bison.simple: Adjust muscle names.
21372 * src/muscle_tab.c (muscle_init): Also rename the muscles.
21373 * src/output.c (prepare): s/_/-/ for the muscles names.
21374 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
21375
8850be4b
MA
213762001-11-28 Marc Autret <autret_m@epita.fr>
21377
21378 * src/bison.simple: Fix debug.
21379 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
21380
4a38e613
AD
213812001-11-28 Akim Demaille <akim@epita.fr>
21382
21383 * src/LR0.c (shifts_new): New.
21384 (save_shifts, insert_start_shift, augment_automaton): Use it.
21385
4b35e1c1
AD
213862001-11-28 Akim Demaille <akim@epita.fr>
21387
21388 * src/closure.c (closure): `b' and `ruleno' denote the same value:
21389 keep ruleno only.
21390
d2b04478
AD
213912001-11-28 Akim Demaille <akim@epita.fr>
21392
21393 * src/closure.c (closure): Instead of looping over word in array
21394 then bits in words, loop over bits in array.
21395
2c4c30aa
AD
213962001-11-28 Akim Demaille <akim@epita.fr>
21397
21398 * src/closure.c (closure): No longer optimize the special case
21399 where all the bits of `ruleset[r]' are set to 0, to make the code
21400 clearer.
21401
576890b7
AD
214022001-11-28 Akim Demaille <akim@epita.fr>
21403
21404 * src/closure.c (closure): `r' and `c' are new variables, used to
21405 de-obfuscate accesses to RULESET and CORE.
21406
cb487d7d
AD
214072001-11-28 Akim Demaille <akim@epita.fr>
21408
21409 * src/reduce.c (reduce_print): Use ngettext.
21410 (dump_grammar): Improve the trace accuracy.
21411
6013d43f
AD
214122001-11-28 Akim Demaille <akim@epita.fr>
21413
21414 * src/reduce.c (dump_grammar): Don't translate trace messages.
21415
cb4956ee
AD
214162001-11-28 Akim Demaille <akim@epita.fr>
21417
21418 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
21419 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
21420 as all tags are free'ed afterwards.
21421 From Enrico Scholz.
21422
648185ab
PE
214232001-11-27 Paul Eggert <eggert@twinsun.com>
21424
21425 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
21426 use alloca when we didn't want to, and vice versa.
21427
68254a03
MA
214282001-11-27 Marc Autret <autret_m@epita.fr>
21429
9113b58f
AD
21430 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
21431 initialization.
68254a03
MA
21432 * src/output.c (prepare): Remove its update.
21433
04d843a2
MA
214342001-11-27 Marc Autret <autret_m@epita.fr>
21435
21436 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
21437 Use %error-verbose.
21438
d2079671 214392001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
21440
21441 * src/bison.simple: Remove YYERROR_VERBOSE using.
21442 Use %%error_verbose.
21443 (yyparse): Likewise.
21444 * src/output.c (prepare): Give its final value.
21445 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
21446 * src/getargs.h: Add its extern declaration.
21447 * src/getargs.c (error_verbose_flag): New int.
21448 (getargs): Update to catch new case.
21449 * src/options.c (option_table): 'error-verbose' is a new option.
21450 (shortopts): Update.
21451
e0327bc8
AD
214522001-11-27 Akim Demaille <akim@epita.fr>
21453
21454 * src/system.h: Use intl/libgettext.h.
21455 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
21456
000f1a3c
AD
214572001-11-27 Akim Demaille <akim@epita.fr>
21458
21459 * tests/torture.at (Exploding the Stack Size with Malloc):
21460 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
21461
26cfe0be
AD
214622001-11-27 Akim Demaille <akim@epita.fr>
21463
21464 * src/files.c: Include error.h.
21465 Reported by Hans Aberg.
21466
f6bd5427
MA
214672001-11-26 Marc Autret <autret_m@epita.fr>
21468
d2079671 21469 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
21470 (read_declarations): Add case tok_include.
21471 * src/getargs.h (include): Add its extern definition.
21472 * src/getargs.c (include): New const char *.
21473 (getargs): Add case '-I'.
21474 * src/options.c (option_table): Add include as command line and
21475 percent option.
21476 * src/lex.h (token_t): Add tok_include.
21477
2ca209c1
AD
214782001-11-26 Akim Demaille <akim@epita.fr>
21479
21480 * src/reader.c (readgram): Make sure rules for mid-rule actions
21481 have a lineno equal to that of their host rule.
21482 Reported by Hans Aberg.
21483 * tests/regression.at (Rule Line Numbers): New.
21484
0e41b407
AD
214852001-11-26 Akim Demaille <akim@epita.fr>
21486
21487 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
21488 size_ts.
21489
214902001-11-26 Akim Demaille <akim@epita.fr>
21491
21492 * src/complain.c, src/complain.h (error): Remove, provided by
21493 lib/error.[ch].
21494
e0c40012
AD
214952001-11-26 Akim Demaille <akim@epita.fr>
21496
21497 * src/reader.c (read_declarations): Don't abort on tok_illegal,
21498 issue an error message.
21499 * tests/regression.at (Invalid %directive): New.
21500 Reported by Hans Aberg.
21501
5e147124
AD
215022001-11-26 Akim Demaille <akim@epita.fr>
21503
21504 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
21505 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21506
a034c8b8
AD
215072001-11-26 Akim Demaille <akim@epita.fr>
21508
21509 * src/conflicts.c (conflicts_print): Don't complain at all when
21510 there are no reduce/reduce conflicts, and as many shift/reduce
21511 conflicts as expected.
21512 * tests/regression.at (%expect right): Adjust.
21513
c64a20f3
AD
215142001-11-23 Akim Demaille <akim@epita.fr>
21515
21516 * lib/alloca.c: Update, from fileutils.
21517
5b0d29bb
AD
215182001-11-23 Akim Demaille <akim@epita.fr>
21519
21520 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
21521
722c4bfe
AD
215222001-11-23 Akim Demaille <akim@epita.fr>
21523
21524 * src/system.h: Include alloca.h.
21525 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
21526
6255b435
AD
215272001-11-23 Akim Demaille <akim@epita.fr>
21528
21529 * src/print_graph.c (print_actions): Remove `rule', unused.
21530 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
21531 pacify GCC's signed < unsigned warnings.
21532 * src/closure.c (itemsetsize): Likewise.
21533 * src/reader.c (symbol_list_new): Static.
21534
b29b2ed5
AD
215352001-11-23 Akim Demaille <akim@epita.fr>
21536
21537 Attaching lineno to buckets is stupid, since only one copy of each
21538 symbol is kept, only the line of the first occurrence is kept too.
21539
21540 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
21541 * src/reader.c (rline_allocated): Remove, unused.
21542 (symbol_list): Have a `line' member.
21543 (symbol_list_new): New.
21544 (readgram): Use it.
21545 * src/print.c (print_grammar): Output the rule line numbers.
21546 * tests/regression.at (Solved SR Conflicts)
21547 (Unresolved SR Conflicts): Adjust.
21548 Reported by Hans Aberg.
21549
a81b1d4a
MA
215502001-11-22 Marc Autret <autret_m@epita.fr>
21551
21552 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
21553
c1ecb3c1
MA
215542001-11-22 Marc Autret <autret_m@epita.fr>
21555
21556 * src/muscle_tab.c (muscle_init): Remove initialization of
21557 skeleton muscle.
21558 * src/output.c (output_master_parser): Do it here.
21559
fbe01355
AD
215602001-11-20 Akim Demaille <akim@epita.fr>
21561
21562 * po/sv.po: New.
21563 * configure.in (ALL_LINGUAS): Adjust.
21564 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
21565 longer contains strings to translate.
21566
81e895c0
AD
215672001-11-19 Akim Demaille <akim@epita.fr>
21568
21569 * src/conflicts.c (conflicts_print): Add a missing \n.
21570
6bb1878b
AD
215712001-11-19 Akim Demaille <akim@epita.fr>
21572
21573 * src/nullable.c (nullable_print): New.
21574 (set_nullable): Call it when tracing.
21575 Better locality of variables.
21576
d9ec2d07
AD
215772001-11-19 Akim Demaille <akim@epita.fr>
21578
21579 * src/print.c (print_actions): Better locality of variables.
21580
720e5c1b
AD
215812001-11-19 Akim Demaille <akim@epita.fr>
21582
21583 * src/derives.c (print_derives): Fix and enrich.
21584 * src/closure.c (print_fderives): Likewise.
21585
fb908786
AD
215862001-11-19 Akim Demaille <akim@epita.fr>
21587
21588 * src/closure.c (itemsetend): Remove, replaced with...
21589 (itemsetsize): new.
21590
125ecb56
AD
215912001-11-19 Akim Demaille <akim@epita.fr>
21592
21593 * src/LR0.c (kernel_end): Remove, replaced with...
21594 (kernel_size): new.
21595
d8cf039f
AD
215962001-11-19 Akim Demaille <akim@epita.fr>
21597
21598 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
21599 to clarify.
21600
7bec0760
AD
216012001-11-19 Akim Demaille <akim@epita.fr>
21602
21603 * src/closure.c (closure): Use arrays instead of pointers to clarify.
21604
c87d4863
AD
216052001-11-19 Akim Demaille <akim@epita.fr>
21606
21607 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
21608 trace messages.
21609 * src/LR0.c: Likewise.
21610 (allocate_itemsets): Use arrays instead of pointers to clarify.
21611
9bfe901c
AD
216122001-11-19 Akim Demaille <akim@epita.fr>
21613
21614 * src/getargs.c (statistics_flag): Replace with...
21615 (trace_flag): New.
21616 (longopts): Accept --trace instead of --statistics.
21617 * src/getargs.h, src/options.c: Adjust.
21618 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
21619 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
21620
97db7bd4
AD
216212001-11-19 Akim Demaille <akim@epita.fr>
21622
cc72668c 21623 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
21624 pointers to clarify the code.
21625 (save_reductions, save_shifts): Factor common parts of alternatives.
21626
2c5f66ed
AD
216272001-11-19 Akim Demaille <akim@epita.fr>
21628
21629 * src/LR0.c (new_state, get_state): Complete TRACE code.
21630 * src/closure.c: Include `reader.h' to get `tags', needed by the
21631 trace code.
21632 Rename the conditional DEBUG as TRACE.
21633 Output consistently TRACEs to stderr, not stdout.
21634 * src/derives.c: Likewise.
21635 * src/reduce.c: (inaccessable_symbols): Using if is better style
21636 than goto.
21637 Use `#if TRACE' instead of `#if 0' for tracing code.
21638
300f275f
AD
216392001-11-19 Akim Demaille <akim@epita.fr>
21640
21641 * src/system.h (LIST_FREE, shortcpy): New.
21642 * src/LR0.c: Use them.
21643 * src/output.c (free_itemsets, free_reductions, free_shifts):
21644 Remove, replaced by LIST_FREE.
21645
f59c437a
AD
216462001-11-19 Akim Demaille <akim@epita.fr>
21647
21648 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
21649 (REDUCTIONS_ALLOC): New.
21650 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
21651 allocation.
21652
6986fd9e
AD
216532001-11-19 Akim Demaille <akim@epita.fr>
21654
21655 * src/LR0.c (new_state): Complete trace code.
21656 * src/nullable.c (set_nullable): Don't translate traces.
21657
4bc30f78
AD
216582001-11-19 Akim Demaille <akim@epita.fr>
21659
21660 * src/print_graph.c (print_core): Better locality of variables.
21661 * src/print.c (print_core): Likewise.
21662
08a946e0
AD
216632001-11-19 Akim Demaille <akim@epita.fr>
21664
21665 * src/vcg.c: You do the output, so you are responsible of the
21666 handling of VCG syntax, in particular: use quotearg.
21667 * src/print_graph.c: Don't.
21668 (print_actions): Don't output the actions as part of the nodes,
21669 since that's the job of the edges.
21670 (print_state): Don't output by hand: fill the node description,
9bfe901c 21671 and ask for its output.
08a946e0 21672
f0473484
AD
216732001-11-19 Akim Demaille <akim@epita.fr>
21674
cc72668c
AD
21675 * src/bison.simple (yyparse): When verbosely reporting an error,
21676 no longer put additional quotes around token names.
f0473484
AD
21677 * tests/calc.at: Adjust.
21678
e41dc700
AD
216792001-11-19 Akim Demaille <akim@epita.fr>
21680
21681 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
21682 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
21683 * src/output.c: Adjust.
21684
652a871c
AD
216852001-11-19 Akim Demaille <akim@epita.fr>
21686
21687 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
21688 (rule_t): this.
21689 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
21690
b2ed6e58
AD
216912001-11-19 Akim Demaille <akim@epita.fr>
21692
21693 * src/gram.h (rule_t): New.
21694 (rule_table): New.
21695 (rrhs, rlhs): Remove, part of state_t.
21696 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
21697 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
21698 * src/reader.c, src/reduce.c: Adjust.
21699
edad7067
AD
217002001-11-19 Akim Demaille <akim@epita.fr>
21701
21702 * src/reader.c (symbols_output): New, extracted from...
21703 (packsymbols): Here.
21704 (reader): Call it.
21705
3feec034
AD
217062001-11-19 Akim Demaille <akim@epita.fr>
21707
21708 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
21709 (maxrhs): this new function.
21710
ddcd5fdf
AD
217112001-11-19 Akim Demaille <akim@epita.fr>
21712
cc72668c 21713 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
21714 Adjust.
21715
bb527fc2
AD
217162001-11-19 Akim Demaille <akim@epita.fr>
21717
cc72668c 21718 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
21719 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21720 * src/lalr.c: Adjust.
21721
a845a697
AD
217222001-11-19 Akim Demaille <akim@epita.fr>
21723
21724 * src/lalr.c (initialize_LA): Only initialize LA. Let...
21725 (set_state_table): handle the `lookaheads' members.
21726
f004bf6a
AD
217272001-11-19 Akim Demaille <akim@epita.fr>
21728
cc72668c
AD
21729 * src/lalr.h (lookaheads): Removed array, whose contents is now
21730 a member of...
f004bf6a
AD
21731 (state_t): this structure.
21732 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21733 Adjust.
21734
de326cc0
AD
217352001-11-19 Akim Demaille <akim@epita.fr>
21736
cc72668c
AD
21737 * src/lalr.h (consistent): Removed array, whose contents is now
21738 a member of...
de326cc0
AD
21739 (state_t): this structure.
21740 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21741 Adjust.
21742
90b4416b
AD
217432001-11-19 Akim Demaille <akim@epita.fr>
21744
cc72668c
AD
21745 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
21746 contents are now members of...
90b4416b
AD
21747 (state_t): this structure.
21748 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21749 Adjust.
21750
9703cc49
AD
217512001-11-19 Akim Demaille <akim@epita.fr>
21752
21753 * src/lalr.h (state_t): New.
21754 (state_table): Be a state_t * instead of a core **.
21755 (accessing_symbol): Remove, part of state_t.
21756 * src/lalr.c: Adjust.
21757 (set_accessing_symbol): Merge into...
21758 (set_state_table): this.
21759 * src/print_graph.c, src/conflicts.c: Adjust.
21760
d803322e
AD
217612001-11-14 Akim Demaille <akim@epita.fr>
21762
21763 * tests/calc.at, tests/output.at, tests/regression.at,
21764 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
21765 now the tests are run in private dirs, therefore AC_CLEANUP and
21766 family can be simplified to 0-ary.
21767 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
21768 use abs. path to find config.h.
21769 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
21770 stderr, there can be way too much random noise.
21771 Instead pass -Werror to GCC and rely on the exit status.
21772 Reported by Wolfram Wagner.
21773
3d76b07d
AD
217742001-11-14 Akim Demaille <akim@epita.fr>
21775
21776 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
21777 defined only if yyoverflow is defined, to avoid `warning: unused
21778 variable `yyvs1''.
21779 Reported by The Test Suite.
21780
09b503c8
AD
217812001-11-14 Akim Demaille <akim@epita.fr>
21782
21783 * src/print.c: Include reduce.h.
21784 Reported by Hans Aberg.
21785
217862001-11-14 Akim Demaille <akim@epita.fr>
21787
21788 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
21789 Revert a previous patch: these are really const.
21790 * src/conflicts.c (conflict_report): Additional useless pair of
21791 braces to pacify GCC's warnings for `if () if () {} else {}'.
21792 * src/lex.c (parse_percent_token): Replace equal_offset with
21793 arg_offset.
21794 arg is const.
21795 Be sure to strdup `arg' when used, since there is no reason for
21796 token_buffer not to change.
21797
0f37a994
AD
217982001-11-14 Akim Demaille <akim@epita.fr>
21799
21800 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
21801 definition.
21802 * src/main.c (main): Use them.
21803 Suggested by Hans Aberg.
21804
d39d93b8
AD
218052001-11-12 Akim Demaille <akim@epita.fr>
21806
21807 * src/system.h (ngettext): Now that we use ngettext, be sure to
21808 provide a default definition when NLS are not used.
21809
9edcd895
AD
218102001-11-12 Akim Demaille <akim@epita.fr>
21811
21812 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
21813 Use @kbd to denote user input.
21814 (Language and Grammar): ANSIfy the example.
21815 Adjust its layout for info/notinfo.
21816 (Location Tracking Calc): Output error messages to stderr.
21817 Output locations in a more GNUtically correct way.
21818 Fix a couple of Englishos.
21819 Adjust @group/@end group pairs.
21820
7da99ede
AD
218212001-11-12 Akim Demaille <akim@epita.fr>
21822
e3aa65c5 21823 %expect was not functioning at all.
7da99ede
AD
21824
21825 * src/conflicts.c (expected_conflicts): Set to -1.
21826 (conflict_report): Use ngettext.
21827 (conflicts_print): Check %expect and make its violation an error.
21828 * doc/bison.texinfo (Expect Decl): Adjust.
21829 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
21830 * tests/regression.at (%expect not enough, %expect right)
21831 (%expect too much): New.
21832
ba9dda1a
AD
218332001-11-12 Akim Demaille <akim@epita.fr>
21834
21835 * tests/regression.at (Conflicts): Rename as...
21836 (Unresolved SR Conflicts): this.
21837 (Solved SR Conflicts): New.
21838
337c5bd1
AD
218392001-11-12 Akim Demaille <akim@epita.fr>
21840
21841 * src/reduce.c (print_results): Rename as...
21842 (reduce_output): This.
21843 Output to OUT, passed as argument, instead of output_obstack.
21844 (dump_grammar): Likewise.
21845 (reduce_free): New.
21846 Also free V1.
21847 (reduce_grammar): No longer call reduce_output, since...
21848 * src/print.c (print_results): do it.
21849 * src/main.c (main): Call reduce_free;
21850
c73a41af
AD
218512001-11-12 Akim Demaille <akim@epita.fr>
21852
21853 * src/conflicts.c (print_reductions): Accept OUT as argument.
21854 Output to it, not to output_obstack.
21855 * src/print.c (print_actions): Adjust.
21856
0df87bb6
AD
218572001-11-12 Akim Demaille <akim@epita.fr>
21858
21859 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
21860 the result instead of using...
21861 (src_total, rrc_total, src_count, rrc_count): Remove.
21862 (any_conflicts): Remove.
21863 (print_conflicts): Split into...
21864 (conflicts_print, conflicts_output): New.
21865 * src/conflicts.h: Adjust.
21866 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 21867 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
21868 * tests/regression.at (Conflicts): New.
21869 Reported by Tom Lane.
21870
e4d3d4de
AD
218712001-11-12 Akim Demaille <akim@epita.fr>
21872
21873 * tests/regression.at (Invalid input): Remove, duplicate with
21874 ``Invalid input: 1''.
21875
6d7d248e
AD
218762001-11-12 Akim Demaille <akim@epita.fr>
21877
21878 * tests/torture.at (AT_DATA_STACK_TORTURE)
21879 (Exploding the Stack Size with Alloca)
21880 (Exploding the Stack Size with Malloc): New.
21881
e9e4c321
AD
218822001-11-12 Akim Demaille <akim@epita.fr>
21883
21884 * src/bison.simple (YYSTACK_REALLOC): New.
21885 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 21886 Reported by Per Allansson.
e9e4c321 21887
5f7e0832
AD
218882001-11-12 Pascal Bart <pascal.bart@epita.fr>
21889
21890 * src/bison.simple: Define type yystype instead of YYSTYPE, and
21891 define CPP macro, which substitute YYSTYPE by yystype.
21892 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
21893 with yyltype/YYLTYPE. This allows inclusion of the generated
21894 header within the parser if the compiler, such as GGC, accepts
21895 multiple equivalent #defines.
21896 From Akim.
21897
e3f1699f
AD
218982001-11-05 Akim Demaille <akim@epita.fr>
21899
21900 * src/reader.c (symbols_output): New, extracted from...
21901 (packsymbols): here.
21902 (reader): Adjust.
21903
65be0866
AD
219042001-11-05 Akim Demaille <akim@epita.fr>
21905
21906 * src/lex.c (parse_percent_token): s/quotearg/quote/.
21907
e4d910bf
AD
219082001-11-05 Akim Demaille <akim@epita.fr>
21909
21910 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
21911 pattern.
21912
951366c1
AD
219132001-11-05 Akim Demaille <akim@epita.fr>
21914
21915 * src/options.h (struct option_table_struct): set_flags is void*.
21916 * src/options.c (longopts): Support `--output' and `%output'.
21917 (usage): Adjust.
21918 * src/lex.h (tok_setopt): Remove, replaced with...
21919 (tok_intopt, tok_stropt): these new guys.
21920 * src/lex.c (getopt.h): Not needed.
21921 (token_buffer, unlexed_token_buffer): Not const.
21922 (percent_table): Promote `-' over `_' in directive names.
21923 Active `%name-prefix', `file-prefix', and `output'.
21924 (parse_percent_token): Accept possible arguments to directives.
21925 Promote `-' over `_' in directive names.
21926
d8988b2f
AD
219272001-11-04 Akim Demaille <akim@epita.fr>
21928
21929 * doc/bison.texinfo (Decl Summary): Split the list into
21930 `directives for grammars' and `directives for bison'.
21931 Sort'em.
21932 Add description of `%name-prefix', `file-prefix', and `output'.
21933 Promote `-' over `_' in directive names.
21934 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21935 Simplify the description of `--name-prefix'.
21936 Promote `-' over `_' in directive names.
21937 Promote `--output' over `--output-file'.
21938 Fix the description of `--defines'.
21939 * tests/output.at: Exercise %file-prefix and %output.
21940
6468d18e
AD
219412001-11-02 Akim Demaille <akim@epita.fr>
21942
21943 * doc/refcard.tex: Update.
21944
6b7e85b9
AD
219452001-11-02 Akim Demaille <akim@epita.fr>
21946
21947 * src/symtab.h (SUNDEF): New.
21948 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21949 stand for `uninitialized', instead of 0.
21950 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21951 * src/lex.c (lex): Adjust.
21952
21953 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21954 Number it 0.
21955 Let yylex return it instead of a plain 0.
21956 Reported by Dick Streefland.
21957
cd5aafcf
AD
219582001-11-02 Akim Demaille <akim@epita.fr>
21959
21960 * tests/regression.at (Mixing %token styles): New test.
21961
037ca2f1
AD
219622001-11-02 Akim Demaille <akim@epita.fr>
21963
21964 * src/reader.c (parse_thong_decl): Formatting changes.
21965 (token_translations_init): New, extracted from...
21966 (packsymbols): Here.
21967 Adjust.
21968
270a173c
AD
219692001-11-01 Akim Demaille <akim@epita.fr>
21970
21971 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21972 Check that `9foo.y' produces correct cpp guards.
21973 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21974 guards.
21975 Reported by Wwp.
21976
561f9a30
AD
219772001-11-01 Akim Demaille <akim@epita.fr>
21978
21979 * tests/regression.at (Invalid input: 2): New.
21980 * src/lex.c (unlexed_token_buffer): New.
21981 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21982 too.
21983 Reported by Wwp.
21984
f987e9d2
AD
219852001-11-01 Akim Demaille <akim@epita.fr>
21986
21987 * tests/calc.at: Catch up with 1.30.
21988 * configure.in: Bump to 1.49a.
21989 Adjust to newer Autotest.
21990
0846f581
PB
219912001-10-19 Pascal Bart <pascal.bart@epita.fr>
21992
21993 * src/conflicts.c: Move global variables rrc_total and src_total ...
21994 (print_conflicts): here.
21995 * src/output.c (output): Free global variable user_toknums.
21996 * src/lex.c (token_obstack): Become static.
21997
3c1a79b3
AD
219982001-10-18 Akim Demaille <akim@epita.fr>
21999
22000 * tests/atlocal.in (GCC): Add.
22001 * tests/calc.at: s/m4_match/m4_bmatch/.
22002 s/m4_patsubst/m4_bpatsubst/.
22003 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
22004 * configure.in: AC_SUBST(GCC).
22005
5d52e7d0
MA
220062001-10-14 Marc Autret <autret_m@epita.fr>
22007
22008 * src/options.c (create_long_option_table): Fix.
22009
631aa1d3
AD
220102001-10-10 Akim Demaille <akim@epita.fr>
22011
22012 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
22013
f6ec6d13
AD
220142001-10-04 Akim Demaille <akim@epita.fr>
22015
22016 * src/reader.c (parse_union_decl): Push the caracters in
22017 union_obstack, not attrs_obstack.
22018
342b8b6e
AD
220192001-10-04 Akim Demaille <akim@epita.fr>
22020
22021 Merge in the branch 1.29.
22022
22023 * src/reader.c (packsymbols): Use a temporary obstack for
22024 `%%tokendef', since output_stack is already used elsewhere.
22025
22026 2001-10-02 Akim Demaille <akim@epita.fr>
22027
22028 Bump 1.29d.
22029
22030 2001-10-02 Akim Demaille <akim@epita.fr>
22031
22032 Version 1.29c.
22033
22034 2001-10-02 Akim Demaille <akim@epita.fr>
22035
22036 * tests/regression.at (Invalid CPP headers): New.
22037 From Alexander Belopolsky.
22038 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
22039
22040 2001-10-02 Akim Demaille <akim@epita.fr>
22041
22042 * tests/regression.at (Invalid input): New.
22043 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
22044 Reported by Shura.
22045
22046 2001-10-02 Akim Demaille <akim@epita.fr>
22047
22048 * tests/calc.at: Now that --debug works, the tests must be adjusted.
22049
22050 2001-10-02 Akim Demaille <akim@epita.fr>
22051
22052 * src/output.c (output_parser): Assert `skeleton'.
22053 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
22054 systems.
22055 From Shura.
22056
22057 2001-10-01 Marc Autret <autret_m@epita.fr>
22058
22059 * src/lex.h: Echo modifications.
22060 * src/lex.c (unlex): Parameter is now token_t.
22061 From Hans Aberg.
22062
22063 2001-10-01 Marc Autret <autret_m@epita.fr>
22064
22065 * src/main.c: Include lex.h.
22066 From Hans Aberg.
22067
22068 2001-09-29 Akim Demaille <akim@epita.fr>
22069
22070 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
22071
22072 2001-09-28 Akim Demaille <akim@epita.fr>
22073
22074 * tests/testsuite.at: Update to newer Autotest.
22075 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
22076
22077 2001-09-27 Akim Demaille <akim@epita.fr>
22078
22079 Position independent wrapper.
22080
22081 * tests/bison: Remove.
22082 * tests/bison.in: New.
22083 * configure.in: Adjust.
22084
22085 2001-09-27 Paul Eggert <eggert@twinsun.com>
22086
22087 Port quotearg fixes from tar 1.13.24.
22088
22089 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22090 tm to be declared.
22091 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
22092 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
22093
22094 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
22095 * m4/mbrtowc.m4: New file.
22096 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
22097 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
22098
22099 2001-09-27 Akim Demaille <akim@epita.fr>
22100
22101 Bump to 1.29c.
22102
22103 2001-09-27 Akim Demaille <akim@epita.fr>
22104
22105 Version 1.29b.
22106
22107 2001-09-25 Akim Demaille <akim@epita.fr>
22108
22109 * src/system.h: Include `xalloc.h'.
22110 Remove it from the C files.
22111 * src/files.c (output_files): Free the obstacks.
22112 * src/lex.c (init_lex): Rename as...
22113 (lex_init): this.
22114 (lex_free): New.
22115 * src/main.c (main): Use it.
22116
22117 2001-09-24 Marc Autret <autret_m@epita.fr>
22118
22119 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
22120 to output informations in fout (FILE*).
22121 (open_graph, close_graph): Likewise.
22122 (output_graph, output_edge, output_node): Likewise.
22123 * src/vcg.h: Update function prototypes.
22124 * src/print_graph.c (print_graph): Open output graph file.
22125 (print_actions): Adjust.
22126 * src/files.h: Remove extern declaration.
22127 * src/files.c: Remove graph_obstack declaration.
22128 (open_files): Remove graph_obstack initialization.
22129 (output_files): Remove graph_obstack saving.
22130
22131 2001-09-24 Marc Autret <autret_m@epita.fr>
22132
22133 * src/files.c (compute_output_file_names): Fix.
22134
22135 2001-09-24 Marc Autret <autret_m@epita.fr>,
22136 Akim Demaille <akim@epita.fr>
22137
22138 * src/reader.c (reader): Remove call to free_symtab ().
22139 * src/main.c (main): Call it here.
22140 Include symtab.h.
22141 * src/conflicts.c (initialize_conflicts): Rename as...
22142 (solve_conflicts): this.
22143 * src/print.c (print_core, print_actions, print_state)
22144 (print_grammar): Dump to a file instead a `output_obstack'.
22145 (print_results): Dump `output_obstack', and then proceed with the
22146 FILE *.
22147 * src/files.c (compute_output_file_names, close_files): New.
22148 (output_files): Adjust.
22149 * src/main.c (main): Adjust.
22150
22151 2001-09-23 Marc Autret <autret_m@epita.fr>
22152
22153 * src/files.c (compute_header_macro): Computes header macro name
22154 from spec_defines_file when given.
22155
22156 2001-09-23 Marc Autret <autret_m@epita.fr>
22157
22158 * src/files.c (output_files): Add default extensions.
22159
22160 2001-09-22 Akim Demaille <akim@epita.fr>
22161
22162 * src/conflicts.c (finalize_conflicts): Rename as...
22163 (free_conflicts): this.
22164
22165 2001-09-22 Akim Demaille <akim@epita.fr>
22166
22167 * src/gram.c (gram_free): Rename back as...
22168 (dummy): this.
22169 (output_token_translations): Free `token_translations'.
22170 * src/symtab.c (free_symtab): Free the tag field.
22171
22172 2001-09-22 Akim Demaille <akim@epita.fr>
22173
22174 Remove `translations' as it is always set to true.
22175
22176 * src/gram.h: Adjust.
22177 * src/reader.c (packsymbols, parse_token_decl): Adjust
22178 * src/print.c (print_grammar): Adjust.
22179 * src/output.c (output_token_translations): Adjust.
22180 * src/lex.c (lex): Adjust.
22181 * src/gram.c: Be sure the set pointers to NULL.
22182 (dummy): Rename as...
22183 (gram_free): this.
22184
22185 2001-09-22 Akim Demaille <akim@epita.fr>
22186
22187 * configure.in: Invoke AM_LIB_DMALLOC.
22188 * src/system.h: Use dmalloc.
22189 * src/LR0.c: Be sure to have pointers initialized to NULL.
22190 (allocate_itemsets): Allocate kernel_items only if needed.
22191
22192 2001-09-22 Akim Demaille <akim@epita.fr>
22193
22194 * configure.in: Bump to 1.29b.
22195 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
22196 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
22197 need xmalloc.c in calc.y.
22198 From Pascal Bart.
22199
22200 2001-09-21 Akim Demaille <akim@epita.fr>
22201
22202 Version 1.29a.
22203 * Makefile.maint, config/config.guess, config/config.sub,
22204 * config/missing: Update from masters.
22205 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
22206 upon package.m4.
22207 * configure.in (ALL_LINGUAS): Add `tr'.
22208
22209 2001-09-21 Akim Demaille <akim@epita.fr>
22210
22211 * tests/Makefile.am (package.m4): Move to...
22212 ($(srcdir)/$(TESTSUITE)): here.
22213
22214 2001-09-20 Akim Demaille <akim@epita.fr>
22215
22216 * src/complain.c: No longer try to be standalone: use system.h.
22217 Don't assume __STDC__ is defined to 1. Just test if it is defined.
22218 * src/complain.h: Likewise.
22219 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
22220 Remove the unused variable `n'.
22221 From Albert Chin-A-Young.
22222
22223 2001-09-18 Marc Autret <autret_m@epita.fr>
22224
22225 * doc/bison.1: Update.
22226 * doc/bison.texinfo (Bison Options): Update --defines and --graph
22227 descriptions.
22228 (Option Cross Key): Update.
22229 Add --graph.
22230
22231 2001-09-18 Marc Autret <autret_m@epita.fr>
22232
22233 * tests/regression.at: New test (comment in %union).
22234
22235 2001-09-18 Marc Autret <autret_m@epita.fr>
22236
22237 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
22238 do that.
22239 Reported by Keith Browne.
22240
22241 2001-09-18 Marc Autret <autret_m@epita.fr>
22242
22243 * tests/output.at: Add tests for --defines and --graph.
22244
22245 2001-09-18 Marc Autret <autret_m@epita.fr>
22246
22247 * tests/output.at: Removes tests of %{header,src}_extension features.
22248
22249 2001-09-18 Akim Demaille <akim@epita.fr>
22250
22251 * tests/Makefile.am (package.m4): New.
22252 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
22253 (_AT_CHECK_CALC_ERROR): Likewise.
22254 Factor the `, ' part of verbose error messages.
22255
22256 2001-09-18 Marc Autret <autret_m@epita.fr>
22257
22258 * src/getargs.c (longopts): Declare --defines and --graph as options
22259 with optional arguments.
22260 * src/files.h: Add extern declarations.
22261 * src/files.c (spec_graph_file, spec_defines_file): New.
22262 (output_files): Update.
22263 Remove CPP-outed code.
22264
22265 2001-09-18 Marc Autret <autret_m@epita.fr>
22266
22267 Turn off %{source,header}_extension feature.
22268
22269 * src/files.c (compute_exts_from_gf): Update.
22270 (compute_exts_from_src): Update.
22271 (output_files): CPP-out useless code.
22272 * src/files.h: Remove {header,source}_extension extern declarations.
22273 * src/reader.c (parse_dquoted_param): CPP-out.
22274 (parse_header_extension_decl): Remove.
22275 (parse_source_extension_decl): Remove.
22276 (read_declarations): Remove cases tok_{hdrext,srcext}.
22277 * src/lex.c (percent_table): Remove {header,source}_extension entries.
22278 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
22279
22280 2001-09-10 Akim Demaille <akim@epita.fr>
22281
22282 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
22283 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
22284 (AT_CHECK_OUTPUT): this.
22285 Merely check ls' exit status, its output is useless.
22286
22287 2001-09-10 Akim Demaille <akim@epita.fr>
22288
22289 * tests/calc.at: Use m4_match.
22290 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
22291
22292 2001-09-10 Marc Autret <autret_m@epita.fr>,
22293 Akim Demaille <akim@epita.fr>
22294
22295 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
22296 enum color_e.
22297 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
22298 to `normal'.
22299 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
22300 * src/lex.h: Adjust prototype.
22301 (token_t): Add `tok_undef'.
22302 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
22303 (parse_percent_token): Now returns token_t.
22304 Add default statement in switch.
22305 (lex): Separate `c' as an input variable, from the token_t result
22306 part.
22307 (unlexed): Is a token_t.
22308
22309 2001-09-10 Akim Demaille <akim@epita.fr>
22310
22311 * configure.in: Bump to 1.29a.
22312
22313 2001-09-07 Akim Demaille <akim@epita.fr>
22314
22315 Version 1.29.
22316
22317 2001-08-30 Akim Demaille <akim@epita.fr>
22318
22319 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
22320 * m4/atconfig.m4: Remove.
22321 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
22322 * tests/bison: New.
22323 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
22324 m4_if, m4_patsubst, and m4_regexp.
22325 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
22326 `input' file instead of echo.
22327
22328 2001-08-29 Akim Demaille <akim@epita.fr>
22329
22330 Bump to 1.28e.
22331
22332 2001-08-29 Akim Demaille <akim@epita.fr>
22333
22334 Version 1.28d.
22335
22336 2001-08-29 Paul Eggert <eggert@twinsun.com>
22337
22338 * src/bison.simple (yyparse): Don't take the address of an
22339 item before the start of an array, as that doesn't conform to
22340 the C Standard.
22341
22342 2001-08-29 Robert Anisko <anisko_r@epita.fr>
22343
22344 * doc/bison.texinfo (Location Tracking Calc): New node.
22345
22346 2001-08-29 Paul Eggert <eggert@twinsun.com>
22347
22348 * src/output.c (output): Do not define const, as this now
22349 causes more problems than it cures.
22350
22351 2001-08-29 Akim Demaille <akim@epita.fr>
22352
22353 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
22354 the nodes.
22355 Be sure to tag the `detailmenu'.
22356
22357 2001-08-29 Akim Demaille <akim@epita.fr>
22358
22359 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
22360 download in a tmp dir.
22361
22362 2001-08-28 Marc Autret <autret_m@epita.fr>
22363
22364 * config/depcomp: New file.
22365
22366 2001-08-28 Marc Autret <autret_m@epita.fr>
22367
22368 * doc/bison.1 (mandoc): Adjust.
22369 From Juan Manuel Guerrero.
22370
22371 2001-08-28 Marc Autret <autret_m@epita.fr>
22372
22373 * src/print_graph.c (print_state): Fix.
22374
22375 2001-08-27 Marc Autret <autret_m@epita.fr>
22376
22377 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
22378 char * members.
22379 Echo modifications to the functions prototypes.
22380 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
22381
22382 2001-08-27 Marc Autret <autret_m@epita.fr>
22383
22384 * src/vcg.c: Include `xalloc.h'.
22385 (add_colorentry): New.
22386 (add_classname): New.
22387 (add_infoname): New.
22388 * src/vcg.h: Add new prototypes.
22389
22390 2001-08-27 Akim Demaille <akim@epita.fr>
22391
22392 * Makefile.maint: Sync. again with CVS Autoconf.
22393
22394 2001-08-27 Akim Demaille <akim@epita.fr>
22395
22396 * Makefile.maint: Formatting changes.
22397 (po-update, cvs-update, update): New targets.
22398 (AMTAR): Remove.
22399
22400 2001-08-27 Akim Demaille <akim@epita.fr>
22401
22402 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22403 * Makefile.maint: Sync. with CVS Autoconf.
22404
22405 2001-08-27 Marc Autret <autret_m@epita.fr>
22406
22407 * src/vcg.h (struct infoname_s): New.
22408 (struct colorentry_s): New.
22409 (graph_s): New fields {vertical,horizontal}_order in structure.
22410 Add `infoname' field.
22411 Add `colorentry' field;
22412 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
22413 (G_HORIZONTAL_ORDER): New.
22414 (G_INFONAME): New.
22415 (G_COLORENTRY): New.
22416 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
22417 Add output of `infoname'.
22418 Add output of `colorentry'.
22419
22420 2001-08-27 Marc Autret <autret_m@epita.fr>
22421
22422 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
22423 This one shadowed a global parameter.
22424
22425 2001-08-24 Marc Autret <autret_m@epita.fr>
22426
22427 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
22428 instead of `unsigned'.
22429 (print_state): Do not call obstack_object_size () in obstack_grow ()
22430 to avoid macro variables shadowing.
22431
22432 2001-08-23 Marc Autret <autret_m@epita.fr>
22433
22434 * src/lex.c (percent_table): Typo: s/naem/name/.
22435 Add graph option.
22436 Normalize new options declarations.
22437
22438 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
22439
22440 * tests/suite.at: Exercise %header_extension and %source_extension.
22441
22442 2001-08-16 Marc Autret <autret_m@epita.fr>
22443
22444 * src/reader.c (parse_dquoted_param): New.
22445 (parse_header_extension_decl): Use it.
22446 (parse_source_extension_decl): Likewise.
22447
22448 2001-08-16 Marc Autret <autret_m@epita.fr>
22449
22450 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
22451 (get_xxxx_str): Use assert () instead of complain ().
22452 Remove return invokations in default cases.
22453 (get_decision_str): Modify default behaviour. Remove second argument.
22454 Echo modifications on calls.
22455 (output_graph): Fix.
22456
22457 2001-08-16 Marc Autret <autret_m@epita.fr>
22458
22459 * src/getargs.c (usage): Update with ``-g, --graph''.
22460
22461 2001-08-16 Marc Autret <autret_m@epita.fr>
22462
22463 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
22464 (Option Cross Key): Likewise.
22465 * doc/bison.1: Update.
22466
1c8c2190
PB
224672001-09-25 Pascal Bart <pascal.bart@epita.fr>
22468
22469 * src/output.c (output_master_parser): Don't finish action_obstack.
22470 (output_parser): Don't care about the muscle action, here.
22471 (prepare): Copy the action_obstack in the action muscle.
22472 (output): Free action_obstack.
22473
180d45ba
PB
224742001-09-23 Pascal Bart <pascal.bart@epita.fr>
22475
22476 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
22477 will contain `%union' declaration.
22478 (parse_union_decl): Delete #line directive output.
22479 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
22480 informations about %union.
22481 (parse_union_decl): Copy the union_obstack in the muscle stype.
22482 * src/bison.simple: Add new #line directive.
22483 Add typdef %%stype YYSTYPE.
22484
c51d1a19
PB
224852001-09-23 Pascal Bart <pascal.bart@epita.fr>
22486
22487 * src/bison.simple: Add new `#line' directive.
22488
6f9344da
PB
224892001-09-22 Pascal Bart <pascal.bart@epita.fr>
22490
22491 * src/bison.simple: New `#line' directive.
22492 * src/output.c (output_parser): Support new dynamic muscle input_line.
22493
652def80
MA
224942001-09-22 Marc Autret <autret_m@epita.fr>
22495
22496 * src/output.c (output_master_parser): New.
22497 (output_parser): Be more re-entrant.
22498
25b222fa
MA
224992001-09-21 Marc Autret <autret_m@epita.fr>
22500
22501 * src/reader.c (copy_definition, parse_union_decl): Update and use
22502 `linef' muscle.
22503 (copy_action): Likewise.
22504 Use obstack_1grow ().
22505 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
22506
6bc35ae5
MA
225072001-09-21 Marc Autret <autret_m@epita.fr>
22508
22509 * src/options.c (option_table): Adjust.
22510 * src/lex.c (parse_percent_token): Fix.
22511
c0629aa1
PB
225122001-09-20 Pascal Bart <pascal.bart@epita.fr>
22513
22514 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 22515
82b6d266
PB
225162001-09-20 Pascal Bart <pascal.bart@epita.fr>
22517
22518 * src/lex.c (parse_percent_token): Change type of variable `tx', which
22519 is now an option_table_struct*.
22520 (option_strcmp): New function option_strcmp.
22521 (parse_percent_token): Call option_strcmp.
22522 * src/getargs.c (xalloc.h, options.h): Include it.
22523 (getargs): Call create_long_option_table.
22524 (getargs): Free longopts at the end of the function.
22525 (shortopts): Move in options.c.
22526 * src/options.c (create_long_option_table): New function. Convert
22527 information from option_table to option structure.
22528 * src/reader.c (options.h): Include it.
22529
22530 * src/Makefile.am: Adjust.
22531 * src/options.c (option_table): Create from longopts and percent_table.
22532 * src/getargs.c (longopts): Delete.
22533 * src/lex.c (struct percent_table_struct): Delete.
22534 (percent_table): Delete.
22535 (options.h): Include it.
22536 * src/options.c: Create.
22537 * src/options.h: Create.
22538 Declare enum opt_access_e.
22539 Define struct option_table_struct.
22540
75f5aaea
MA
225412001-09-20 Marc Autret <autret_m@epita.fr>
22542
22543 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
22544 sections of Bison.
22545
f508cb0a
PB
225462001-09-19 Pascal Bart <pascal.bart@epita.fr>
22547
22548 * src/bison.simple: s/%%filename/%%skeleton.
22549 * src/muscle_tab.c (getargs.h): Include it.
22550 (muscle_init): Insert new muscle skeleton.
22551
13105fc1
PB
225522001-09-18 Pascal Bart <pascal.bart@epita.fr>
22553
22554 * src/output.c (output_parser): Delete unused variable actions_dumped.
22555
b0c4483e
PB
225562001-09-07 Pascal Bart <pascal.bart@epita.fr>
22557
22558 * src/output.c (output): Delete call to reader_output_yylsp.
22559 * src/reader.c (reader): Likewise.
ba0fe3c7 22560 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 22561
11d82f03
MA
225622001-09-02 Marc Autret <autret_m@epita.fr>
22563
22564 * src/reader.c: Include muscle_tab.h.
22565 (parse_union_decl): Update.
22566 (parse_macro_decl): Rename parse_muscle_decl.
22567 Update to use renamed functions and variable.
22568 (read_declarations, copy_action, read_additionnal_code, : Updated
22569 with correct variables and functions names.
22570 (packsymbols, reader): Likewise.
342b8b6e 22571
11d82f03 22572 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 22573
11d82f03
MA
22574 * src/output.c: Include muscle_tab.h
22575 In all functions using macro_insert, change by using muscle_insert ().
22576 (macro_obstack): Rename muscle_obstack.
22577 Echo modifications in the whole file.
22578 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
22579 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
22580 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
22581
22582 * src/muscle_tab.h: Update double inclusion macros.
22583 (macro_entry_s): Rename muscle_entry_s.
22584 Update prototypes.
342b8b6e 22585
11d82f03
MA
22586 * src/muscle_tab.c: Include muscle_tab.h.
22587 Rename macro_tabble to muscle_table.
22588 (mhash1, mhash2, mcmp): Use muscle_entry.
22589 (macro_init): Rename muscle_init. Update.
22590 (macro_insert): Rename muscle_insert. Update.
22591 (macro_find): Rename muscle_find. Update.
22592
22593 * src/main.c: Include muscle_tab.h.
22594 (main): Call muscle_init ().
22595 * src/Makefile.am (bison_SOURCES): Echo modifications.
22596
93a37297
MA
225972001-09-02 Marc Autret <autret_m@epita.fr>
22598
f753cd62 22599 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 22600
f753cd62
MA
22601 * src/muscle_tab.c, src/muscle_tab.h: Add files.
22602
226032001-09-02 Marc Autret <autret_m@epita.fr>
22604
22605 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 22606
682d48cd
PB
226072001-09-01 Pascal Bart <pascal.bart@epita.fr>
22608
342b8b6e 22609 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
22610 filename.
22611
087c8fda
MA
226122001-09-01 Marc Autret <autret_m@epita.fr>
22613
22614 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
22615 to an explicit value to activate the feature. We do it here.
22616
dda680cb
PB
226172001-08-31 Pascal Bart <pascal.bart@epita.fr>
22618
22619 * src/output.c (prepare): Delete the `filename' muscule insertion.
22620 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
22621 (parse_union_decl): Likewise.
22622 * src/macrotab.c (macro_init): Initialize filename by infile.
22623
9e644e64
MA
226242001-08-31 Marc Autret <autret_m@epita.fr>
22625
22626 * src/bison.simple (YYLSP_NEEDED): New definition.
22627 * src/output.c (prepare): Add macro insertion of `locations_flag'
22628
17da6427
PB
226292001-08-31 Pascal Bart <pascal.bart@epita.fr>
22630
22631 * src/output.c (prepare): Delete insertion of previous muscles,
22632 and insert the `prefix' muscles.
22633 * src/macrotab.c (macro_init): Likewise.
22634 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 22635 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
22636 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
22637 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 22638 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
22639 name_prefix.
22640
e8cb70b9
PB
226412001-08-31 Pascal Bart <pascal.bart@epita.fr>
22642
22643 * src/main.c (main): Standardize.
22644 * src/output.c (output_table_data, output_parser): Likewise.
22645 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
22646
63c2d5de
MA
226472001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
22648
342b8b6e 22649 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
22650 %%epilogue.
22651 * src/output.c (output): Rename %%declarations to %%prologue.
22652 * src/bison.simple: Echo modifications.
342b8b6e 22653
d8cb5183
MA
226542001-08-31 Marc Autret <autret_m@epita.fr>
22655
22656 * src/reader.c (readgram): CleanUp.
22657 (output_token_defines): Likewise.
22658 (packsymbols): Likewise.
22659 (reader): Likewise.
22660 * src/output.c (output): CPP-out useless code.
22661
6c686258
PB
226622001-08-31 Pascal Bart <pascal.bart@epita.fr>
22663
342b8b6e 22664 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
22665 output_trailers and output_headers.
22666 * src/output.h: Remove obsolete functions prototypes of output_headers
22667 and output_trailers.
22668
8f451ef7
PB
226692001-08-30 Pascal Bart <pascal.bart@epita.fr>
22670
22671 * src/main.c: Include macrotab.h.
342b8b6e 22672 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
22673 Adjust functions prototypes.
22674 * src/macrotab.c (macro_insert): Constify key and value.
22675 (macro_find): Constify key.
22676 (macro_insert): Include 'xalloc.h'
22677 (macro_insert): Use XMALLOC.
22678 (macro_find): Constify return value.
22679 * src/output.c (output_table_data): Rename table to table_data.
22680 (output_parser): Constify macro_key, macro_value.
22681
997b6fd0 226822001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
22683
22684 * src/reader.c (parse_skel_decl): New.
342b8b6e 22685 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
22686 * src/lex.h (token_t): New token `tok_skel'.
22687 * src/lex.c (percent_table): Add skeleton option entry.
22688 Standardize.
22689
ff48177d
MA
226902001-08-29 Marc Autret <autret_m@epita.fr>
22691
22692 * src/bison.simple: Add %%user_code directive at the end.
22693 * src/reader.c (read_additionnal_code): New.
22694 (reader): Use it.
22695 * src/output.c (output_program): Remove.
22696 (output): Update.
22697
b33160bf
MA
226982001-08-28 Marc Autret <autret_m@epita.fr>
22699
22700 * src/output.c (output_actions): Clean up.
4e5caae2 22701 (output_gram): CPP-out useless code.
b33160bf
MA
22702 * src/reader.c (reader): Clean up, CPP-out useless code.
22703
d1a2daf7
PB
227042001-08-28 Pascal Bart <pascal.bart@epita.fr>
22705
342b8b6e 22706 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 22707 directive.
d1a2daf7
PB
22708 * src/bison.simple: Add `%%definitions'.
22709
2b763dfe
MA
227102001-08-28 Marc Autret <autret_m@epita.fr>
22711
22712 * config/depcomp: New file.
22713
f1a87ef6
PE
227142001-08-27 Paul Eggert <eggert@twinsun.com>
22715
22716 * src/bison.simple (yyparse): Don't take the address of an
22717 item before the start of an array, as that doesn't conform to
22718 the C Standard.
22719
82e236e2
RA
227202001-08-27 Robert Anisko <robert.anisko@epita.fr>
22721
f1a87ef6 22722 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
22723 obstack. It was done too late here.
22724
22725 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
22726 completely wrong.
22727 (reader): Initialize the macro obstack here, since we need it to grow
22728 '%define' directives.
22729
22730 * src/reader.h: Declare the macro obstack as extern.
22731
b0cfa28a
RA
227322001-08-27 Robert Anisko <robert.anisko@epita.fr>
22733
22734 * src/output.c (output_parser): Fix. Store single '%' characters in
22735 the output obstack instead of throwing them away.
22736
6fc74234
AD
227372001-08-27 Akim Demaille <akim@epita.fr>
22738
22739 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22740
9c76d118
RA
227412001-08-25 Robert Anisko <robert.anisko@epita.fr>
22742
22743 * lib/Makefile.am: Adjust.
22744
a8289c62
RA
227452001-08-25 Robert Anisko <robert.anisko@epita.fr>
22746
22747 * src/bison.simple: Update and add '%%' directives.
22748
b6610515
RA
227492001-08-25 Robert Anisko <robert.anisko@epita.fr>
22750
22751 * src/reader.c (reader): Remove calls to 'output_headers' and
22752 'output_trailers'. Remove some C output.
22753 (readgram): Disable a piece of code that was writing a default
22754 definition for 'YYSTYPE'.
22755 (reader_output_yylsp): Remove.
22756 (packsymbols): Output token defintions to a macro.
22757 (copy_definition): Disable C output.
6fc74234 22758
b6610515
RA
22759 * src/reader.c (parse_macro_decl): New function used to parse macro
22760 declarations.
22761 (copy_string2): Put the body of copy_string into this new function.
22762 Add a parameter to let the caller choose whether he wants to copy the
22763 string delimiters or not.
22764 (copy_string): Be a simple call to copy_string2 with the last argument
22765 bound to true.
22766 (read_declarations): Add case for macro definition.
22767 (copy_identifier): New.
6fc74234 22768 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
22769 rather than lex.
22770
26f609ff
RA
227712001-08-25 Robert Anisko <robert.anisko@epita.fr>
22772
22773 * src/output.c (prepare): Add prefixed names.
22774 (output_parser): Output semantic actions.
22775 (output_parser): Fix bug on '%%line' directives.
6fc74234 22776
26f609ff
RA
22777 * src/output.c (output_headers): Remove. The C code printed by this
22778 function should now be in the skeletons.
22779 (output_trailers): Remove.
22780 (output): Disable call to 'reader_output_yylsp'.
22781 (output_rule_data): Do not output tables to the table obstack.
22782
22783 * src/output.c: Remove some C dedicated output.
22784 Improve the use of macro and output obstacks.
22785 (output_defines): Remove.
6fc74234 22786
26f609ff
RA
22787 * src/output.c (output_token_translations): Associate 'translate'
22788 table with a macro. No output to the table obstack.
22789 (output_gram): Same for 'rhs' and 'prhs'.
22790 (output_stos): Same for 'stos'.
22791 (output_rule_data): Same for 'r1' and 'r2'.
22792 (token_actions): Same for 'defact'.
22793 (goto_actions): Same for 'defgoto'.
22794 (output_base): Same for 'pact' and 'pgoto'.
22795 (output_table): Same for 'table'.
22796 (output_check): Same for 'check'.
6fc74234 22797
26f609ff
RA
22798 * src/output.c (output_table_data): New function.
22799 (output_short_table): Remove.
22800 (output_short_or_char_table): Remove.
6fc74234 22801
26f609ff
RA
22802 * src/output.c (output_parser): Replace most of the skeleton copy code
22803 with something new. Skeletons are now processed character by character
22804 rather than line by line, and Bison looks for '%%' macros. This is the
22805 first step in making Bison's output process (a lot) more flexible.
22806 (output_parser): Use the macro table.
22807
6f43b113
RA
228082001-08-25 Robert Anisko <robert.anisko@epita.fr>
22809
22810 * src/main.c (main): Initialize the macro table.
22811
dd3127cf
RA
228122001-08-25 Robert Anisko <robert.anisko@epita.fr>
22813
22814 * src/lex.c (percent_table): Add tok_define.
22815 * src/lex.h: Add tok_define.
22816
aa321494
RA
228172001-08-25 Robert Anisko <robert.anisko@epita.fr>
22818
22819 * src/macrotab.c: New file.
22820 * src/macrotab.h: New file.
22821 * src/Makefile.am: Update.
22822
68bd3b6b
RA
228232001-08-25 Robert Anisko <robert.anisko@epita.fr>
22824
22825 * lib/hash.c: New file.
22826 * lib/hash.h: New file.
22827 * lib/Makefile.am: Update.
22828
45f8dd1e
AD
228292001-08-15 Akim Demaille <akim@epita.fr>
22830
22831 Version 1.28c.
22832
40a64a7a 228332001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
22834
22835 * src/reader.c (readgram): Indent output macro YYSTYPE.
22836 (packsymbols): Likewise.
22837 (output_token_defines): Likewise.
22838 * src/files.c: Standardize.
22839 (compute_header_macro): New.
22840 (defines_obstack_save): New. Use compute_header_macro.
22841 (output_files): Update. Use defines_obstack_save.
22842
f9a8293a
AD
228432001-08-15 Akim Demaille <akim@epita.fr>
22844
22845 * doc/bison.texinfo (Table of Symbols): Document
22846 YYSTACK_USE_ALLOCA.
22847
150ca7a7
AD
228482001-08-15 Akim Demaille <akim@epita.fr>
22849
22850 * missing: Update from CVS Automake.
22851 * config/config.guess, config/config.sub, config/texinfo.tex:
22852 Update from gnu.org.
22853
69b5cec4
AD
228542001-08-15 Akim Demaille <akim@epita.fr>
22855
22856 * Makefile.maint: Sync with CVS Autoconf.
22857
f2b5126e
PB
228582001-08-14 Pascal Bart <pascal.bart@epita.fr>
22859
69b5cec4 22860 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
22861 `fdl.texi'.
22862 * doc/fdl.texi: Add to package.
22863
4ecbf796
MA
228642001-08-14 Marc Autret <autret_m@epita.fr>
22865
22866 Turn on %{source,header}_extension features.
22867
69b5cec4 22868 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
22869 source_extension.
22870 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 22871 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
22872 between options.
22873
95fb5662
MA
228742001-08-14 Marc Autret <autret_m@epita.fr>
22875
22876 * src/files.c (compute_base_names): Add extensions computing when
22877 `--file-prefix' used.
22878 Standardize function calls.
22879
78d09da9
MA
228802001-08-13 Marc Autret <autret_m@epita.fr>
22881
69b5cec4 22882 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
22883 defining it (defined but null disables alloca).
22884
5a009f2c
MA
228852001-08-13 Marc Autret <autret_m@epita.fr>
22886
22887 * src/bison.simple (_yy_memcpy): CPP reformat.
22888
1e41465a
PB
228892001-08-13 Pascal Bart <pascal.bart@epita.fr>
22890
22891 * tests/atconfig.in (CPPFLAGS): Fix.
22892
c67a198d
PB
228932001-08-10 Pascal Bart <pascal.bart@epita.fr>
22894
79282c6c 22895 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
22896 `gpl.texi'.
22897 * doc/gpl.texi: Add to package.
22898
09a6de7e
MA
228992001-08-10 Marc Autret <autret_m@epita.fr>
22900
22901 * src/print_graph.h: Fix.
22902 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
22903
b77b9ee0
AD
229042001-08-10 Akim Demaille <akim@epita.fr>
22905
22906 * src/system.h: Provide default declarations for stpcpy, strndup,
22907 and strnlen.
22908
3e259915
MA
229092001-08-10 Robert Anisko <anisko_r@epita.fr>
22910
22911 * doc/bison.texinfo (Locations): Update @$ stuff.
22912
ca96bc2d
MA
229132001-08-09 Robert Anisko <anisko_r@epita.fr>
22914
22915 * src/bison.simple (YYLLOC_DEFAULT): Update.
22916 (yyparse): Adjust.
22917
fdc6758b
MA
229182001-08-08 Marc Autret <autret_m@epita.fr>
22919
b77b9ee0 22920 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
22921 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
22922 Reported by Fabrice Bauzac.
957d4dbf 22923
600cad3b
MA
229242001-08-08 Marc Autret <autret_m@epita.fr>
22925
22926 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
22927 * src/vcg.c (output_node): Fix.
22928 * src/vcg.h: Cleanup.
22929 * src/print_graph.c: Add comments.
b77b9ee0 22930 (node_output_size): New global variable. Simplify the formatting of
600cad3b 22931 the VCG graph output.
b77b9ee0 22932 (print_actions): Unused code is now used. It notifies the final state
600cad3b 22933 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 22934 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
22935 blue.
22936 Get the current node name and node_obstack by argument.
22937 (node_obstack): New variable.
22938 (print_state): Manage node_obstack.
22939 (print_core): Use node_obstack given by argument.
22940 A node is not only computed here but in print_actions also.
22941 (print_graph): CPP out useless code instead of commenting it.
22942
976e528f
AD
229432001-08-07 Pascal Bart <pascal.bart@epita.fr>
22944
22945 * tests/atconfig.in (CPPFLAGS): Fix.
22946
20e8e5ca
AD
229472001-08-07 Akim Demaille <akim@epita.fr>
22948
22949 * src/print_graph.c (quote): New.
22950 (print_core): Use it.
22951
957d4dbf 229522001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 22953
3e3da797
AD
22954 * src/vcg.c (complain.h): Include it.
22955 Unepitaize `return' invocations.
c4b66126 22956 [NDEBUG] (main): Remove.
79282c6c 22957 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
22958 * src/files.c (open_files): Initialize graph_obstack.
22959 * src/print_graph.c (print_actions): CPP out useless code.
22960 (print_core): Don't output the last `\n' in labels.
22961 Use `quote'.
22962 * src/files.c (output_files): Output the VCG file.
22963 * src/main.c (main): Invoke print_graph ();
3e3da797 22964
957d4dbf 229652001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
22966
22967 Automaton VCG graph output.
22968 Using option ``-g'' or long option ``--graph'', you can generate
22969 a gram_filename.vcg file containing a VCG description of the LALR (1)
22970 automaton of your grammar.
22971
22972 * src/main.c: Call to print_graph() function.
22973 * src/getargs.h: Update.
22974 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22975 (graph_flag): New flag.
22976 (longopts): Update.
22977 (getargs): Add case `g'.
22978 * src/files.c (graph_obstack): New obstack struct.
22979 (open_files): Initialize new obstack.
22980 (output_files): Saves graph_obstack if required.
22981 * src/files.h (graph_obstack): New extern declaration.
22982 * src/Makefile.am: Add new source files.
22983
927c1557 229842001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
22985
22986 * src/print_graph.c, src/print_graph.h (graph): New.
22987 * src/vcg.h: New file.
22988 * src/vcg.c: New file, VCG graph handling.
22989
7333d403
AD
229902001-08-06 Marc Autret <autret_m@epita.fr>
22991
22992 Add of %source_extension and %header_extension which specify
22993 the source or/and the header output file extension.
22994
22995 * src/files.c (compute_base_names): Remove initialisation of
22996 src_extension and header_extension.
22997 (compute_exts_from_gf): Update.
22998 (compute_exts_from_src): Update.
22999 (output_files): Update.
23000 * src/reader.c (parse_header_extension_decl): New.
23001 (parse_source_extension_decl): New.
23002 (read_declarations): New case statements for the new tokens.
23003 * src/lex.c (percent_table): Add entries for %source_extension
23004 and %header_extension.
23005 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
23006
84163231
AD
230072001-08-06 Marc Autret <autret_m@epita.fr>
23008
23009 * configure.in: Bump to 1.28c.
23010 * doc/bison.texinfo: Texinfo thingies.
23011
8303fc42
AD
230122001-08-04 Pascal Bart <pascal.bart@epita.fr>
23013
23014 * tests/atconfig.in (CPPFLAGS): Add.
23015 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
23016
70a84437
AD
230172001-08-03 Akim Demaille <akim@epita.fr>
23018
23019 Version 1.28b.
23020
2ce10144
AD
230212001-08-03 Akim Demaille <akim@epita.fr>
23022
23023 * tests/Makefile.am (check-local): Ship testsuite.
23024 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
23025 Include `string.h'.
23026
1e3e4bc1
AD
230272001-08-03 Akim Demaille <akim@epita.fr>
23028
23029 * configure.in: Try using -Wformat when compiling.
23030
42b45b7f
AD
230312001-08-03 Akim Demaille <akim@epita.fr>
23032
23033 * configure.in: Bump to 1.28b.
23034
8f13fe33
AD
230352001-08-03 Akim Demaille <akim@epita.fr>
23036
23037 * src/complain.c: Adjust strerror_r portability issues.
23038
b37ba92c
AD
230392001-08-03 Akim Demaille <akim@epita.fr>
23040
23041 Version 1.28a.
23042
b0ce6046
AD
230432001-08-03 Akim Demaille <akim@epita.fr>
23044
23045 * src/getargs.c, src/getarg.h (skeleton)): Constify.
23046 * src/lex.c (literalchar): Avoid name clashes on `buf'.
23047 * src/getargs.c: Include complain.h.
23048 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
23049 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
23050
d01c415b
AD
230512001-08-03 Akim Demaille <akim@epita.fr>
23052
23053 * src/reader.c (readgram): Display hidden chars in error messages.
23054
459dd1a6
AD
230552001-08-03 Akim Demaille <akim@epita.fr>
23056
23057 Update to gettext 0.10.39.
23058
53b74c0c
AD
230592001-08-03 Akim Demaille <akim@epita.fr>
23060
23061 * lib/strspn.c: New.
23062
234a3be3
AD
230632001-08-01 Marc Autret <autret_m@epita.fr>
23064
23065 * doc/bison.texinfo: Update.
23066 * doc/bison.1 (mandoc): Update.
23067 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
23068 * src/files.c: Support output files extensions computing.
23069 (src_extension): New static variable.
23070 (header_extension): New static variable.
23071 (tr): New function.
23072 (get_extension_index): New function, gets the index of an extension
23073 filename in a string.
23074 (compute_exts_from_gf): New function, computes extensions from the
23075 grammar file extension.
23076 (compute_exts_from_src): New functions, computes extensions from the
23077 C source file extension, file given by ``-o'' option.
23078 (compute_base_names): Update.
23079 (output_files): Update.
23080
847bf1f5
AD
230812001-08-01 Robert Anisko <anisko_r@epita.fr>
23082
d995fee7 23083 * doc/bison.texi: Document @$.
847bf1f5
AD
23084 (Locations): New section.
23085
d074a105
AD
230862001-07-18 Akim Demaille <akim@epita.fr>
23087
23088 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
23089 * config/prev-version.txt, config/move-if-change: New.
23090 * Makefile.am: Adjust.
23091
3419715d
AD
230922001-07-08 Pascal Bart <pascal.bart@epita.fr>
23093
23094 * src/bison.simple (yyparse): Suppress warning `comparaison
23095 between signed and unsigned'.
23096
62ab6972
AD
230972001-07-05 Pascal Bart <pascal.bart@epita.fr>
23098
23099 * src/getargs.h (raw_flag): Remove.
23100 * src/getargs.c: Die on `-r'/`--raw'.
23101 * src/lex.c (parse_percent_token): Die on `%raw'.
23102 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
23103 * tests/calc.at: Suppress test with option `--raw'.
23104
1e24cc5b
AD
231052001-07-14 Akim Demaille <akim@epita.fr>
23106
23107 * config/: New.
23108 * configure.in: Require Autoconf 2.50.
23109 Update to gettext 0.10.38.
23110
32dfccf8
AD
231112001-03-16 Akim Demaille <akim@epita.fr>
23112
23113 * doc/bison.texinfo: ANSIfy the examples.
23114
cd5bd6ac
AD
231152001-03-16 Akim Demaille <akim@epita.fr>
23116
23117 * getargs.c (skeleton): New variable.
23118 (longopts): --skeleton is a new option.
23119 (shortopts, getargs): -S is a new option.
23120 * getargs.h: Declare skeleton.
23121 * output.c (output_parser): Use it.
23122
5141b016
AD
231232001-03-16 Akim Demaille <akim@epita.fr>
23124
23125 * m4/strerror_r.m4: New.
23126 * m4/error.m4: Run AC_FUNC_STRERROR_R.
23127 * lib/error.h, lib/error.c: Update.
23128
447992b9
AD
231292001-03-16 Akim Demaille <akim@epita.fr>
23130
23131 * src/getargs.c (longopts): Clean up.
23132
274d42ce
AD
231332001-02-21 Akim Demaille <akim@epita.fr>
23134
23135 * src/reader.c (gensym): `gensym_count' is your own.
23136 Use a static buf to create the symbol name, as token_buffer is no
23137 longer a buffer.
23138
22c821f3
AD
231392001-02-08 Akim Demaille <akim@epita.fr>
23140
23141 * src/conflicts.c (conflict_report): Be sure not to append to res
23142 between two calls, which could happen if both first sprintf were
23143 skipped, but not the first cp += strlen.
23144
18569462
AD
231452001-02-08 Akim Demaille <akim@epita.fr>
23146
23147 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
23148 New, from fileutils 4.0.37.
23149 * configure.in: Require Autoconf 2.49c. I took some time before
23150 making this decision. This is the only way out for portability
23151 issues in Bison, it would mean way too much duplicate effort to
23152 import in Bison features implemented in 2.49c since 2.13.
23153 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
23154
0d8f3c8a
AD
231552001-02-02 Akim Demaille <akim@epita.fr>
23156
23157 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 23158 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 23159
f17bcd1f
AD
231602001-01-19 Akim Demaille <akim@epita.fr>
23161
23162 Get rid of the ad hoc handling of token_buffer in the scanner: use
23163 the obstacks.
23164
23165 * src/lex.c (token_obstack): New.
23166 (init_lex): Initialize it. No longer call...
23167 (grow_token_buffer): this. Remove it.
23168 Adjust all the places which used it to use the obstack.
23169
511e79b3
AD
231702001-01-19 Akim Demaille <akim@epita.fr>
23171
23172 * src/lex.h: Rename all the tokens:
23173 s/\bENDFILE\b/tok_eof/g;
23174 s/\bIDENTIFIER\b/tok_identifier/g;
23175 etc.
23176 Let them be enums, not #define, to ease debugging.
23177 Adjust all the code.
23178
0d6508ef
AD
231792001-01-18 Akim Demaille <akim@epita.fr>
23180
23181 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
23182 * src/lex.c (maxtoken, grow_token_buffer): Static.
23183
6deb4447
AD
231842001-01-18 Akim Demaille <akim@epita.fr>
23185
23186 Since we now use obstacks, more % directives can be enabled.
23187
23188 * src/lex.c (percent_table): Also accept `%yacc',
23189 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
23190 `%debug'.
23191 Handle the actions for `%semantic_parser' and `%pure_parser' here,
23192 instead of returning a token.
23193 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
23194 * src/reader.c (read_declarations): Adjust.
23195 * src/files.c (open_files): Don't call `compute_base_names', don't
23196 compute `attrsfile' since they depend upon data which might be
23197 *in* the input file now.
23198 (output_files): Do it here.
23199 * src/output.c (output_headers): Document the fact that this patch
23200 introduces a guaranteed SEGV for semantic parsers.
23201 * doc/bison.texinfo: Document them.
23202 * tests/suite.at: Exercise these %options.
23203
ff4423cc
AD
232042000-12-20 Akim Demaille <akim@epita.fr>
23205
23206 Also handle the output file (--verbose) with obstacks.
23207
23208 * files.c (foutput): Remove.
23209 (output_obstack): New.
23210 Adjust all dependencies.
23211 * src/conflicts.c: Return a string.
23212 * src/system.h (obstack_grow_string): Rename as...
23213 (obstack_sgrow): this. Be ready to work with non literals.
23214 (obstack_fgrow4): New.
23215
956dba3a
AD
232162000-12-20 Akim Demaille <akim@epita.fr>
23217
23218 * src/files.c (open_files): Fix the computation of short_base_name
23219 in the case of `-o foo.tab.c'.
23220
337bab46
AD
232212000-12-20 Akim Demaille <akim@epita.fr>
23222
23223 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
23224 (copy_dollar): Now that everything uses obstacks, get rid of the
23225 FILE * parameters.
23226
5d3214b8
AD
232272000-12-20 Akim Demaille <akim@epita.fr>
23228
23229 * src/files.c (open_files): Actually the `.output' file is based
23230 on the short_base_name, not base_name.
23231 * tests/suite.at (Checking output file names): Adjust.
23232
29092a57
AD
232332000-12-20 Akim Demaille <akim@epita.fr>
23234
23235 * src/bison.s1: Remove, we now use directly...
23236 * src/bison.simple: this.
23237 * src/Makefile.am: Use pkgdata instead of data.
23238
ea5607fd
AD
232392000-12-20 Akim Demaille <akim@epita.fr>
23240
23241 * src/files.c (guard_obstack): New.
23242 (open_files): Initialize it.
23243 (output_files): Dump it...
23244 * src/files.h: Export it.
23245 * src/reader.c (copy_guard): Use it.
23246
27110317
AD
232472000-12-19 Akim Demaille <akim@epita.fr>
23248
23249 * src/files.c (outfile, defsfile, actfile): Removed as global
23250 vars.
23251 (open_files): Don't compute them.
23252 (output_files): Adjust.
23253 (base_name, short_base_name): Be global.
23254 Adjust dependencies.
23255
19c50364
AD
232562000-12-19 Akim Demaille <akim@epita.fr>
23257
23258 * src/files.c (strsuffix): New.
23259 (stringappend): Be just like strcat but allocate.
23260 (base_names): Eve out from open_files.
23261 Try to simplify the rather hairy computation of base_name and
23262 short_base_name.
23263 (open_files): Use it.
23264 * tests/suite.at (Checking output file names): New test.
23265
573c1d9f
AD
232662000-12-19 Akim Demaille <akim@epita.fr>
23267
23268 * src/system.h (obstack_grow_literal_string): Rename as...
23269 (obstack_grow_string): this.
23270 * src/output.c (output_parser): Recognize `%% actions' instead of
23271 `$'.
23272 * src/bison.s1: s/$/%% actions/.
23273 * src/bison.hairy: Likewise.
23274
ef7ddedd
AD
232752000-12-19 Akim Demaille <akim@epita.fr>
23276
23277 * src/output.c (output_parser): Compute the `#line' lines when
23278 there are.
23279 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
23280 Suggested by Hans Aberg.
23281
ff61dabd
AD
232822000-12-19 Akim Demaille <akim@epita.fr>
23283
23284 Let the handling of the skeleton files be local to the procedures
23285 that use it.
23286
23287 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
23288 longer static.
23289 (fparser, open_extra_files): Remove.
23290 (open_files, output_files): Don't take care of fparser.
23291 * src/files.h: Adjust.
23292 * src/output.c (output_parser): Open and close the file to the
23293 skeleton.
23294 * src/reader.c (read_declarations): When %semantic_parser, open
23295 fguard.
23296
55b96341
AD
232972000-12-19 Akim Demaille <akim@epita.fr>
23298
23299 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
23300 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
23301
358c15b7
AD
233022000-12-19 Akim Demaille <akim@epita.fr>
23303
23304 * src/files.c (open_files): Yipee! We no longer need all the code
23305 looking for `/tmp' since we have no tmp file.
23306
7de3329e
AD
233072000-12-19 Akim Demaille <akim@epita.fr>
23308
23309 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
23310 New macros.
23311 * src/files.c (open_files): Less dependency on MSDOS etc.
23312
3abcd459
AD
233132000-12-14 Akim Demaille <akim@epita.fr>
23314
23315 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
23316 Provide a default definition.
23317 Use it when executing the default @ action.
23318 * src/reader.c (reader_output_yylsp): No longer include
23319 `timestamp' and `text' in the default YYLTYPE.
23320
2a91a95e
AD
233212000-12-12 Akim Demaille <akim@epita.fr>
23322
23323 * src/reader.c (copy_definition, parse_union_decl, copy_action)
23324 (copy_guard): Quote the file names.
23325 Reported by Laurent Mascherpa.
23326
14d3eb9b
AD
233272000-12-12 Akim Demaille <akim@epita.fr>
23328
23329 * src/output.c (output_headers, output_program, output): Be sure
23330 to escape special characters when outputting filenames.
23331 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
23332 (output_headers): Don't depend on them, Use ACTSTR.
23333
d7045ec6
AD
233342000-11-17 Akim Demaille <akim@epita.fr>
23335
23336 * lib/obstack.h: Formatting changes.
23337 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
23338 prevents type checking.
23339 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23340 cast the value to (void *): assigning a `foo *' to a `void *'
23341 variable is valid.
23342 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23343 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
23344 append characters.
23345
6fd54b73
AD
233462000-11-17 Akim Demaille <akim@epita.fr>
23347
23348 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
23349 as...
23350 (suite.m4, regression.m4, calc.m4): these.
23351 * tests/atgeneral.m4: Update from CVS Autoconf.
23352
4c50eae6
AD
233532000-11-17 Akim Demaille <akim@epita.fr>
23354
23355 * tests/regression.m4 (%union and --defines): New test,
23356 demonstrating a current bug in the obstack implementation.
23357
a35f64ea
AD
233582000-11-17 Akim Demaille <akim@epita.fr>
23359
23360 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
23361 macros.
23362 Use them to declare the variables which are global or local to
23363 `yyparse'.
23364
7de23534
AD
233652000-11-17 Akim Demaille <akim@epita.fr>
23366
23367 * acconfig.h: Remove, no longer used.
23368
aa7815f5
AD
233692000-11-07 Akim Demaille <akim@epita.fr>
23370
23371 * src: s/Copyright (C)/Copyright/g.
23372
5af1f549
AD
233732000-11-07 Akim Demaille <akim@epita.fr>
23374
23375 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
23376 defining.
23377 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
23378
553e2b22
AD
233792000-11-07 Akim Demaille <akim@epita.fr>
23380
23381 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
23382 Merge in a single CPP if/else.
23383
8a4f41d6
AD
233842000-11-07 Akim Demaille <akim@epita.fr>
23385
23386 * src/output.c (output): Remove useless variables.
23387 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
23388 argument `data' for consistency with the prototypes.
23389 Qualify it `const'.
23390 (obstack_copy, obstack_copy0): Rename the second argument as
23391 `address' for consistency. Qualify it `const'.
23392 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
23393 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
23394 `const' their input argument (`data' or `address').
23395 Adjust the corresponding macros to include `const' in casts.
23396
095a3fb5
AD
233972000-11-03 Akim Demaille <akim@epita.fr>
23398
23399 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
23400 s/PFILE1/BISON_HAIRY/.
23401 Adjust dependencies.
23402
d1cdce7c
AD
234032000-11-03 Akim Demaille <akim@epita.fr>
23404
090c5ebf 23405 For some reason, this was not applied.
d1cdce7c
AD
23406
23407 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23408 `unlink': it's no longer used.
23409
9311529b
AD
234102000-11-03 Akim Demaille <akim@epita.fr>
23411
23412 * src/files.c (skeleton_find): New function, eved out of...
23413 (open_files, open_extra_files): here.
23414
d8880f69
AD
234152000-11-03 Akim Demaille <akim@epita.fr>
23416
23417 Don't use `atexit'.
23418
23419 * src/files.c (obstack_save): New function.
23420 (done): Rename as...
23421 (output_files): this.
23422 Use `obstack_save'.
23423 * src/main.c (main): Don't use `atexit' to register `done', since
23424 it no longer has to remove tmp files, just call `output_files'
23425 when there are no errors.
23426
0dbb648e
AD
234272000-11-02 Akim Demaille <akim@epita.fr>
23428
23429 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
23430 `unlink': it's no longer used.
23431 * src/files.h: Formatting changes.
23432
896fe5c1
AD
234332000-11-02 Akim Demaille <akim@epita.fr>
23434
23435 Remove the last uses of mktemp and unlink/delete.
23436
23437 * src/files.c (fdefines, ftable): Removed.
23438 (defines_ostack, table_obstack): New.
23439 Adjust dependencies of the former into uses of the latter.
23440 * src/output.c (output_short_or_char_table, output_short_table):
23441 Convert to using obstacks.
23442 * src/reader.c (copy_comment2): Accept one FILE * and two
23443 obstacks.
23444 (output_token_defines, reader_output_yylsp): Use obstacks.
23445 * src/system.h (obstack_fgrow3): New.
1f65350a 23446 * po/POTFILES.in: Adjust.
896fe5c1 23447
dd60faec
AD
234482000-11-01 Akim Demaille <akim@epita.fr>
23449
23450 Change each use of `fattrs' into a use of `attrs_obstack'.
23451
23452 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
23453 * src/files.c (fattrs): Remove.
23454 (attrs_obstack): New.
23455 Adjust all dependencies.
23456 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
23457
8c7ebe49
AD
234582000-11-01 Akim Demaille <akim@epita.fr>
23459
23460 Introduce obstacks.
23461 Change each use of `faction' into a use of `action_obstack'.
23462
23463 * lib/obstack.h, lib/obstack.c: New files.
23464 * src/files.c (faction): Remove.
23465 (action_obstack): New.
23466 Adjust all dependencies.
23467
77aee789
AD
234682000-10-20 Akim Demaille <akim@epita.fr>
23469
23470 * lib/quote.h (PARAMS): New macro. Use it.
23471
43591cec
AD
234722000-10-16 Akim Demaille <akim@epita.fr>
23473
23474 * src/output.c (output_short_or_char_table): New function.
23475 (output_short_table, output_token_translations): Use it.
23476 (goto_actions): Use output_short_table.
23477
1e9798d5
AD
234782000-10-16 Akim Demaille <akim@epita.fr>
23479
23480 * src/symtab.c (bucket_new): New function.
23481 (getsym): Use it.
23482
23483 * src/output.c (output_short_table): New argument to display the
23484 comment associated with the table.
23485 Adjust dependencies.
23486 (output_gram): Use it.
23487 (output_rule_data): Nicer output layout for YYTNAME.
23488
f282676b
AD
234892000-10-16 Akim Demaille <akim@epita.fr>
23490
23491 * src/lex.c (read_typename): New function.
23492 (lex): Use it.
23493 * src/reader.c (copy_dollar): Likewise.
23494
550a72a3
AD
234952000-10-16 Akim Demaille <akim@epita.fr>
23496
23497 * src/reader.c (copy_comment2): Expect the input stream to be on
23498 the `/' which is suspected to open a comment, instead of being
23499 called after `//' or `/*' was read.
23500 (copy_comment, copy_definition, parse_union_decl, copy_action)
23501 (copy_guard): Adjust.
23502
131e2fef
AD
235032000-10-16 Akim Demaille <akim@epita.fr>
23504
23505 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
23506 `read_signed_integer'.
23507
79282c5a
AD
235082000-10-16 Akim Demaille <akim@epita.fr>
23509
23510 * src/reader.c (copy_dollar): New function.
23511 (copy_guard, copy_action): Use it.
23512
ff4a34be
AD
235132000-10-16 Akim Demaille <akim@epita.fr>
23514
23515 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
23516 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
23517 New files, from Fileutils 4.0.27.
23518 * src/main.c (printable_version): Remove.
23519 * src/lex.c, src/reader.c: Use `quote'.
23520
235212000-10-04 Akim Demaille <akim@epita.fr>
23522
23523 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
23524
14ded682
AD
235252000-10-04 Akim Demaille <akim@epita.fr>
23526
23527 * doc/bison.texinfo: Various typos spotted by Neil Booth.
23528
8e03724b
AD
235292000-10-04 Akim Demaille <akim@epita.fr>
23530
23531 When a literal string is used to define two different tokens,
23532 `bison -v' segfaults.
23533 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
23534
23535 * tests/regression.m4: New file.
23536 Include the core of the sample provided by Piotr Gackiewicz.
23537 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
23538 properly.
23539
a9e64249
AD
235402000-10-04 Akim Demaille <akim@epita.fr>
23541
23542 * src/reader.c (parse_expect_decl): Keep `count' within the size
23543 of `buffer'.
23544 From Neil Booth.
23545
da9abf43
AD
235462000-10-02 Paul Eggert <eggert@twinsun.com>
23547
23548 * bison.s1 (yyparse): Assign the default value
23549 unconditionally, to avoid a GCC warning and make the parser a
23550 tad smaller.
23551
c33638bb
AD
235522000-10-02 Akim Demaille <akim@epita.fr>
23553
23554 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
23555 options.
23556
444c570a
AD
235572000-10-02 Akim Demaille <akim@epita.fr>
23558
23559 * src/derives.c, src/print.c, src/reduce.c: To ease the
23560 translation, move some `\n' out of the translated strings.
23561
89cab50d
AD
235622000-10-02 Akim Demaille <akim@epita.fr>
23563
23564 The location tracking mechanism is precious for parse error
23565 messages. Nevertheless, it is enabled only when `@n' is used in
23566 the grammar, which is a different issue (you can use it in error
23567 message, but not in the grammar per se). Therefore, there should
23568 be another means to enable it.
23569
23570 * src/getargs.c (getargs): Support `--locations'.
23571 (usage): Report it.
23572 * src/getargs.h (locationsflag): Export it.
23573 * src/lex.c (percent_table): Support `%locations'.
23574 * src/reader.c (yylsp_needed): Remove this variable, now replaced
23575 with `locationsflag'.
23576 * doc/bison.texinfo: Document `--locations' and `%locations'.
23577 Sort the options.
23578 * tests/calc.m4: Test it.
23579
23580 For regularity of the names, replace each
23581 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
23582 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
23583 In addition replace each `flag' with `_flag'.
23584
d6c2cba0
AD
235852000-10-02 Akim Demaille <akim@epita.fr>
23586
23587 Also test parse error messages, including with YYERROR_VERBOSE.
23588
23589 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
23590 associative).
23591 Use it to check the computations.
23592 Use it to check `nonassoc' is honored.
23593 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
23594 `--yyerror-verbose'.
23595 (_AT_CHECK_CALC): Adjust to this option.
23596 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
23597
5a35a6cb
AD
235982000-10-02 Akim Demaille <akim@epita.fr>
23599
23600 Test also `--verbose', `--defines' and `--name-prefix'. Testing
23601 the latter demonstrates a flaw in the handling of non debugging
23602 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
23603 was used in order to simplify:
23604
23605 #if YYDEBUG
23606 if (yydebug)
23607 {
23608 ...
23609 }
23610 #endif
23611
23612 into
23613
23614 if (yydebug)
23615 {
23616 ...
23617 }
23618
23619 unfortunately this leads to a CPP conflict when
23620 `--name-prefix=foo' is used since it produces `#define yydebug
23621 foodebug'.
23622
23623 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
23624 (YYDPRINTF): New macro.
23625 Spread its use.
23626 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
23627 the bison options.
23628 Also test `--verbose', `--defines' and `--name-prefix'.
23629
71da9eea
AD
236302000-10-02 Akim Demaille <akim@epita.fr>
23631
23632 Improve the readability of the produced parsers.
23633
23634 * src/bison.s1: Formatting changes.
23635 Improve the comment related to the `$' mark.
23636 (yydefault): Don't fall through to `yyresume': `goto' there.
23637 * src/output.c (output_parser): When the `$' is met, skip the end
23638 of its line.
23639 New variable, `number_of_dollar_signs', to check there's exactly
23640 one `$' in the parser skeleton.
23641
95e36146
AD
236422000-10-02 Akim Demaille <akim@epita.fr>
23643
23644 * lib/xstrdup.c: New file, from the fileutils.
23645 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
23646 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
23647 instead of strlen + xmalloc + strcpy.
23648 * src/symtab.c (copys): Remove, use xstrdup instead.
23649
d7020c20
AD
236502000-10-02 Akim Demaille <akim@epita.fr>
23651
23652 * src/gram.h (associativity): New enum type which replaces the
23653 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
23654 `right_assoc', `left_assoc' and `non_assoc'.
23655 Adjust all dependencies.
23656 * src/reader.c: Formatting changes.
23657 (LTYPESTR): Don't define it, use it as a literal in
23658 `reader_output_yylsp'.
23659 * src/symtab.h (symbol_class): New enum type which replaces the
23660 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
23661 `sunknown', `stoken and `snterm'.
23662
1916f98e
AD
236632000-10-02 Akim Demaille <akim@epita.fr>
23664
23665 * src/getargs.c (fixed_outfiles): Rename as...
23666 (yaccflag): for consistency and accuracy.
23667 Adjust dependencies.
23668
d7913476
AD
236692000-10-02 Akim Demaille <akim@epita.fr>
23670
23671 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
23672 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
23673 difficult and introduced a lot of core dump. It turns out that
23674 Bison used an implementation of `xmalloc' based on `calloc', and
23675 at various places it does depend upon the initialization to 0. I
23676 have not tried to isolate the pertinent places, and all the former
23677 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
23678 someone should address this issue.
23679
23680 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
23681 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
23682 files.
23683 Adjust dependencies.
23684 * src/warshall.h: New file.
23685 Propagate.
23686
340ef489
AD
236872000-10-02 Akim Demaille <akim@epita.fr>
23688
23689 Various anti-`extern in *.c' changes.
23690
23691 * src/system.h: Include `assert.h'.
23692
b2ca4022
AD
236932000-10-02 Akim Demaille <akim@epita.fr>
23694
23695 * src/state.h (nstates, final_state, first_state, first_shift)
23696 (first_reduction): Move their exportation from here...
23697 * src/LR0.h: to here.
23698 Adjust dependencies.
23699 * src/getargs.c (statisticsflag): New variable.
23700 Add support for `--statistics'.
23701 Adjust dependencies.
23702
23703 Remove a lot of now useless `extern' statements in most files.
23704
403b315b
AD
237052000-10-02 Akim Demaille <akim@epita.fr>
23706
23707 * src/LR0.h: New file.
23708 Propagate its use.
23709
07a58c13
AD
237102000-10-02 Akim Demaille <akim@epita.fr>
23711
23712 * src/print.h: New file.
23713 Propagate its use.
23714 * src/print.c: Formatting and ordering changes.
23715 (verbose, terse): Replace with...
23716 (print_results): this new function.
23717 Adjust dependencies.
23718
0619caf0
AD
237192000-10-02 Akim Demaille <akim@epita.fr>
23720
23721 * src/conflicts.c (conflict_report): New function.
23722 (conflict_log, verbose_conflict_log): Replace with...
23723 (print_conflicts): this function.
23724 Adjust dependencies.
23725 * src/conflicts.h: New file.
23726 Propagate its inclusion.
23727
3519ec76
AD
237282000-10-02 Akim Demaille <akim@epita.fr>
23729
23730 * src/nullable.h: New file.
23731 Propagate its inclusion.
23732 * src/nullable.c: Formatting changes.
23733
015acc48
AD
237342000-10-02 Akim Demaille <akim@epita.fr>
23735
23736 * src/reduce.h: New file.
23737 Propagate its inclusion.
23738 * src/reduce.c: Topological sort and other formatting changes.
23739 (bool, TRUE, FALSE): Move their definition to...
23740 * src/system.h: here.
23741
8963a27b
AD
237422000-10-02 Akim Demaille <akim@epita.fr>
23743
23744 * src/files.c: Formatting changes.
23745 (tryopen, tryclose, openfiles): Rename as...
23746 (xfopen, xfclose, open_files): this.
23747 (stringappend): static.
23748 * src/files.h: Complete the list of exported symbols.
23749 Propagate its use.
23750
a70083a3
AD
237512000-10-02 Akim Demaille <akim@epita.fr>
23752
23753 * src/reader.h: New file.
23754 Propagate its use instead of tedious list of `extern' and
23755 prototypes.
23756 * src/reader.c: Formatting changes, topological sort,
23757 s/register//.
23758
abadc117
AD
237592000-10-02 Akim Demaille <akim@epita.fr>
23760
23761 * src/lex.h: Prototype `lex.c' exported functions.
23762 * src/reader.c: Adjust.
23763 * src/lex.c: Formatting changes.
23764 (safegetc): Rename as...
23765 (xgetc): this.
23766
720d742f
AD
237672000-10-02 Akim Demaille <akim@epita.fr>
23768
23769 * src/lalr.h: New file.
23770 Propagate its inclusion instead of prototypes and `extern'.
23771 * src/lalr.c: Formatting changes, topological sorting etc.
23772
f2acea59
AD
237732000-10-02 Akim Demaille <akim@epita.fr>
23774
23775 * src/output.c (token_actions): Introduce a temporary array,
23776 YYDEFACT, that makes it possible for this function to use
23777 output_short_table.
23778
d019d655
AD
237792000-10-02 Akim Demaille <akim@epita.fr>
23780
23781 `user_toknums' is output as a `short[]' in `output.c', while it is
23782 defined as a `int[]' in `reader.c'. For consistency with the
23783 other output tables, `user_toknums' is now defined as a table of
23784 shorts.
23785
23786 * src/reader.c (user_toknums): Be a short table instead of an int
23787 table.
23788 Adjust dependencies.
23789
23790 Factor the short table outputs.
23791
23792 * src/output.c (output_short_table): New function.
23793 * src/output.c (output_gram, output_stos, output_rule_data)
23794 (output_base, output_table, output_check): Use it.
23795
6c89f1c1
AD
237962000-10-02 Akim Demaille <akim@epita.fr>
23797
23798 * src/output.c (output): Topological sort of the functions, in
23799 order to get rid of the `static' prototypes.
23800 No longer use `register'.
23801 * src/output.h: New file.
23802 Propagate its inclusion in files explicitly prototyping functions
23803 from output.c.
23804
d9efd181
AD
238052000-09-21 Akim Demaille <akim@epita.fr>
23806
23807 * src/atgeneral.m4: Update from Autoconf.
23808
c29240e7 238092000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
23810
23811 * src/closure.h: New file.
23812 * src/closure.c: Formatting changes, topological sort over the
23813 functions, use of closure.h.
23814 (initialize_closure, finalize_closure): Rename as...
23815 (new_closure, free_closure): these. Adjust dependencies.
23816 * src/LR0.c: Formatting changes, topological sort, use of
23817 cloture.h.
23818 (initialize_states): Rename as...
23819 (new_states): this.
23820 * src/Makefile.am (noinst_HEADERS): Adjust.
23821
499daa50
AD
238222000-09-20 Akim Demaille <akim@epita.fr>
23823
23824 * src/acconfig.h: Don't protect config.h against multiple
23825 inclusion.
23826 Don't define PARAMS.
23827 * src/system.h: Define PARAMS.
23828 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
23829 purpose of config.h. system.h must not try to fix wrong
23830 definitions in config.h.
23831
cc84fd5d
AD
238322000-09-20 Akim Demaille <akim@epita.fr>
23833
23834 * src/derives.h: New file.
23835 * src/main.c, src/derives.h: Use it.
23836 Formatting changes.
23837 * src/Makefile.am (noinst_HEADERS): Adjust.
23838
db5b3a89
AD
238392000-09-20 Akim Demaille <akim@epita.fr>
23840
23841 * tests/atgeneral.m4: Update from Autoconf.
23842 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
23843 (AT_CHECK_CALC): New macros.
23844 Use these macros to test bison with options `', `--raw',
23845 `--debug', `--yacc', `--yacc --debug'.
23846
ceed8467
AD
238472000-09-19 Akim Demaille <akim@epita.fr>
23848
23849 * src/output.c: Formatting changes.
23850 * src/machine.h: Remove, leaving its contents in...
23851 * src/system.h: here.
23852 Include stdio.h.
23853 Adjust all dependencies on stdio.h and machine.h.
23854 * src/getargs.h: New file.
23855 Let all `extern' declarations about getargs.c be replaced with
23856 inclusion of `getargs.h'.
23857 * src/Makefile.am (noinst_HEADERS): Adjust.
23858
23859 * tests/calc.m4 (yyin): Be initialized in main, not on the global
23860 scope.
23861 (yyerror): Returns void, not int.
23862 * doc/bison.texinfo: Formatting changes.
23863
05a1d24b
AD
238642000-09-19 Akim Demaille <akim@epita.fr>
23865
23866 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
23867 portable.
23868
cbd25751
AD
238692000-09-18 Akim Demaille <akim@epita.fr>
23870
23871 * configure.in: Append WARNING_CFLAGS to CFLAGS.
23872 * src/Makefile.am (INCLUDES): Don't.
23873 Be ready to fetch headers in lib/.
23874
13863333
AD
238752000-09-18 Akim Demaille <akim@epita.fr>
23876
23877 * doc/bison.texinfo: Update the copyright.
23878 ANSIfy and GNUify the examples.
23879 Remove the old menu.
23880
0d533154
AD
238812000-09-18 Akim Demaille <akim@epita.fr>
23882
23883 First set of tests: use the `calc' example from the documentation.
23884
23885 * src/bison.s1 (yyparse): Condition the code using `yytname' which
23886 is defined only when YYDEBUG is.
23887 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
23888 * src/files.c (tryopen, tryclose): Formatting changes.
23889 Move to the top and be static.
23890 * src/reader.c (read_signed_integer): Likewise.
23891 * tests/calc.m4: New file.
23892 * Makefile.am, suite.m4: Adjust.
23893 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
23894
e79137ac
AD
238952000-09-18 Akim Demaille <akim@epita.fr>
23896
23897 Add support for an Autotest test suite for Bison.
23898
23899 * m4/m4.m4, m4/atconfig.m4: New files.
23900 * m4/Makefile.am (EXTRA_DIST): Adjust.
23901 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
23902 files.
23903 * src/getargs.c: Display a more standard --version message.
23904 * src/reader.c (reader): Formatting changes.
23905 No longer depend upon VERSION_STRING.
23906 * configure.in: No longer use `dnl'.
23907 Set up the test suite and the new directory `tests/.
23908 (VERSION_STRING): Remove.
23909
27821bff
AD
239102000-04-14 Akim Demaille <akim@epita.fr>
23911
23912 * src/reader.c (copy_comment2): New function, same as former
23913 `copy_comment', but outputs into two FILE *.
23914 (copy_comment): Use it.
23915 (parse_union_decl): Use it.
23916 (get_type, parse_start_decl): Use the same `invalid' message.
23917 (parse_start_decl, parse_union_decl): Use the same `multiple'
23918 message.
23919 (parse_union_decl, copy_guard, copy_action): Use the same
23920 `unmatched' message.
23921 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
23922
cfe5fbc0
AD
239232000-03-31 Akim Demaille <akim@epita.fr>
23924
23925 * src/files.c (tryopen, tryclose): Move to the top.
23926 Be static.
23927
cb7db13e
AD
239282000-03-31 Akim Demaille <akim@epita.fr>
23929
23930 * src/main.c (main): Don't call `done', exit does it.
23931
a0f6b076
AD
239322000-03-31 Akim Demaille <akim@epita.fr>
23933
36281465
AD
23934 * allocate.c: s/return (foo)/return foo/.
23935 * lalr.c: Likewise.
23936 * LR0.c: Likewise.
23937 * output.c: Likewise.
23938 * reader.c: Likewise.
23939 * symtab.c: Likewise.
23940 * vmsgetargs.c: Likewise.
23941
239422000-03-31 Akim Demaille <akim@epita.fr>
23943
23944 Clean up the error reporting functions.
a0f6b076
AD
23945
23946 * src/report.c: New file.
23947 * src/report.h: Likewise.
23948 * src/Makefile.am: Adjust.
23949 * m4/error.m4: New file.
23950 * m4/Makefile.am: Adjust.
23951 * configure.in (jm_PREREQ_ERROR): Call it.
23952 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23953 Remove.
23954 (fatal, fatals): Remove. All callers use complain.c::fatal.
23955 (warn, warni, warns, warnss, warnss): Remove. All callers use
23956 complain.c::complain.
23957 (toomany): Remove, use fatal instead.
23958 * src/files.c (done): No argument, use complain_message_count.
23959 * src/main.c (main): Register `done' to `atexit'.
23960
23961 * src/getargs.c (usage): More `fputs', less `fprintf'.
23962
18539825
AD
239632000-03-28 Akim Demaille <akim@epita.fr>
23964
23965 * lib/: New directory.
23966 * Makefile.am (SUBDIRS): Adjust.
23967 * configure.in: Adjust.
23968 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23969 useless.
23970 * src/alloca.c: Moved to lib/.
23971 * src/getopt.c: Likewise.
23972 * src/getopt1.c: Likewise.
23973 * src/getopt.h: Likewise.
23974 * src/ansi2knr.c: Likewise.
23975 * src/ansi2knr.1: Likewise.
23976 * src/Makefile.am: Adjust.
23977 * lib/Makefile.am: New file.
23978
9f306f2a
AD
239792000-03-28 Akim Demaille <akim@epita.fr>
23980
23981 * src/getargs.c (usage): Refresh the help message.
23982
0ba347b6
AD
239832000-03-17 Akim Demaille <akim@epita.fr>
23984
23985 * src/getopt1.c: Updated from textutils 2.0e
23986 * src/getopt.c: Likewise.
23987 * src/getopt.h: Likewise.
23988
dbe7f271
AD
239892000-03-17 Akim Demaille <akim@epita.fr>
23990
23991 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23992 the file name, not the whole `#line LINE FILE'.
23993
75bbe78d
AD
239942000-03-17 Akim Demaille <akim@epita.fr>
23995
23996 On syntax errors, report the token on which we choked.
23997
aa5fd0ee
AD
23998 * src/bison.s1 (yyparse): In the label yyerrlab, when
23999 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 24000
7b306f52
AD
240012000-03-17 Akim Demaille <akim@epita.fr>
24002
aa5fd0ee 24003 * src/reader.c (copy_at): New function.
7b306f52
AD
24004 (copy_guard): Use it.
24005 (copy_action): Use it.
24006
e87b5700
AD
240072000-03-17 Akim Demaille <akim@epita.fr>
24008
24009 Be kind to translators, save some useless translations.
24010
aa5fd0ee 24011 * src/main.c (banner): New function.
e87b5700
AD
24012 (fatal_banner): Use it.
24013 (warn_banner): Use it.
24014
ae3c3164
AD
240152000-03-17 Akim Demaille <akim@epita.fr>
24016
aa5fd0ee
AD
24017 * src/reader.c (copy_definition): Use copy_string and
24018 copy_comment. Removed now unused `match', `ended',
24019 `cplus_comment'.
ae3c3164
AD
24020 (copy_comment, copy_string): Moved, to be visible from
24021 copy_definition.
24022
4dc58e7c
AD
240232000-03-17 Akim Demaille <akim@epita.fr>
24024
aa5fd0ee
AD
24025 * src/reader.c (copy_string): Declare `static inline'. No
24026 problems with inline, since it is checked by configure.
4dc58e7c
AD
24027 (copy_comment): Likewise.
24028
0a6384c4
AD
240292000-03-17 Akim Demaille <akim@epita.fr>
24030
aa5fd0ee 24031 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 24032
3cef001a
AD
240332000-03-17 Akim Demaille <akim@epita.fr>
24034
aa5fd0ee 24035 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
24036 (copy_action): Use it. Removed now unused `match', `ended',
24037 `cplus_comment'.
24038 (copy_guard): Likewise.
24039
ca36d2ef
AD
240402000-03-17 Akim Demaille <akim@epita.fr>
24041
aa5fd0ee 24042 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
24043 (copy_action): Use it.
24044 (copy_guard): Likewise.
24045
6666f98f
AD
240462000-03-17 Akim Demaille <akim@epita.fr>
24047
24048 Change the handling of @s so that they behave exactly like $s.
24049 There is now a pseudo variable @$ (readble and writable), location
24050 of the lhs of the rule (by default ranging from the location of
24051 the first symbol of the rhs, to the location of the last symbol,
24052 or, if the rhs is empty, YYLLOC).
24053
24054 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
24055 yyval.
24056 (yyparse): When providing a default semantic action, provide a
24057 default location action.
24058 (after the $): No longer change `*YYLSP', just stack YYLOC the
24059 same way you stack YYVAL.
24060 * src/reader.c (read_declarations): Use warns.
24061 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
24062 (copy_action, case '@'): Likewise.
24063 Use a standard error message, to save useless work from
24064 translators.
24065
41aca2e0
AD
240662000-03-17 Akim Demaille <akim@epita.fr>
24067
aa5fd0ee
AD
24068 * src/bison.s1: Formatting and cosmetics changes.
24069 * src/reader.c: Likewise.
41aca2e0
AD
24070 Update the Copyright notice.
24071
dc08c1d5
AD
240722000-03-17 Akim Demaille <akim@epita.fr>
24073
aa5fd0ee
AD
24074 * src/bison.s1 (#line): All set to `#line' only, since the
24075 Makefile now handles them.
dc08c1d5 24076
9ee3c97b
AD
240772000-03-16 Akim Demaille <akim@epita.fr>
24078
24079 * src/output.c (output_rule_data): Output the documentation of
24080 some of the tables.
24081 (Copyright notice): Update.
24082 Formatting changes.
24083
0de741ca
AD
240842000-03-16 Akim Demaille <akim@epita.fr>
24085
24086 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
24087 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
24088 One `#if YYDEBUG' remains, since it uses variables which are
24089 defined only if `YYDEBUG != 0'.
24090
bb10be54
AD
240912000-03-16 Akim Demaille <akim@epita.fr>
24092
24093 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
24094 and related variables so that the similarities are highlighted.
24095
b07b484a
AD
240962000-03-16 Akim Demaille <akim@epita.fr>
24097
24098 * src/bison.s1: Properly indent CPP directives.
24099
361f60b3
AD
241002000-03-16 Akim Demaille <akim@epita.fr>
24101
24102 * src/bison.s1: Properly indent the `alloca' CPP section.
24103
8c44d3ec
AD
241042000-03-16 Akim Demaille <akim@epita.fr>
24105
24106 Do not hard code values of directories in `configure.in'.
24107 Update the `configure' tool chain.
24108
24109 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
24110 src/makefile.am.
24111 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
24112 (AC_OUTPUT): Add m4/Makefile.
24113 Bump to bison 1.28a, 1.29 has never been released.
24114 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
24115 handled via src/Makefile.am.
24116 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
24117 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
24118 autoheader.
24119 * Makefile.am (SUBDIRS): Add m4.
24120 (ACLOCAL_AM_FLAGS): New variable.
24121 (AUTOMAKE_OPTIONS): Add check-news.
24122 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
24123 the proper line number and file name.
24124 (DEFS): Propagate the location of bison library files and of the
24125 locale files.
24126 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
24127 builddir.
24128 * acinclude.m4: Remove, replaced by the directory m4.
24129 * m4/Makefile.am (EXTRA_DIST): New variable.
24130 * m4/gettext.m4: New file, from the fileutils.
24131 * m4/lcmessage.m4: Likewise
24132 * m4/progtest.m4: Likewise.
24133 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
24134
f95997e7
AD
241352000-03-10 Akim Demaille <akim@epita.fr>
24136
24137 * src/closure.c:
24138 Formatting changes of various comments.
24139 Respect the GNU coding standards at various places.
24140 Don't use `_()' when no translation is needed.
24141
241421999-12-13 Jesse Thilo <jthilo@gnu.org>
24143
24144 * src/files.c:
24145 OS/2 honors TMPDIR environment variable.
24146
241471999-12-13 Jesse Thilo <jthilo@gnu.org>
24148
24149 * doc/bison.texinfo: Tweaked spelling and grammar.
24150 Updated ISBN.
24151 Removed reference to price of printed copy.
24152 Mention BISON_SIMPLE and BISON_HAIRY.
24153
241541999-12-13 Jesse Thilo <jthilo@gnu.org>
24155
24156 * configure.in, NEWS:
24157 Bison 1.29 released.
24158
241591999-10-27 Jesse Thilo <jthilo@gnu.org>
24160
24161 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
24162 Added reference card.
24163
241641999-07-26 Jesse Thilo <jthilo@gnu.org>
24165
24166 * po/ru.po: Added Russian translation.
24167
241681999-07-26 Jesse Thilo <jthilo@gnu.org>
24169
24170 * configure.in: Added Russian translation.
24171
241721999-07-06 Jesse Thilo <jthilo@gnu.org>
24173
24174 * configure.in, NEWS, README:
24175 Released version 1.28.
24176
241771999-06-14 Jesse Thilo <jthilo@gnu.org>
24178
24179 * src/system.h:
24180 Squashed redefinition warning on some systems.
24181
24182 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
24183 Have configure build version string instead of relying on ANSI string
24184 concatentation.
24185
241861999-06-14 Jesse Thilo <jthilo@gnu.org>
24187
24188 * po/POTFILES.in: Got rid of version.c.
24189
241901999-06-14 Jesse Thilo <jthilo@gnu.org>
24191
24192 * acconfig.h, configure.in:
24193 Have configure build version string instead of relying on ANSI string
24194 concatentation.
24195
241961999-06-08 Jesse Thilo <jthilo@gnu.org>
24197
24198 * doc/bison.1:
24199 Dropped mention of `+' for long-named options.
24200
242011999-05-30 Jesse Thilo <jthilo@gnu.org>
24202
24203 * src/files.c: Added <unistd.h> for unlink().
24204
24205 * src/Makefile.am, src/system.h:
24206 I18n fixes.
24207
242081999-05-30 Jesse Thilo <jthilo@gnu.org>
24209
24210 * README: Added a FAQ list.
24211
24212 * configure.in, acconfig.h:
24213 I18n fixes.
24214
242151999-05-30 Jesse Thilo <jthilo@gnu.org>
24216
24217 * doc/FAQ, doc/Makefile.am:
24218 Added a FAQ list.
24219
242201999-05-19 Jesse Thilo <jthilo@gnu.org>
24221
24222 * src/alloc.h, src/symtab.h, src/version.c:
24223 Protected inclusion of "config.h" with HAVE_CONFIG_H.
24224
242251999-04-18 Jesse Thilo <jthilo@gnu.org>
24226
24227 * src/.cvsignore, src/Makefile.am:
24228 Reorganized: sources in `src', documentation in `doc'.
24229
24230 * src/lex.c (literalchar):
24231 fixed the code for escaping double quotes (thanks
24232 Jonathan Czisny.)
24233
242341999-04-18 Jesse Thilo <jthilo@gnu.org>
24235
24236 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
24237 Adjusted paths to reflect directory reorganization.
24238
242391999-04-18 Jesse Thilo <jthilo@gnu.org>
24240
24241 * doc/.cvsignore, doc/Makefile.am:
24242 Reorganized: sources in `src', documentation in `doc'.
24243
242441999-04-18 Jesse Thilo <jthilo@gnu.org>
24245
24246 * configure.in:
24247 Updated AC_INIT file to reflect directory reorganization.
24248
24249 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
24250 Reorganized: sources in `src', documentation in `doc'.
24251
242521999-04-13 Jesse Thilo <jthilo@gnu.org>
24253
24254 * src/allocate.c:
24255 Don't declare calloc() and realloc() if not necessary.
24256
242571999-04-13 Jesse Thilo <jthilo@gnu.org>
24258
24259 * configure.in, acconfig.h, acinclude.m4:
24260 Don't declare calloc() and realloc() if not necessary.
24261
242621999-03-23 Jesse Thilo <jthilo@gnu.org>
24263
24264 * po/.cvsignore: Added i18n support.
24265
242661999-03-23 Jesse Thilo <jthilo@gnu.org>
24267
24268 * acconfig.h, configure.in, Makefile.am:
24269 Added i18n support.
24270
242711999-03-22 Jesse Thilo <jthilo@gnu.org>
24272
24273 * src/bison.s1: Fixed #line numbers.
24274
242751999-03-15 Jesse Thilo <jthilo@gnu.org>
24276
24277 * po/es.po, po/fr.po, po/nl.po, po/de.po:
24278 Added PO files from Translation Project.
24279
242801999-03-03 Jesse Thilo <jthilo@gnu.org>
24281
24282 * Makefile.am:
24283 Added support for non-ANSI compilers (ansi2knr).
24284
242851999-02-16 Jesse Thilo <jthilo@gnu.org>
24286
24287 * configure.in: Bumped version number to 1.27.
24288
24289 * Makefile.am:
24290 Added `bison.simple' to list of files removed by `make distclean'.
24291
242921999-02-12 Jesse Thilo <jthilo@gnu.org>
24293
24294 * src/files.c, src/files.h:
24295 Defined locations of parser files in config.h instead of Makefile.
24296
242971999-02-12 Jesse Thilo <jthilo@gnu.org>
24298
24299 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
24300 Defined locations of parser files in config.h instead of Makefile.
24301
243021999-02-09 Jesse Thilo <jthilo@gnu.org>
24303
24304 * Makefile.am:
24305 Removed inappropriate use of $< macro.
24306
243071999-02-05 Jesse Thilo <jthilo@gnu.org>
24308
24309 * po/Makefile.in.in, po/POTFILES.in:
24310 Add `po' directory skeleton.
24311
243121999-01-27 Jesse Thilo <jthilo@gnu.org>
24313
24314 * README: Document help-bison list.
24315
24316 * configure.in: Add check for mkstemp().
24317
243181999-01-20 Jesse Thilo <jthilo@gnu.org>
24319
24320 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
24321 Hush a few compiler warnings.
24322
24323 * src/files.c:
24324 Add tryclose(), which verifies that fclose was successful.
24325 Hush a couple of compiler warnings.
24326
243271999-01-20 Jesse Thilo <jthilo@gnu.org>
24328
24329 * Makefile.am, OChangeLog:
24330 ChangeLog is now automatically generated. Include the old version as
24331 OChangeLog.
24332
243331999-01-14 Jesse Thilo <jthilo@gnu.org>
24334
24335 * 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:
24336 Update FSF address.
24337
243381999-01-14 Jesse Thilo <jthilo@gnu.org>
24339
24340 * doc/bison.texinfo: Fix formatting glitch.
24341
24342 * doc/bison.texinfo: Update FSF address.
24343
243441999-01-14 Jesse Thilo <jthilo@gnu.org>
24345
24346 * acconfig.h: Update FSF address.
24347
243481999-01-08 Jesse Thilo <jthilo@gnu.org>
24349
24350 * src/system.h:
24351 Don't define PACKAGE here, since config.h defines it.
24352
243531998-12-30 Jesse Thilo <jthilo@gnu.org>
24354
24355 * src/reader.c: Update copyright date.
24356
24357 * src/main.c:
24358 Ditch sprintf to statically-sized buffers in fatal/warn functions in
24359 favor of output directly to stderr (avoids buffer overruns).
24360
24361 * src/reader.c: Some checks for premature EOF.
24362
24363 * 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:
24364 Use prototypes if the compiler understands them.
24365
24366 * src/files.c: Honor TMPDIR on Unix hosts.
24367 Use prototypes if the compiler understands them.
24368
24369 * src/reader.c:
24370 Fix a couple of buffer overrun bugs.
24371 Use prototypes if the compiler understands them.
24372
24373 * src/system.h: Include unistd.h and ctype.h.
24374 Use #ifdef instead of #if for NLS symbols.
24375
243761998-12-30 Jesse Thilo <jthilo@gnu.org>
24377
24378 * doc/bison.texinfo:
24379 Delete comment "consider using @set for edition number, etc..." since
24380 we now are doing so.
24381
243821998-12-30 Jesse Thilo <jthilo@gnu.org>
24383
24384 * configure.in:
24385 Use prototypes if the compiler understands them.
24386
24387 * NEWS: Document 1.26 highlights.
24388
24389 * Makefile.am: Require Automake 1.3 or later.
24390
24391 * acconfig.h:
24392 Use prototypes if the compiler understands them.
24393
243941998-12-29 Jesse Thilo <jthilo@gnu.org>
24395
24396 * src/version.c:
24397 Use VERSION symbol from automake for version number.
24398
243991998-12-29 Jesse Thilo <jthilo@gnu.org>
24400
24401 * acconfig.h, configure.in, version.cin:
24402 Use VERSION symbol from automake for version number.
24403
244041998-11-28 Jesse Thilo <jthilo@gnu.org>
24405
24406 * Makefile.am:
24407 Distribute original version of simple parser (bison.s1), not built
24408 version (bison.simple).
24409
244101998-11-28 Jesse Thilo <jthilo@gnu.org>
24411
24412 * doc/bison.texinfo: Add info dir entry.
24413
24414 * doc/bison.texinfo:
24415 Let automake put version number into documentation.
24416
244171998-11-26 Jesse Thilo <jthilo@gnu.org>
24418
24419 * src/bison.cld, src/build.com, src/vmshlp.mar:
24420 Add non-RCS files from /gd/gnu/bison.
24421
244221998-11-26 Jesse Thilo <jthilo@gnu.org>
24423
24424 * doc/bison.1:
24425 Document the BISON_HAIRY and BISON_SIMPLE variables.
24426
244271998-11-25 Jesse Thilo <jthilo@gnu.org>
24428
24429 * src/version.c: Build version.c automatically.
24430
24431 * src/reader.c:
24432 Fix token numbering (used to start at 258, not 257).
24433
24434 * src/system.h: Include config.h.
24435
24436 * src/getargs.c: Update bug report address.
24437
24438 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
24439 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
24440
244411998-11-25 Jesse Thilo <jthilo@gnu.org>
24442
24443 * Makefile.am:
24444 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24445
24446 * configure.in, version.cin:
24447 Build version.c automatically.
24448
24449 * AUTHORS: Add AUTHORS file.
24450
24451 * README: Update bug report address.
24452
24453 * bison.simple:
24454 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
24455
24456 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
24457 Add automake stuff.
24458
244591998-11-25 Jesse Thilo <jthilo@gnu.org>
24460
24461 * doc/bison.texinfo: Clean up some formatting.
24462
244631998-05-05 Richard Stallman <rms@gnu.org>
24464
24465 * doc/bison.texinfo:
24466 Explain better why to make a pure parser.
24467
244681998-01-05 Richard Stallman <rms@gnu.org>
24469
24470 * src/files.c (openfiles):
24471 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
24472 find a temporary directory, if possible. Do not unlink files while
24473 they are open.
24474
244751997-08-25 Richard Stallman <rms@gnu.org>
24476
24477 * src/reader.c (stack_offset;):
24478 Change some warni to warns.
24479
24480 * src/lex.c (literalchar): Use warns, not warni.
24481
244821997-06-28 Richard Stallman <rms@gnu.org>
24483
24484 * src/bison.s1: Add a Bison version comment.
24485
24486 * src/main.c (fatal, warn, berror):
24487 Use program_name.
24488
244891997-06-28 Richard Stallman <rms@gnu.org>
24490
24491 * Makefile.in (bison_version): New variable.
24492 (dist): Use that variable.
24493 (bison.s1): Substitute the Bison version into bison.simple.
24494
24495 * bison.simple: Add a Bison version comment.
24496
244971997-06-18 Richard Stallman <rms@gnu.org>
24498
24499 * src/main.c (fatal, warn, berror):
24500 Make error messages standard.
24501 (toomany): Improve error message text.
24502
24503 * 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:
24504 new.h renamed to alloc.h.
24505
245061997-06-18 Richard Stallman <rms@gnu.org>
24507
24508 * Makefile.in: new.h renamed to alloc.h.
24509
245101997-05-24 Richard Stallman <rms@gnu.org>
24511
24512 * src/lex.c (literalchar):
24513 Fix the code for escaping \, " and '.
24514
24515 (lex): Avoid trouble when there are many chars
24516 to discard in a char literal with just several chars in it.
24517
245181997-05-17 Richard Stallman <rms@gnu.org>
24519
24520 * src/bison.s1:
24521 Use malloc, if using alloca is troublesome.
24522 (YYSTACK_USE_ALLOCA): New flag macro.
24523 Define it for some systems and compilers.
24524 (YYSTACK_ALLOC): New macro.
24525 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24526 If it was malloc'd, free it.
24527
245281997-05-17 Richard Stallman <rms@gnu.org>
24529
24530 * bison.simple:
24531 Use malloc, if using alloca is troublesome.
24532 (YYSTACK_USE_ALLOCA): New flag macro.
24533 Define it for some systems and compilers.
24534 (YYSTACK_ALLOC): New macro.
24535 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24536 If it was malloc'd, free it.
24537
245381997-04-23 Richard Stallman <rms@gnu.org>
24539
24540 * src/bison.s1:
24541 (alloca) [__hpux]: Always define as __builtin_alloca.
24542
245431997-04-23 Richard Stallman <rms@gnu.org>
24544
24545 * bison.simple:
24546 (alloca) [__hpux]: Always define as __builtin_alloca.
24547
245481997-04-22 Richard Stallman <rms@gnu.org>
24549
24550 * src/bison.s1:
24551 [__hpux]: Include alloca.h (right for HPUX 10)
24552 instead of declaring alloca (right for HPUX 9).
24553
24554 * src/bison.s1 (__yy_memcpy):
24555 Declare arg `count' as unsigned int.
24556 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24557
245581997-04-22 Richard Stallman <rms@gnu.org>
24559
24560 * bison.simple:
24561 [__hpux]: Include alloca.h (right for HPUX 10)
24562 instead of declaring alloca (right for HPUX 9).
24563
24564 * bison.simple (__yy_memcpy):
24565 Declare arg `count' as unsigned int.
24566 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24567
245681997-01-03 Richard Stallman <rms@gnu.org>
24569
24570 * src/allocate.c: [__STDC__ or _MSC_VER]:
24571 Declare calloc and realloc to return void *.
24572
245731997-01-02 Richard Stallman <rms@gnu.org>
24574
24575 * src/system.h:
24576 [_MSC_VER]: Include stdlib.h and process.h.
24577 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
24578
24579 * src/main.c (main): Return FAILURE as a value.
24580 (printable_version): Declare arg as int, not char.
24581
245821997-01-02 Richard Stallman <rms@gnu.org>
24583
24584 * Makefile.in (dist):
24585 Explicitly check for symlinks, and copy them.
24586
245871996-12-19 Richard Stallman <rms@gnu.org>
24588
24589 * src/files.c:
24590 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
24591
245921996-12-18 Paul Eggert <eggert@gnu.org>
24593
24594 * src/bison.s1 (yyparse):
24595 If __GNUC__ and YYPARSE_PARAM are both defined,
24596 declare yyparse to have a void * argument.
24597
245981996-12-18 Paul Eggert <eggert@gnu.org>
24599
24600 * bison.simple (yyparse):
24601 If __GNUC__ and YYPARSE_PARAM are both defined,
24602 declare yyparse to have a void * argument.
24603
246041996-12-17 Richard Stallman <rms@gnu.org>
24605
24606 * src/reduce.c (nbits): Add some casts.
24607
246081996-08-12 Richard Stallman <rms@gnu.org>
24609
24610 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
24611
246121996-08-12 Richard Stallman <rms@gnu.org>
24613
24614 * bison.simple: Test _MSDOS as well as _MSDOS_.
24615
246161996-07-31 Richard Stallman <rms@gnu.org>
24617
24618 * src/bison.s1:
24619 [__sun && __i386]: Include alloca.h.
24620
246211996-07-31 Richard Stallman <rms@gnu.org>
24622
24623 * bison.simple:
24624 [__sun && __i386]: Include alloca.h.
24625
246261996-07-30 Richard Stallman <rms@gnu.org>
24627
24628 * src/bison.s1: Comment change.
24629
24630 * src/bison.s1: Test _MSDOS_, not MSDOS.
24631
246321996-07-30 Richard Stallman <rms@gnu.org>
24633
24634 * bison.simple: Comment change.
24635
24636 * bison.simple: Test _MSDOS_, not MSDOS.
24637
246381996-06-01 Richard Stallman <rms@gnu.org>
24639
24640 * 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:
24641 Insert `_' macro around many string constants.
24642
24643 * src/main.c:
24644 Insert `_' macro around many string constants.
24645
24646 (main): Call setlocale, bindtextdomain and textdomain.
24647
24648 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
24649 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
24650 [ENABLE_NLS]: Include libintl.h.
24651 [ENABLE_NLS] (gettext): Define.
24652 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
24653 (N_, PACKAGE, LOCALEDIR): New macros.
24654
246551996-06-01 Richard Stallman <rms@gnu.org>
24656
24657 * POTFILES.in: New file.
24658
24659 * Makefile.in (allocate.o):
24660 Define target explicitly.
24661
24662 * Makefile.in (CFLAGS): Set to @CFLAGS@.
24663 (LDFLAGS): Set to @LDFLAGS@.
24664 (configure): Run autoconf only if preceding `cd' succeeds.
24665 (bison.s1): Redirect output to temporary file then move the
24666 temporary to the target, rather than redirecting directly to bison.s1.
24667 (clean): Remove config.status and config.log.
24668 (distclean): Don't remove config.status here.
24669
246701996-05-12 Richard Stallman <rms@gnu.org>
24671
24672 * src/bison.s1:
24673 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24674
246751996-05-12 Richard Stallman <rms@gnu.org>
24676
24677 * bison.simple:
24678 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24679
246801996-05-11 Richard Stallman <rms@gnu.org>
24681
24682 * src/bison.s1 (__yy_memcpy):
24683 Really reorder the args, as was supposedly done on Feb 14 1995.
24684 (yyparse): Calls changed accordingly.
24685
246861996-05-11 Richard Stallman <rms@gnu.org>
24687
24688 * Makefile.in (dist): Don't use $(srcdir).
24689
24690 * bison.simple (__yy_memcpy):
24691 Really reorder the args, as was supposedly done on Feb 14 1995.
24692 (yyparse): Calls changed accordingly.
24693
246941996-01-27 Richard Stallman <rms@gnu.org>
24695
24696 * src/output.c (output_rule_data):
24697 Test YYERROR_VERBOSE in the conditional
24698 around the definition of ttyname.
24699
247001995-12-29 Richard Stallman <rms@gnu.org>
24701
24702 * src/bison.s1:
24703 Fix line numbers in #line commands.
24704
247051995-12-29 Richard Stallman <rms@gnu.org>
24706
24707 * bison.simple:
24708 Fix line numbers in #line commands.
24709
247101995-12-27 Richard Stallman <rms@gnu.org>
24711
24712 * src/bison.s1 (YYPARSE_PARAM_DECL):
24713 In C++, make it always null.
24714 (YYPARSE_PARAM_ARG): New macro.
24715 (yyparse): Use YYPARSE_PARAM_ARG.
24716
247171995-12-27 Richard Stallman <rms@gnu.org>
24718
24719 * bison.simple (YYPARSE_PARAM_DECL):
24720 In C++, make it always null.
24721 (YYPARSE_PARAM_ARG): New macro.
24722 (yyparse): Use YYPARSE_PARAM_ARG.
24723
247241995-11-29 Richard Stallman <rms@gnu.org>
24725
24726 * doc/bison.texinfo:
24727 Describe literal string tokens, %raw, %no_lines, %token_table.
24728
247291995-11-29 Daniel Hagerty <hag@gnu.org>
24730
24731 * doc/bison.texinfo: Fixed update date
24732
247331995-10-16 Richard Stallman <rms@gnu.org>
24734
24735 * src/version.c: Version 1.25.
24736
247371995-10-16 Richard Stallman <rms@gnu.org>
24738
24739 * NEWS: *** empty log message ***
24740
247411995-10-16 Richard Stallman <rms@gnu.org>
24742
24743 * doc/bison.1, doc/bison.rnh:
24744 Add new options.
24745
247461995-10-15 Richard Stallman <rms@gnu.org>
24747
24748 * src/vmsgetargs.c, src/getargs.c:
24749 Added -n, -k, and -raw switches.
24750 (noparserflag, toknumflag, rawtoknumflag): New variables.
24751
24752 * src/symtab.h (SALIAS):
24753 New #define for adding aliases to %token.
24754 (struct bucket): Added `alias' field.
24755
24756 * src/reduce.c (reduce_grammar):
24757 Revise error message.
24758 (print_notices): Remove final `.' from error message.
24759
24760 * src/reader.c (reader_output_yylsp):
24761 New function.
24762 (readgram): Use `#if 0' around code that accepted %command
24763 inside grammar rules: The documentation doesn't allow it,
24764 and it will fail since the %command processors scan for the next %.
24765 (parse_token_decl): Extended the %token
24766 declaration to allow a multi-character symbol as an alias.
24767 (parse_thong_decl): New function.
24768 (read_declarations): Added %thong declarations.
24769 (read_declarations): Handle NOOP to deal with allowing
24770 % declarations as another means to specify the flags.
24771 (readgram): Allow %prec prior to semantics embedded in a rule.
24772 (skip_to_char, read_declarations, copy_definition)
24773 (parse_token_decl, parse_start_decl, parse_type_decl)
24774 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
24775 (get_type_name, copy_guard, copy_action, readgram)
24776 (get_type, packsymbols): Revised most error messages.
24777 Changed `fatal' to `warnxxx' to avoid aborting for error.
24778 Revised and use multiple warnxxx functions to avoid using VARARGS1.
24779 (read_declarations): Improve the error message for
24780 an invalid character. Do not abort.
24781 (read_declarations, copy_guard, copy_action): Use
24782 printable_version to avoid unprintable characters in printed output.
24783 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
24784 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
24785 Allow the type of a non-terminal can be given
24786 more than once, as long as all specifications give the same type.
24787
24788 * src/output.c:
24789 (output_headers, output_trailers, output, output_gram)
24790 (output_rule_data): Implement noparserflag variable.
24791 Implement toknumflag variable.
24792 (output): Call reader_output_yylsp to output LTYPESTR.
24793
24794 * src/main.c (main):
24795 If reader sees an error, don't process the grammar.
24796 (fatals): Updated to not use VARARGS1.
24797 (printable_version, int_to_string, warn, warni, warns, warnss)
24798 (warnsss): New error reporting functions. Avoid abort for error.
24799
24800 * src/lex.h:
24801 Added THONG and NOOP for alias processing.
24802 Added SETOPT for the new code that allows setting options with %flags.
24803
24804 * src/lex.c:
24805 Include getopt.h. Add some extern decls.
24806 (safegetc): New function to deal with EOF gracefully.
24807 (literalchar); new function to deal with reading \ escapes.
24808 (lex): Use literalchar.
24809 (lex): Implemented "..." tokens.
24810 (literalchar, lex, parse_percent_token): Made tokenbuffer
24811 always contain the token. This includes growing the token
24812 buffer while reading an integer.
24813 (parse_percent_token): Replaced if-else statement with percent_table.
24814 (parse_percent_token): Added % declarations as another
24815 way to specify the flags -n, -l, and -r. Also added hooks for
24816 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
24817 major changes to files.c.
24818 (lex) Retain in the incoming stream a character following
24819 an incorrect '/'.
24820 (skip_white_space, lex): Revised most error messages
24821 and changed fatal to warn to avoid aborting.
24822 (percent_table): Added %thong declarations.
24823
24824 * src/gram.h: Comment changes.
24825
24826 * src/files.c (openfiles, open_extra_files, done):
24827 Add faction flag
24828 and actfile file. Handle noparserflag. Both for -n switch.
24829
24830 * src/conflicts.c (resolve_sr_conflict):
24831 Remove use of alloca.
24832
248331995-06-01 Jim Meyering <meyering@gnu.org>
24834
24835 * doc/bison.texinfo: *** empty log message ***
24836
248371995-05-06 Richard Stallman <rms@gnu.org>
24838
24839 * src/bison.s1: Comment change.
24840
248411995-05-06 Richard Stallman <rms@gnu.org>
24842
24843 * bison.simple: Comment change.
24844
248451995-05-03 Richard Stallman <rms@gnu.org>
24846
24847 * src/version.c: Version now 1.24.
24848
24849 * src/bison.s1: Change distribution terms.
24850
24851 * src/version.c: Version now 1.23.
24852
248531995-05-03 Richard Stallman <rms@gnu.org>
24854
24855 * doc/bison.texinfo:
24856 Rewrite "Conditions for Using Bison".
24857 Update version to 1.24.
24858
248591995-05-03 Richard Stallman <rms@gnu.org>
24860
24861 * bison.simple: Change distribution terms.
24862
248631995-02-23 Richard Stallman <rms@gnu.org>
24864
24865 * src/files.c: Test __VMS_POSIX as well as VMS.
24866
248671995-02-14 Jim Meyering <meyering@gnu.org>
24868
24869 * src/bison.s1 (__yy_memcpy):
24870 Renamed from __yy_bcopy to avoid
24871 confusion. Reverse FROM and TO arguments to be consistent with
24872 those of memcpy.
24873
248741995-02-14 Jim Meyering <meyering@gnu.org>
24875
24876 * bison.simple (__yy_memcpy):
24877 Renamed from __yy_bcopy to avoid
24878 confusion. Reverse FROM and TO arguments to be consistent with
24879 those of memcpy.
24880
248811994-11-10 David J. MacKenzie <djm@gnu.org>
24882
24883 * NEWS: reformat
24884
24885 * NEWS: New file.
24886
24887 * Makefile.in (DISTFILES): Include NEWS.
24888
24889 * Makefile.in (DISTFILES):
24890 Include install-sh, not install.sh.
24891
24892 * configure.in: Update to Autoconf v2 macro names.
24893
248941994-10-05 David J. MacKenzie <djm@gnu.org>
24895
24896 * Makefile.in: fix typo
24897
24898 * Makefile.in (prefix, exec_prefix):
24899 Let configure set them.
24900
249011994-09-28 David J. MacKenzie <djm@gnu.org>
24902
24903 * Makefile.in: Set datadir to $(prefix)/share.
24904
249051994-09-15 Richard Stallman <rms@gnu.org>
24906
24907 * src/bison.s1:
24908 Update copyright notice and GPL version.
24909
249101994-09-15 Richard Stallman <rms@gnu.org>
24911
24912 * bison.simple:
24913 Update copyright notice and GPL version.
24914
249151994-07-12 Richard Stallman <rms@gnu.org>
24916
24917 * src/reduce.c, src/reader.c:
24918 entered into RCS
24919
249201994-05-05 David J. MacKenzie <djm@gnu.org>
24921
24922 * Makefile.in: entered into RCS
24923
249241994-03-26 Richard Stallman <rms@gnu.org>
24925
24926 * src/bison.s1: entered into RCS
24927
249281994-03-26 Richard Stallman <rms@gnu.org>
24929
24930 * bison.simple: entered into RCS
24931
249321994-03-25 Richard Stallman <rms@gnu.org>
24933
24934 * src/main.c: entered into RCS
24935
249361994-03-24 Richard Stallman <rms@gnu.org>
24937
24938 * src/conflicts.c: entered into RCS
24939
249401994-01-02 Richard Stallman <rms@gnu.org>
24941
24942 * Makefile.in: *** empty log message ***
24943
249441993-11-21 Richard Stallman <rms@gnu.org>
24945
24946 * src/bison.s1: *** empty log message ***
24947
249481993-11-21 Richard Stallman <rms@gnu.org>
24949
24950 * doc/bison.texinfo: entered into RCS
24951
24952 * doc/bison.texinfo: *** empty log message ***
24953
249541993-11-21 Richard Stallman <rms@gnu.org>
24955
24956 * bison.simple: *** empty log message ***
24957
249581993-10-25 David J. MacKenzie <djm@gnu.org>
24959
24960 * doc/bison.texinfo: *** empty log message ***
24961
249621993-10-19 Richard Stallman <rms@gnu.org>
24963
24964 * src/bison.s1: *** empty log message ***
24965
249661993-10-19 Richard Stallman <rms@gnu.org>
24967
24968 * bison.simple: *** empty log message ***
24969
249701993-10-14 Richard Stallman <rms@gnu.org>
24971
24972 * src/bison.s1: *** empty log message ***
24973
249741993-10-14 Richard Stallman <rms@gnu.org>
24975
24976 * bison.simple: *** empty log message ***
24977
249781993-09-14 David J. MacKenzie <djm@gnu.org>
24979
24980 * doc/bison.texinfo: *** empty log message ***
24981
249821993-09-13 Noah Friedman <friedman@gnu.org>
24983
24984 * Makefile.in: *** empty log message ***
24985
249861993-09-10 Richard Stallman <rms@gnu.org>
24987
24988 * src/conflicts.c: *** empty log message ***
24989
24990 * src/system.h: entered into RCS
24991
249921993-09-10 Richard Stallman <rms@gnu.org>
24993
24994 * doc/bison.1: entered into RCS
24995
249961993-09-06 Noah Friedman <friedman@gnu.org>
24997
24998 * src/version.c: entered into RCS
24999
250001993-09-06 Noah Friedman <friedman@gnu.org>
25001
25002 * Makefile.in: *** empty log message ***
25003
250041993-07-30 David J. MacKenzie <djm@gnu.org>
25005
25006 * Makefile.in: *** empty log message ***
25007
250081993-07-24 Richard Stallman <rms@gnu.org>
25009
25010 * src/bison.s1: *** empty log message ***
25011
250121993-07-24 Richard Stallman <rms@gnu.org>
25013
25014 * bison.simple: *** empty log message ***
25015
250161993-07-08 David J. MacKenzie <djm@gnu.org>
25017
25018 * Makefile.in: *** empty log message ***
25019
250201993-07-04 Richard Stallman <rms@gnu.org>
25021
25022 * src/bison.s1: *** empty log message ***
25023
250241993-07-04 Richard Stallman <rms@gnu.org>
25025
25026 * bison.simple: *** empty log message ***
25027
250281993-06-26 David J. MacKenzie <djm@gnu.org>
25029
25030 * src/getargs.c: entered into RCS
25031
250321993-06-26 David J. MacKenzie <djm@gnu.org>
25033
25034 * doc/bison.texinfo: *** empty log message ***
25035
25036 * doc/bison.1: New file.
25037
250381993-06-25 Richard Stallman <rms@gnu.org>
25039
25040 * src/getargs.c: New file.
25041
250421993-06-16 Richard Stallman <rms@gnu.org>
25043
25044 * src/bison.s1: *** empty log message ***
25045
250461993-06-16 Richard Stallman <rms@gnu.org>
25047
25048 * bison.simple: *** empty log message ***
25049
250501993-06-03 Richard Stallman <rms@gnu.org>
25051
25052 * src/bison.s1: New file.
25053
250541993-06-03 Richard Stallman <rms@gnu.org>
25055
25056 * doc/bison.texinfo: *** empty log message ***
25057
250581993-06-03 Richard Stallman <rms@gnu.org>
25059
25060 * bison.simple: New file.
25061
250621993-05-19 Richard Stallman <rms@gnu.org>
25063
25064 * doc/bison.texinfo: New file.
25065
250661993-05-07 Noah Friedman <friedman@gnu.org>
25067
25068 * Makefile.in: *** empty log message ***
25069
250701993-04-28 Noah Friedman <friedman@gnu.org>
25071
25072 * src/reader.c: *** empty log message ***
25073
250741993-04-23 Noah Friedman <friedman@gnu.org>
25075
25076 * src/alloc.h: entered into RCS
25077
250781993-04-20 David J. MacKenzie <djm@gnu.org>
25079
25080 * src/version.c: *** empty log message ***
25081
25082 * src/files.c, src/allocate.c:
25083 entered into RCS
25084
25085 * src/reader.c: *** empty log message ***
25086
25087 * src/lex.c: entered into RCS
25088
25089 * src/conflicts.c: New file.
25090
25091 * src/symtab.c: entered into RCS
25092
25093 * src/alloc.h: New file.
25094
25095 * src/LR0.c: entered into RCS
25096
250971993-04-18 Noah Friedman <friedman@gnu.org>
25098
25099 * src/reader.c: New file.
25100
25101 * src/version.c: *** empty log message ***
25102
251031993-04-18 Noah Friedman <friedman@gnu.org>
25104
25105 * Makefile.in: *** empty log message ***
25106
251071993-04-17 Noah Friedman <friedman@gnu.org>
25108
25109 * Makefile.in: *** empty log message ***
25110
251111993-04-15 Richard Stallman <rms@gnu.org>
25112
25113 * src/main.c, src/files.c:
25114 New file.
25115
251161993-04-15 Noah Friedman <friedman@gnu.org>
25117
25118 * configure.in: entered into RCS
25119
25120 * configure.in: *** empty log message ***
25121
25122 * configure.in: New file.
25123
251241993-04-14 Richard Stallman <rms@gnu.org>
25125
25126 * Makefile.in: New file.
25127
251281993-04-13 Richard Stallman <rms@gnu.org>
25129
25130 * src/version.c: New file.
25131
251321993-03-25 Richard Stallman <rms@gnu.org>
25133
25134 * src/output.c: entered into RCS
25135
251361992-09-25 Richard Stallman <rms@gnu.org>
25137
25138 * configure.bat: entered into RCS
25139
251401992-06-22 Richard Stallman <rms@gnu.org>
25141
25142 * src/vmsgetargs.c: entered into RCS
25143
251441992-06-22 Richard Stallman <rms@gnu.org>
25145
25146 * doc/bison.rnh: entered into RCS
25147
251481992-04-20 David J. MacKenzie <djm@gnu.org>
25149
25150 * README: entered into RCS
25151
251521992-01-22 Richard Stallman <rms@gnu.org>
25153
25154 * src/machine.h: entered into RCS
25155
251561991-12-21 Richard Stallman <rms@gnu.org>
25157
25158 * src/lalr.c, src/closure.c:
25159 entered into RCS
25160
251611991-12-20 Richard Stallman <rms@gnu.org>
25162
25163 * src/state.h: entered into RCS
25164
251651991-12-18 Richard Stallman <rms@gnu.org>
25166
25167 * src/print.c, src/nullable.c, src/derives.c:
25168 entered into RCS
25169
251701991-11-03 David J. MacKenzie <djm@gnu.org>
25171
25172 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
25173 entered into RCS
25174
251751988-09-09 Richard Stallman <rms@gnu.org>
25176
25177 * src/bison.hairy: entered into RCS
25178
251791987-12-16 Richard Stallman <rms@gnu.org>
25180
25181 * REFERENCES: entered into RCS
dc546b0f 25182
f294a2c2 25183
04098407 25184 -----
f294a2c2 25185
e141f4d4
JD
25186 Copyright (C) 1987-1988, 1991-2010 Free Software Foundation,
25187 Inc.
f294a2c2 25188
04098407
PE
25189 Copying and distribution of this file, with or without
25190 modification, are permitted provided the copyright notice and this
25191 notice are preserved.