]> git.saurik.com Git - bison.git/blame - ChangeLog
Fix --enable-gcc-warnings.
[bison.git] / ChangeLog
CommitLineData
2d399888
JD
12009-09-10 Joel E. Denny <jdenny@clemson.edu>
2
3 Fix --enable-gcc-warnings.
4 * src/parse-gram.y (%printer <param>): Handle param_none.
5
ff601366
AD
62009-09-09 Akim Demaille <demaille@gostai.com>
7
8 lalr1.cc: syntax_error as exceptions.
9 It is common to use sort of factories in the user actions. These
10 factories may check some "syntactic" constraints that are not
11 enforced by the grammar itself. This is possible using YYERROR
12 within the action itself. Provide the user with a means to throw
13 a syntax_error exception.
14
15 * data/c++.m4 (b4_public_types_declare, b4_public_types_define):
16 Declare and define yy::parser::syntax_error.
17 * data/lalr1.cc: Include stdexcept.
18 (yy::parser::parse): Wrap the user action within a try/catch.
19 * data/glr.cc: Include stdexcept.
20
29660062
AD
212009-09-09 Akim Demaille <demaille@gostai.com>
22
23 lalr1.cc: add missing "inline".
24 * data/c++.m4 (b4_public_types_define): Add missing inline to
25 implementations provided in headers.
26
2055a44e
AD
272009-09-09 Akim Demaille <demaille@gostai.com>
28
29 %param: documentation.
30 * NEWS (2.6): Document %param, %lex-param, and %parse-param
31 changes.
32 * doc/bison.texinfo: Document that %lex-param and %parse-param
33 are n-ary.
34 Changes some examples to demonstrate it.
35 (Calc++ Parser): Use %param.
36
dd875058
AD
372009-09-09 Akim Demaille <demaille@gostai.com>
38
39 Regen.
40
f71db70b
AD
412009-09-09 Akim Demaille <demaille@gostai.com>
42
43 style changes.
44 * src/parse-gram.y (add_param): Scope changes.
45
eaca4c11
AD
462009-09-09 Akim Demaille <demaille@gostai.com>
47
48 %parse: support several arguments.
49 * src/parse-gram.y (current_param): New.
50 (param_type): Add param_none.
51 (params): New nonterminal.
52 Use it.
53
b18cdd91
AD
542009-09-09 Akim Demaille <demaille@gostai.com>
55
56 Regen.
57
a7706735
AD
582009-09-09 Akim Demaille <demaille@gostai.com>
59
60 %param.
61 Provide a means to factor lex-param and parse-param common
62 declarations.
63
64 * src/parse-gram.y (param_type): New.
65 Define a %printer for it.
66 (add_param): Use it.
67 (%parse-param, %lex-param): Merge into...
68 (%parse): this new token.
69 Adjust the grammar to use it.
70 * src/scan-gram.l (RETURN_VALUE): New.
71 (RETURN_PERCENT_FLAG): Use it.
72 (RETURN_PERCENT_PARAM): New.
73 Use it to support %parse-param, %lex-param and %param.
74
9789acf0
JD
752009-09-03 Joel E. Denny <jdenny@clemson.edu>
76
77 Use aver not assert.
78 * src/output.c: Don't include assert.h.
79 (output_skeleton): Use aver not assert.
80 * src/system.h (aver): In documentation of why, add links to
81 Paul Eggert's explanations in the mailing lists.
82
61bc57e5
AR
832009-09-05 Alex Rozenman <rozenman@gmail.com>
84
85 Use "Unresolved reference" error message when no symbols were found
86 in a symbolic reference resolution. Remove .expr and -expr from
87 the shown reference when the reference is unresolved.
88 * src/scan-code.l: Change the error message, adjust location columns,
89 rename variable "exact_mode" to "explicit_bracketing".
90 * tests/named-ref.at: Adjust existing tests and add a new one.
91
f4c75eaf
AD
922009-09-04 Akim Demaille <demaille@gostai.com>
93
94 Adjust synclines in src/parse-gram.[ch].
95 * tests/bison.in: Do some magic (including working around issues
96 with ylwrap) when this wrapper is used to compile
97 src/parse-gram.y.
98
c6abeab1
JD
992009-09-03 Joel E. Denny <jdenny@clemson.edu>
100
101 Complain about unused %define variables and %code qualifiers.
102 * NEWS (2.5): Document.
103 * data/bison.m4 (b4_check_user_names): Complain instead of warn.
104 * doc/bison.texinfo (Decl Summary): Document complaint, and
105 improve %define documentation a little otherwise.
106 * tests/input.at (Reject unused %code qualifiers): Update.
107 (%define errors): Update.
108 (%define, --define, --force-define): Update.
109 (%define backward compatibility): Update.
110 (Unused %define api.pure): Update.
111 * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
112
82db7cdb
JD
1132009-09-03 Joel E. Denny <jdenny@clemson.edu>
114
115 Don't suppress warnings about unused parse.error.
116 * data/bison.m4 (b4_error_verbose_flag): Don't examine value of
117 %define variable parse.error unless b4_error_verbose_flag is
118 actually expanded in a skeleton.
119
2755de8f
AD
1202009-09-03 Akim Demaille <demaille@gostai.com>
121
122 * NEWS (2.4.2): Add "Internationalization" item.
123
1deef26d
AD
1242009-09-03 Akim Demaille <demaille@gostai.com>
125
126 bootstrap: fix/improve find_tool.
127 * bootstrap (find_tool): Improve error messages.
128 Fix typo about find_tool_names.
129
2646cd54
JD
1302009-08-29 Joel E. Denny <jdenny@clemson.edu>
131
132 Fix gcc 3.4.4 shadowing warning reported by Eric Blake.
133 See
134 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00093.html>.
135 * src/scan-code.h (code_props_rule_action_init): Rename
136 named_ref arg to name so it doesn't shadow named_ref type. This
137 makes it consistent with the function definition in scan-code.l
138 anyway.
139
cf499cff
JD
1402009-08-28 Joel E. Denny <jdenny@clemson.edu>
141
142 %define: accept unquoted values.
143 * NEWS (2.5): Group all %define changes together, and document
144 this one. Remove quotes in IELR and canonical LR entry.
145 * doc/bison.texinfo: Remove quotes in most examples throughout.
146 (Decl Summary): Update %define documentation.
147 (Table of Symbols): Likewise.
148 * src/ielr.c (LrType): Update documentation.
149 * src/parse-gram.y (content.opt): Add production for ID.
150 * tests/actions.at: Remove quotes in most tests.
151 * tests/calc.at: Likewise.
152 * tests/existing.at: Likewise.
153 * tests/input.at: Likewise.
154 * tests/local.at: Likewise.
155 * tests/push.at: Likewise.
156 * tests/reduce.at: Likewise.
157 * tests/torture.at: Likewise.
158
6ba96404
JD
1592009-08-28 Joel E. Denny <jdenny@clemson.edu>
160
161 %define lr.type: make values lowercase IDs.
162 That is, "LALR" => "lalr", "IELR" => "ielr", and
163 "canonical LR" => "canonical-lr".
164 * NEWS (2.5): Update documentation.
165 * doc/bison.texinfo (Decl Summary): Likewise.
166 * src/ielr.c (ielr): Use new values.
167 * src/ielr.h (ielr): Update documentation.
168 * src/reader.c (prepare_percent_define_front_end_variables): Use
169 and validate new values.
170 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): Update test
171 grammars.
172 * tests/reduce.at (AT_TEST_LR_TYPE): Likewise.
173
4413bbd3
EB
1742009-08-27 Eric Blake <ebb9@byu.net>
175
176 scan-gram: avoid portability trap with ctype usage.
177 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
178 Avoid compiler warning.
179
b70c7fb4
JD
1802009-08-27 Joel E. Denny <jdenny@clemson.edu>
181
182 tests: use perl for printing special sequences to files.
183 And skip tests if perl is not available. This is better than
184 playing tricks with shell portability. Suggested by Akim
185 Demaille.
186 * tests/input.at (Bad character literals): Use it here for
187 omitting final newlines.
188 (Bad escapes in literals): Use it here for special characters.
189
d1cc31c5
JD
1902009-08-26 Joel E. Denny <jdenny@clemson.edu>
191
192 tests: show a use of %define lr.default-reductions "consistent"
193 * tests/conflicts.at (%nonassoc and eof): Extend to test that it
194 prevents the omission of expected tokens for %error-verbose.
195
3bed3a75
AD
1962009-08-26 Akim Demaille <demaille@gostai.com>
197
198 tests: portability fix.
199 * tests/input.at (Bad escapes in literals): Don't expect "echo
200 '\0'" to output \ then 0.
201
aa0cb40d
JD
2022009-08-26 Joel E. Denny <jdenny@clemson.edu>
203
204 Actually handle the yytable zero value correctly this time.
205 * data/bison.m4 (b4_integral_parser_tables_map): Don't mention
206 zero values in the YYTABLE comments.
207 * data/glr.c (yytable_value_is_error): Don't check for zero
208 value.
209 * data/lalr1.cc (yy_table_value_is_error_): Likewise.
210 * data/yacc.c (yytable_value_is_error): Likewise.
211 * data/lalr1.java (yy_table_value_is_error_): Likewise.
212 (yysyntax_error): Fix typo in code: use yytable_ not yycheck_.
213 * src/tables.h: In header comments, explain why it's useless to
214 check for a zero value in yytable.
215
f2b30bdf
JD
2162009-08-25 Joel E. Denny <jdenny@clemson.edu>
217
218 More fixes related to last two patches.
219 * data/bison.m4 (b4_integral_parser_tables_map): Fix YYTABLE
220 comments: zero indicates syntax error not default action.
221 * data/c.m4 (b4_table_value_equals): Comment that YYID must be
222 defined.
223 * data/glr.c (yyis_pact_ninf): Rename to...
224 (yypact_value_is_default): ... this.
225 (yyisDefaultedState): Update for rename.
226 (yyis_table_ninf): Rename to...
227 (yytable_value_is_error): ... this, and check for value zero
228 besides just YYTABLE_NINF.
229 (yygetLRActions): Check for default value from yypact. It
230 appears that this check is always performed before this function
231 is invoked, and so adding the check here is probably redundant.
232 However, the code may evolve after this subtlety is forgotten.
233 Also, update for rename to yytable_value_is_error. Because that
234 macro now checks for zero, a different but equivalent branch of
235 the if-then-else here is evaluated.
236 (yyreportSyntaxError): Update for rename to
237 yytable_value_is_error. The zero condition was mishandled
238 before.
239 (yyrecoverSyntaxError): Update for renames. No behavioral
240 changes.
241 * data/lalr1.cc, data/lalr1.java (yy_pact_value_is_default_):
242 New function.
243 (yy_table_value_is_error_): New function.
244 (parse): Use new functions where possible. No behavioral
245 changes.
246 (yysyntax_error_, yysyntax_error): Use yy_table_value_is_error_.
247 The zero condition was mishandled before.
248 * data/yacc.c (yyis_pact_ninf): Rename to...
249 (yypact_value_is_default): ... this.
250 (yyis_table_ninf): Rename to...
251 (yytable_value_is_error): ... this, and check for value zero
252 besides just YYTABLE_NINF.
253 (yysyntax_error): Update for rename to yytable_value_is_error.
254 The zero condition was mishandled before.
255 (yyparse): Update for renames. No behavioral changes.
256 * src/tables.h: Improve comments about yypact, yytable, etc.
257 more. Most importantly, say yytable value of zero means syntax
258 error not default action.
259
53f036ce
JD
2602009-08-25 Joel E. Denny <jdenny@clemson.edu>
261
262 Fix %error-verbose for conflicts resolved by %nonassoc.
263 * NEWS (2.5): Document.
264 * data/glr.c (yyreportSyntaxError): Fix this by checking
265 yyis_table_ninf.
266 * data/yacc.c (yysyntax_error): Likewise.
267 * data/lalr1.cc (yysyntax_error_): Fix this by checking
268 yytable_ninf_.
269 * data/lalr1.java (yysyntax_error): Likewise.
270 * tests/conflicts.at (%nonassoc and eof): Update expected output
271 and remove FIXME.
272
87412882
JD
2732009-08-25 Joel E. Denny <jdenny@clemson.edu>
274
275 Some code and documentation improvements.
276 * data/c.m4 (b4_table_value_equals): New macro to capture
277 some repeated code.
278 * data/glr.c (yyis_pact_ninf): Use it here.
279 (yyis_table_ninf): Likewise.
280 (yyreportSyntaxError): Improve internal comments.
281 * data/yacc.c (yyis_pact_ninf): New macro copied from glr.c.
282 Use it everywhere possible.
283 (yyis_table_ninf): Likewise.
284 (yysyntax_error): Improve internal comments.
285 * data/lalr1.cc (yysyntax_error_): Likewise.
286 * data/lalr1.java (yysyntax_error): Likewise.
287 * src/tables.h: Improve comments about yypact, yytable, etc.
288
e6c849d8
JD
2892009-08-21 Joel E. Denny <jdenny@clemson.edu>
290
291 Use locale when quoting.
292 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER): Use
293 quote rather than implementing quoting here.
294
d8911864
EB
2952009-08-20 Eric Blake <ebb9@byu.net>
296
b0778bdd
EB
297 Make previous patch more robust.
298 * src/output.c (ARRAY_CARDINALITY): New macro, copied from
299 argmatch.h.
300 (output_skeleton): Use it.
301 Suggested by Akim Demaille.
302
d8911864
EB
303 Import latest m4/m4.m4.
304 * submodules/autoconf: Update to autoconf 2.64.
305 * configure.ac (M4_GNU_OPTION): New define.
306 * src/output.c (output_skeleton): Use it to resolve FIXME.
307 * NEWS: Mention this.
308
c2724603
JD
3092009-08-19 Joel E. Denny <jdenny@clemson.edu>
310
311 Fix complaints about escape sequences.
312 Discussed starting at
313 <http://lists.gnu.org/archive/html/bison-patches/2009-08/msg00036.html>.
314 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER):
315 For a \0 and similar escape sequences meaning the null
316 character, report an invalid escape sequence instead of an
317 invalid null character because the latter does not actually
318 appear in the user's input.
319 In all escape sequence complaints, don't escape the initial
320 backslash, and don't quote when the sequence appears at the end
321 of the complaint line unless there's whitespace that quotearg
322 won't escape.
323 Consistently say "invalid" not "unrecognized".
324 Consistently prefer "empty character literal" over "extra
325 characters in character literal" warning for invalid escape
326 sequences; that is, consistently discard those sequences.
327 * tests/input.at (Bad escapes in literals): New.
328
17aed602
AD
3292009-08-19 Akim Demaille <demaille@gostai.com>
330
331 doc: fixes.
332 * doc/bison.texinfo: Fix minor Texinfo errors.
333
9142239a
AD
3342009-08-19 Akim Demaille <demaille@gostai.com>
335
336 tests: distcc compliance.
337 * tests/synclines.at (AT_SYNCLINES_COMPILE): Discard distcc's
338 error messages from the output.
339
171ad99d
AD
3402009-08-19 Akim Demaille <demaille@gostai.com>
341
342 variables: simplify the upgrade of namespace into api.namespace.
343
344 This patch simplifies "variables: rename namespace as
345 api.namespace", commit 67501061076ba46355cfd9f9361c7eed861b389c.
346 Suggested by Joel E. Denny in
347 http://lists.gnu.org/archive/html/bison-patches/2009-07/msg00006.html
348
349 * src/muscle-tab.c (muscle_percent_variable_update): New.
350 (muscle_percent_define_insert): Use it in replacement of the
351 previous tr invocation.
352 Remove variable_tr, no longer needed.
353 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
354 Remove.
355 * data/c++.m4: No longer handle namespace -> api.namespace.
356 * tests/input.at (%define backward compatibility): Check that
357 namespace is treated as api.namespace.
358
d59e456d
AD
3592009-08-19 Akim Demaille <demaille@gostai.com>
360
361 doc: %initial-action to initialize yylloc.
362 Reported by Bill Allombert.
363 * doc/bison.texinfo: Set fill-column to 76.
364 (Location Type): Document the use of %initial-action to initialize
365 yylloc.
366
ceb8b8e6
AD
3672009-08-19 Akim Demaille <demaille@gostai.com>
368
369 lalr1.cc: use state_type.
370 * data/lalr1.cc (yysyntax_error_): Use state_type.
371 Move argument names into yy*.
372
7580c379
AD
3732009-08-19 Akim Demaille <demaille@gostai.com>
374
375 lalr1.cc: get rid of yyparse's yystate.
376 yystate and yystack_[0].state are equal, keep only the latter.
377 The former was also used as a temporary variable to compute the
378 post-reduction state. Move this computation into an auxiliary
379 function.
380
381 * data/glr.c (yyLRgotoState): Fuse variable definition and first
382 assignment.
383 * data/lalr1.cc (yy_lr_goto_state_): New.
384 (yyparse): Use it.
385 Replace remaining uses of yystate by yystate_[0].state.
386 Remove the former.
387
c4dc4c46
AD
3882009-08-19 Akim Demaille <demaille@gostai.com>
389
390 lalr1.cc: destroy $$ when YYERROR is called.
391 * data/lalr1.cc (yyreduce): Compute the resulting state before
392 running the user action so that yylhs is a valid symbol.
393 (yyerrorlab): Since yylhs is complete (it knows its type), we can
394 simply call yy_destroy_ to destroy $$ on YYERROR invocations.
395 * tests/c++.at (AT_CHECK_VARIANTS): Test YYERROR with variants.
396
c67e466f
JD
3972009-08-18 Joel E. Denny <jdenny@clemson.edu>
398
399 maint: update for gnulib's recent update-copyright changes
400 * gnulib: Update.
401 * .x-update-copyright (COPYING): Add as it's no longer implied
402 when .x-update-copyright is present.
403 * cfg.mk (update-copyright-local): Remove, now ignored.
404 (update-copyright): Declare update-b4-copyright as a dependency.
405
af6d2358
AD
4062009-08-17 Akim Demaille <demaille@gostai.com>
407
408 build: require gettext 0.17.
409
410 Suggested by Bruno Haible.
411 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00009.html
412 * configure.ac: require gettext 0.17 to ensure compatibility with
413 gnulib.
414
91a2b9b1
AD
4152009-08-17 Akim Demaille <demaille@gostai.com>
416
417 build: lower gettext requirements.
418
419 Bison was uselessly requiring the formatstring macros from
420 gettext, which resulted in mo files not being installed on systems
421 that perfectly supported Bison mo files. Lower the requirement.
422 http://lists.gnu.org/archive/html/bug-bison/2009-08/msg00006.html
423
b0778bdd
EB
424 * configure.ac: Require need-ngettext instead of
425 need-formatstring-macros.
426 Reported by Martin Jabocs.
427 Suggested by Bruno Haible.
428 * INSTALL: Restructure.
429 (Internationalization): New.
91a2b9b1 430
585935e8
JD
4312009-08-14 Joel E. Denny <jdenny@clemson.edu>
432
433 maint: fix use of copyright year intervals.
434 * gnulib: Update.
435 * bootstrap.conf (gnulib_modules): Update getopt to getopt-gnu
436 as now recommended in gnulib/NEWS.
437 * build-aux/update-b4-copyright: Fix.
438 * cfg.mk (update-copyright-env): Configure update-copyright.
439
83b60c97
JD
4402009-08-13 Joel E. Denny <jdenny@clemson.edu>
441
442 Make it easier to write deterministic tests.
443 Continues Akim's work from his 2009-06-10 commits.
444 * src/reader.c (check_and_convert_grammar): Don't add any
445 symbols after the first symbols_do invocation.
446 * src/symtab.c (symbols_sorted): New static global.
447 (user_token_number_redeclaration): Update comments.
448 (symbol_from_uniqstr): If a new symbol is being created, assert
449 that symbols_sorted hasn't been allocated yet.
450 (symbols_free): Free symbols_sorted.
451 (symbols_cmp, symbols_cmp_qsort): New functions.
452 (symbols_do): Sort symbol_table into symbols_sorted on first
453 invocation.
454 * tests/input.at (Numbered tokens): Recombine tests now that the
455 output should be deterministic across multiple numbers.
456
28169bab
AD
4572009-08-12 Akim Demaille <demaille@gostai.com>
458
459 tests: GCC 4.5 compliance.
460 * tests/synclines.at (AT_SYNCLINES_COMPILE): Adjust to GCC 4.5's
461 messages about #error.
462
9f14e187
AD
4632009-08-12 Akim Demaille <demaille@gostai.com>
464
465 build: fix the generation of the documentation.
466 Some of our targets use "bison --help", but they can't depend on
467 "bison" itself (to avoid additional requirements on the user), so
468 they used to call "make src/bison" in the commands. Then
469 concurrent builds may fail: one make might be aiming one of its
470 jobs at compiling src/bison, and another job at generating the man
471 page. If the latter is faster than the former, then we have two
472 makes that concurrently try to compile src/bison.
473
474 This might also be a more convincing explanation for the failure
475 described in the patch "build: fix paths".
476
477 * Makefile.am (SUFFIXES): Initialize.
478 * build-aux/move-if-change: New, symlink to gnulib's.
479 * build-aux/local.mk: Ship it.
480 * doc/common.x: Remove, merged into...
481 * doc/bison.x: here.
482 * doc/local.mk (doc/bison.help): New.
483 ($(CROSS_OPTIONS_TEXI)): Depend on it.
484 Use src/bison.
485 (.x.1): Replace with...
486 (doc/bison.1): this explicit, simpler, target.
487 (common_dep): Remove, inlined where appropriate.
488 (SUFFIXES, PREPATH): Remove, unused.
489
d1b55e81
AD
4902009-08-12 Akim Demaille <demaille@gostai.com>
491
492 gnulib: improve prefixing.
493 * configure.ac (gl_PREFIXED_LIBOBJS): Don't rename it, rather,
494 change the value of...
495 (gl_LIBOBJS): this.
496 Adjust more variables.
497 * etc/prefix-gnulib-mk (prefix_assignment): Don't rename
498 gl_LIBOBJS.
499 (prefix): Also transform rules whose targets have slashes.
500 Use $prefix liberally.
501 Map @MKDIR_P@ to $(MKDIR_P).
502 Prefix directories that are mkdir'd.
503
838205d5
AD
5042009-08-12 Akim Demaille <demaille@gostai.com>
505
506 build: fix paths.
507 When using $(top_builddir) inconsistently, Make (including GNU
508 Make) is sometimes confused. As a result it may want to build
509 lib/libbison.la and $(top_builddir)/lib/libbison.la (the same
510 file, different names) concurrently, which, amusingly enough,
511 might end with:
512
513 ranlib lib/libbison.a
514 ranlib lib/libbison.a
515 make[2]: *** [lib/libbison.a] Segmentation fault
516
517 on OS X.
518
519 * doc/local.mk, src/local.mk: Do not use $(top_builddir) when not
520 needed.
521
67af7198
AD
5222009-08-12 Akim Demaille <demaille@gostai.com>
523
524 distcheck: fix.
525
b0778bdd 526 * examples/calc++/Makefile.am: (EXTRA_DIST): Ship calc.stamp.
67af7198 527
c467dc42
JD
5282009-08-10 Joel E. Denny <jdenny@clemson.edu>
529
530 * tests/local.mk (TESTSUITE_AT): Add named-refs.at.
531
dfaa4860
JD
5322009-08-10 Joel E. Denny <jdenny@clemson.edu>
533
534 Miscellaneous code readability improvements.
535
536 * src/reader.c (reader): Move %define front-end variable
537 defaults and checking into...
538 (prepare_percent_define_front_end_variables): ... this new
539 function.
540
541 * src/scan-gram.l (INITIAL): For consistency with string
542 literals, don't store open quote on character literal. It's
543 discarded before returning anyway.
544 (SC_ESCAPED_CHARACTER): Similarly, don't store close quote.
545 Make length test more readable, and make the character stored
546 for an empty literal more obvious while consistent with the
547 previous behavior.
548
549 * src/symtab.c, src/symtab.h: Rename USER_NUMBER_ALIAS to
550 USER_NUMBER_HAS_STRING_ALIAS throughout.
551 * src/symtab.c (symbol_make_alias): Remove comment from symtab.c
552 that is repeated in symtab.h. Improve argument names to make it
553 clear which side of the symbol-string alias pair is which.
554 (symbol_check_alias_consistency): Improve local variable names
555 for the same purpose.
556 * src/symtab.h (struct symbol): Make comments about aliases
557 clearer.
558 (symbol_make_alias): Improve comments and argument name.
559 * src/output.c (token_definitions_output): Update for rename to
560 USER_NUMBER_HAS_STRING_ALIAS and improve comments about aliases.
561
ce268795
AR
5622009-08-08 Alex Rozenman <rozenman@gmail.com>
563
564 Convert "misleading reference" messages to warnings.
565 * src/scan-code.l: New function 'show_sub_messages', more
566 factoring.
567 * tests/named-ref.at: Adjust tests.
568
401b73af
JD
5692009-08-06 Joel E. Denny <jdenny@clemson.edu>
570
571 maint: run "make update-copyright"
572
a1a9422d
JD
5732009-08-06 Joel E. Denny <jdenny@clemson.edu>
574
575 maint: make update-b4-copyright easier to use
576 * build-aux/update-b4-copyright: In warnings, report line
577 numbers rather than character positions.
578 * cfg.mk (update-copyright-local): Set to update-b4-copyright so
579 that update-copyright runs it.
580 * gnulib: Update.
581
0b61a8ec
JD
5822009-08-05 Joel E. Denny <jdenny@clemson.edu>
583
584 maint: clean up update-b4-copyright code
585 * build-aux/update-b4-copyright: Do not accept 2-digit
586 UPDATE_COPYRIGHT_YEAR, which was not handled correctly.
587 Don't accept a `[' in a b4_copyright argument.
588 Format code more consistently.
589 Don't assume b4*copyright never occurs.
590
269e222e
JD
5912009-08-04 Joel E. Denny <jdenny@clemson.edu>
592
593 maint: automate b4_copyright updates.
594 * Makefile.am (update-b4-copyright): New target rule.
595 * build-aux/local.mk (EXTRA_DIST): Add update-b4-copyright.
596 * build-aux/update-b4-copyright: New.
597 * data/yacc.c: Remove stray characters around b4_copyright
598 invocations.
599
35905f2b
JD
6002009-08-04 Joel E. Denny <jdenny@clemson.edu>
601
602 maint: automate annual package-wide copyright-year update.
603 * .x-update-copyright: New.
604 * Makefile.am (EXTRA_DIST): Remove maint.mk.
605 * bootstrap.conf (gnulib_modules): Add maintainer-makefile and
606 update-copyright. Remove gnumakefile, which is implied by
607 maintainer-makefile.
608 * cfg.mk (bootstrap-tools): Copy from old maint.mk.
609 * gnulib: Update.
610 * maint.mk: Remove, now copied from gnulib.
611 * examples/extexi: Add missing "(C)" in copyright statement so
612 update-copyright can recognize it.
613 * src/LR0.h: Likewise.
614 * src/print.h: Likewise.
615 * src/print_graph.h: Likewise.
616 * src/gram.c: Add missing comma in copyright statement.
617 * src/gram.h: Likewise.
618
b30e18dc
JD
6192009-08-04 Joel E. Denny <jdenny@clemson.edu>
620
621 Fix "make distcheck".
622 * examples/calc++/Makefile.am: Say $(srcdir)/calc.stamp instead
623 of just calc.stamp.
624
8d90395d
JD
6252009-08-01 Joel E. Denny <jdenny@clemson.edu>
626
627 Pacify "gcc -Wunused" for the input function from Flex.
628 Reported by Alex Rozenman. This warning shows up with gcc-4.3.0
629 and later.
630 * src/scan-code.l: Add "%option noinput", which I cannot find in
631 the Flex manual, but which Flex has supported since at least as
632 far back as 2.5.4. However, if any of our developers still use
633 Flex 2.5.4, they'll need to stop configuring with
634 --enable-gcc-warnings because "%option noinput" didn't work
635 correctly until Flex 2.5.6.
636 * src/scan-gram.l: Likewise.
637 * src/scan-skel.l: Likewise.
638
ba4184ec
AR
6392009-07-31 Alex Rozenman <rozenman@gmail.com>
640
641 Fix --enable-gcc-warnings problems.
642 * src/reader.c: Adjust variable names.
643 * src/scan-code.l: Fix prototypes and adjust names.
644 * src/named-ref.c: Remove redundant "if".
645
91a2af97
JD
6462009-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
647
648 Fix a --enable-gcc-warnings problem.
649 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Actually use length
650 variable.
651
3208e3f4
JD
6522009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
653
654 Warn about character literals not of length one.
655 * NEWS (2.5): Document.
656 * src/scan-gram.l (INITIAL): Remove comment that we don't check
657 the length.
658 (SC_ESCAPED_CHARACTER): Warn if length is wrong.
659 * tests/input.at (Bad character literals): New test group.
660
5add20ab 6612009-07-24 Alex Rozenman <rozenman@gmail.com>
13cdf208
AR
662
663 Fix some memory leaks.
664 * src/named-ref.c: Add a pointer check (named_ref_free).
665 * src/scan-code.l: New function (variant_table_free). Called in
666 code_scanner_free.
667 * src/symlist.c: Call to named_ref_free (symbol_list_free).
668
e459fb0e
JD
6692009-07-24 Joel E. Denny <jdenny@ces.clemson.edu>
670
671 * src/lalr.c (state_lookahead_tokens_count): Correct comment.
672
c4be5517
JD
6732009-07-22 Joel E. Denny <jdenny@ces.clemson.edu>
674
675 Some M4 cleanup in the testsuite.
676 Suggested by Eric Blake at
677 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00083.html>.
678 * tests/existing.at (_AT_TEST_EXISTING_GRAMMAR): Do not
679 complicate the code by distinguishing between a missing value
680 and an empty string value for an optional argument. This fix is
681 allowed by the similar fix in AT_TEST_TABLES_AND_PARSE below.
682 * tests/local.at (_AT_TEST_TABLES_AND_PARSE): Merge into...
683 (AT_TEST_TABLES_AND_PARSE): ... this now that the special
684 arguments are not needed because of the following changes.
685 Fix stale comments.
686 Bison developers should use GNU M4 and should not use
687 POSIXLY_CORRECT when building the test suite, so do not
688 complicate the code by avoiding $10 and above.
689 Do not quote an empty string value for an optional argument, and
690 do not distinguish between a missing value and an empty string
691 value.
692
feeb56cd
JD
6932009-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
694
695 Revert unnecessary column realignment in --help output.
696 Reported by Akim Demaille at
697 <http://lists.gnu.org/archive/html/bison-patches/2009-06/msg00010.html>.
698 * src/getargs.c (usage): Here.
699
5add20ab 7002009-07-04 Alex Rozenman <rozenman@gmail.com>
629e4def
AR
701
702 Alphabetical order in src/local.mk.
703 * src/local.mk: Adjust.
704
5add20ab 7052009-07-04 Alex Rozenman <rozenman@gmail.com>
872b52bc
AR
706
707 Style changes and factoring.
708 * src/named-ref.h: Add comments.
709 * src/parse-gram.y: Readability and style changes.
710 * src/reader.c: Factoring: assign_named_ref function.
711 * src/scan-code.l: Factoring and style changes. Rename
712 parse_named_ref to parse_ref. Use "c-ctype.h" from gnulib.
713 Use "unsigned" type for variant index. Improve readablity.
714 * src/scan-gram.l: Change error messages and add comments.
715 * src/symlist.h: symbol_list_null: New function decl.
716 * src/symlist.c: symbol_list_null: Implement here.
717 * tests/named-refs.at: Adjust for new error messages.
718
83ea2423
EB
7192009-06-29 Eric Blake <ebb9@byu.net>
720
721 scan-code: avoid compiler warnings
722 * src/scan-code.l (parse_named_ref): Use correct specifiers.
723
5ece73ea
AD
7242009-06-29 Akim Demaille <demaille@gostai.com>
725
726 build: avoid concurrent extraction of calc++.
727 * examples/calc++/Makefile.am (calc.stamp): New.
728 Depend on it to create the sources of calc++ so that concurrent
729 builds don't launch several "extexi" in parallel.
730 Not only this is inefficient, this also builds incorrect sources
731 with several extractions mixed together.
732
ad597a78
AD
7332009-06-29 Akim Demaille <demaille@gostai.com>
734
735 parse.error: fix.
736 * data/bison.m4: Move code related to specific variables after the
737 definition of the variable-maintaining macros so that we don't
738 "invoke" b4_percent_define_check_values before it is defined.
739
31b850d2
AD
7402009-06-29 Akim Demaille <demaille@gostai.com>
741
742 variables: parse.error
743
744 Implement, document, and test the replacement of %error-verbose
745 by %define parse.error "verbose".
746 * data/bison.m4 (b4_error_verbose_if): Reimplement to track the
747 values of the parse.error variable.
748 Make "simple" its default value.
749 Check the valid values.
750 * src/parse-gram.y: Use %define parse.error.
751 (PERCENT_ERROR_VERBOSE): New token.
752 Support it.
753 * src/scan-gram.l: Support %error-verbose.
754
755 * doc/bison.texinfo (Decl Summary): Replace the documentation of
756 %define error-verbose by that of %define parse.error.
757 * NEWS: Document it.
758
759 * tests/actions.at, tests/calc.at: Use parse.error instead of
760 %error-verbose.
761
b9f1d9a4
AR
7622009-06-27 Alex Rozenman <rozenman@gmail.com>
763
764 Implement support for named symbol references.
765 * src/parse-gram.y: Add new syntax (named_ref.opt).
766 * src/reader.c: Store named refs in symbol lists.
767 * src/reader.h: New argument for symbol_append and
768 action_append functions.
769 * src/scan-code.h: Add new field (named_ref) into
770 code_props data structure. Keeps named ref of midrule
771 actions.
772 * src/scan-code.l: Support for named refs in semantic
773 action code. New function 'parse_named_ref'.
774 * src/scan-gram.l: Support bracketed id.
775 * src/symlist.c: Store named refs in symbol lists.
776 * src/symlist.h: New field in symbol list: named_ref.
777 * src/named-ref.h: New file, a struct for named_ref.
778 * src/named-ref.cp: New file, named_ref_new function.
779 * src/local.mk: Add two new files.
780 * tests/testsuite.at: Include new test group:
781 * tests/named-refs.at: this new file.
782
b5c212b6
AD
7832009-06-25 Akim Demaille <demaille@gostai.com>
784
785 hash: check insertion for memory exhaustion.
786 * src/uniqstr.c (uniqstr_new): New.
787
67501061
AD
7882009-06-24 Akim Demaille <demaille@gostai.com>
789
790 variables: rename namespace as api.namespace.
791 Discussed in
792 http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00033.html
793
794 * data/bison.m4 (b4_percent_define_copy_, b4_percent_define_copy):
795 New.
796 (b4_percent_define_use): New.
797 Use it where applicable.
798 * data/c++.m4: Replace uses of the variable "namespace" by
799 "api.namespace".
800 Default the latter to the former.
801 * doc/bison.texinfo (Decl Summary): Document "namespace" as
802 obsolete.
803 Document api.namespace.
804 Use @samp to document %define uses, keep @code for identifiers.
805 * NEWS: Likewise.
806 * tests/c++.at, tests/input.at: Test api.namespace instead of
807 namespace. (The tests passed with namespace.)
808
41976786
AD
8092009-06-11 Akim Demaille <demaille@gostai.com>
810
811 style changes.
812 * data/xslt/xml2dot.xsl, data/xslt/xml2xhtml.xsl: Space changes.
813 * src/print-xml.c: Style changes.
814 * tests/conflicts.at: Comment changes.
815
44bb9084
AD
8162009-06-11 Akim Demaille <demaille@gostai.com>
817
818 xml: beware of user strings used to give a %prec to rules.
819 * tests/conflicts.at (%prec with user strings): New.
820 * src/gram.c (grammar_rules_print_xml): Escape the precedence for
821 XML output.
822
04d1e39d
AD
8232009-06-11 Akim Demaille <demaille@gostai.com>
824
825 hash: check insertion for memory exhaustion.
826 * src/muscle-tab.c (muscle_insert, muscle_grow)
827 * src/state.c (state_hash_insert): Check the return value of
828 hash_insert.
829
a8873669
AD
8302009-06-11 Akim Demaille <demaille@gostai.com>
831
832 tests: honor TESTSUITEFLAGS in every check target.
833 * tests/local.mk (RUN_TESTSUITE): New.
834 (check-local, installcheck-local, maintainer-check-g++)
835 (maintainer-check-posix, maintainer-check-valgrind): Use it.
836
8893145a
AD
8372009-06-10 Akim Demaille <demaille@gostai.com>
838
839 deterministic test suite.
840 Some consistency checks on symbols are performed after all the
841 symbols were read, by an iteration over the symbol table. This
842 traversal is nondeterministic, which can be a problem for test
843 cases.
844 Avoid this.
845 Addresses another form of nondeterminism reported by Joel E. Denny.
846 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
847
848 * tests/input.at (Numbered tokens): Split the hexadecimal/decimal
849 test in two.
850 Use different file names for the three tests to make the
851 maintenance easier.
852
92d7a23a
AD
8532009-06-10 Akim Demaille <demaille@gostai.com>
854
855 gnulib: update.
b0778bdd
EB
856 * gnulib: Update to latest.
857 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore,
858 * m4/.gitignore: Regen.
859 * src/symtab.c (symbol_from_uniqstr, semantic_type_from_uniqstr):
860 Call xalloc_die on hash_insert failures.
861 Requested by the new __warn_unused_result__ attribute of
862 hash_insert.
92d7a23a 863
12cf133f
AD
8642009-06-10 Akim Demaille <demaille@gostai.com>
865
866 deterministic user-token-number redeclaration errors.
867 Address nondeterminism reported by Joel E. Denny.
868 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00023.html
869
870 * src/uniqstr.h: Comment changes.
871 * src/location.h (boundary_cmp, location_cmp): New.
872 * src/symtab.c (user_token_number_redeclaration): New.
873 (symbol_translation): Use it.
874 * tests/input.at (Numbered tokens): Adjust the expected output.
875
796a2b0a
AD
8762009-05-25 Akim Demaille <demaille@gostai.com>
877
878 build: avoid ignored errors.
879 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Don't generate ignored
880 errors, they pollute the output.
881
0b6d43c5
JD
8822009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
883
884 Convert multiple variable definition warnings to complaints.
885 * NEWS (2.5): Add a new entry for that change.
886 * doc/bison.texinfo (Decl Summary): Update %define entry.
887 (Bison Options): Update -D/--define/-F/--force-define entry.
888 * src/muscle-tab.c (muscle_percent_define_insert): Implement.
889 * src/muscle-tab.h (muscle_percent_define_insert): Update
890 comments.
891 * tests/input.at (`%define errors'): Update.
892 (`%define, --define, --force-define'): Update.
893
de5ab940
JD
8942009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
895
896 -F/--force-define and relative %define/-D/--define priorities.
897 * NEWS (2.5): Add documentation to -D/--define entry.
898 * build-aux/cross-options.pl: Hard-code association of
899 --force-define with %define.
900 * doc/bison.texinfo (Decl Summary): In %define entry,
901 cross-reference command-line options.
902 (Bison Options): Add documentation to -D/--define entry.
903 (Option Cross Key): Widen column for --force-define row.
904 * src/getargs.c (usage): Document -F/--force-define. Realign
905 options in output.
906 (short_options, long_options, getargs): Parse -F/--force-define,
907 and update muscle_percent_define_insert invocations.
908 * src/muscle-tab.h (muscle_percent_define_how): New enum type.
909 (muscle_percent_define_insert): Add argument with that type.
910 * src/muscle-tab.c (muscle_percent_define_insert): Implement
911 -F/--force-define behavior and priorities.
912 (muscle_percent_define_ensure): Update
913 muscle_percent_define_insert invocation.
914 * src/parse-gram.y (prologue_declaration): Update
915 muscle_percent_define_insert invocations.
916 * tests/input.at (`%define, --define'): Rename to...
917 (`%define, --define, --force-define'): ... this and extend.
918
f8e7258f
JD
9192009-05-22 Joel E. Denny <jdenny@ces.clemson.edu>
920
921 Update some comments to make sense for -D.
922 * data/bison.m4 (b4_check_user_names): In header comments, say
923 "user occurrence" instead of "grammar occurrence".
924 * src/muscle-tab.h (muscle_percent_define_insert): Likewise.
925 (muscle_percent_code_grow): Likewise just for consistency.
926
b987342b
JD
9272009-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
928
929 * data/c++.m4 (b4_namespace_close): Simplify slightly.
930
4977e0a7
JD
9312009-05-19 Joel E. Denny <jdenny@ces.clemson.edu>
932
933 Handle a trailing `:' in a user-supplied C++ namespace better.
934 * data/c++.m4 (b4_namespace_close): Don't let it be printed
935 among the closing braces here. This fix might make the
936 generated code easier to debug, but otherwise it should be
937 insignificant because a trailing `:' is a C++ error already.
938
9b04dad7
AD
9392009-05-19 Akim Demaille <demaille@gostai.com>
940
941 remove useless variable.
942 * src/getargs.c (skeleton_arg): Remove now useless variable.
943 Should help the compiler see that this printf-like call is sane.
944
4c6622c2
AD
9452009-05-15 Akim Demaille <demaille@gostai.com>
946
947 Rename token.prefix as api.tokens.prefix.
948 Discussed here.
949 http://lists.gnu.org/archive/html/bison-patches/2009-05/msg00024.html.
950
951 * NEWS, data/bison.m4, data/c.m4, data/java.m4, doc/bison.texinfo,
952 * tests/c++.at, tests/calc.at, tests/java.at, tests/local.at
953 (token.prefix): Rename as...
954 (api.tokens.prefix): this.
955
3c248d70
AD
9562009-05-11 Akim Demaille <demaille@gostai.com>
957
958 doc: use C++ headers.
959 * doc/bison.texinfo (Calc++ Scanner): Prefer C++ headers to C
960 headers.
961
99c08fb6
AD
9622009-05-11 Akim Demaille <demaille@gostai.com>
963
964 doc: token.prefix
965 * doc/bison.simple (Decl Summary): Document token.prefix.
966 (Calc++ Parser): Various fixes.
967 Formatting changes.
968 Use token.prefix.
969 Introduce a macro TOKEN to shorten the code and make it more
970 readable.
971 (Calc++ Scanner): Adjust.
972 * NEWS (Variable token.prefix): New.
973
84a1cb5a
AD
9742009-05-04 Akim Demaille <demaille@gostai.com>
975
976 bison: catch bad symbol names.
977 * src/scan-gram.l({int}{id}): Report as an invalid identifier.
978 * tests/input.at: Adjust.
979
cdf3f113
AD
9802009-05-04 Akim Demaille <demaille@gostai.com>
981
982 identifiers: dashes are letters.
983 Dashes can now start identifiers (symbols and directives).
84a1cb5a 984
cdf3f113
AD
985 * src/scan-gram.l ({letter}): Add dash.
986 ({id}): Remove it.
987 * tests/input.at (Symbols): Adjust.
988 Remove stray comment.
989 * tests/regression.at (Invalid inputs): Adjust error message.
990 * doc/bison.texinfo (Symbols): Update.
991
98a345a2
JD
9922009-05-01 Joel E. Denny <jdenny@ces.clemson.edu>
993
994 Declare %code to be a permanent feature.
995 * NEWS (2.4.2): Here.
996 * doc/bison.texinfo (Prologue Alternatives): Don't say it's
997 experimental.
998 (Decl Summary): Likewise.
999
67212941
JD
10002009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1001
1002 Convert underscores to dashes in some %define variable names.
1003 For now, just api.push-pull and lr.keep-unreachable-states.
1004 Maintain old names for backward compatibility.
1005 * NEWS (2.5): Document.
1006 * data/c.m4 (b4_identification): Update comment.
1007 * data/yacc.c: Update access.
1008 * doc/bison.texinfo: Update.
1009 * etc/bench.pl.in (bench_push_parser): Update use.
1010 * src/files.c (tr): Move to...
1011 * src/getargs.c, src/getargs.h (tr): ... here because I can't
1012 think of a better place to expose it. My logic is that, for all
1013 uses of tr so far, command-line arguments can be involved, and
1014 getargs.h is already included.
1015 * src/main.c (main): Update access.
1016 * src/muscle_tab.c (muscle_percent_define_insert): Convert old
1017 variable names to new variable names before assigning value.
1018 * src/reader.c (reader): Update setting default.
1019 * tests/calc.at: Update uses.
1020 * tests/conflicts.at (Unreachable States After Conflict
1021 Resolution): Update use.
1022 * tests/input.at (%define enum variables): Update use.
1023 (%define backward compatibility): New test group.
1024 * tests/push.at: Update uses.
1025 * tests/reduce.at: Update uses.
1026 * tests/torture.at: Update uses.
1027
ba5c6d94
JD
10282009-04-30 Joel E. Denny <jdenny@ces.clemson.edu>
1029
1030 Set all front-end %define defaults in one place.
1031 * src/main.c (main): Move lr.keep_unreachable_states default...
1032 * src/reader.c (reader): ... to here.
1033
5bab9d08
JD
10342009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1035
1036 Rename lr.default_reductions to lr.default-reductions.
1037 * NEWS (2.5): Here.
1038 * doc/bison.texinfo: Here.
1039 * src/lalr.c (initialize_LA): Here.
1040 * src/print.c (print_reductions): Here.
1041 * src/reader.c (reader): Here.
1042 * src/tables.c (action_row): Here.
1043 * tests/input.at (%define enum variables): Here.
1044 * tests/reduce.at (AT_TEST_LR_DEFAULT_REDUCTIONS): Here.
1045
d521ee19
JD
10462009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
1047
1048 Pacify ./configure --enable-gcc-warnings.
1049 * tests/input.at (Symbols): Prototype yyerror and yylex.
1050
10512009-04-29 Joel E. Denny <jdenny@ces.clemson.edu>
c9aded4b
JD
1052
1053 Document how `%define "var" "value"' is not M4-friendly.
1054 * src/parse-gram.y (variable): In comments here.
1055
8f0d265e
JD
10562009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1057
1058 Clean up recent patches a little.
1059 Reported by Akim Demaille.
1060 * doc/bison.texinfo (Understanding): Fix typos.
1061 * src/print.c (print_reductions): Don't use negated variable.
1062
f4909773
JD
10632009-04-24 Joel E. Denny <jdenny@ces.clemson.edu>
1064
1065 List accepted values for a %define enum variable with an invalid value.
1066 Suggested by Akim Demaille at
1067 <http://lists.gnu.org/archive/html/bison-patches/2009-04/msg00082.html>.
1068 * data/bison.m4 (_b4_percent_define_check_values): Implement.
1069 * src/muscle-tab.c (muscle_percent_define_check_values): Implement.
1070 * tests/input.at (%define lr.default_reductions invalid values): Merge
1071 into...
1072 (%define enum variables): ... here, and update output.
1073
110ef36a
JD
10742009-04-23 Joel E. Denny <jdenny@ces.clemson.edu>
1075
1076 Rename "default rule" to "default reduction".
1077 This includes changing variable names in code, changing
1078 comments, and renaming %define lr.default_rules to %define
1079 lr.default_reductions.
1080 * NEWS (2.5): Update IELR documentation.
1081 * data/bison.m4 (b4_integral_parser_tables_map): Adjust YYDEFACT
1082 documentation.
1083 * data/glr.c, data/lalr1.java: Sync copyright dates.
1084 * doc/bison.texinfo (Decl Summary): Adjust lr.default_reductions
1085 and lr.type documentation. Make some other wording
1086 improvements.
1087 (Glossary): Adjust cross-references and Default Reduction
1088 definition.
1089 * src/lalr.c (state_lookahead_tokens_count): Adjust code.
1090 Remove a confusing comment pointed out by Akim Demaille.
1091 (initialize_LA): Adjust code.
1092 * src/print-xml.c (print_reductions): Adjust code.
1093 * src/print.c (print_reductions): Adjust code.
1094 * src/reader.c (reader): Adjust code.
1095 * src/tables.c (action_row): Adjust code.
1096 (token_actions): Adjust code.
1097 * src/tables.h: Adjust YYDEFACT documentation.
1098 * tests/input.at (%define lr.default_rules invalid values):
1099 Rename test group to...
1100 (%define lr.default_reductions invalid values): ... this, and
1101 update grammar file and expected output.
1102 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): Rename to...
1103 (AT_TEST_LR_DEFAULT_REDUCTIONS): ... this, and update.
1104
746ee38c
AD
11052009-04-21 Akim Demaille <demaille@gostai.com>
1106
1107 tests: check the use of dashes and periods in symbols.
1108 * tests/input.at (Symbol): New test group.
1109
eb45ef3b
JD
11102009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1111
1112 Document %define lr.type and lr.default_rules.
1113 * NEWS (2.5): Add an entry.
1114 * src/getargs.c (usage): Mention IELR(1) and canonical LR(1)
1115 besides just LALR(1) and GLR(1).
1116 * doc/bison.texinfo (Introduction): Likewise.
1117 (Language and Grammar): Bison is no longer limited to LALR(1)
1118 restrictions.
1119 (GLR parsing): Say deterministic or LR(1) rather than LALR(1)
1120 when trying to distinguish from GLR. Talk about LR(1) grammars
1121 rather than LALR(1) grammars.
1122 (Decl Summary): In %define api.push_pull entry, say it applies
1123 to deterministic parsers in C rather than LALR(1) parsers in C.
1124 Add lr.default_rules entry.
1125 Add lr.type entry.
1126 (Mystery Conflicts): Bison is no longer limited to LALR(1)
1127 restrictions.
1128 (Generalized LR Parsing): Same changes as for the previous GLR
1129 section.
1130 (Memory Management): Say deterministic rather than LALR(1).
1131 (Understanding): Correct some bison output.
1132 Index discussion of "accepting state".
1133 Say deterministic rather than LALR(1).
1134 (Bison Options): In --yacc entry, say deterministic rather than
1135 LALR(1).
1136 In --report, --graph, and --xml entries, just don't mention
1137 LALR(1).
1138 (C++ Parsers): Say deterministic rather than LALR(1).
1139 (Table of Symbols): Likewise in YYSTACK_USE_ALLOCA entry.
1140 (Glossary): Add Accepting State, Consistent State, Default Rule,
1141 and IELR(1) definitions.
1142 In Generalized LR (GLR) definition, make same changes as in
1143 previous GLR sections.
1144 In LALR(1) definition, say Bison uses LALR(1) by default rather
1145 than implying Bison is limited to LALR(1).
1146 (LocalWords): Add IELR.
1147
db34f798
JD
11482009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1149
1150 Finish implementing %define lr.type.
1151 Its value can be "LALR", "IELR", or "canonical LR".
1152 * lib/timevar.def (TV_IELR_PHASE1): New var.
1153 (TV_IELR_PHASE2): New var.
1154 (TV_IELR_PHASE3): New var.
1155 (TV_IELR_PHASE4): New var.
1156 * src/Makefile.am (bison_SOURCES): Add AnnotationList.c,
1157 AnnotationList.h, InadequacyList.c, InadequacyList.h, Sbitset.c,
1158 Sbitset.h, ielr.h, and ielr.c.
1159 * src/getargs.h, src/getargs.c (enum trace, trace_args,
1160 trace_types): Add trace_ielr.
1161 * src/lalr.h, src/lalr.c (ngotos): Export it.
1162 (F): Rename to...
1163 (goto_follows): ... this, update all uses, and export it.
1164 (set_goto_map): Export it.
1165 (map_goto): Export it.
1166 (compute_lookahead_tokens): Don't free goto_follows yet. Now
1167 handled in ielr.
1168 (initialize_LA): Export it. Move lookback allocation to...
1169 (lalr): ... here because, for canonical LR, initialize_LA must
1170 be invoked but lookback and much of the rest of LALR isn't
1171 needed.
1172 * main.c (main): Instead of lalr, invoke ielr, which invokes
1173 lalr.
1174 * src/reader.c (reader): Default lr.type to "LALR".
1175 Default lr.default_rules to "accepting" if lr.type is "canonical
1176 LR". Leave the default as "all" otherwise.
1177 Check for a valid lr.type value.
1178 * src/state.h, src/state.c (struct state_list): Add state_list
1179 member.
1180 (state_new): Initialize state_list member to NULL.
1181 (state_new_isocore): New function, exported.
1182 * tests/existing.at (AT_TEST_EXISTING_GRAMMAR): New macro that
1183 exercises all values of lr.type.
1184 (GNU AWK Grammar): Rename test group to...
1185 (GNU AWK 3.1.0 Grammar): ... this, and extend to use
1186 AT_TEST_EXISTING_GRAMMAR.
1187 (GNU Cim Grammar): Extend to use AT_TEST_EXISTING_GRAMMAR.
1188 (GNU pic Grammar): Rename test group to...
1189 (GNU pic (Groff 1.18.1) Grammar): ... this, and extend to use
1190 AT_TEST_EXISTING_GRAMMAR.
1191 * tests/reduce.at (AT_TEST_LR_TYPE): New macro that exercises
1192 all values of lr.type.
1193 (Single State Split): New test groups using AT_TEST_LR_TYPE.
1194 (Lane Split): Likewise.
1195 (Complex Lane Split): Likewise.
1196 (Split During Added Lookahead Propagation): Likewise.
1197
7fe11bb5
JD
11982009-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
1199
1200 Add new files for IELR and canonical LR implementation.
1201 * src/AnnotationList.c: New.
1202 * src/AnnotationList.h: New.
1203 * src/InadequacyList.c: New.
1204 * src/InadequacyList.h: New.
1205 * src/Sbitset.c: New.
1206 * src/Sbitset.h: New.
1207 * src/ielr.c: New.
1208 * src/ielr.h: New.
1209
7254f6a8
JD
12102009-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
1211
1212 Implement %define lr.default_rules.
1213 Its value describes the states that are permitted to contain
1214 default rules: "all", "consistent", or "accepting".
1215 * src/reader.c (reader): Default lr.default_rules to "all".
1216 Check for a valid lr.default_rules value.
1217 * src/lalr.c (state_lookahead_tokens_count): If lr.default_rules
1218 is "accepting", then only mark the accepting state as
1219 consistent.
1220 (initialize_LA): Tell state_lookahead_tokens_count whether
1221 lr.default_rules is "accepting".
1222 * src/tables.c (action_row): If lr.default_rules is not "all",
1223 then disable default rules in inconsistent states.
1224 * src/print.c (print_reductions): Use this opportunity to
1225 perform some assertions about whether lr.default_rules was
1226 obeyed correctly.
1227 * tests/local.at (AT_TEST_TABLES_AND_PARSE): New macro that
1228 helps with checking the parser tables for a grammar.
1229 * tests/input.at (%define lr.default_rules invalid values): New
1230 test group.
1231 * tests/reduce.at (AT_TEST_LR_DEFAULT_RULES): New macro using
1232 AT_TEST_TABLES_AND_PARSE.
1233 (`no %define lr.default_rules'): New test group generated by
1234 AT_TEST_LR_DEFAULT_RULES.
1235 (`%define lr.default_rules "all"'): Likewise.
1236 (`%define lr.default_rules "consistent"'): Likewise.
1237 (`%define lr.default_rules "accepting"'): Likewise.
1238
72e727f2
AD
12392009-04-20 Akim Demaille <demaille@gostai.com>
1240
1241 Formatting change.
1242
90462b8d
AD
12432009-04-20 Akim Demaille <demaille@gostai.com>
1244
1245 bison: factoring.
1246 * src/output.c (token_definitions_output): Use symbol_id_get
1247 instead of duplicating its logic.
1248 * TODO (YYERRCODE): Extend.
1249
4f646c37
AD
12502009-04-20 Akim Demaille <demaille@gostai.com>
1251
71b00ed8
AD
1252 variables: prefer error-verbose to error_verbose.
1253 * data/bison.m4 (b4_error_verbose_if): Based on error-verbose
1254 instead of error_verbose.
1255 * src/scan-gram.l (%error-verbose): Map to the error-verbose
1256 variable.
1257 * doc/bison.texinfo: Promote %define error-verbose instead of
1258 %error-verbose.
1259 * tests/actions.at: Prefer %define error-verbose to %error-verbose.
1260
12612009-04-15 Akim Demaille <demaille@gostai.com>
1262
4f646c37
AD
1263 variables: accept dashes.
1264 * data/bison.m4 (b4_percent_define_if_define_): Also map dashes to
1265 underscores.
1266 * src/scan-gram.l ({id}): Also accept dashes after the initial
1267 letter.
1268 ({directive}): Use {id}.
1269 * src/parse-gram.y: Comment and formatting changes.
1270 * doc/bison.texinfo (Symbols): Adjust the lexical definitions of
1271 symbols.
1272 * src/complain.h, src/complain.c (yacc_at): New.
1273 * src/symtab.c (symbol_new): Use yacc_at to report inappropriate
1274 symbol names.
1275 * src/output.c (token_definitions_output): Do not #define token
1276 names with dashes.
1277
184e3179
AD
12782009-04-20 Akim Demaille <demaille@gostai.com>
1279
1280 Consistently refer to Yacc, not YACC.
1281 * src/getargs.c (usage, warnings_args): s/YACC/Yacc/.
1282
41253c3a
JD
12832009-04-17 Joel E. Denny <jdenny@ces.clemson.edu>
1284
1285 Pacify make maintainer-check-posix.
1286 * tests/input.at (%define, --define): Move bison command-line
1287 options before grammar file name.
1288
197b82ba
JD
12892009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1290
1291 Document semicolon warnings.
1292 * NEWS (2.5): Here.
1293
0c90a1f5
AD
12942009-04-14 Akim Demaille <demaille@gostai.com>
1295
1296 variables: use `parse.assert' instead of `assert'.
1297 * TODO (assert): Remove.
1298 * data/bison.m4 (b4_assert_if): Replace with...
1299 (b4_parse_assert_if): this.
1300 * data/lalr1.cc, data/variant.hh, tests/c++.at: Adjust.
1301 * doc/bison.texinfo (Decl Summary): Document parse.assert.
1302
fa819509
AD
13032009-04-14 Akim Demaille <demaille@gostai.com>
1304
16dc0d90 1305 variables: use `parse.trace' instead of `debug'.
fa819509
AD
1306 * src/getargs.c (getargs): Map -t to %define trace.parse.
1307 * src/scan-gram.l (%debug): Map to %define trace.parse.
1308 * data/bison.m4 (b4_percent_define_if_define): Map `.' in variable
1309 names to `_' in macro names.
1310 (b4_debug_if): Replace with...
1311 (b4_parse_trace_if): this.
1312 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
1313 * data/yacc.c: Adjust.
1314 * doc/bison.texinfo (Decl Summary): Document %debug as obsoleted.
1315 Use @code to label the variable list.
1316 Document the variable parse.trace.
1317 (Tracing): Promote the parse.trace variable.
1318 * TODO: %printer is not documented.
1319
f7dae1ea
AD
13202009-04-14 Akim Demaille <demaille@gostai.com>
1321
1322 doc: minor fixes.
1323 * doc/bison.texinfo (Decl Summary): Fix entry about %debug.
1324 (Table of Symbols): Remove duplicate entry for %debug.
1325
3535c071
EB
13262009-04-10 Eric Blake <ebb9@byu.net>
1327
1328 submodules: update to latest
1329 * submodules/autoconf: Use latest upstream Autoconf.
1330
cf48f675
EB
13312009-04-06 Eric Blake <ebb9@byu.net>
1332
1333 Work around autoconf 2.63b bug in testsuite.
1334 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Avoid tripping
1335 autoconf bug related to # in test.
1336
50cca368
JD
13372009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1338
1339 * NEWS (2.5): New section. Describe new -D/--define feature.
1340
3583d96b
AD
13412009-04-06 Akim Demaille <demaille@gostai.com>
1342
1343 Regen.
1344 * src/parse-gram.h, src/parse-gram.c: Regen.
1345
00f5d575
AD
13462009-04-06 Akim Demaille <demaille@gostai.com>
1347
1348 rename muscle_tab.* as muscle-tab.* for consistency.
1349 * src/muscle_tab.h, src/muscle_tab.c: Rename as...
1350 * src/muscle-tab.h, src/muscle-tab.c: these.
1351 * src/getargs.c, src/local.mk, src/main.c, src/output.c,
1352 * src/parse-gram.y, src/reader.c, src/scan-code.l: Adjust.
1353
76bf5102
AD
13542009-04-06 Akim Demaille <demaille@gostai.com>
1355
1356 Makefile: introduce $(BISON).
1357 * src/local.mk (BISON): New.
1358 (YACC): Use it.
1359
bc0f5737
AD
13602009-04-06 Akim Demaille <demaille@gostai.com>
1361
1362 parser: handle %locations as %define locations.
1363 * src/getargs.h, src/getargs.c (locations_flag): Remove.
1364 * src/getargs.c, src/scan-code.l: Use muscle_percent_define_ensure
1365 to set "locations" to true.
1366 * src/output.c (prepare): Don't output "locations".
1367 * src/scan-gram.l (%locations): Handle it as a %<flag>.
1368 * src/parse-gram.y: It's no longer a token.
1369 Don't handle it.
1370 * data/bison.m4 (b4_locations_if): Define it with
1371 b4_percent_define_if_define.
1372 * data/c.m4, data/glr.cc: Adjust.
1373
697c912f
AD
13742009-04-06 Akim Demaille <demaille@gostai.com>
1375
1376 Regen.
1377 * src/parse-gram.c: Regen.
1378
4920ae8b
AD
13792009-04-06 Akim Demaille <demaille@gostai.com>
1380
1381 muscle: factor the handling of obsolete of obsolete directives.
1382 Suggested by Joel E. Denny.
50cca368 1383
4920ae8b
AD
1384 * src/muscle_tab.h, src/muscle_tab.c (muscle_percent_define_ensure):
1385 New, extracted from...
1386 * src/parse-gram.y (prologue_declaration: pure-parser): here.
1387 Remove it.
1388 (prologue_declaration: "%<flag>"): Use
1389 muscle_percent_define_ensure.
1390 (%error-verbose, %pure-parser): No longer tokens.
1391 * src/scan-gram.l (pure-parser): Return as a %<flag>.
1392
1d5b3c08
JD
13932009-04-06 Joel E. Denny <jdenny@ces.clemson.edu>
1394
1395 Fix options documentation.
1396 * build-aux/cross-options.pl: As in --help output, write optional
1397 arguments as [=ARG] not =[ARG].
1398 * doc/bison.texinfo (Bison Options): Add -W/--warnings argument.
1399
62c99cf4
JD
14002009-04-04 Joel E. Denny <jdenny@ces.clemson.edu>
1401
1402 Replace BISON_PROG_GNU_M4 with Autoconf's AC_PROG_GNU_M4.
1403 If the first m4 in $PATH is wrong, it keeps looking. Moreover, its
1404 requirements for a correct m4 are stricter.
1405 * m4/m4.m4: Make it a symbolic link to submodules/autoconf/m4/m4.m4.
1406 * configure.ac: Update to use AC_PROG_GNU_M4.
1407 Reported by Eric Blake.
1408
1c93f35b
JD
14092009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1410
1411 Help with updating web manual.
1412 * HACKING: Incorporate instructions from gnulib/doc/README.
1413 * bootstrap.conf (gnulib_modules): Add gendocs.
1414
86cfae0a
AD
14152009-04-03 Akim Demaille <demaille@gostai.com>
1416
1417 Regen.
1418 * src/parse-gram.h, src/parse-gram.c: Regen.
1419
ba061fa6
AD
14202009-04-03 Akim Demaille <demaille@gostai.com>
1421
1422 Factor %FLAG at scan level.
1423 * src/parse-gram.y (PERCENT_DEBUG, PERCENT_ERROR_VERBOSE): Token
1424 definitions and associated rules, replaced by....
1425 (PERCENT_FLAG): this new token type, and rule.
1426 * src/scan-gram.l (RETURN_PERCENT_FLAG): New.
1427 Use it for %debug and %error-verbose.
1428
b19ebeb3
AD
14292009-04-03 Akim Demaille <demaille@gostai.com>
1430
1431 Regen.
1432 * src/parse-gram.h, src/parse-gram.c: Regen.
1433
001a16a9
AD
14342009-04-03 Akim Demaille <demaille@gostai.com>
1435
1436 Treat %debug as %define debug.
1437 * data/bison.m4 (b4_debug_if): New.
1438 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c,
1439 * data/lalr1.java: Use it instead of b4_debug_flag.
1440 * src/getargs.h, src/getargs.c (debug_flag): Remove.
1441 * src/output.c (prepare): Don't output it.
1442 * src/parse-gram.y: Treat %debug as %define debug.
1443
14442009-04-03 Akim Demaille <demaille@gostai.com>
1445
1446 Treat %error-verbose as %define error_verbose.
1447 This allows to pass -Derror_verbose on the command line. Better
1448 yet, it allows to pass -Derror_verbose=$(ERROR_VERBOSE), with
1449 ERROR_VERBOSE being defined as false or true.
1450 * data/bison.m4 (b4_percent_define_if_define): Instead of relying
1451 on b4_percent_define_ifdef, for does not check the defined value,
1452 but only whether the symbol is defined, rely on
1453 b4_percent_define_flag_if, so that a value of "false" is processed
1454 as a false.
1455 If not defined, define the flag to "false".
1456 (b4_error_verbose_if): New.
1457 * data/glr.c, data/lalr1.cc, data/yacc.c: Use it instead of
1458 b4_error_verbose_flag.
1459 * src/getargs.h, src/getargs.c (error_verbose_flag): Remove.
1460 * src/output.c (prepare): Don't output it.
1461 * src/parse-gram.y (%error-verbose): Treat as %define error_verbose.
1462
92822aff
JD
14632009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1464
1465 Fix strange %define locations for default values.
1466 Reported by Akim Demaille at
1467 <http://lists.gnu.org/archive/html/bug-bison/2007-12/msg00001.html>
1468 and discussed again starting at
1469 <http://lists.gnu.org/archive/html/bison-patches/2008-11/msg00102.html>.
1470 * data/bison.m4 (b4_percent_define_default): Leave syncline blank
1471 because location information is bogus.
1472 Use angle brackets to delimit fake file name because square brackets
1473 look like underexpanded m4. Choose a better fake file name.
1474 Use negative line numbers.
1475 * src/muscle_tab.c (muscle_percent_define_default): Likewise.
1476 * src/location.c (location_print): If line for a boundary is negative,
1477 only print that boundary's file name.
1478 * src/location.h: Document that.
1479 * tests/skeletons.at (%define Boolean variables: invalid skeleton
1480 defaults): Update output.
1481
e021191b
JD
14822009-04-03 Joel E. Denny <jdenny@ces.clemson.edu>
1483
1484 Pacify ./configure --enable-gcc-warnings.
1485 * Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS) because many files
1486 in lib won't compile with it.
1487 * src/local.mk (src_bison_CFLAGS): Use $(WERROR_CFLAGS) here only.
1488
78f65418
AD
14892009-03-31 Akim Demaille <demaille@gostai.com>
1490
1491 bootstrap: --help to stdout.
1492 * bootstrap (usage): Don't send --help to stderr.
1493 Use a here doc instead of a long string.
1494
f7e241f4
AD
14952009-03-31 Akim Demaille <demaille@gostai.com>
1496
1497 bootstrap: README-hacking no longer exists
1498 * bootstrap (checkout_only_file): Set to HACKING.
1499
31d3e510
AD
15002009-03-26 Akim Demaille <demaille@gostai.com>
1501
1502 doc: merge HACKING and README-hacking.
1503 Two files is confusing.
1504 Reported by Alexandre Duret-Lutz.
1f9d8248 1505
31d3e510
AD
1506 * README-hacking: Merge into...
1507 * HACKING (Working from the repository): here.
1508
81535bfa
AD
15092009-03-26 Akim Demaille <demaille@gostai.com>
1510
1511 doc: update README-hacking.
1512 * README-hacking: We now use git and git submodules.
1513 Reported by Ralf Wildenhues and Alexandre Duret-Lutz.
1514
56f772e9
AD
15152009-03-26 Akim Demaille <demaille@gostai.com>
1516
1517 lalr1.cc: avoid GCC 4.3 warnings.
1518 GCC 4.3 now warns about "a || b && c" and asks for explicit
1519 parentheses.
1520 Reported by Alexandre Duret-Lutz.
1521 * data/location.cc: Update copyright years.
1522 (Position::operator==): Use parens to make precedence explicit.
1523 Compare lines and columns first, as they are more likely to be
1524 different, and they are faster to compare.
1525
11c073b7
AD
15262009-03-26 Akim Demaille <demaille@gostai.com>
1527
1528 gnulib: update.
1529 * gnulib: Update to latest.
1530 * src/local.mk (AM_CFLAGS): Move to...
1531 * Makefile.am: here.
1532 * etc/prefix-gnulib-mk (prefix_assignment): Also transform
1533 AM_CFLAGS.
1534
91be6b28
AD
15352009-03-02 Akim Demaille <demaille@gostai.com>
1536
1537 Comment changes.
1538
cbf25ce7
AD
15392009-03-02 Akim Demaille <demaille@gostai.com>
1540
1541 Share b4_yytranslate_define.
1542 * data/lalr1.cc (b4_yytranslate_define): Move to...
1543 * data/c++.m4: here.
1544
882f02ed
AD
15452009-03-02 Akim Demaille <demaille@gostai.com>
1546
1547 Use locations in the variant example.
1f9d8248
AD
1548 Yes, this obfuscates the point of this example, variants only.
1549 But glr.cc cannot work (yet?) without locations. This change
1550 makes it easier to use this example with glr.cc.
11c073b7 1551
882f02ed
AD
1552 * examples/variant.yy (assert): %define it.
1553 (locations): Request them.
1554 (yylex): Bind the location to the stage.
1555
0623bacc
AD
15562009-03-02 Akim Demaille <demaille@gostai.com>
1557
1558 Dub make_TOKEN as a public type interface.
1559 * data/c++.m4 (b4_symbol_constructor_declare)
1560 (b4_symbol_constructor_define): New empty stubs.
1561 (b4_public_types_declare, b4_public_types_define): Use them.
1562 * data/lalr1.cc (b4_symbol_constructor_declare)
1563 (b4_symbol_constructor_declare_)
1564 (b4_symbol_constructor_define_, b4_symbol_constructor_define):
1565 Move to...
1566 * data/variant.hh: here.
1567 Remove the "b4_variant_if" parts, as variant.hh is loaded only if
1568 needed.
1569 * data/lalr1.cc: No longer invoke b4_symbol_constructor_define and
1570 b4_symbol_constructor_declare, as it is now done by
1571 b4_public_types_define and b4_public_types_declare.
1572
5f5a90df
AD
15732009-03-02 Akim Demaille <demaille@gostai.com>
1574
1575 Coding style changes.
1576 * data/lalr1.cc (b4_symbol_constructor_declaration_)
1577 (b4_symbol_constructor_declarations)
1578 (b4_symbol_constructor_definition_)
1579 (b4_symbol_constructor_definitions)
1580 (b4_yytranslate_definition): Rename as...
1581 (b4_symbol_constructor_declare_)
1582 (b4_symbol_constructor_declare)
1583 (b4_symbol_constructor_define_)
1584 (b4_symbol_constructor_define)
1585 (b4_yytranslate_define): these.
1586 * data/variant.hh (b4_variant_definition): Rename as...
1587 (b4_variant_define): this.
1588
b47b6ff7
AD
15892009-03-02 Akim Demaille <demaille@gostai.com>
1590
1591 Factor b4_assert_if, b4_lex_symbol_if, and b4_variant_if.
1592 * data/bison.m4 (b4_percent_define_if_define): New.
1593 * data/c++.m4 (b4_variant_if): Move to...
1594 * data/bison.m4: Here, using b4_percent_define_if_define.
1595 * data/lalr1.cc (b4_assert_if, b4_lex_symbol_if): Move to...
1596 * data/bison.m4: Here, using b4_percent_define_if_define.
1597
1d6b689b
AD
15982009-03-02 Akim Demaille <demaille@gostai.com>
1599
1600 Dub symbol_type_base as a public type.
1601 * data/c++.m4 (b4_public_types_declare): Now define
1602 symbol_type_base and symbol_type.
1603 (b4_public_types_define): New.
1604 In both cases, the definitions are taken verbatim from lalr1.cc.
1605 * data/lalr1.cc: Adjust.
1606
4f84717d
AD
16072009-03-02 Akim Demaille <demaille@gostai.com>
1608
1609 b4_public_types_declare.
1610 * data/c++.m4 (b4_public_types_declare): New.
1611 * data/glr.cc, data/lalr1.cc: Use it.
1612
b9e4eb5b
AD
16132009-03-02 Akim Demaille <demaille@gostai.com>
1614
1615 b4_semantic_type_declare.
1616 * data/c++.m4 (b4_semantic_type_declare): New.
1617 Factors and generalizes what was in glr.cc and lalr1.cc.
1618 * data/variant.hh (b4_semantic_type_declare): Redefine it for
1619 variants.
1620 * data/lalr1.cc, data/glr.cc: Use it.
1621
6a6e7f0c
AD
16222009-02-26 Akim Demaille <demaille@gostai.com>
1623
1624 Upgrade gnulib.
1625 * gnulib: Upgrade from master.
1626 * lib/.cvsignore, lib/.gitignore, m4/.cvsignore, m4/.gitignore:
1627 Regen.
1628
e9e61b00
AD
16292009-02-25 Akim Demaille <demaille@gostai.com>
1630
1631 Remove useless arguments.
1632 * data/glr.c (yy_reduce_print): $$ and @$ are not used and not
1633 relevant.
1634
3eead995
AD
16352009-02-25 Akim Demaille <demaille@gostai.com>
1636
1637 Comment changes.
1638 * data/lalr1.cc: here.
1639
87f28efe
AD
16402009-02-25 Akim Demaille <demaille@gostai.com>
1641
1642 Fix glr.cc's debug level handling.
1643 * data/glr.cc (yydebug_): Remove, as it is actually yydebug from
1644 glr.c which is used.
1645 (debug_level, set_debug_level): Adjust.
1646
9be2a009
AD
16472009-02-25 Akim Demaille <demaille@gostai.com>
1648
1649 Copyright years.
1650 * data/glr.c: Add 2007 and 2008 here, consistenly with the comments.
1651
07a6e87d
AD
16522009-02-25 Akim Demaille <demaille@gostai.com>
1653
1654 Style changes.
1655 * etc/bench.pl.in (generate_grammar_list): Consitently use
1656 location_type, not yy::location.
1657
33c78bd2
AD
16582009-02-25 Akim Demaille <demaille@gostai.com>
1659
1660 Comment change.
1661 * data/lalr1.cc: here.
1662
49572920
AD
16632009-02-19 Akim Demaille <demaille@gostai.com>
1664
1665 Make yyparser::error public.
1666 * data/lalr1.cc: here.
1667 There is no good reason to keep it private (and it is convenient
1668 to use it from the scanner for instance). It is already public in
1669 glr.cc.
1670
88654b47
AD
16712009-02-19 Akim Demaille <demaille@gostai.com>
1672
1673 Comment changes.
1674 * data/glr.cc: here.
1675
4524c55b
AD
16762009-02-19 Akim Demaille <demaille@gostai.com>
1677
1678 Remove trailing blanks.
6a6e7f0c
AD
1679 The epilogue has its own ending \n, no need to add another.
1680
4524c55b
AD
1681 * data/glr.c, data/lalr1.java, data/yacc.c: dnl when outputing the
1682 epilogue.
1683 * data/glr.cc: dnl when extending the epilogue.
1684 Remove stray "private:".
1685
6ceccee8
AD
16862009-02-19 Akim Demaille <demaille@gostai.com>
1687
1688 Use b4_c_modern.
1689 * data/c.m4 (b4_c_function_decl): Here.
1690
9c6a8966
AD
16912009-02-19 Akim Demaille <demaille@gostai.com>
1692
1693 Comment changes.
1694 * data/lalr1.cc: here.
1695
507aa0e2
AD
16962009-02-19 Akim Demaille <demaille@gostai.com>
1697
1698 Extract variant.hh
1699 * data/variant.hh: New, extracted from...
1700 * data/lalr1.cc: here.
1701 Adjust.
1702 * data/local.mk: Adjust.
1703
51bacae6
AD
17042009-02-19 Akim Demaille <demaille@gostai.com>
1705
1706 Extract stack.hh from lalr1.cc.
1707 * data/stack.hh: New.
1708 * data/lalr1.cc: Extract from here.
1709 * data/local.mk: Adjust.
1710
06c3084f
JD
17112009-02-03 Joel E. Denny <jdenny@ces.clemson.edu>
1712
1713 Add reminder about uploading public key to keys.gnupg.net.
1714 * HACKING (Release Procedure): Here.
1715
0ea583d2
AD
17162009-01-28 Akim Demaille <demaille@gostai.com>
1717
1718 * NEWS: Update information about 2.4.1 and 2.4.2.
1719
402b123d
AD
17202008-11-04 Akim Demaille <demaille@gostai.com>
1721
1722 Reformat NEWS.
1723 * NEWS: Use more outline-mode markup.
1724 Suggested by Jim Meyering.
1725
74553c98
AD
17262009-01-08 Akim Demaille <demaille@gostai.com>
1727
1728 Fix grep portability issues.
1729 Grep on Solaris does not support -q.
1730 Reported by Summum Bonum.
1731
1732 * NEWS: Add a stub for 2.4.2.
1733 * THANKS: Add Summum Bonum.
1734 * tests/atlocal.in (EGREP): New.
1735 (CC, CXX, XSLTPROC): Make it possible to override them via
1736 envvars.
1737 * tests/java.at: Use $EGREP instead of egrep.
1738 Use AT_CHECK's ignore instead of grep's -q.
1739
84eedf86
AD
17402008-12-11 Akim Demaille <demaille@gostai.com>
1741
1742 Pass the token type to yysyntax_error.
1743 * data/yacc.c (yysyntax_error): Take the transated token instead
1744 of the raw number.
1745 Adjust callers.
1746 * TODO: Update.
1747
5860cc8c
AD
17482008-12-11 Akim Demaille <demaille@gostai.com>
1749
1750 Formatting changes.
1751 * data/glr.c: Formatting changes.
1752
2b008529
AD
17532008-12-11 Akim Demaille <demaille@gostai.com>
1754
1755 Propagate i18n changes into glr.c.
1756 * TODO: Update.
1757 * data/glr.c (yyreportSyntaxError): Use "switch" instead of
1758 building the error message format dynamically.
1759 * data/lalr1.java: Formatting changes.
1760
2cd1af95
AD
17612008-12-11 Akim Demaille <demaille@gostai.com>
1762
1763 Use testsuite -C.
1764 * tests/local.mk: Replace "cd && testsuite" by "testsuite -C".
1765 Solves problems when top_srcdir is an absolute path.
1766 Suggested by Eric Blake.
1767 * configure.ac: Require Autoconf 2.62.
1768
eeb29422
AD
17692008-12-11 Akim Demaille <demaille@gostai.com>
1770
1771 Simplify the i18n of the error messages.
1772 * data/lalr1.cc: Comment changes.
1773 * data/yacc.c (yysyntax_error): Rewrite, using a switch as in
1774 lalr1.cc instead of building dynamically the format string.
1775
6617622c
AD
17762008-12-08 Akim Demaille <demaille@gostai.com>
1777
1778 Fix portability issue in the test suite.
1779 * tests/local.at (AT_MATCHES_CHECK): New.
1780 Based on Perl instead of Sed. Sed has too many portability
1781 pitfalls, not ever Sed is GNU Sed.
1782 * tests/actions.at (Fix user actions without a trailing semicolon):
1783 Use it.
1784
2ca1136c
AD
17852008-12-08 Akim Demaille <demaille@gostai.com>
1786
1787 Update data/README.
1788 * data/README: Document glr.cc, lalr1.java, m4sugar and xslt.
1789
6c63b895
AD
17902008-12-08 Akim Demaille <demaille@gostai.com>
1791
1792 Install autoconf as a submodule to get m4sugar.
1793 * .gitmodules: Add submodules/autoconf.
1794 * data/m4sugar/foreach.m4, data/m4sugar/m4sugar.m4: Now links into
1795 submodules/autoconf.
1796
417e31d2
AD
17972008-12-08 Akim Demaille <demaille@gostai.com>
1798
1799 Test token.prefix in all the skeletons.
1800 * data/java.m4 (b4_token_enum): Use the token.prefix.
1801 * tests/local.at (AT_BISON_OPTION_PUSHDEFS): Define AT_TOKEN_PREFIX.
1802 * tests/calc.at (_AT_DATA_CALC_Y): Use it.
1803 Add checks for yacc.c, glr.c, lalr1.cc and glr.cc.
1804 * tests/java.at: Comment changes.
1805 (AT_CHECK_JAVA_MINIMAL): Define the END token.
1806 (Java parser class and package names): Add token.prefix check.
1807
97abf544
AD
18082008-12-08 Akim Demaille <demaille@gostai.com>
1809
1810 Fix regeneration of atconfig.
1811 * tests/local.mk (tests/atconfig): The rule was incorrect, but
1812 remove it: now that there is no tests/Makefile.am, the top-level
1813 Makefile properly updates atconfig when needed.
1814
e8cd1ad6
DJ
18152008-12-07 Di-an Jan <dianj@freeshell.org>
1816
1817 Implement the FIXME that ends an user action with a semicolon
1818 if it seems necessary.
1819 * src/scan-code.l (flex rules section): Flag cpp directive from
1820 any `#' to the first unescaped end-of-line. Semicolon is not
1821 needed after `;', `{', '}', or cpp directives and is needed after
1822 any other token (whitespaces and comments have no effect).
1823 * tests/actions.at (Fix user actions without a trailing semicolon):
1824 New test.
1825 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add semicolons to
1826 to make user actions complete statements.
1827 Adjust column numbers in error messages.
1828 * tests/regression.at (Fix user actions without a trailing semicolon):
1829 Remove. Covered by new test.
1830
ce9447fc
AD
18312008-12-07 Akim Demaille <demaille@gostai.com>
1832
1833 Update gnulib.
1834 * gnulib: Update from master.
1835
d333175f
EB
18362008-12-05 Eric Blake <ebb9@byu.net>
1837
1838 Avoid compiler warning.
1839 * src/output.c (muscle_insert_item_number_table): Delete unused
1840 function.
1841
215b40ac
EB
18422008-12-02 Eric Blake <ebb9@byu.net>
1843
1844 Build testsuite with newer autoconf.
1845 * tests/output.at (m4_expand): Don't override in newer autoconf,
1846 where the underlying implementation changed.
1847 * tests/cxx-type.at (_AT_RESOLVED_GLR_OUTPUT)
1848 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT)
1849 (_AT_AMBIG_GLR_OUTPUT_WITH_LOC, _AT_GLR_STDERR)
1850 (_AT_VERBOSE_GLR_STDERR): Expand to double-quoted strings,
1851 since some of them contain unbalanced ')'.
1852
3bb21113
AD
18532008-12-01 Akim Demaille <demaille@gostai.com>
1854
1855 Use b4_symbol for printers and destructors everywhere.
1856 * data/bison.m4 (b4_symbol_action_location): New.
1857 * data/c.m4 (b4_symbol_actions): Remove.
1858 Adjust all callers to use by b4_symbol_foreach and the corresponding
1859 b4_symbol_printer/destructor macro.
1860 * data/glr.cc: Adjust.
1861 * data/lalr1.java: Adjust the %destructor sanity check.
1862 * src/output.c (symbol_code_props_output): Remove, we no longer
1863 need the b4_symbol_printers/destructors tables.
1864
fb7c5b1f
AD
18652008-12-01 Akim Demaille <demaille@gostai.com>
1866
1867 Use b4_symbol_case_.
1868 * data/lalr1.cc, data/bison.m4 (b4_symbol_action): Use
1869 b4_symbol_case_.
1870
cf6fb222
AD
18712008-12-01 Akim Demaille <demaille@gostai.com>
1872
1873 Move b4_symbol based macro to bison.m4.
1874 * data/lalr1.cc (b4_symbol_, b4_symbol, b4_symbol_if)
1875 (b4_symbol_action, b4_symbol_destructor, b4_symbol_printer)
1876 (b4_symbol_case_, b4_symbol_foreach, b4_type_action_)
1877 (b4_type_foreach): Move to...
1878 * data/bison.m4: Here.
1879 * data/lalr1.cc (b4_symbol_action): Specialize for C++: use
1880 b4_symbol_value_template instead of b4_symbol_value.
cf6fb222 1881
e3c52a63
AD
18822008-12-01 Akim Demaille <demaille@gostai.com>
1883
1884 b4_symbol/type_foreach.
1885 * data/lalr1.cc (b4_symbol_foreach, b4_type_foreach): New.
1886 Use them.
1887
2bde9113
AD
18882008-12-01 Akim Demaille <demaille@gostai.com>
1889
1890 Use the symbol properties to output the printer/destructor for lalr1.cc.
30c10faf
AD
1891 Instead of defining complex list of tuples to define various
1892 properties of the symbols, we now prefer to define symbols as
1893 "structs" in m4: using the symbol key (its number), and the
1894 property name, b4_symbol gives it value. Use this to handle
1895 destructors and printers.
1896
2bde9113
AD
1897 * src/output.c (CODE_PROP): New.
1898 (prepare_symbol_definitions): Use it to define the printer and
1899 destructor related attributes of the symbols.
1900 * data/lalr1.cc (b4_symbol_actions): Rename as...
1901 (b4_symbol_action): this.
1902 Use b4_symbol instead of 6 arguments.
1903 (b4_symbol_printer, b4_symbol_destructor): New.
1904 Use them instead of b4_symbol_actions.
1905
44494bf6
AD
19062008-12-01 Akim Demaille <demaille@gostai.com>
1907
1908 Avoid capturing variables too easily.
1909 * src/muscle_tab.h (MUSCLE_INSERT_BOOL, MUSCLE_OBSTACK_SGROW): Use
1910 v__ and p__ instead of v and p.
1911
fad814bd
AD
19122008-12-01 Akim Demaille <demaille@gostai.com>
1913
1914 Remove spurious empty line before syncline.
1915 * data/bison.m4 (b4_syncline): Don't output an empty line before
1916 the output.
1917
feda5527
AD
19182008-11-26 Akim Demaille <demaille@gostai.com>
1919
1920 Convert lib/Makefile.am into lib/local.mk.
1921 The real problem is rather gnulib.mk, which itself is extracted
1922 from a Makefile.am that gnulib expects to the "recursive". The
1923 tool prefix-gnulib-mk converts such a gnulib.mk to be
1924 non-recursive. Also, some AC_SUBST variables need to be adjusted.
1925
1926 * etc/prefix-gnulib-mk: New.
1927 * bootstrap (slurp): Use it to convert further gnulib.mk.
1928 No longer try to avoid re-creation of lib/gnulib.mk as the changes
1929 are deeper.
1930 * lib/Makefile.am: Rename as...
1931 * lib/local.mk: this.
1932 Adjust to be prefixed.
1933 * Makefile.am, configure.ac: Adjust.
1934 * src/local.mk (AM_CPPFLAGS): Extend it, don't define it.
1935
56ddee7f
AD
19362008-11-26 Akim Demaille <demaille@gostai.com>
1937
1938 s/_FLAGS/FLAGS/.
1939 * tests/local.mk (TESTSUITE_FLAGS, AUTOTEST_FLAGS): Rename as...
1940 (TESTSUITEFLAGS, AUTOTESTFLAGS): these to compy with the GCS.
1941 Reported by Eric Blake.
1942
728e89a0
AD
19432008-11-26 Akim Demaille <demaille@gostai.com>
1944
1945 Use b4_parser_tables_define in glr.cc.
1946 * data/glr.c: Use b4_parser_tables_define instead of defining the
1947 (deterministic integral) tables by hand.
1948
2c1bf9bd
AD
19492008-11-26 Akim Demaille <demaille@gostai.com>
1950
1951 Use b4_parser_tables_define in Java.
1952 * data/java.m4 (b4_typed_parser_table): Rename as...
1953 (b4_typed_parser_table_define): this, for consistency.
1954 Accept a comment as $4.
1955 Move $2 into yy*_.
1956 (b4_integral_parser_table): Rename as...
1957 (b4_integral_parser_table_define): this.
1958 * data/lalr1.java: Adjust all uses.
1959 Use b4_parser_tables_define instead of generation by hand.
1960
ba206cf4
AD
19612008-11-26 Akim Demaille <demaille@gostai.com>
1962
1963 Prepare the convergence bw C style and Java table generation.
1964 * data/bison.m4 (b4_tables_map, b4_tables_declare)
1965 (b4_tables_define): Rename as...
1966 (b4_integral_parser_tables_map, b4_parser_tables_declare)
1967 (b4_parser_tables_define): these.
1968 * data/c.m4 (b4_table_define): Rename as...
1969 (b4_integral_parser_table_define): this.
1970 * data/lalr1.cc: Adjust.
1971 (b4_table_define, b4_table_declare): Rename as...
1972 (b4_integral_parser_table_define)
1973 (b4_integral_parser_table_declare): these.
1974 (yyrline_): Move the comment where it is actually used.
1975 * data/yacc.c: Adjust.
1976 (yyrline): Use b4_integral_parser_table_define.
1977
d12f8e49
AD
19782008-11-26 Akim Demaille <demaille@gostai.com>
1979
1980 Regen.
1981 * src/parse-gram.h, src/parse-gram.c: Regen.
1982
0991e29b
AD
19832008-11-26 Akim Demaille <demaille@gostai.com>
1984
1985 Factor the generation of the (integral) tables bw yacc.c and lalr1.cc.
1986 * data/lalr1.cc (b4_tables_map): Move to...
1987 * data/bison.m4: here.
1988 Update the comment for yytable during the flight.
1989 (b4_tables_declare, b4_tables_define): New.
1990 * data/lalr1.cc: Use them.
1991 * data/c.m4 (b4_table_define): New.
1992 * data/yacc.c: Use b4_tables_define instead of output the tables
1993 by hand.
1994 * tests/regression.at (Web2c Actions): Adjust the expected output,
1995 the order of the tables changed.
1996
3d3bc1fe
AD
19972008-11-26 Akim Demaille <demaille@gostai.com>
1998
1999 Get rid of (yy)rhs and (yy)prhs.
2000 These tables are no longer needed in the parsers, and they don't seem to
2001 be useful. They are not documented either.
feda5527 2002
3d3bc1fe
AD
2003 * src/output.c (prepare_rules): Get rid of rhs and prhs.
2004 Adjust the computation of (yy)r2.
2005
08c81469
AD
20062008-11-26 Akim Demaille <demaille@gostai.com>
2007
2008 Rule length is unsigned.
2009 * src/gram.h, src/gram.c (rule_rhs_length): Return a size_t.
2010
932b0c96
AD
20112008-11-26 Akim Demaille <demaille@gostai.com>
2012
2013 Get rid of lalr1-split.cc.
2014 It was no longer maintainer.
feda5527 2015
932b0c96
AD
2016 * data/lalr1-split.cc: Remove.
2017 * etc/bench.pl.in (bench_fusion_parser): Remove.
2018 Adjust.
2019
8452c667
AD
20202008-11-26 Akim Demaille <demaille@gostai.com>
2021
2022 Use yy* consistently.
2023 * data/glr.c: Now that yyrhs no longer exists as a global
2024 variable, rename local "rhs" variables into "yyrhs" for
2025 consistency.
2026
783aa653
AD
20272008-11-25 Akim Demaille <demaille@gostai.com>
2028
2029 Get rid of yyrhs and yyprhs in glr.c.
2030 * data/glr.c (yyrhs, yyprhs): Remove.
2031 Instead, use the state stack and yystos.
2032
6130b755
AD
20332008-11-25 Akim Demaille <demaille@gostai.com>
2034
2035 Flag glr tests.
2036 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): If glr, declare it
2037 as an Autotest keyword.
2038
95a7b1c9
AD
20392008-11-25 Akim Demaille <demaille@gostai.com>
2040
2041 Prefer TESTSUITE_FLAGS.
2042 TESTSUITEFLAGS is barely readable.
feda5527 2043
95a7b1c9
AD
2044 * tests/local.mk (TESTSUITE_FLAGS): Default to $(TESTSUITEFLAGS)
2045 for backward compatibility.
2046 Use the former instead of the latter.
2047
b4f18401
AD
20482008-11-25 Akim Demaille <demaille@gostai.com>
2049
2050 Get rid of yyrhs and yyprhs in larl1.java.
2051 * data/lalr1.java (yyrhs_, yyprhs_): Remove.
2052 (yy_reduce_print): Rather, use yystos_ and the state stack.
2053
c265fd6b
AD
20542008-11-25 Akim Demaille <demaille@gostai.com>
2055
2056 Formatting changes.
2057
68dbdee8
AD
20582008-11-25 Akim Demaille <demaille@gostai.com>
2059
2060 Get rid of yyrhs and yyprhs in yacc.c.
30c10faf
AD
2061 They were used to get the symbol types, given a rule number, when
2062 displaying the top of the stack before a reduction. But the
2063 symbol type is available from the state stack. This has two be
2064 benefits: two tables less in the parser (making it smaller), and a
2065 more consistent use of the three stacks which will help to fuse
2066 them.
feda5527 2067
68dbdee8
AD
2068 * data/yacc.c (yyprhs, yyrhs): Remove.
2069 (YY_REDUCE_PRINT): Pass yyssp to yy_reduce_print.
2070 (yy_reduce_print): Take yyssp as argument.
2071 Use it, together with yystos, to get the symbol type.
2072 * tests/regression.at (Web2c Report): Remove these tables from the
2073 expected output.
2074
6ab1adbe
AD
20752008-11-25 Akim Demaille <demaille@gostai.com>
2076
2077 b4_tables_map.
2078 The point is to factor the generation of the tables across skeletons.
2079 This is language dependant.
feda5527 2080
6ab1adbe
AD
2081 * data/c.m4 (b4_comment_): New.
2082 Should be usable to define how to generate tables independently of
2083 the language.
2084 (b4_c_comment): New.
2085 (b4_comment): Bounce to b4_c_comment.
2086 Now support $2 = [PREFIX] for indentation.
2087 * data/lalr1.cc (b4_table_declare): Don't output a comment if
2088 there is no comment.
2089 Indent it properly when there is one.
2090 Output the ending semicolon.
2091 (b4_table_define): Space changes.
2092 Output the ending semicolon.
2093 (b4_tables_map): New.
2094 Use it twice instead of declaring and defining the (integral)
2095 tables by hand.
2096
0fddb3d5
AD
20972008-11-25 Akim Demaille <demaille@gostai.com>
2098
2099 b4_table_declare.
2100 * data/lalr1.cc (b4_table_declare): New.
2101 Use it to declare the tables defined with b4_table_define.
2102 (b4_table_define): Declare a third arg to match b4_table_declare
2103 signature.
2104 Move all the comments around invocations of b4_table_define into
2105 the invocations itselves.
2106 Move things around to have the order for declarations and
2107 definitions.
2108
c4ddc0fb
AD
21092008-11-25 Akim Demaille <demaille@gostai.com>
2110
2111 Formatting changes.
2112 * data/lalr1.java: here.
2113
e0c653e7
AD
21142008-11-25 Akim Demaille <demaille@gostai.com>
2115
2116 b4_args is more general than only C++.
2117 * data/lalr1.cc (b4_args, _b4_args): Move to...
2118 * data/bison.m4: here.
2119
4182a0a1
DJ
21202008-11-21 Di-an Jan <dianj@freeshell.org>
2121
2122 Implement no-XXX arguments for --warnings, --report, --trace.
2123 * src/getargs.c (flags_argmatch): Handles no-XXX.
2124 Fix typo in doxygen comment.
2125
01466c3e
AD
21262008-11-21 Akim Demaille <demaille@gostai.com>
2127
2128 Display the changes in cross-options.texi.
2129 * build-aux/cross-options.pl ($sep): New, to separate items.
2130 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): Use diff to display the
2131 changes.
2132
a7c09cba
DJ
21332008-11-20 Di-an Jan <dianj@freeshell.org>
2134
2135 Improves options in the manual.
2136 * doc/bison.texinfo (-g, -x): Add space before argument.
2137 (Option Cross Key): Implement FIXME: listing directives also.
2138 * build-aux/cross-options.pl: Read from <STDIN> rather than <>.
2139 (Short Option): Special case -d. Put arguments inside @option.
feda5527 2140 (Bison Directive): Add column, automatically extracted from
a7c09cba
DJ
2141 src/scan-gram.l (actual name passed as the first argument)
2142 with special case for %define.
2143 * doc/local.mk (doc/cross-options.texi): Pass src/scan-gram.l
2144 to build-aux/cross-options.pl.
2145 * src/getargs.c (usage): Document limitations of cross-options.pl.
2146 * src/scan-gram.l: Likewise.
2147
6c88b51e
JD
21482008-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
2149
2150 Fix unexpanded macros in GLR defines file.
2151 Reported by Csaba Raduly at
2152 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00048.html>.
2153 * THANKS (Csaba Raduly): Add.
2154 * data/glr.c: Fix overquoting on b4_prefix for yylval and yylloc.
2155 * tests/calc.at (_AT_DATA_CALC_Y): If %defines is specified, generate
2156 lexer in a separate module that includes the defines file.
2157 (AT_CHECK_CALC): From AT_FULL_COMPILE, request compilation of lexer
2158 source.
2159 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_DEFINES_IF.
2160 Adjust AT_LOC and AT_VAL to use AT_NAME_PREFIX.
2161 (AT_BISON_OPTION_POPDEFS): Pop AT_DEFINES_IF.
2162 (AT_DATA_SOURCE_PROLOGUE): New.
2163 (AT_DATA_GRAMMAR_PROLOGUE): Use AT_DATA_SOURCE_PROLOGUE.
2164 (AT_DATA_SOURCE): New.
2165 (AT_FULL_COMPILE): Extend to support an additional source file.
2166
1e034807
AD
21672008-11-18 Akim Demaille <demaille@gostai.com>
2168
2169 More TODO.
2170 * TODO: More short term issues.
2171
e3dda35c
AD
21722008-11-18 Akim Demaille <demaille@gostai.com>
2173
2174 Regen.
2175 * src/parse-gram.h, src/parse-gram.c: Regen.
2176
bd187d7b
AD
21772008-11-18 Akim Demaille <demaille@gostai.com>
2178
2179 Use b4_subtract where possible.
2180 * data/lalr1.cc (b4_subtract): Move to...
2181 * data/bison.m4: here.
2182 * data/glr.c (b4_rhs_data): Use it.
2183 * data/yacc.c (b4_rhs_value, b4_rhs_location): Use it.
2184
6085ab0d
AD
21852008-11-18 Akim Demaille <demaille@gostai.com>
2186
2187 Remove incorrect mode specification.
2188 * data/glr.cc: Don't pretend it's C code.
2189
9ce405ce
JD
21902008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2191
2192 Simplify last patch slightly.
2193 * src/getargs.c (getargs): Here.
2194
a8beef7e
JD
21952008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2196
2197 Fix last warning from --enable-gcc-warnings.
2198 * src/getargs.c (getargs): Don't assign const address to non-const
2199 pointer.
2200
d50eea6d
JD
22012008-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
2202
2203 Don't let maintainer-*-check targets force a version update.
2204 * cfg.mk (_is-dist-target): Implement. maintainer-check* was already
2205 handled.
2206
f5f419de
DJ
22072008-11-17 Di-an Jan <dianj@freeshell.org>
2208
2209 * doc/bison.texinfo: Synchronize ``Detail Node Listing''.
2210 Align menus. Adjust word wrapping. Use node names for menu names.
2211 (Examples): Don't abbreviate node names.
2212 (LocalWords): Remove abbreviations.
2213 (Copying): Make description a sentence.
d50eea6d 2214 (Java Action Features): Remove period to match the rest of menu.
f5f419de 2215
d73e55e0
DJ
22162008-11-17 Di-an Jan <dianj@freeshell.org>
2217
2218 Handles several --enable-gcc-warnings.
2219 * src/getargs.c (command_line_location): Set parameters to void.
2220 * src/output.c (symbol_type_name_cmp): Make static.
2221 (symbols_by_type_name): Set parameters to void.
2222 (symbol_definitions_output): Remove unused parameter. Rename as...
2223 (prepare_symbol_definitions): this.
2224 (muscles_output): Move symbol_definitions_output to...
2225 (output): here as prepare_symbol_definitions.
2226 * tests/c++.at (AT_CHECK_VARIANTS): Remove unused parameters of main.
d50eea6d 2227 (AT_CHECK_NAMESPACE): Make unused parameter lloc unnamed.
d73e55e0 2228
68c989de
DJ
22292008-11-17 Di-an Jan <dianj@freeshell.org>
2230
2231 * tests/c++.at (AT_CHECK_VARIANTS): Fixes tests 198-202.
2232 Use AT_DATA_GRAMMAR instead of AT_DATA for compiled tests.
2233
23ce6f4c
AD
22342008-11-16 Akim Demaille <demaille@gostai.com>
2235
2236 Add missing $(EXEEXT).
2237 * doc/local.mk ($(CROSS_OPTIONS_TEXI)): The target is
2238 "src/bison$(EXEEXT)".
2239 Reported by Di-an Jan.
2240
dd704c35
AD
22412008-11-15 Akim Demaille <demaille@gostai.com>
2242
2243 * TODO: Update.
2244
dab244d5
AD
22452008-11-15 Akim Demaille <demaille@gostai.com>
2246
2247 Formatting changes.
2248 * tests/input.at: here.
2249
4b4da9fb
AD
22502008-11-15 Akim Demaille <demaille@gostai.com>
2251
2252 Remove duplicate header inclusion.
2253 * src/LR0.c: here.
2254
4ea3f53d
AD
22552008-11-15 Akim Demaille <demaille@gostai.com>
2256
2257 * src/parse-gram.h, src/parse-gram.c: Regen.
2258
cb823b6f
AD
22592008-11-15 Akim Demaille <demaille@gostai.com>
2260
2261 Support parametric types.
b06df3c2
AD
2262
2263 There are two issues to handle: first scanning nested angle
2264 bracket pairs to support types such as std::pair< std::string,
2265 std::list<std::string> > >.
2266
2267 Another issue is to address idiosyncracies of C++: do not glue two
2268 closing angle brackets together (otherwise it's operator>>), and
2269 avoid sticking blindly a TYPE to the opening <, as it can result
2270 in '<:' which is a digraph for '['.
2271
cb823b6f
AD
2272 * src/scan-gram.l (brace_level): Rename as...
2273 (nesting): this.
2274 (SC_TAG): New.
2275 Implement support for complex tags.
b06df3c2 2276 (tag): Accept
cb823b6f
AD
2277 , but not <.
2278 * data/lalr1.cc (b4_symbol_value, b4_symbol_value_template)
2279 (b4_symbol_variant): Leave space around types as parameters.
2280 * examples/variant.yy: Use nested template types and leading ::.
2281 * src/parse-gram.y (TYPE, TYPE_TAG_ANY, TYPE_TAG_NONE, type.opt):
2282 Rename as...
2283 (TAG, TAG_ANY, TAG_NONE, tag.opt): these.
2284 * tests/c++.at: Test parametric types.
2285
7b6e6753
AD
22862008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2287
2288 Test token.prefix.
2289 This is not sufficient, but we test at least that the make_SYMBOL
2290 interface is not affected by token.prefix. A more general test
2291 will be implemented when the support of token.prefix is generalized
2292 to more skeletons.
b06df3c2 2293
7b6e6753
AD
2294 * tests/c++.at: One more variant test, using token.prefix.
2295
dddec537
AD
22962008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2297
2298 Test the make_TOKEN interface.
2299 * tests/c++.at (AT_CHECK_VARIANTS): Require and use locations.
2300 Factor the common code in yylex.
2301 Use it to test "%define lex_symbol".
2302
7d3e21ba
AD
23032008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2304
2305 Formatting change.
2306
4fc55348
AD
23072008-11-15 Akim Demaille <akim@betelgeuse.gostai.ensta.fr>
2308
2309 Simplify code for variants bench marks.
2310 * etc/bench.pl.in (&generate_grammar_list): Define and use
2311 location_type.
2312 Factor the common code in yylex.
2313
070e6509
AD
23142008-11-15 Akim Demaille <demaille@gostai.com>
2315
2316 Better error message.
2317 * bootstrap (find_tool): Fix the error message.
2318
0078681b
AD
23192008-11-15 Akim Demaille <demaille@gostai.com>
2320
2321 Update variant.yy to newest interface.
2322 * examples/variant.yy: Define lex_symbol.
2323 Adjust.
2324
ff084799
AD
23252008-11-15 Akim Demaille <demaille@gostai.com>
2326
2327 Don't use locations in variant.yy.
2328 * examples/variant.yy: Adjust to not using locations.
2329
b0d79ec6
AD
23302008-11-15 Akim Demaille <demaille@gostai.com>
2331
2332 Comment changes.
2333 * data/local.mk, etc/local.mk, examples/local.mk: Use Automake
2334 comments for the license.
2335
d4977ce3
AD
23362008-11-15 Akim Demaille <demaille@gostai.com>
2337
2338 Remove tests/Makefile.am.
2339 * tests/Makefile.am: Rename as...
2340 * tests/local.mk: this.
2341 * Makefile.am, configure.ac: Adjust.
2342 * Makefile.am (DISTCLEANFILES): Define.
2343 (maintainer-check, maintainer-xml-check, maintainer-push-check):
2344 Remove, we no longer need to bounce to the real targets.
2345
87f1149a
AD
23462008-11-15 Akim Demaille <demaille@gostai.com>
2347
2348 Comment changes.
2349
36415906
AD
23502008-11-15 Akim Demaille <demaille@gostai.com>
2351
2352 djgpp/local.mk.
2353 * Makefile.am (EXTRA_DIST): Move djgpp related part to...
2354 * djgpp/local.mk: this new file.
2355
e2c2f696
AD
23562008-11-15 Akim Demaille <demaille@gostai.com>
2357
2358 Remove doc/Makefile.am.
2359 * doc/Makefile.am: Rename as...
2360 * doc/local.mk: this.
2361 Adjust paths
2362 * Makefile.am, configure.ac: Adjust.
2363 * Makefile.am (MOSTLYCLEANFILES): New.
2364 * src/local.mk: Adjust.
2365
2ead32e6
AD
23662008-11-15 Akim Demaille <demaille@gostai.com>
2367
2368 Move sc_tight_scope into maint.mk.
b06df3c2
AD
2369 It does not work, and I don't know how it was supposed to work: it
2370 seems to be looking for sources in the build tree. I just moved
2371 it at a better place, fixing it is still required.
2372
2ead32e6
AD
2373 * src/local.mk (echo): Remove.
2374 (sc_tight_scope): Move to...
2375 * maint.mk: here.
2376
2df9ec37
AD
23772008-11-15 Akim Demaille <demaille@gostai.com>
2378
2379 Regen.
2380 * src/parse-gram.h, src/parse-gram.h: Regen.
2381
0305d25e
AD
23822008-11-15 Akim Demaille <demaille@gostai.com>
2383
2384 Remove src/Makefile.am.
2385 * src/Makefile.am: Rename as...
2386 * src/local.mk: this.
2387 Prefix all the paths with src/.
2388 (AUTOMAKE_OPTIONS): Build object files in the sub dirs.
2389 (AM_CPPFLAGS): Find find in builddir/src.
2390 (YACC): Move the flags into...
2391 (AM_YFLAGS): here.
2392 * maint.mk (sc_tight_scope): Disable.
2393 It used to bounce to the version in src/Makefile.am which is now
2394 part of this very Makefile.
2395 * Makefile.am, configure.ac: Adjust.
2396 * src/scan-code-c.c, src/scan-code.l: We can no longer rely on
2397 include "..." to find files "here": we are no longer in src/, so
2398 qualify the includes with src/.
2399 * doc/Makefile.am (PREPATH): No longer include the top_builddir
2400 prefix.
2401 (.x.1): Adjust to be able to create src/foo from the top level
2402 Makefile, instead of going bounce to src/Makefile the creation of
2403 foo.
2404
5277c0a3
AD
24052008-11-15 Akim Demaille <demaille@gostai.com>
2406
2407 Remove useless variable.
2408 * doc/Makefile.am (srcsrcdir): Remove.
2409
6a5aa0cd
AD
24102008-11-15 Akim Demaille <demaille@gostai.com>
2411
2412 Remove data/Makefile.am.
2413 * data/Makefile.am: Rename as...
2414 * data/local.mk: this.
2415 Adjust paths.
2416 * Makefile.am, configure.ac: Adjust.
2417
7cb794dc
AD
24182008-11-15 Akim Demaille <demaille@gostai.com>
2419
2420 Remove etc/Makefile.am.
2421 * etc/Makefile.am: Rename as...
2422 * etc/local.mk: this.
2423 Adjust.
2424 * Makefile.am, configure.ac: Adjust.
2425
cd409e3b
AD
24262008-11-15 Akim Demaille <demaille@gostai.com>
2427
2428 Remove examples/local.mk.
2429 examples/calc++/Makefile.am might be interesting to keep as is, since
2430 it is an example in itself.
2df9ec37 2431
cd409e3b
AD
2432 * examples/Makefile.am: Rename as...
2433 * examples/local.mk: this.
2434 Adjust.
2435 * Makefile.am, configure.ac: Adjust.
2436
9a1e4214
AD
24372008-11-15 Akim Demaille <demaille@gostai.com>
2438
2439 Remove build-aux/Makefile.am.
2440 Recursive Makefiles are really way too slow, let's get rid of some of
2441 them.
2df9ec37 2442
9a1e4214
AD
2443 * build-aux/Makefile.am: Rename as...
2444 * build-aux/local.mk: this.
2445 Adjust paths.
2446 * Makefile.am, configure.ac: Adjust.
2447
0634493c
AD
24482008-11-15 Akim Demaille <demaille@gostai.com>
2449
2450 Provide convenience constructors for locations and positions.
2451 * data/location.cc (position::position): Accept file, line and
2452 column as arguments with default values.
2453 Always qualify initial line and column literals as unsigned.
2454 (location::location): Provide convenience constructors.
2455
fe1b448a
AD
24562008-11-15 Akim Demaille <demaille@gostai.com>
2457
b06df3c2
AD
2458 Instead of using make_symbol<TOK_FOO>, generate make_FOO for each
2459 token type.
fe1b448a
AD
2460 Using template buys us nothing, and makes it uselessly complex to
2461 construct a symbol. Besides, it could not be generalized to other
2462 languages, while make_FOO would work in C/Java etc.
2df9ec37 2463
fe1b448a
AD
2464 * data/lalr1.cc (b4_symbol_): New.
2465 (b4_symbol): Use it.
2466 (b4_symbol_constructor_declaration_)
2467 (b4_symbol_constructor_definition_): Instead of generating
2468 specializations of an overloaded template function, just generate
2469 several functions whose names are forged from the token names
2470 without the token.prefix.
2471 (b4_symbol_constructor_declarations): Generate them for all the
2472 symbols, not just by class of symbol type, now that instead of
2473 specializing a function template by the token, we generate a
2474 function named after the token.
2475 (b4_symbol_constructor_specialization_)
2476 (b4_symbol_constructor_specializations): Remove.
2477 * etc/bench.pl.in: Adjust to this new API.
2478
5679f311
AD
24792008-11-13 Akim Demaille <demaille@gostai.com>
2480
2481 %define token.prefix.
b06df3c2
AD
2482 Provide a means to add a prefix to the name of the tokens as
2483 output in the generated files. Because of name clashes, it is
2484 good to have such a prefix such as TOK_ that protects from names
2485 such as EOF, FILE etc. But it clutters the grammar itself.
2df9ec37 2486
5679f311
AD
2487 * data/bison.m4 (token.prefix): Empty by default.
2488 * data/c.m4 (b4_token_enum, b4_token_define): Use it.
2489 * data/lalr1.cc (b4_symbol): Ditto.
2490
3204049e
AD
24912008-11-13 Akim Demaille <demaille@gostai.com>
2492
2493 Compute at M4 time some of the subtractions.
90290ce5 2494 * data/lalr1.cc (b4_subtract): New.
3204049e
AD
2495 (b4_rhs_data): Use it.
2496
202598d3
AD
24972008-11-13 Akim Demaille <demaille@gostai.com>
2498
2499 symbol::token.
b06df3c2 2500 This allows the user to get the type of a token returned by yylex.
2df9ec37 2501
202598d3
AD
2502 * data/lalr1.cc (symbol::token): New.
2503 (yytoknum_): Define when %define lex_symbol, independently of
2504 %debug.
2505 (yytoken_number_): Move into...
2506 (symbol::token): here, since that's the only use.
2507 The other one is YYPRINT which was not officially supported
2508 by lalr1.cc, and anyway it did not work since YYPRINT uses this
2509 array under a different name (yytoknum).
2510
fc2476c7
AD
25112008-11-13 Akim Demaille <demaille@gostai.com>
2512
2513 YYERRCODE.
2514 * TODO (YYERRCODE): Mention the case of $undef.
2515
865f1e9f
AD
25162008-11-13 Akim Demaille <demaille@gostai.com>
2517
2518 TODO: YYPRINT.
2519 * TODO (YYPRINT): New.
2520
cb0b136a
AD
25212008-11-13 Akim Demaille <demaille@gostai.com>
2522
2523 Comment changes.
2524 * data/lalr1.cc, data/yacc.c: Fix the description of the
2525 yytranslate and yytoknum tables.
2526
2c086d29
AD
25272008-11-13 Akim Demaille <demaille@gostai.com>
2528
2529 Define make_symbol in the header.
b06df3c2
AD
2530 To reach good performances these functions should be inlined (yet
2531 this is to measure precisely). To this end they must be available
2532 to the caller.
2df9ec37 2533
2c086d29
AD
2534 * data/lalr1.cc (b4_symbol_constructor_definition_): Qualify
2535 location_type with the class name.
2536 Since will now be output in the header, declare "inline".
2537 No longer use b4_symbol_constructor_specializations, but
2538 b4_symbol_constructor_definitions in the header.
2539 Don't call it in the *.cc file.
2540
1c4af381
AD
25412008-11-13 Akim Demaille <demaille@gostai.com>
2542
2543 Define yytranslate in the header for lex_symbol.
2544 * data/lalr1.cc: Move the invocation of b4_yytranslate_definition
2545 into the header file when using %define lex_symbol.
2546 (yytranslate_): Declare inline.
2547
e51b0a82
AD
25482008-11-13 Akim Demaille <demaille@gostai.com>
2549
b06df3c2
AD
2550 Define the constructors of symbol_type in
2551 b4_symbol_constructor_definitions.
e51b0a82 2552 The constructors are called by the make_symbol functions, which a
b06df3c2
AD
2553 forthcoming patch will move elsewhere. Hence the interest of
2554 putting them together.
2df9ec37 2555
b06df3c2
AD
2556 The stack_symbol_type does not need to be moved, it is used only
2557 by the parser.
2df9ec37 2558
e51b0a82
AD
2559 * data/lalr1.cc: Move symbol_type and symbol_base_type
2560 constructors into...
2561 (b4_symbol_constructor_definitions): here.
2562 Adjust.
2563
78835571
AD
25642008-11-13 Akim Demaille <demaille@gostai.com>
2565
2566 Make it easier to move the definition of yytranslate_.
2567 Forthcoming changes will make it possible to use yytranslate_
2568 from outside the parser implementation file.
2df9ec37 2569
78835571
AD
2570 * data/lalr1.cc (b4_yytranslate_definition): New.
2571 Use it.
2572
c1e6c88c
AD
25732008-11-13 Akim Demaille <demaille@gostai.com>
2574
2575 Remove useless class specification.
2576 * data/lalr1.cc (b4_symbol_constructor_specialization_): No need
2577 to refer to the class name to use a type defined by the class for
2578 arguments of member functions.
2579
4654b0c0
AD
25802008-11-13 Akim Demaille <demaille@gostai.com>
2581
2582 Finer input type for yytranslate.
2583 This patch is debatable: the tradition expects yylex to return an int
2584 which happens to correspond to token_number (which is an enum). This
2585 allows for instance to return characters (such as '*' etc.). But this
2586 goes against the stronger typing I am trying to have with the new
2587 lex interface which return a symbol_type. So in this case, feed
2588 yytranslate_ with a token_type.
2df9ec37 2589
4654b0c0
AD
2590 * data/lalr1.cc (yytranslate_): When in %define lex-symbol,
2591 expect a token_type.
2592
dd735e4e
AD
25932008-11-13 Akim Demaille <demaille@gostai.com>
2594
2595 Honor lex-params in %define lex_symbol mode.
2596 * data/lalr1.cc: Use b4_lex_param.
2597
6659366c
AD
25982008-11-13 Akim Demaille <demaille@gostai.com>
2599
2600 Simplify names.
2601 * src/output.c (symbol_definitions_output): Rename symbol
2602 attributes type_name and has_type_name as type and has_type.
2603 * data/lalr1.cc: Adjust uses.
2604
e9805e57
AD
26052008-11-13 Akim Demaille <demaille@gostai.com>
2606
2607 Use b4_type_names for the union type.
b06df3c2
AD
2608 The union used to compute the size of the variant used to iterate
2609 over the type of all the symbols, with a lot of redundancy. Now
2610 iterate over the lists of symbols having the same type-name.
2df9ec37 2611
e9805e57
AD
2612 * data/lalr1.cc (b4_char_sizeof_): New.
2613 (b4_char_sizeof): Use it.
2614 Adjust to be called with a list of numbers instead of a single
2615 number.
2616 Adjust its caller for new-line issues.
2617
aea10ef4
AD
26182008-11-13 Akim Demaille <demaille@gostai.com>
2619
2620 Define the "identifier" of a symbol.
b06df3c2
AD
2621 Symbols may have several string representations, for instance if
2622 they have an alias. What I call its "id" is a string that can be
2623 used as an identifier. May not exist.
2df9ec37 2624
b06df3c2
AD
2625 Currently the symbols which have the "tag_is_id" flag set are
2626 those that don't have an alias. Look harder for the id.
2df9ec37 2627
aea10ef4
AD
2628 * src/output.c (is_identifier): Move to...
2629 * src/symtab.c (is_identifier): here.
2630 * src/symtab.h, src/symtab.c (symbol_id_get): New.
2631 * src/output.c (symbol_definitions_output): Use it to define "id"
2632 and "has_id".
2633 Remove the definition of "tag_is_id".
2634 * data/lalr1.cc: Use the "id" and "has_id" whereever "tag" and
2635 "tag_is_id" were used to produce code.
2636 We still use "tag" for documentation.
2637
2ea7730c
AD
26382008-11-11 Akim Demaille <demaille@gostai.com>
2639
2640 Locations are no longer required by lalr1.cc.
2641 * data/lalr1.cc (_b4_args, b4_args): New.
2642 Adjust all uses of locations to make them optional.
2643 * tests/c++.at (AT_CHECK_VARIANTS): No longer use the locations.
2644 (AT_CHECK_NAMESPACE): Check the use of locations.
2645 * tests/calc.at (_AT_DATA_CALC_Y): Adjust to be usable with or
2646 without locations with lalr1.cc.
2647 Test these cases.
2648 * tests/output.at: Check lalr1.cc with and without location
2649 support.
2650 * tests/regression.at (_AT_DATA_EXPECT2_Y, _AT_DATA_DANCER_Y):
2651 Don't use locations.
2652
7ca2266a
AD
26532008-11-11 Akim Demaille <demaille@gostai.com>
2654
2655 AT_FULL_COMPILE.
2656 * tests/local.at (AT_FULL_COMPILE): New.
2657 * tests/actions.at, tests/calc.at, tests/regression.at: Use it.
2658
1a7a65f9
AD
26592008-11-11 Akim Demaille <demaille@gostai.com>
2660
2661 Support parens in calc++.
2662 * doc/bison.texinfo (Calc++ Scanner, Calc++ Parser): Support parens.
2663 * examples/calc++/test (run): Check the expected output.
2664 Adjust callers.
2665 Check parens too.
2666
c944f7f2
AD
26672008-11-11 Akim Demaille <demaille@gostai.com>
2668
2669 Simplify lalr1.cc since %defines is mandatory.
2670 * data/lalr1.cc: Remove useless calls to b4_defines_if.
2671
dada3cd1
AD
26722008-11-11 Akim Demaille <demaille@gostai.com>
2673
2674 TODO: yyfmt.
2675 * TODO (yysyntax_error): New item.
2676
422c18f4
AD
26772008-11-11 Akim Demaille <demaille@gostai.com>
2678
2679 Prefer M4 to CPP.
2680 * data/lalr1.cc: Use b4_error_verbose_if instead of #if
2681 YYERROR_VERBOSE.
2682
a0ffc175
AD
26832008-11-11 Akim Demaille <demaille@gostai.com>
2684
2685 Support i18n of the parse error messages.
2686 * TODO (lalr1.cc/I18n): Remove.
2687 * data/lalr1.cc (yysyntax_error_): Support the translation of the
2688 error messages, as done in yacc.c.
2689 Stay within the yy* pseudo namespace.
2690
00a8a083
AD
26912008-11-11 Akim Demaille <demaille@gostai.com>
2692
2693 More TODO.
2694 * TODO (single stack, yysyntax_error): New.
2695
09277875
AD
26962008-11-11 Akim Demaille <demaille@gostai.com>
2697
2698 Make it possible to return a symbol_type from yylex.
2699 * data/lalr1.cc (b4_lex_symbol_if): New.
2700 (parse): When lex_symbol is defined, expected yylex to return the
2701 complete lookahead.
2702 * etc/bench.pl.in (generate_grammar_list): Extend to support this
2703 yylex interface.
2704 (bench_variant_parser): Exercise it.
2705
64c1b92a
AD
27062008-11-11 Akim Demaille <demaille@gostai.com>
2707
2708 Remove useless bench case.
2709 * etc/bench.pl.in (bench_variant_parser): VARIANT_DESTROY is
2710 no longer used.
2711
2722aa42
AD
27122008-11-11 Akim Demaille <demaille@gostai.com>
2713
2714 Improve display of directives.
2715 * etc/bench.pl.in (parse_term): Don't add useless eol.
2716
918eb7c5
AD
27172008-11-11 Akim Demaille <demaille@gostai.com>
2718
2719 Use string_cast in the bench.
2720 * etc/bench.pl.in (generate_grammar_list): Define and use
2721 string_cast.
2722
39be9022
AD
27232008-11-11 Akim Demaille <demaille@gostai.com>
2724
2725 Replace yychar with a Boolean.
2726 * data/lalr1.cc (parse::yychar): Replace by...
2727 (parse::yyempty): this.
2728
a2e3fa77
AD
27292008-11-11 Akim Demaille <demaille@gostai.com>
2730
2731 Factor the tables.
2732 * TODO: New item.
2733
aba12ad1
AD
27342008-11-11 Akim Demaille <demaille@gostai.com>
2735
2736 Let yytranslate handle the eof case.
2737 * data/lalr1.cc (yytranslate_): Handle the EOF case.
2738 Adjust callers.
2739 No longer expect yychar to be equal to yyeof_, rather, test the
2740 lookahead's (translated) kind.
2741
27cb5b59
AD
27422008-11-11 Akim Demaille <demaille@gostai.com>
2743
2744 yychar cannot be empty in yyerrlab.
2745 * TODO (yychar == yyempty_): New.
2746 * data/lalr1.cc: Remove the handling of this case.
2747 This eases forthcoming changes related to yychar and yytranslate.
2748
fce629c0
AD
27492008-11-11 Akim Demaille <demaille@gostai.com>
2750
2751 Bench: syntactic sugar for %define/#define.
2752 * etc/bench.pl.in (parse_dirs): Support %d and #d with arguments.
2753 (&bench_push_parser, bench_variant_parser): Use this feature.
2754 (&eat): New.
2755 Use it.
2756
ce671960
AD
27572008-11-11 Akim Demaille <demaille@gostai.com>
2758
2759 Less memory pressure on the "list" bench.
2760 * etc/bench.pl.in (generate_grammar_list): Do not accumulate all
2761 the values, to limit memory pressure.
2762
2873fdf8
AD
27632008-11-11 Akim Demaille <demaille@gostai.com>
2764
2765 Introduce make_symbol.
b06df3c2
AD
2766 make_symbol provides a means to construct a full symbol (kind,
2767 value, location) in a single shot. It is meant to be a Symbol
2768 constructor, parameterized by the symbol kind so that overloading
2769 would prevent incorrect kind/value pairs. Unfortunately
2770 parameterized constructors do not work well in C++ (unless the
2771 parameter also appears as an argument, which is not acceptable),
2772 hence the use of a function instead of a constructor.
2df9ec37 2773
2873fdf8
AD
2774 * data/lalr1.cc (b4_symbol_constructor_declaration_)
2775 (b4_symbol_constructor_declarations)
2776 (b4_symbol_constructor_specialization_)
2777 (b4_symbol_constructor_specializations)
2778 (b4_symbol_constructor_definition_)
2779 (b4_symbol_constructor_definitions): New.
2780 Use them where appropriate to generate declaration, declaration of
2781 the specializations, and implementations of the templated
2782 overloaded function "make_symbol".
2783 (variant::variant): Always define a default ctor.
2784 Also provide a copy ctor.
2785 (symbol_base_type, symbol_type): New ctor overloads for value-less
2786 symbols.
2787 (symbol_type): Now public, so that functions such as yylex can use
2788 it.
2789
8be046d7
AD
27902008-11-11 Akim Demaille <demaille@gostai.com>
2791
2792 Inform m4 whether a tag is a valid id.
2793 * src/output.c (is_identifier): New.
2794 (symbol_definitions_output): Use it to define tag_is_id.
2795 But maybe this should be done at m4 level?
2796
de62edee
AD
27972008-11-11 Akim Demaille <demaille@gostai.com>
2798
2799 Test 214 was failing: it greps with a pattern containing [ ]*
2800 which obviously meant to catch spaces and tabs, but contained only
2801 spaces. Tabulations in sources are a nuisance, so to simplify the
2802 matter, get rid of all the tabulations in the Java sources. The
2803 other skeletons will be treated equally later.
2804
2805 * data/java.m4, data/lalr1.java: Untabify.
2806 * tests/java.at: Simplify AT_CHECK_JAVA_GREP invocations:
2807 tabulations are no longer generated.
2808
905f0697
PB
28092008-11-11 Paolo Bonzini <bonzini@gnu.org>
2810
2811 * bootstrap.conf: Replace m4/warning.m4 with warnings module.
2812 * configure.ac: Adjust usage.
2813 * lib/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2814 * src/Makefile.am: Replace $(WARNING_CFLAGS) with $(WARN_CFLAGS).
2815 * tests/atlocal.in: Replace $(WARNING_*FLAGS) with $(WARN_*FLAGS).
2816
09ccae9b
DJ
28172008-11-10 Di-an Jan <dianj@freeshell.org>
2818
2819 Workaround Java's ``code too large'' problem for parser tables
2820 in most cases, by using one function per initialization.
2821 * data/java.m4 (b4_typed_parser_table, b4_integral_parser_table): New.
2822 * data/lalr1.java (yypact_, yydefact_, yypgoto_, yydefgoto_,
2823 yytable_, yycheck_, yystos_, yytoken_number_, yyr1_, yyr2_, yyrhs_
2824 yyprhs_, yyrline_, yytranslate_table_): Use b4_integral_parser_table.
2825 (yytname_): Use b4_typed_parser_table.
2826 * doc/bison.texinfo (Java Bison Interface): Add note on Java's
2827 ``code too large'' error.
2828
1979121c
DJ
28292008-11-10 Di-an Jan <dianj@freeshell.org>
2830
2831 * NEWS: Document them.
de62edee 2832
1979121c
DJ
2833 General Java skeleton improvements.
2834 * configure.ac (gt_JAVACOMP): Request target of 1.4, which allows
2835 using gcj < 4.3 in the testsuite, according to comments in
2836 gnulib/m4/javacomp.m4.
2837 * data/java.m4 (stype, parser_class_name, lex_throws, throws,
2838 location_type, position_type): Remove extraneous brackets from
2839 b4_percent_define_default.
2840 (b4_lex_param, b4_parse_param): Remove extraneous brackets from
2841 m4_define and m4_define_default.
2842 * data/lalr1.java (b4_pre_prologue): Change to b4_user_post_prologue,
2843 which marks the end of user code with appropriate syncline, like all
2844 the other skeletons.
2845 (b4_user_post_prologue): Add. Don't silently drop.
2846 (yylex): Remove.
2847 (parse): Inline yylex.
2848 * doc/bison.texinfo (bisonVersion, bisonSkeleton): Document.
2849 (%{...%}): Fix typo of %code imports.
2850 * tests/java.at (AT_JAVA_COMPILE): Add "java" keyword.
2851
2852 Support annotations on parser class with %define annotations.
2853 * data/lalr1.java (annotations): Add to parser class modifier.
2854 * doc/bison.texinfo (Java Parser Interface): Document
2855 %define annotations.
2856 (Java Declarations Summary): Document %define annotations.
2857 * tests/java.at (Java parser class modifiers): Test annotations.
2858
2859 Do not generate code for %error-verbose unless requested.
2860 * data/lalr1.java (errorVerbose): Rename to yyErrorVerbose.
2861 Make private. Make conditional on %error-verbose.
2862 (getErrorVerbose, setErrorVerbose): New.
2863 (yytnamerr_): Make conditional on %error-verbose.
2864 (yysyntax_error): Make some code conditional on %error-verbose.
2865 * doc/bison.texinfo (Java Bison Interface): Remove the parts
2866 about %error-verbose having no effect.
2867 (getErrorVerbose, setErrorVerbose): Document.
2868
2869 Move constants for token names to Lexer interface.
2870 * data/lalr1.java (Lexer): Move EOF, b4_token_enums(b4_tokens) here.
2871 * data/java.m4 (b4_token_enum): Indent for move to Lexer interface.
2872 (parse): Qualify EOF to Lexer.EOF.
2873 * doc/bison.texinfo (Java Parser Interface): Move documentation of
2874 EOF and token names to Java Lexer Interface.
2875 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove Calc qualifier.
2876
2877 Make yyerror public.
2878 * data/lalr1.java (Lexer.yyerror): Use longer parameter name.
2879 (yyerror): Change to public. Add Javadoc comments. Use longer
2880 parameter names. Make the body rather than the declarator
2881 conditional on %locations.
2882 * doc/bison.texinfo (yyerror): Document. Don't mark as protected.
2883
2884 Allow user to add code to the constructor with %code init.
2885 * data/java.m4 (b4_init_throws): New, for %define init_throws.
2886 * data/lalr1.java (YYParser.YYParser): Add b4_init_throws.
2887 Add %code init to the front of the constructor body.
2888 * doc/bison.texinfo (YYParser.YYParser): Document %code init
2889 and %define init_throws.
2890 (Java Declarations Summary): Document %code init and
2891 %define init_throws.
2892 * tests/java.at (Java %parse-param and %lex-param): Adjust grep.
2893 (Java constructor init and init_throws): Add tests.
de62edee 2894
42f832d6
AD
28952008-11-10 Akim Demaille <demaille@gostai.com>
2896
2897 Update TODO.
2898 * TODO (-D): is implemented.
2899 (associativity): Same precedence must have the same associativity.
2900 For instance, how can a * b / c be parsed if * is %left and / is
2901 %right?
2902 (YYERRORCODE, YYFAIL, YYBACKUP): New.
2903
247efe34
AD
29042008-11-10 Akim Demaille <demaille@gostai.com>
2905
2906 Formatting changes.
2907
5d731440
AD
29082008-11-10 Akim Demaille <demaille@gostai.com>
2909
2910 More information about the symbols.
2911 * src/output.c (type_names_output): Document all the symbols,
2912 including those that don't have a type-name.
2913 (symbol_definitions_output): Define "is_token" and
2914 "has_type_name".
2915 * data/lalr1.cc (b4_type_action_): Skip symbols that have an empty
2916 type-name, now that they are defined too in b4_type_names.
2917
21db118b
AD
29182008-11-10 Akim Demaille <demaille@gostai.com>
2919
2920 Regen.
2921
6ed15cde
AD
29222008-11-10 Akim Demaille <demaille@gostai.com>
2923
2924 Make parser::yytranslate static.
b06df3c2
AD
2925 Small speedup (1%) on the list grammar. And makes yytranslate_
2926 available in non member functions.
de62edee 2927
6ed15cde
AD
2928 * data/lalr1.cc (yytranslate_): Does not need to be a instance
2929 function.
2930
30bb2edc
AD
29312008-11-10 Akim Demaille <demaille@gostai.com>
2932
2933 Avoid trailing spaces.
2934 * data/c.m4: b4_comment(TEXT): Don't indent empty lines.
2935 * data/lalr1.cc: Don't indent before rule and symbol actions, as
2936 they can be empty, and anyway this incorrectly indents the first
2937 action.
2938
b3a28fd4
AD
29392008-11-10 Akim Demaille <demaille@gostai.com>
2940
2941 Comment changes.
2942
914202bd
AD
29432008-11-10 Akim Demaille <demaille@gostai.com>
2944
2945 Use "enum" for integral constants.
2946 This is just nicer to read, I observed no speedup.
de62edee 2947
914202bd
AD
2948 * data/lalr1.cc (yyeof_, yylast_, yynnts_, yyempty_, yyfinal_)
2949 (yterror_, yyerrcode_, yyntokens_): Define as members of an enum.
2950 (yyuser_token_number_max_, yyundef_token_): Move into...
2951 (yytranslate_): here.
2952
c17f9a4a
AD
29532008-11-10 Akim Demaille <demaille@gostai.com>
2954
2955 Shortcuts in bench directives.
2956 * etc/bench.pl.in (parse_dirs): New.
2957 Use it.
2958 (bench_variant_parser, bench_fusion_parser): Use %s and %d.
2959 Create the benches in "benches/".
2960
b9855ea5
AD
29612008-11-10 Akim Demaille <demaille@gostai.com>
2962
2963 Formatting changes.
2964 * data/lalr1.cc: here.
2965
6e097787
AD
29662008-11-10 Akim Demaille <demaille@gostai.com>
2967
2968 Adjust verbose message to using emacs.
2969 * etc/bench.pl.in: Inform compilation-mode when we change the
2970 directory.
2971 (generate_grammar_list): Recognize %define "variant" in addition
2972 to %define variant.
2973
4c3cc7da
AD
29742008-11-10 Akim Demaille <demaille@gostai.com>
2975
2976 Classify symbols by type-name.
2977 * src/uniqstr.h (UNIQSTR_CMP): New.
2978 * src/output.c (symbol_type_name_cmp, symbols_by_type_name)
2979 (type_names_output): New.
2980 (muscles_output): Use it.
2981 * data/lalr1.cc (b4_symbol_action_): Remove.
2982 (b4_symbol_case_, b4_type_action_): New.
2983 Adjust uses of b4_symbol_action_ to use b4_type_action_.
2984
d69c9694
AD
29852008-11-10 Akim Demaille <demaille@gostai.com>
2986
2987 Change the handling of the symbols in the skeletons.
2988 Before we were using tables which lines were the symbols and which
2989 columns were things like number, tag, type-name etc. It is was
2990 difficult to extend: each time a column was added, all the numbers had
2991 to be updated (you asked for colon $2, not for "tag"). Also, it was
2992 hard to filter these tables when only a subset of the symbols (say the
2993 tokens, or the nterms, or the tokens that have and external number
2994 *and* a type-name) was of interest.
de62edee 2995
d69c9694
AD
2996 Now instead of monolithic tables, we define one macro per cell. For
2997 instance "b4_symbol(0, tag)" is a macro name which contents is
2998 self-decriptive. The macro "b4_symbol" provides easier access to
2999 these cells.
de62edee 3000
d69c9694
AD
3001 * src/output.c (type_names_output): Remove.
3002 (symbol_numbers_output, symbol_definitions_output): New.
3003 (muscles_output): Call them.
3004 (prepare_symbols): Define b4_symbols_number.
3005
5263bea9
AD
30062008-11-10 Akim Demaille <demaille@gostai.com>
3007
3008 --trace=muscles
3009 * src/getargs.h, src/getargs.c (trace_muscle): New.
3010 (trace_types, trace_args): Support it.
3011 * src/output.c (output_skeleton): Use it.
3012
4175f6bb
AD
30132008-11-10 Akim Demaille <demaille@gostai.com>
3014
3015 muscles_output.
3016 * src/output.c (muscles_output): New, extracted from...
3017 (output_skeleton): here.
3018 Adjust.
3019
1de69d6a
AD
30202008-11-10 Akim Demaille <demaille@gostai.com>
3021
3022 Formatting changes.
3023
36db78a7
AD
30242008-11-10 Akim Demaille <demaille@gostai.com>
3025
3026 Update the variant example.
3027 * examples/variant.yy: Formatting changes.
3028 One stage build.
3029
e5eb92e7
AD
30302008-11-10 Akim Demaille <demaille@gostai.com>
3031
3032 Support constructor with an argument.
3033 This improves the "list" bench by 2%.
de62edee 3034
e5eb92e7
AD
3035 * data/lalr1.cc (variant::build): Add an overloaded version with
3036 an argument.
3037 * tests/c++.at (AT_CHECK_VARIANT): Check it.
3038
76307410
AD
30392008-11-10 Akim Demaille <demaille@gostai.com>
3040
3041 Test variants.
3042 * tests/c++.at (AT_CHECK_VARIANTS): New.
3043 Use it with and without %define assert.
3044
d78f0ac9
AD
30452008-11-10 Akim Demaille <demaille@gostai.com>
3046
3047 Add %precedence support.
3048 Unfortunately it is not possible to reuse the %prec directive. This
3049 is because to please POSIX, we do not require to end the rules with a
3050 semicolon. As a result,
de62edee 3051
d78f0ac9 3052 foo: bar %prec baz
de62edee 3053
d78f0ac9
AD
3054 is ambiguous: either a rule which precedence is that of baz, or a rule,
3055 and then a declaration of the precedence of the token baz.
de62edee 3056
d78f0ac9
AD
3057 * doc/bison.texinfo: Document %precedence.
3058 (Precedence Only): New.
3059 * src/assoc.h, src/assoc.c (precedence_assoc): New.
3060 * src/conflicts.c (resolve_sr_conflict): Support it.
3061 * src/scan-gram.l, src/parse-gram.y (%precedence): New token.
3062 Parse it.
3063 * tests/calc.at: Use %precedence for NEG.
3064 * tests/conflicts.at (%precedence does not suffice)
3065 (%precedence suffices): New tests.
3066
c85be41a
AD
30672008-11-09 Akim Demaille <demaille@gostai.com>
3068
3069 Make benches in a sub dirs.
3070 * etc/bench.pl.in ($dir): New.
3071 Use it.
3072 Check the use of constructors with an argument.
3073 (bench_variant_parser): Fix.
3074
db65ca1f
AD
30752008-11-09 Akim Demaille <demaille@gostai.com>
3076
3077 fix eof condition
3078
9b0efa5b
AD
30792008-11-09 Akim Demaille <demaille@gostai.com>
3080
3081 Fix --help.
3082
432ac57a
AD
30832008-11-09 Akim Demaille <demaille@gostai.com>
3084
3085 Require the generation of parse-gram.output.
3086 * src/Makefile.am (YACC): Pass --report=all.
3087
deef2a0a
AD
30882008-11-09 Akim Demaille <demaille@gostai.com>
3089
3090 Formatting changes.
3091
df72984a
AD
30922008-11-09 Akim Demaille <demaille@gostai.com>
3093
3094 Update TODO.
3095 * TODO: Remove obsolete items.
3096 Update others.
3097
f10e19fd
AD
30982008-11-09 Akim Demaille <demaille@gostai.com>
3099
3100 Enhance bench.pl.
3101 * etc/bench.pl.in (parse, parse_expr, parse_term, parse_fact)
3102 (@token, $grammar, $bench): New.
3103 (generate_grammar_variant): Rename as...
3104 (generate_grammar_list): this.
3105 (generate_grammar): Adjust.
3106 (bench_grammar): Rename as...
3107 (bench): this.
3108 Use it in the various bench-marking routines.
3109 (-b, -g): New options.
3110
5de9c593
AD
31112008-11-09 Akim Demaille <demaille@gostai.com>
3112
3113 Use a static hierarchy for symbols in the C++ parser.
3114 * data/lalr1.cc (symbol_base_type, symbol_type)
3115 (stack_symbol_type): Make it a static hierarchy.
3116 Adjust dependencies.
3117
757f8f98
AD
31182008-11-09 Akim Demaille <demaille@gostai.com>
3119
3120 bench.pl -d, --directive.
3121 * etc/bench.pl.in (@directive): New.
3122 (&bench_grammar): Use it.
3123 (&bench_list_grammar): New, to provide access to the "variant"
3124 grammar.
3125 Use it.
3126 (getopts): Support -d, --directive.
3127
d3be4f6d
AD
31282008-11-09 Akim Demaille <demaille@gostai.com>
3129
3130 Use inline for small operations.
3131 * data/lalr1.cc (symbol_base_type, symbol_type)
3132 (stack_symbol_type): Declare constructor and other operations as
3133 inline.
3134 (yy_destroy_): Inline.
3135
1f7d007b
AD
31362008-11-09 Akim Demaille <demaille@gostai.com>
3137
3138 Introduce a hierarchy for symbols.
3139 * data/lalr1.cc (symbol_base_type, symbol_type): New.
3140 (data_type): Rename as...
3141 (stack_symbol_type): this.
3142 Derive from symbol_base_type.
3143 (yy_symbol_value_print_): Merge into...
3144 (yy_symbol_print_): this.
3145 Rename as...
3146 (yy_print_): this.
3147 (yydestruct_): Rename as...
3148 (yy_destroy_): this.
3149 (b4_symbols_actions, YY_SYMBOL_PRINT): Adjust.
3150 (parser::parse): yyla is now of symbol_type.
3151 Use its type member instead of yytoken.
3152
bc0b0477
AD
31532008-11-09 Akim Demaille <demaille@gostai.com>
3154
3155 Rename data_type and stack_symbol_type.
3156 * data/lalr1.cc (data_type): Rename as...
3157 (stack_symbol_type): this.
3158
57295d14
AD
31592008-11-09 Akim Demaille <demaille@gostai.com>
3160
3161 Handle semantic value and location together.
3162 * data/lalr1.cc (b4_symbol_actions): Bounce $$ and @$ to
3163 yydata.value and yydata.location.
3164 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_)
3165 (YY_SYMBOL_PRINT): Now take semantic value and location as a
3166 single arg.
3167 Adjust all callers.
3168 (yydestruct_): New overload for a stack symbol.
3169
e9b0834e
AD
31702008-11-09 Akim Demaille <demaille@gostai.com>
3171
3172 Push a complete symbol, not connected parts.
3173 * data/lalr1.cc (yypush_): Take a data_type&, not disconnected
3174 state, value and location.
3175 Adjust callers.
3176
6082531a
AD
31772008-11-09 Akim Demaille <demaille@gostai.com>
3178
3179 Agregate yylval and yylloc.
3180 * data/lalr1.cc (parser::yylval, parser::yylloc): Replace by...
3181 (parser::yyla): this.
3182
33c195cc
AD
31832008-11-09 Akim Demaille <demaille@gostai.com>
3184
3185 Rely on the state stack to display reduction traces.
b06df3c2
AD
3186 To display rhs symbols before a reduction, we used information
3187 about the rule reduced, which required the tables yyrhs and
3188 yyprhs. Now use rely only on the state stack to get the same
3189 information.
de62edee 3190
33c195cc
AD
3191 * data/lalr1.cc (b4_rhs_data, b4_rhs_state): New.
3192 Use them.
3193 (parser::yyrhs_, parser::yyprhs_): Remove.
3194 (parser::yy_reduce_print_): Use the state stack.
3195
e1f93869
AD
31962008-11-09 Akim Demaille <demaille@gostai.com>
3197
3198 Fuse yyval and yyloc into yylhs.
3199 * data/lalr1.cc (b4_lhs_value, b4_lhs_location): Adjust to using
3200 yylhs.
3201 (parse): Replace yyval and yyloc with yylhs.value and
3202 yylhs.location.
3203 After a user action, compute yylhs.state earlier.
3204 (yyerrlab1): Do not play tricks with yylhs.location, rather, use a
3205 fresh error_token.
3206
2935744b
DJ
32072008-11-09 Di-an Jan <dianj@freeshell.org>
3208
3209 Remove unused variable.
3210 * src/output.c (type_names_output): Remove unused variable sep.
3211
bbf9ca37
PB
32122008-11-09 Paolo Bonzini <bonzini@gnu.org>
3213
3214 Change tests/output.at quoting.
3215 * tests/output.at (AT_CHECK_OUTPUT): Use conventional m4 quoting when
3216 expanding arguments.
3217
d9a9b96b
JD
32182008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3219
3220 Don't add a semicolon to actions for %skeleton or %language.
3221 It breaks Java test cases as reported by Akim Demaille.
3222 * src/scan-code.l: Implement.
3223
51365192
JD
32242008-11-07 Joel E. Denny <jdenny@ces.clemson.edu>
3225
3226 Clean up %skeleton and %language priority implementation.
3227 * src/getargs.c (skeleton_prio): Use default_prio rather than 2, and
3228 remove static qualifier because others will soon need to see it.
3229 (language_prio): Likewise.
3230 (getargs): Use command_line_prio rather than 0.
3231 * src/getargs.h (command_line_prio, grammar_prio, default_prio): New
3232 enum fields.
3233 (skeleton_prio): Extern it.
3234 (language_prio): Extern it.
3235 * src/parse-gram.y: Use grammar_prio rather than 1.
3236
9380cfd0
AD
32372008-11-07 Akim Demaille <demaille@gostai.com>
3238
3239 Moving push traces into yypush_.
3240 * data/lalr1.cc (yypush_): Now takes a optional trace message.
3241 Adjust all uses.
3242
8901f32e
AD
32432008-11-07 Akim Demaille <demaille@gostai.com>
3244
3245 The single-stack C++ parser is now the standard one.
3246 * data/lalr1.cc: Rename as...
3247 * data/lalr1-split.cc: this.
3248 * data/lalr1-fusion.cc: Rename as...
3249 * data/lalr1.cc: this.
3250 * etc/bench.pl.in: Adjust.
3251
8cdabf02
AD
32522008-11-07 Akim Demaille <demaille@gostai.com>
3253
3254 Avoid empty-if warnings.
3255 Reported by Quentin Hocquet.
de62edee 3256
8cdabf02
AD
3257 * data/lalr1-fusion.cc (YY_SYMBOL_PRINT, YY_REDUCE_PRINT)
3258 (YY_STACK_PRINT): Provide some contents even when !YYDEBUG.
3259
5a893c2b
AD
32602008-11-07 Akim Demaille <demaille@gostai.com>
3261
3262 Pass command line location to skeleton_arg and language_argmatch.
3263 * src/getargs.h, src/getargs.c (skeleton_arg, language_argmatch):
3264 The location argument is now mandatory.
3265 Adjust all dependencies.
3266 (getargs): Use command_line_location.
3267
58697c6d
AD
32682008-11-07 Akim Demaille <demaille@gostai.com>
3269
3270 -D, --define.
3271 * src/getargs.c (usage): Document -D.
3272 Fix help string for --locations.
3273 (command_line_location): New.
3274 (short_options, long_options, getargs): Support -D, --define.
3275 (getargs): Move -d support at the right place.
3276 * doc/bison.texinfo (Bison Options): Update.
3277 * tests/input.at (%define, --define): New.
3278
9fe5a457
AD
32792008-11-07 Akim Demaille <demaille@gostai.com>
3280
3281 Initialize the muscle table before parsing the command line.
3282 * src/getargs.c (quotearg.h, muscle_tab.h): Include.
3283 (getargs): Define file_name.
3284 * src/main.c (main): Initialize muscle_tab before calling
3285 getargs.
3286 * src/muscle_tab.c (muscle_init): No longer define file_name, as
3287 its value is not available yet.
3288
56c5eca9
AD
32892008-11-07 Akim Demaille <demaille@gostai.com>
3290
3291 Locations without columns for command line arguments.
3292 * src/location.c (location_print): Don't display negative columns.
3293 * src/location.h: Document this.
3294
9b9e0a7d
AD
32952008-11-07 Akim Demaille <demaille@gostai.com>
3296
3297 Fix --help.
3298 * src/getargs.c (usage): Fix help string for -W.
3299
74eae918
AD
33002008-11-07 Akim Demaille <demaille@gostai.com>
3301
3302 Handle more general types of option arguments.
3303 * build-aux/cross-options.pl: The argument ends at the first
3304 space, not the first non-symbol character.
3305 Use @var for each word appearing the argument description.
3306
a3d4c6fb
AD
33072008-11-07 Akim Demaille <demaille@gostai.com>
3308
3309 Destroy the variants that remain on the stack in case of error.
3310 * data/lalr1-fusion.cc (yydestruct_): Invoke the variant's
3311 destructor.
3312 Display the value only if yymsg is nonnull.
3313 (yyreduce): Invoke yydestruct_ when popping lhs symbols.
3314
2d32fc9f
AD
33152008-11-07 Akim Demaille <demaille@gostai.com>
3316
3317 Add "%define assert" to variants.
3318 This is used to help the user catch cases where some value gets
3319 ovewritten by a new one. This should not happen, as this will
3320 probably leak.
de62edee 3321
2d32fc9f
AD
3322 Unfortunately this uncovered a bug in the C++ parser itself: the
3323 lookahead value was not destroyed between two calls to yylex. For
3324 instance if the previous lookahead was a std::string, and then an int,
3325 then the value of the std::string was correctly taken (i.e., the
3326 lookahead was now an empty string), but std::string structure itself
3327 was not reclaimed.
de62edee 3328
2d32fc9f
AD
3329 This is now done in variant::build(other&) (which is used to take the
3330 value of the lookahead): other is not only stolen from its value, it
3331 is also destroyed. This incurs a new performance penalty of a few
3332 percent, and union becomes faster again.
de62edee 3333
2d32fc9f
AD
3334 * data/lalr1-fusion.cc (variant::build(other&)): Destroy other.
3335 (b4_variant_if): New.
3336 (variant::built): New.
3337 Use it whereever the status of the variant changes.
3338 * etc/bench.pl.in: Check the penalty of %define assert.
3339
f6038cb8
AD
33402008-11-07 Akim Demaille <demaille@gostai.com>
3341
3342 Use "%define variant" in bench.pl.
3343 * etc/bench.pl.in: No longer use the pseudo directive %variants,
3344 just use %define variants.
3345
ccde1f98
AD
33462008-11-07 Akim Demaille <demaille@gostai.com>
3347
3348 Regen.
3349 * src/parse-gram.h, src/parse-gram.c: Regen.
3350
58bd33b7
JD
33512008-11-04 Joel E. Denny <jdenny@ces.clemson.edu>
3352
3353 Fix user actions without a trailing semicolon.
3354 Reported by Sergei Steshenko at
3355 <http://lists.gnu.org/archive/html/bug-bison/2008-11/msg00001.html>.
3356 * THANKS (Sergei Steshenko): Add.
3357 * src/scan-code.l (SC_RULE_ACTION): Fix it.
3358 * tests/regression.at (Fix user actions without a trailing semicolon):
3359 New test case.
3360
639867b5
AD
33612008-11-04 Akim Demaille <demaille@gostai.com>
3362
3363 Use b4_copyright_years.
3364 * data/yacc.c (b4_copyright_years): New.
3365 Fix its value according to the comments in the file.
3366 Use it and undefine it.
3367
3c262606
AD
33682008-11-04 Akim Demaille <demaille@gostai.com>
3369
3370 Formatting changes.
3371 * data/lalr1-fusion.cc, src/parse-gram.y: here.
3372
a2b93d52
AD
33732008-11-04 Akim Demaille <demaille@gostai.com>
3374
3375 Formatting changes.
3376 * data/lalr1-fusion.cc: here.
3377
3a2803df
AD
33782008-11-04 Akim Demaille <demaille@gostai.com>
3379
3380 Use strict on bench.pl.
3381 * etc/bench.pl.in (&run, &generate_grammar): New.
3382 Rename the grammar generating functions for consistency.
3383 Change the interface so that the list of benches to run is passed
3384 as (optionless) arguments.
3385 (&compile): Use &run.
3386
a0d4650a
AD
33872008-11-04 Akim Demaille <demaille@gostai.com>
3388
3389 Remove spurious initial empty lines.
3390 * data/glr.c, data/glr.cc, data/lalr1.cc, data/lalr1.java,
3391 * data/yacc.c: End the @output lines with an @.
3392
cac9e09b
AD
33932008-11-04 Akim Demaille <demaille@gostai.com>
3394
3395 Improve the display of sizes.
3396 * etc/bench.p.in: Higher precision.
3397 Sort by decreasing size.
3398
4af4348a
AD
33992008-11-04 Akim Demaille <demaille@gostai.com>
3400
3401 Don't memcpy C++ structures.
3402 * data/lalr1-fusion.cc (b4_symbol_variant): Adjust additional
3403 arguments.
3404 (variant::build): New overload for
3405 copy-construction-that-destroys.
3406 (variant::swap): New.
3407 (parser::yypush_): Use it in variant mode.
3408
ef05c4d6
AD
34092008-11-04 Akim Demaille <demaille@gostai.com>
3410
3411 Better defaults for bench.pl.
3412 * etc/bench.pl.in ($verbose, $cflags, $iterations): Change the
3413 default values.
3414 Adjust &verbose uses.
3415 (-q, --quiet): New.
3416
9718cfa9
AD
34172008-11-04 Akim Demaille <demaille@gostai.com>
3418
3419 Make variant.yy more complex.
3420 std::list cannot be copied via memcpy, they are more demanding than
3421 std::string. Use one std::list to strengthen the test.
de62edee 3422
9718cfa9
AD
3423 * examples/variant.yy: Use lalr1-fusion.cc, not lalr1.cc.
3424 Adjust.
3425 Create a list of strings, instead of a single large string.
3426
a6df593d
AD
34272008-11-04 Akim Demaille <demaille@gostai.com>
3428
3429 bench.pl --bench.
3430 * etc/bench.pl.in (--bench, $bench): New.
3431
006a0303
AD
34322008-11-04 Akim Demaille <demaille@gostai.com>
3433
3434 Sort methods.
3435 * data/lalr1-fusion.cc (destroy): Use as() in its definition.
3436 Define it after as().
3437
faef3466
AD
34382008-11-04 Akim Demaille <demaille@gostai.com>
3439
3440 Useless parens.
3441 * data/lalr1-fusion.cc (b4_rhs_location): Remove useless parens.
3442
2141aded
AD
34432008-11-04 Akim Demaille <demaille@gostai.com>
3444
3445 Issue missing synclines after user actions.
3446 * data/c.m4 (b4_case): Issue synclines on the output file.
3447
e426d17b
AD
34482008-11-04 Akim Demaille <demaille@gostai.com>
3449
3450 Remove trailing empty line.
3451 * data/lalr1-fusion.cc: Don't add an empty line after the user's
3452 epilogue.
3453
a9ce3f54
AD
34542008-11-04 Akim Demaille <demaille@gostai.com>
3455
3456 Fix output of copyright years.
3457 * data/bison.m4 (b4_copyright): Fix the indentation of the
3458 copyright year paragraph.
3459 Use b4_copyright_years when no years are given.
3460 * data/lalr1.cc, data/lalr1-fusion.cc, data/location.cc
3461 (b4_copyright_years): New.
3462 Use it.
3463
59c544c2
AD
34642008-11-04 Akim Demaille <demaille@gostai.com>
3465
3466 Avoid the spurious initial empty line.
3467 * data/lalr1-fusion.cc, data/location.cc: Put a trailing "@" at
3468 the end of @output request to suppress the empty line that
3469 results.
3470
96b15448
AD
34712008-11-04 Akim Demaille <demaille@gostai.com>
3472
3473 Remove parser::rhs_number_type.
3474 * data/lalr1-fusion.cc (rhs_number_type): No longer define it.
3475 (yyrhs_): Use b4_table_define.
3476
f0633174
AD
34772008-11-04 Akim Demaille <demaille@gostai.com>
3478
3479 Fix iteration type.
3480 * data/lalr1-fusion.cc: Use an int to iterate up to an int.
3481
417b8004
AD
34822008-11-04 Akim Demaille <demaille@gostai.com>
3483
3484 Factor the declaration of the integer tables.
3485 * data/lalr1-fusion.cc (b4_table_define): New.
3486 Use it.
3487
1a5246c6
AD
34882008-11-03 Akim Demaille <demaille@gostai.com>
3489
3490 Fix indentation of tables in lalr1.cc
3491 * data/lalr1-fusion.cc: Fix the indentation.
3492
f8a95c9c
AD
34932008-11-03 Akim Demaille <demaille@gostai.com>
3494
3495 Destroy the lhs symbols after reduction.
3496 * data/lalr1-fusion.cc (parse): After the user action, when in
3497 variant mode, destroy the lhs symbols.
3498
d7f4d823
AD
34992008-11-03 Akim Demaille <demaille@gostai.com>
3500
3501 Simplify yysyntax_error_ use.
3502 * data/lalr1-fusion.cc (yysyntax_error_): Always pass it the token
3503 type, but make it unnamed in the declaration when it is not used.
3504
8b9c89fb
AD
35052008-11-03 Akim Demaille <demaille@gostai.com>
3506
3507 Let yy::variant::build return an lvalue.
3508 * data/lalr1-fusion.cc (variant::build): Return a reference to the
3509 object.
3510
83243c24
AD
35112008-11-03 Akim Demaille <demaille@gostai.com>
3512
3513 Define yy::variant only when needed.
3514 * data/lalr1-fusion.cc (yy::variant): Define only if variants are
3515 used.
3516
429b4848
AD
35172008-11-03 Akim Demaille <demaille@gostai.com>
3518
3519 Bench the three-stack lalr1.cc.
3520 * etc/bench.pl.in: Bench the three-stack lalr1.cc vs. the
3521 one-stack one.
3522
414c76a4
AD
35232008-11-03 Akim Demaille <demaille@gostai.com>
3524
3525 Fail on parse error in calc++.
3526 * doc/bison.texinfo (calc++.cc): Propagate failures to the exit
3527 status.
3528 * examples/calc++/test ($me, $number, $exit, run): New.
3529 Use them to propagate errors to the exit status.
3530
8a5783fd
AD
35312008-11-03 Akim Demaille <demaille@gostai.com>
3532
3533 Don't specify the skeleton twice in the example.
3534 * examples/calc++/Makefile.am: Don't pass -S to Bison, the grammar
3535 file does what is needed.
3536
0cc5bead
AD
35372008-11-03 Akim Demaille <demaille@gostai.com>
3538
3539 bench: Improve output.
3540 * etc/bench.pl.in (bench_grammar): Tune the printf format.
3541
5b421a4e
AD
35422008-11-03 Akim Demaille <demaille@gostai.com>
3543
3544 bench: check impact of %debug on variants.
3545 * etc/bench.pl.in (variant_grammar): Fix the computation of
3546 $variant.
3547 Generate a grammar file that can work with or without %debug.
3548 Do use the @directive.
3549 (bench_variant_parser): Check impact of %debug.
3550 (@directives): Rename all the occurrences to...
3551 (@directive): this, for consistency.
3552
d11ee647
AD
35532008-11-03 Akim Demaille <demaille@gostai.com>
3554
3555 bench: report the size too.
3556 * etc/bench.pl.in ($iterations): Defaults to -3.
3557 (&bench_grammar): Require hireswallclock.
3558 Compute and display the size of the result.
3559 More comments.
3560
e1b74b92
AD
35612008-11-03 Akim Demaille <demaille@gostai.com>
3562
3563 bench: More use of the verbosity level.
3564 * etc/bench.pl.in ($verbose, &verbose): New.
3565 Use them.
3566 More POD documentation.
3567
7e5f9c54
AD
35682008-11-03 Akim Demaille <demaille@gostai.com>
3569
3570 bench.pl: a command line interface
3571 * etc/bench.pl.in: More doc.
3572 Some fixes in the documentation.
3573 ($cflags, $iterations, &help, &getopt): New.
3574 Use them.
3575 (&variant_grammar): Let the number of stages be 10 times what is
3576 specified.
3577
7109a18d
AD
35782008-11-03 Akim Demaille <demaille@gostai.com>
3579
3580 Bench the use of Boost.Variants.
3581 * etc/bench.pl.in ($cxx, &variant_grammar, &bench_variant_parser):
3582 New.
3583 (&compile): Be ready to compile C++ parsers.
3584 (&bench_push_parser): Move debug information to the outermost
3585 level.
3586 * THANKS: Add Michiel De Wilde.
3587
922730fe
AD
35882008-11-03 Akim Demaille <demaille@gostai.com>
3589
3590 bench.pl: Pass directives as a list instead of as a string.
3591 * etc/bench.pl.in (&directives): New.
3592 (&triangular_grammar, &calc_grammar): Use it to format the Bison
3593 directives.
3594 (&triangular_grammar): Do use the directives (were ignored).
3595 (&bench_grammar, &bench_push_parser): Adjust to pass lists of
3596 directives.
3597
7484f1d4
AD
35982008-11-03 Akim Demaille <demaille@gostai.com>
3599
3600 Improve genericity of bench.pl.
3601 * etc/bench.pl.in (&bench_grammar): Take the set of benches as
3602 argument.
3603 (&bench_push_parser): New.
3604 Call it.
3605
15129f25
AD
36062008-11-03 Akim Demaille <demaille@gostai.com>
3607
3608 Add documentation to bench.pl.
3609 * etc/bench.pl.in: Comment changes.
3610
0e0ed236
AD
36112008-11-03 Akim Demaille <demaille@gostai.com>
3612
3613 Fuse the three stacks into a single one.
de62edee 3614
b06df3c2
AD
3615 In order to make it easy to perform benchmarks to ensure that
3616 there are no performance loss, lalr1.cc is forked into
3617 lalr1-fusion.cc. Eventually, lalr1-fusion.cc will replace
3618 lalr1.cc.
3619
3620 Meanwhile, to make sure that lalr1-fusion.cc is correctly
3621 exercized by the test suite, the user must install a symbolic link
3622 from lalr1.cc to it.
de62edee 3623
b06df3c2
AD
3624 Instead of having three stacks (state, value, location), use a
3625 stack of triples. This considerably simplifies the code (and it
3626 will be easier not to require locations as currently does the C++
3627 parser), and also gives a 10% speedup according to
3628 etc/bench (probably mainly since memory allocation is done once
3629 instead of three times).
de62edee 3630
0e0ed236
AD
3631 Another motivation is to make it easier to destruct properly
3632 semantic values: now that they are bound to their state (hence
3633 symbol type) it will be easier to call the appropriate destructor.
de62edee 3634
0e0ed236 3635 These changes should probably benefit the C parser too.
de62edee 3636
b06df3c2
AD
3637 * data/lalr1.cc: Copy as...
3638 * data/lalr1-fusion.cc: this new file.
0e0ed236
AD
3639 (b4_rhs_value, b4_rhs_location): New definitions overriding those
3640 from c++.m4.
3641 (state_stack_type, semantic_stack_type, location_stack_type)
3642 (yystate_stack_, yysemantic_stack_, yylocation_stack_): Remove.
3643 (data_type, stack_type, yystack_): New.
3644 (YYLLOC_DEFAULT, yypush_): Adjust.
3645 (yyerror_range): Now based on data_type, not location_type.
3646
7dedf26e
AD
36472008-11-03 Akim Demaille <demaille@gostai.com>
3648
3649 Push the state, value, and location at the same time.
3650 This is needed to prepare a forthcoming patch that fuses the three
3651 stacks into one.
de62edee 3652
7dedf26e
AD
3653 * data/lalr1.cc (parser::yypush_): New.
3654 (parser::yynewstate): Change the semantics: instead of arriving to
3655 this label when value and location have been pushed, but yystate
3656 is to be pushed on the state stack, now the three of them must
3657 have been pushed before. yystate still must be the new state.
3658 This allows to use yypush_ everywhere instead of individual
3659 handling of the stacks.
3660
c4585f1e
AD
36612008-11-03 Akim Demaille <demaille@gostai.com>
3662
3663 Prefer references to pointers.
3664 * data/lalr1.cc (b4_symbol_actions): New, overrides the default C
3665 definition to use references instead of pointers.
3666 (yy_symbol_value_print_, yy_symbol_print_, yydestruct_):
3667 Take the value and location as references.
3668 Adjust callers.
3669
56017c17
AD
36702008-11-03 Akim Demaille <demaille@gostai.com>
3671
3672 stack::size instead of stack::height.
3673 * data/lalr1.cc (stack::height): Rename as...
3674 (stack::size): this.
3675 Fix the output type.
3676 Comment changes.
3677
5ab8c47b
AD
36782008-11-03 Akim Demaille <demaille@gostai.com>
3679
3680 Use variants to support objects as semantic values.
b06df3c2
AD
3681 This patch was inspired by work by Michiel De Wilde. But he used
3682 Boost variants which (i) requires Boost on the user side, (ii) is
3683 slow, and (iii) has useless overhead (the parser knows the type of
3684 the semantic value there is no reason to duplicate this
3685 information as Boost.Variants do).
3686
3687 This implementation reserves a buffer large enough to store the
3688 largest objects. yy::variant implements this buffer. It was
3689 implemented with Quentin Hocquet.
de62edee 3690
5ab8c47b
AD
3691 * src/output.c (type_names_output): New.
3692 (output_skeleton): Invoke it.
3693 * data/c++.m4 (b4_variant_if): New.
3694 (b4_symbol_value): If needed, provide a definition for variants.
3695 * data/lalr1.cc (b4_symbol_value, b4_symbol_action_)
3696 (b4_symbol_variant, _b4_char_sizeof_counter, _b4_char_sizeof_dummy)
3697 (b4_char_sizeof, yy::variant): New.
3698 (parser::parse): If variants are requested, define
3699 parser::union_type, parser::variant, change the definition of
3700 semantic_type, construct $$ before running the user action instead
3701 of performing a default $$ = $1.
3702 * examples/variant.yy: New.
3703 Based on an example by Michiel De Wilde.
3704
1fa5d8bb
AD
37052008-11-03 Akim Demaille <demaille@gostai.com>
3706
3707 Parameterize the extraction of semantic values.
3708 To make future changes easier, no longer rely on ".TYPE" being the
3709 way to get a semantic value.
de62edee 3710
1fa5d8bb
AD
3711 * data/c.m4 (b4_symbol_value): New.
3712 Use it.
3713 * data/c++.m4, data/yacc.c: Use it.
3714 * data/glr.c: Use b4_symbol_value.
3715 (b4_rhs_data): New.
3716 Use it.
3717
91ba8a55
AD
37182008-11-03 Akim Demaille <demaille@gostai.com>
3719
3720 Prepare easier M4 changes.
3721 * data/lalr1.cc: Use escaped [] instead of literals to prepare
3722 future changes.
3723
c9ba9e59
JD
37242008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3725
3726 Initiate further development.
3727 * NEWS: Create an empty section for new entries.
3728 * gnulib: Update submodule to HEAD.
3729
bfb40910
JD
37302008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3731
3732 * NEWS: Version 2.4.
3733
241fda7a
JD
37342008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3735
3736 Prepare for next release.
3737 * NEWS: Briefly mention changes since 2.3b.
3738 * README: Say GNU m4 1.4.6, which we've been requiring in release
3739 announcements already, not 1.4.3, which breaks the build.
3740
ed4d67dc
JD
37412008-11-02 Joel E. Denny <jdenny@ces.clemson.edu>
3742
3743 Say %language is experimental.
3744 We're thinking of extending it's effect on output file naming. See the
3745 thread at
3746 <http://lists.gnu.org/archive/html/bison-patches/2008-10/msg00003.html>.
3747 * NEWS: Say it's experimental.
3748 * doc/bison.texinfo (Decl Summary): Say it's experimental, and so don't
3749 recommend it over %skeleton for now.
3750 (Bison Options): Likewise.
3751 (C++ Bison Interface): Use %skeleton not %language.
3752 (Calc++ Parser): Use %skeleton not %language.
3753 * src/getargs.c (usage): Say it's experimental.
3754
e254a580
DJ
37552008-11-01 Di-an Jan <dianj@freeshell.org>
3756 Paolo Bonzini <bonzini@gnu.org>
3757
3758 Support all Java parser class modifiers.
3759 * data/java.m4 (b4_percent_define_get3): New.
3760 (b4_final_if, b4_strictfp_if): New.
3761 * data/lalr1.java (final, strictfp, extends, implements): Support.
3762 * doc/bison.texinfo (final, strictfp, extends, implements): Add
3763 documentation.
3764 * tests/java.at (AT_CHECK_JAVA_MINIMAL): New.
3765 (AT_CHECK_JAVA_MINIMAL_W_LEXER): New.
3766 (AT_CHECK_JAVA_GREP): New.
3767 (Java parser class modifiers): New test.
3768 (Java parser class extends and implements): New test.
3769
3770 Model exception propagation better with throws and lex_throws.
3771 * data/java.m4 (b4_list2): New.
3772 (throws): Change default.
3773 * data/lalr1.java (yyaction): Add throws.
3774 (parse): Add lex_throws in addition to throws.
3775 * doc/bison.texinfo (throws, lex_throws): Add documentation.
3776 * tests/java.at (Java throws specifications): New test.
3777
3778 Improve documentation for Java parsers.
3779 * doc/bison.texinfo (Java Parsers): Add subsections.
3780 Don't quote first argument of %define.
3781 (Java Bison Interface): Document output files. Move documentation
3782 of parser class and merge into Java Parser Interface. Document
3783 features that error out. Document directives with no effect.
3784 Move note about Javadoc higher.
3785 (Java Semantic Values): Explicitly mention stype.
3786 Document that generic types cannot be used.
3787 (Java Location Values): Use @deftypeivar. Document constructors.
3788 Correct return value for toString.
3789 (Java Parser Interface): List undocumented constants/fields.
3790 Move documentation of fields added by %parse-param closer to list
3791 of members. Document that token names are added as fields.
3792 Document constructors accurately. Remove error method.
3793 (Java Scanner Interface): Move note on %pure-parser to Java Bison
3794 Interface. Describe %code lexer and yylex accutately.
3795 Remove documentation that does not match the code.
3796 (Java Action Features): New.
3797 (Java Differences): Add reference. Add item on semantic values.
3798 Add note about @{ ... @}. Clarify %% epilogue placement.
3799 (Java Declarations Summary): New.
3800
3801 Fix Java skeleton.
3802 * data/java.m4 (b4_prefix): Correct quoting for m4_define_default.
3803 (b4_remove_comma): Quote test argument.
3804 (b4_identification): Remove "bison" field.
3805 * tests/java.at (Java parser class and package names): New test.
3806 (Java %parse-param and %lex-param): New test.
3807 (Java stype, position_class and location_class): New test.
3808
f259e4e6
PB
38092008-10-31 Di-an Jan <dianj@freeshell.org>
3810
3811 * data/lalr1.jave: Update copyright years.
3812 (YYParser): Correct name of "generated from" file in Javadoc:
3813 use b4_file_name instead of @ofile@.
3814 (Location constructor): Correct Javadoc parameter name.
3815 (yylloc): Add missing opening m4 quote after b4_location_if.
3816 This removes a stray [ in the Javadoc of Lexer.getStartPos.
3817 (Lexer.yyerror): Fix incorrect m4 and Javadoc.
3818 (YYParser constructor): Correct Javadoc parameter name.
3819
cae5057f
JD
38202008-10-30 Joel E. Denny <jdenny@ces.clemson.edu>
3821
3822 Always put auxiliary code files in the same dir as other output files.
3823 * src/files.c (compute_file_name_parts): When the user specifies
3824 --output but not --file-prefix, extract the directory prefix from the
3825 file prefix not from the grammar file name. This affects the location
3826 of files like location.hh generated by the C++ skeleton. The includes
3827 in the other output files require this fix.
3828 * tests/output.at (AT_CHECK_OUTPUT): Automatically create directories
3829 for expected output files.
3830 (Output files): Add a test for the above.
3831
4af432ba
JD
38322008-10-29 Joel E. Denny <jdenny@ces.clemson.edu>
3833
3834 * gnulib: Update submodule to HEAD.
3835
e26d4e43
JD
38362008-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
3837
3838 Update copyright year.
3839 * src/files.c: Here.
3840
c0ee9e21
DJ
38412008-10-28 Di-an Jan <dianj@freeshell.org> (tiny change)
3842
3843 Don't overwrite the input file.
3844 * src/files.c (output_file_name_check): Fatal error if using input file
3845 for output.
3846 * tests/output.at: (AT_CHECK_CONFLICTING_OUTPUT): Add return status
3847 argument.
3848 (Conflicting output files): Add test.
3849
482dc52f
AD
38502008-10-28 Akim Demaille <demaille@gostai.com>
3851
3852 Space changes.
3853 * data/lalr1.cc: Formatting changes.
3854
52cbbe84
AD
38552008-10-28 Akim Demaille <demaille@gostai.com>
3856
3857 Don't define debugging functions when !YYDEBUG.
3858 * data/lalr1.cc (debug_stream, set_debug_stream)
3859 (debug_level_type, debug_level, set_debug_level): Don't
3860 declare them when YYDEBUG is not defined.
3861 The implementation are already YYDEBUG-aware.
3862
0925d5bf
AD
38632008-10-28 Akim Demaille <demaille@gostai.com>
3864
3865 Prefer "continue" for empty loop bodies.
3866 * etc/bench.pl.in: Use "continue" instead of {}.
3867
cf98343c
AD
38682008-10-28 Akim Demaille <demaille@gostai.com>
3869
3870 Space and comments changes.
3871 * data/c++.m4, data/glr.c, data/lalr1.cc: Copyright year changes.
3872 * data/c.m4, data/lalr1.cc: Space changes.
3873
9f467b7d
AD
38742008-10-28 Akim Demaille <demaille@gostai.com>
3875
3876 Make gnulib a submodule.
3877 * gnulib: New.
3878 * .gitmodules (gnulib): New.
3879
0f0e1ace
JD
38802008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3881
3882 Fix yyerror_range for user-defined location type in C++. Reported by
3883 Georg Sauthoff at
3884 <http://lists.gnu.org/archive/html/bug-bison/2008-08/msg00008.html>.
3885 * data/lalr1.cc (parse): Change type of yyerror_range to location_type.
3886 * THANKS (Georg Sauthoff): Add.
3887
548e2104
JD
38882008-10-18 Joel E. Denny <jdenny@ces.clemson.edu>
3889
3890 Update several administrative files mainly to facilitate releasing.
3891 * HACKING (Administrivia): Make the git-merge-changelog notes more
3892 helpful.
3893 (Test suite): Don't say lalr1.cc is not exercised in the test suite.
3894 (Release Procedure): Update for git and add numerous details that were
3895 previously missing.
3896 * Makefile.am (EXTRA_DIST): Remove Makefile.cfg and Makefile.maint.
3897 * maint.mk (announcement): Don't list bison as a bootstrap tool so
3898 that announcements don't claim we bootstrapped with whatever bison
3899 happened to be in PATH. Add flex as a bootstrap tool.
3900 * Makefile.maint: Remove, previously replaced by maint.mk.
3901 * Makefile.cfg: Remove, and migrate settings to...
3902 * cfg.mk: ... here for the sake of `make announcement'.
3903 * bootstrap.conf (gnulib_modules): Add announce-gen.
3904 * README: Say GNU Bison instead of just Bison. Suggested by Karl
3905 Berry.
3906
ddf17a6e
PB
39072008-10-08 Di-an Jan <dianj@freeshell.org> (tiny change)
3908
3909 Small but important bugfixes for the Java skeleton.
3910 * data/lalr1.java (yyerror): Change Location to b4_location_type.
3911 (yy_symbol_print): Call toString on yyvaluep.
3912
e1145ad8
AD
39132008-08-29 Akim Demaille <demaille@gostai.com>
3914
3915 Clarify UPDATED use.
215b40ac 3916 * doc/bison.texinfo: It refers to the last edition of this file,
e1145ad8 3917 not to the release date of Bison.
215b40ac 3918 Reported by Joel E. Denny.
e1145ad8 3919
0df72d78
AD
39202008-08-29 Akim Demaille <demaille@gostai.com>
3921
3922 * README: Update FAQ pointer.
3923 Reported by Joel E. Denny.
3924
9a90b6bb
EB
39252008-08-27 Eric Blake <ebb9@byu.net>
3926
3927 Resync m4sugar from autoconf.
3928 * data/m4sugar/m4sugar.m4 (m4_defn, m4_popdef, m4_undefine)
3929 (m4_init): Adjust to latest m4.git changes.
3930 (m4_mapall_sep, _m4_list_cmp, m4_version_compare): Reduce side
3931 effects.
3932 * data/m4sugar/foreach.m4 (_m4_shiftn): Fix off-by-one bug.
3933 (_m4_list_cmp): Reduce side effects.
3934
65015668
AD
39352008-08-27 Akim Demaille <demaille@gostai.com>
3936
3937 Check yyerrok in calc.at.
215b40ac
EB
3938 * tests/calc.at (calc.y): Use yyerrok on "( error )".
3939 (AT_CHECK_CALC): Add a check that ensures that yyerrok works as
3940 expected.
65015668 3941
98e26a92
AD
39422008-08-27 Akim Demaille <demaille@gostai.com>
3943
3944 Support yyerrok in lalr1.cc.
3945 YYBACKUP is still to import back into lalr1.cc.
215b40ac 3946 * data/lalr1.cc (yyerrork, yyclearin, YYRECOVERING): Define.
98e26a92 3947
86c0e784
JD
39482008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3949
3950 For maintainer-check*, don't recompile for a $(VERSION) update.
3951 * cfg.mk: New file.
3952 (_is-dist-target): Override the one in GNUmakefile.
3953 * Makefile.am (EXTRA_DIST): Add cfg.mk.
3954
88511166
JD
39552008-08-26 Joel E. Denny <jdenny@ces.clemson.edu>
3956
3957 Update for recent change to gnulib.
3958 * src/parse-gram.y: Don't include strverscmp.h. It comes from
3959 string.h now.
3960
6bbb2ed5
EB
39612008-08-15 Eric Blake <ebb9@byu.net>
3962
d67c52e8
EB
3963 Remaining m4sugar merge from autoconf.
3964 * data/m4sugar/m4sugar.m4: Copy entire file from autoconf.
3965 * data/m4sugar/foreach.m4: New file, copied from autoconf.
3966 * data/Makefile.am (dist_m4sugar_DATA): Distribute it.
3967 * src/output.c (output_skeleton): Tell m4 how to find it.
3968
6bbb2ed5
EB
3969 Partial m4sugar merge from autoconf: m4_map.
3970 * data/m4sugar/m4sugar.m4 (m4_fst): Delete.
3971 (m4_map, m4_map_sep, _m4_map): Rewrite more efficiently.
3972 (m4_apply, _m4_apply, m4_mapall, m4_mapall_sep): New macros.
3973 * data/java.m4 (b4_token_enums): Use more efficient short-circuit
3974 for empty list.
3975 * data/c.m4 (b4_token_defines, b4_token_enums, b4_c_ansi_formals):
3976 Likewise.
3977 (b4_parse_param_for): Avoid m4_fst, now that autoconf no longer
3978 declares it.
3979
8dce3875
JD
39802008-08-07 Joel E. Denny <jdenny@ces.clemson.edu>
3981
3982 Keep .version and PACKAGE_VERSION in sync.
3983 * Makefile.am ($(top_srcdir)/.version): Declare configure as a
3984 dependency, and add comments justifying this in more detail. Discussed
3985 starting at
3986 <http://lists.gnu.org/archive/html/bison-patches/2008-07/msg00022.html>.
3987
882a1fbf
EB
39882008-08-06 Eric Blake <ebb9@byu.net>
3989
a3764451
EB
3990 Partial m4sugar merge from autoconf: m4_shiftn.
3991 * data/m4sugar/m4sugar.m4 (m4_shiftn): Faster implementation.
3992 (m4_shift2, m4_shift3): New macros.
3993 (m4_case, m4_bmatch, m4_bpatsubsts, m4_join): Adjust clients.
3994 * data/c.m4 (b4_c_function_def, b4_c_ansi_function_def)
3995 (b4_c_ansi_function_decl, b4_c_function_call): Likewise.
3996 * data/java.m4 (b4_remove_comma): Likewise.
3997
882a1fbf
EB
3998 Partial m4sugar merge from autoconf: m4_wrap vs. m4 1.6.
3999 * data/m4sugar/m4sugar.m4 (m4_unquote, m4_wrap_lifo): New macros.
4000 (m4_wrap): Guarantee FIFO order, in spite of m4 1.6.
4001 (m4_init): Consolidate wrapped text into single m4_wrap.
4002 * data/bison.m4 (b4_check_user_names_wrap): Stick with LIFO order
4003 in wrapped text.
4004
a30e920d
EB
40052008-08-05 Eric Blake <ebb9@byu.net>
4006
dfcc5959
EB
4007 Partial m4sugar merge from autoconf: builtins, version.m4.
4008 * data/m4sugar/m4sugar.m4 (changeword): Nuke.
4009 (m4_prepend): Remove, as it is unused and inherently quadratic,
4010 whereas m4_append is linear in newer m4.
4011 (m4_mkstemp): New builtin.
4012 (m4_symbols): Make rename conditional.
4013 (m4_version_prereq): Ensure fatal error if used in bison, which
4014 intentionally lacks version.m4.
4015
a30e920d
EB
4016 Fix comments in m4sugar.
4017 * data/m4sugar/m4sugar.m4: Comment changes, borrowed from autoconf.
4018
445b7470
JD
40192008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4020
4021 Update for recent .gitignore fix in Gnulib.
4022 * bootstrap: Back out 2008-07-18 hack now that gnulib-tool creates
4023 anchored .gitignore entries.
4024
a1e50014
JD
40252008-08-02 Joel E. Denny <jdenny@ces.clemson.edu>
4026
4027 Set gnu or gnits strictness.
4028 * configure.ac (AM_INIT_AUTOMAKE): Set gnu strictness during
4029 development and gnits strictness for releases. Based on Eric Blake's
4030 suggestion at
4031 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00019.html>.
4032
d43f77e7
PB
40332008-07-31 Paolo Bonzini <bonzini@gnu.org>
4034
4035 * NEWS: Clarify documentation of %language.
4036
fee2ed87
PB
40372008-07-31 Paolo Bonzini <bonzini@gnu.org>
4038
4039 Support usage of git-merge-changelog.
4040 * .gitattributes: New.
4041 * HACKING: Document usage of git-merge-changelog.
4042 * bootstrap: Install git-merge-changelog entries in .git/config
4043 if appropriate.
4044
78029cd5
JD
40452008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4046
4047 Remove remaining dependence on CVS Id keyword.
4048 * ChangeLog: For the sake of people still using CVS, don't use dollars
4049 when mentioning Id.
4050 * data/xslt/bison.xsl: Remove Id from header comments, where it was
4051 unusual anyway.
4052 * data/xslt/xml2dot.xsl: Likewise.
4053 * data/xslt/xml2text.xsl: Likewise.
4054 * data/xslt/xml2xhtml.xsl: Likewise.
4055 * doc/Doxyfile.in (PROJECT_NUMBER): Don't use ID.
4056 * doc/Makefile.am (neutralize): Remove, no longer needed.
4057 (.x.1): Don't use neutralize.
4058 (edit): Don't substitute for ID.
4059 (Doxyfile): Don't define Id, and thus don't depend on ChangeLog.
4060
c53d18b1
JD
40612008-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
4062
4063 Fix dependence on computed configure variables.
4064 * doc/Makefile.am (common_dep): Depend on $(top_srcdir)/configure not
4065 $(top_srcdir)/configure.ac so that changes to computed variables, such
4066 as PACKAGE_VERSION, are seen.
4067 * tests/Makefile.am ($(srcdir)/package.m4): Likewise.
4068
5523ac79
JD
40692008-07-20 Joel E. Denny <jdenny@ces.clemson.edu>
4070
4071 Update copyright dates for recent changes.
4072 * Makefile.am: Here.
4073 * src/Makefile.am: Here.
4074 * src/reduce.c: Here.
4075 * tests/reduce.at: Here.
4076
8fa36911
JD
40772008-07-18 Joel E. Denny <jdenny@ces.clemson.edu>
4078
4079 Use git-version-gen for version names between releases.
4080 * .cvsignore (.tarball-version, GNUmakefile, *~): Add.
4081 * .gitignore (/.tarball-version, /GNUmakefile, /*~): Add.
4082 * .prev-version: New.
4083 * .version.in: Remove.
78029cd5 4084 * ChangeLog: Remove the Id previously used for capturing the CVS
8fa36911
JD
4085 revision.
4086 * GNUmakefile: Remove, now copied from Gnulib.
4087 * Makefile.am: Add code suggested by comments in
4088 build-aux/git-version-gen.
4089 (EXTRA_DIST): Remove GNUmakefile, handled by Gnulib. Add maint.mk,
4090 .prev-version, and .version.
4091 * NEWS (2.3b+): Rename to...
4092 (?.?): ... this because we're dropping the "+" version naming scheme,
4093 but, in general, we still can't be sure of our next release name.
4094 * bootstrap: Add a quick hack to remove from .gitignore the
4095 GNUmakefile entry that gnulib adds. We already have a /GNUmakefile
4096 entry. This should really be fixed in gnulib instead.
4097 * bootstrap.conf (gnulib_modules): Add gnumakefile.
4098 * configure.ac (AC_INIT): Set version name by invoking
4099 build-aux/git-version-gen.
4100 (AC_CONFIG_FILES): Remove .version, now generated by
4101 build-aux/git-version-gen.
4102 * maint.mk: New, copied from coreutils.
4103 * doc/.cvsignore (bison.1): Add.
4104 * doc/.gitignore (/bison.1): Add.
4105 * doc/bison.1: Remove, generated.
4106 * src/.cvsignore (revision.c): Remove.
4107 * src/.gitignore (/revision.c): Remove.
4108 * src/Makefile.am (bison_SOURCES): Remove revision.c and revision.h.
4109 (BUILT_SOURCES): Remove revision.c.
4110 (revision.c): Remove.
4111 * src/getargs.c (version): Don't print revision after the VERSION.
4112 * src/revision.h: Remove.
4113
bcf07cb7
JD
41142008-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
4115
4116 Fix untranslatable composition of sentences. Reported by Goran
4117 Uddeborg at
4118 <http://lists.gnu.org/archive/html/bug-bison/2008-06/msg00000.html>.
4119 * THANKS (Goran Uddeborg): Add.
4120 * src/reduce.c (reduce_print): Report the number of nonterminals and
4121 rules useless in the grammar in separate sentences.
4122 * tests/reduce.at (Useless Rules): Update output.
4123 (Reduced Automaton): Likewise.
4124 (Underivable Rules): Likewise.
4125 (Empty Language): Likewise.
4126
9aacab9a
JD
41272008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4128
4129 Fix some .gitignore and .cvsignore problems.
4130 * bootstrap (insert_sorted_if_absent): Replace all uses with...
4131 (insert_vc_ignore): ... this new function, which prepends `/' to all
4132 .gitignore entries before passing them to insert_sorted_if_absent.
4133 * bootstrap.conf (vc_ignore): Set to '.cvsignore .gitignore' so that
4134 .cvsignore files are maintained even though Bison developers run
4135 bootstrap while using Git.
4136 * .cvsignore (*.patch *.log log patches applied): Remove, apparently
4137 unneeded by Bison.
4138 (gnulib): Add.
4139 * .gitignore (/*.patch *.log log patches applied): Remove, broken and
4140 unneeded. Reported by Eric Blake.
4141 * lib/.gitignore (/*~): Add.
4142 * po/.cvsignore, runtime-po/.cvsignore: Sync with .gitignore.
4143 * examples/calc++/.gitignore (/calc++.exe): Add. Reported by Eric
4144 Blake.
4145 * src/.gitignore (/bison.exe): Add. Reported by Eric Blake.
4146
a9fc7990
JD
41472008-07-15 Joel E. Denny <jdenny@ces.clemson.edu>
4148
4149 Improve forward-compatibility with GNU M4. Reported by Eric Blake at
4150 <http://lists.gnu.org/archive/html/bug-bison/2008-07/msg00000.html>.
4151 * bootstrap.conf (gnulib_modules): Add unsetenv.
4152 * lib/.gitignore, lib/.cvsignore (/unsetenv.c): Add.
4153 * m4/.gitignore, m4/.cvsignore (/environ.m4): Add.
4154 (/setenv.m4): Add.
4155 * src/output.c (output_skeleton): For the m4 invocation, pass -dV as
4156 the first argument because it may become position-dependent, and unset
4157 POSIXLY_CORRECT so Bison's skeletons have access to GNU M4 extensions.
4158 Add comments explaining these issues in more detail.
4159
0f1d6f10
JD
41602008-07-14 Joel E. Denny <jdenny@ces.clemson.edu>
4161
4162 Add .gitignore everywhere based on .cvsignore.
4163 * .gitignore: New.
4164 * build-aux/.gitignore: New.
4165 * data/.gitignore: New.
4166 * doc/.gitignore: New.
4167 * etc/.gitignore: New.
4168 * examples/.gitignore: New.
4169 * examples/calc++/.gitignore: New.
4170 * lib/.gitignore: New.
4171 * m4/.gitignore: New.
4172 * po/.gitignore: New.
4173 * runtime-po/.gitignore: New.
4174 * src/.gitignore: New.
4175 * tests/.gitignore: New.
4176
7bd1665a
JD
41772008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4178
4179 * NEWS (2.3b+): New section, empty for now.
4180 * configure.ac (AC_INIT): 2.3b -> 2.3b+.
4181
72c5b982
JD
41822008-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
4183
4184 * NEWS (2.3b): Update release date since there has been a delay in
4185 getting the announcements and tarballs out.
4186
bd02cd5d
JD
41872008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4188
4189 * NEWS: Version 2.3b.
4190 * configure.ac (AC_INIT): Likewise.
4191 (PACKAGE_COPYRIGHT_YEAR): Update to 2008.
4192
9126263e
JD
41932008-05-23 Joel E. Denny <jdenny@ces.clemson.edu>
4194
4195 * HACKING: Don't say don't mention HACKING in the ChangeLog. We've
4196 been doing it for years.
4197 (Test suite): Mention maintainer-push-check and maintainer-xml-check.
4198 (Release Procedure): Add FIXME about make alpha being unmaintained.
4199
fa6aa7b3
JD
42002008-05-13 Joel E. Denny <jdenny@ces.clemson.edu>
4201
4202 * data/yacc.c: Reformat m4 a little for readability.
4203 * src/lalr.c (build_relations): Correct comment.
4204
d30b312d
JMG
42052008-05-12 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4206
4207 DJGPP specific issue.
4208 * djgpp/config.sed: Fixes required to run configure scripts generated
4209 by autoconf 2.62.
4210
138d4cd9
JD
42112008-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
4212
4213 * HACKING (Release Procedure): translation@iro.umontreal.ca is now
4214 coordinator@translationproject.org.
4215
8f7e2e1f
JD
42162008-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
4217
4218 * THANKS: Add Eric Blake.
4219
f55efa38
JD
42202008-04-23 Eric Blake <ebb9@byu.net>
4221
4222 Revert prior patch, by working around autoconf regression.
4223 * tests/output.at (m4_expand): Add workaround for autoconf 2.62.
4224 ("Output file name: ("): Uncomment test.
4225 ("Output file name: )"): Likewise.
4226 Based on an idea from Noah Misch.
4227
096c9f9d
JD
42282008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4229
4230 Work-around an Autoconf 2.62 AT_SETUP bug that was not present in
4231 2.61. Reported by Juan Manuel Guerrero at
4232 <http://lists.gnu.org/archive/html/bug-bison/2008-04/msg00011.html>.
4233 * tests/output.at ("Output file name: ("): Comment out test case for
4234 now.
4235 ("Output file name: )"): Likewise.
4236
0f664b89
JD
42372008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4238
4239 * GNUmakefile: Update git-version-gen invocation so make dist
4240 succeeds.
4241
1cfe6375
JD
42422008-04-21 Joel E. Denny <jdenny@ces.clemson.edu>
4243
4244 Update to the current gnulib CVS repository, and fix trigraph handling
4245 in Bison.
4246 * bootstrap: Update gnulib CVS repository URL.
4247 (symlink_to_dir): Encapsulate the code that guarantees the destination
4248 directory exists into...
4249 (check_dst_dir): ... this new function, and...
4250 (cp_mark_as_generated): ... reuse it here so that bootstrap doesn't
4251 fail when copying files into lib/uniwidth/.
4252 * src/output.c (prepare_symbols): When writing yytname muscles, where
4253 symbol names will be encoded in C-string literals, tell quotearg to
4254 escape trigraphs. This used to be the default in gnulib.
4255 * tests/regression.at (Token definitions): Because of the change in
4256 gnulib's quotearg behavior, string_as_id in parse-gram.y no longer
4257 escapes trigraphs in symbol names. Thus, yytname no longer has
4258 trigraphs unnecessarily doubly escaped. Update test case output.
4259 Extend test case to be sure Bison's own error messages will no longer
4260 have trigraphs in symbol names unnecessarily escaped once.
4261
74c52fc8
JD
42622008-04-20 Joel E. Denny <jdenny@ces.clemson.edu>
4263
4264 Fix make dist infinite loop reported by Juan Manuel Guerrero at
4265 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00009.html>.
4266 * .cvsignore: Add .version.
4267 * .version.in: New.
4268 * bootstrap.conf (gnulib_modules): Add git-version-gen.
4269 * configure.ac (AC_CONFIG_FILES): Add .version.
4270 * build-aux/.cvsignore: Add git-version-gen.
4271
8e55b3aa
JD
42722008-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
4273
4274 * NEWS (2.3a+): Mention that -g now takes an argument.
4275 * doc/bison.texinfo (Bison Options): Reword -W entry a little for
4276 consistency. Update the -g and -x entries now that they take
4277 arguments. Use brackets to indicate optional arguments.
4278 * src/getargs.c (usage): Explain the relationship between arguments of
4279 long and short options more completely. Document --defines and -d
4280 separately since the former takes an argument but, for POSIX Yacc, the
4281 latter does not.
4282 (short_options): Let -W take an optional argument like --warnings.
8452fdd9 4283 (getargs): Sort cases.
8e55b3aa 4284
59c5ac72
AD
42852008-02-28 Akim Demaille <demaille@gostai.com>
4286
4287 * doc/bison.texinfo: Fix a few typos.
4288
118d4978
AD
42892008-02-28 Akim Demaille <akim@epita.fr>
4290
4291 * doc/bison.texinfo (Bison Options): Document -W.
4292 Based on Joel E. Denny's NEWS entry, and Automake's documentation.
4293
7020f1e9
AD
42942008-02-28 Akim Demaille <akim@epita.fr>
4295
4296 * src/getargs.c (short_options): Split and sort for readability.
4297 -g and -x take optional arguments, just like their long options.
4298 * build-aux/cross-options.pl: Use /x to make the regexp easier to
4299 understand.
4300 Fix the handling of $opt which resulted in all the argument to be
4301 considered as optional.
4302
59da312b
JD
43032008-02-22 Joel E. Denny <jdenny@ces.clemson.edu>
4304
4305 * NEWS (2.3a+): Don't say %language is experimental. Mention Java and
4306 say its interface is experimental.
4307 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
4308 Java.
4309 (Bison Options): In the -L and --language entry, mention Java.
4310 (Java Bison Interface): Say the interface is experimental.
4311 * src/getargs.c (usage): Mention -L and --language.
4312
4313 * NEWS (2.3a+): Say the push parsing interface is experimental.
4314 * doc/bison.texinfo (Push Decl): Likewise.
4315 (Decl Summary): Likewise in the "%define api.push_pull" entry.
4316 (Push Parser Function): Likewise.
4317 (Pull Parser Function): Likewise.
4318 (Parser Create Function): Likewise.
4319 (Parser Delete Function): Likewise.
4320 (Table of Symbols): Likewise in the yypstate_delete, yypstate_new,
4321 yypull_parse, and yypush_parse entries.
4322
4323 * NEWS (2.3a+): Mention XML support, and say the schema is
4324 experimental.
4325 * doc/bison.texinfo (Bison Options): Mention -x and --xml.
4326 * src/getargs.c (usage): Say the XML schema is experimental.
4327
4328 * NEWS (2.3a+): Say option instead of flag.
4329
2bb3ebec
WP
43302008-02-21 Wojciech Polak <polak@gnu.org>
4331
4332 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Change footer
4333 text.
4334
333e670c
JD
43352008-02-20 Joel E. Denny <jdenny@ces.clemson.edu>
4336
4337 Fix impure push parser compile error reported by Bob Rossi at
4338 <http://lists.gnu.org/archive/html/help-bison/2008-02/msg00023.html>.
4339 * data/yacc.c: Clean up whitespace in the output a little.
4340 (yypstate_allocated): Define for impure push parsers regardless of
4341 whether the pull interface is also requested.
4342 * tests/push.at (Push Parsing: Multiple impure instances): Extend to
4343 check impure push parsers without the pull interface.
4344
4345 * data/yacc.c (yypstate_new): Don't try to invoke yyerror since
4346 yyerror takes arguments specified by %parse-param while yypstate_new
4347 does not.
4348 * doc/bison.texinfo (Parser Create Function): Document that
4349 yypstate_new returns 0 for multiple impure parser instances.
4350 * tests/push.at (Push Parsing: Multiple impure instances): Update
4351 expected stderr output.
4352
798096e1
JD
43532008-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
4354
4355 * runtime-po/POTFILES.in (push.c): Remove.
4356
9ca7f077
JD
43572008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4358
4359 * data/Makefile.am (dist_pkgdata_DATA): Remove push.c.
4360 * data/push.c: Rename to...
4361 * data/yacc.c: ... this, overwriting it.
4362 * etc/bench.pl.in (bench_grammar): `%pure-parser'-> `%define api.pure'.
4363 `%push-pull-parser' -> `%define api.push_pull "both"'.
4364 Remove old yacc.c tests, and update push.c tests to yacc.c.
4365
42ee26bb
JD
43662008-02-17 Joel E. Denny <jdenny@ces.clemson.edu>
4367
4368 * data/bison.m4 (b4_percent_code_get): Output %code block comments like
4369 `"%code top" blocks' instead of `%code "top" blocks'.
4370 * data/push.c: Import yacc.c changes from 2008-01-09 and 2007-08-03.
4371 Clean up whitespace in the output a little.
4372
b1cc23c4
JD
43732008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4374
4375 Fix documentation problems reported by Tim Josling at
4376 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00013.html>.
4377 * NEWS (2.3a+): Mention removal of --no-parser, -n, and %no-parser.
4378 * doc/bison.texinfo (Token Decl): Token numbers are *nonnegative*
4379 integers. Explain the effect of literal string aliases on error
4380 messages. Copy token 0 documentation from the C++ skeleton
4381 documentation.
4382
ab7f29f8
JD
43832008-02-16 Joel E. Denny <jdenny@ces.clemson.edu>
4384
4385 Accept a token number in a %left, %right, or %nonassoc for POSIX
4386 conformance. Reported by Tim Josling at
4387 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00010.html>.
4388 * NEWS (2.3a+): Mention.
4389 * doc/bison.texinfo (Precedence Decl): Describe how literal strings
4390 and code numbers are treated by precedence declarations.
4391 * src/parse-gram.y (precedence_declaration): Use symbols.prec instead
4392 of symbols.1.
4393 (symbols.prec): New, just like symbols.1 but uses symbol.prec instead
4394 of symbol.
4395 (symbol.prec): New, just like symbol but allows INT.
4396 * src/symtab.c (symbol_user_token_number_set): Remove an aver that no
4397 longer holds.
4398 * tests/regression.at (Token number in precedence declaration): New
4399 test case.
4400
a924ef36
JMG
44012008-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4402
4403 DJGPP specific issues.
4404 * djgpp/config.bat: Add filenames that are not 8.3 clean and that must
4405 be changed. Copyright timestamp adjusted.
4406 * djgpp/config.sed: Add filenames that are not 8.3 clean and that must
4407 be changed. Copyright timestamp adjusted.
4408 * djgpp/config.site: Copyright timestamp adjusted.
4409 * djgpp/config_h.sed: Copyright timestamp adjusted.
4410 * djgpp/djunpack.bat: Copyright timestamp adjusted.
4411 * djgpp/fnchnage.lst: Add filenames that are not 8.3 clean to the
4412 filename translation list.
4413 * djgpp/subpipe.c (init_subpipe): Check the environment variables
4414 TMPDIR, TMP and TEMP, in that order, to determinate where the temp
4415 files shall be created. Before trying to use the temp dir where the
4416 environment variable points to check that the dir really exists. If
4417 not default to the cwd as temp dir. Copyright timestamp adjusted.
4418 * djgpp/subpipe.h: Copyright timestamp adjusted.
4419 * djgpp/testsuite.sed: Copyright timestamp adjusted.
4420
389c8cfd
PE
44212008-01-30 Paul Eggert <eggert@cs.ucla.edu>
4422
4423 * doc/bison.texinfo: Update Back-Cover text to reflect new GNU wording.
4424
5d1cfef4
PE
44252008-01-09 Paul Eggert <eggert@cs.ucla.edu>
4426
4427 * data/yacc.c (yyparse): Correct the comment when locations aren't used.
4428 Problem reported by Claudio Saavedra in
4429 <http://lists.gnu.org/archive/html/bug-bison/2008-01/msg00003.html>.
4430
e2dcf996
WP
44312008-01-05 Wojciech Polak <polak@gnu.org>
4432
4433 * data/xslt/xml2xhtml.xsl (xsl:template match="/"): Precede an XHTML
4434 document's title with the input grammar file name.
4435
da730230
JD
44362007-12-22 Joel E. Denny <jdenny@ces.clemson.edu>
4437
4438 Automate regression testing of the XML/XSLT implementation. Discussed
4439 starting at
4440 <http://lists.gnu.org/archive/html/bison-patches/2007-11/msg00021.html>.
4441 * configure.ac (XSLTPROC): New substitution.
4442 * Makefile.am (maintainer-xml-check): New phony target invoking...
4443 * tests/Makefile.am (maintainer-xml-check): ... this new phony target
4444 invoking make maintainer-check with BISON_TEST_XML=1.
4445 * tests/atlocal.in (XSLTPROC): New.
4446 * tests/local.at (AT_BISON_CHECK): New macro to (1) instruct Valgrind
4447 not to report reachable memory when Bison is expected to have a
4448 non-zero exit status and (2) to compare XML/XSLT output with --graph
4449 and --report=all output for every working grammar when
4450 BISON_TEST_XML=1.
4451 (AT_BISON_CHECK_NO_XML): Likewise, but skip XML checks.
4452 (AT_BISON_CHECK_XML): New.
4453 (AT_QUELL_VALGRIND): New.
4454 * tests/testsuite.at (ORIGINAL_AT_CHECK): Remove this and...
4455 (AT_CHECK): ... don't redefine this since this was the old way to
4456 quell Valgrind.
4457 * tests/actions.at: Rewrite all AT_CHECK invocations for bison as
4458 AT_BISON_CHECK invocations.
4459 * tests/c++.at: Likewise.
4460 * tests/calc.at: Likewise.
4461 * tests/conflicts.at: Likewise.
4462 * tests/cxx-type.at: Likewise.
4463 * tests/existing.at: Likewise.
4464 * tests/glr-regression.at: Likewise.
4465 * tests/headers.at: Likewise.
4466 * tests/input.at: Likewise.
4467 * tests/java.at: Likewise.
4468 * tests/output.at: Likewise.
4469 * tests/push.at: Likewise.
4470 * tests/reduce.at: Likewise.
4471 * tests/regression.at: Likewise.
4472 * tests/sets.at: Likewise.
4473 * tests/skeletons.at: Likewise.
4474 * tests/synclines.at: Likewise.
4475 * tests/torture.at: Likewise.
4476 (Big triangle): Use AT_BISON_CHECK_NO_XML instead since this grammar
4477 tends to hang xsltproc.
4478 (Big horizontal): Likewise.
4479
408476bc
JD
44802007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4481
4482 In XML output, remove redundant class attribute on symbol element.
4483 * data/xslt/bison.xsl (xsl:key name="bison:symbolByName"): New.
4484 * data/xslt/xml2xhtml.xsl (xsl:template match="symbol"): Use it to
4485 look up a symbol to determine whether it's a nonterminal or terminal.
4486 * src/gram.c (rule_rhs_print_xml): Remove class attribute.
4487 * src/state.c (state_rule_lookahead_tokens_print_xml): Likewise.
4488
4489 Add prec/assoc information to XML output.
4490 * src/gram.c (grammar_rules_print_xml): For each rule that has a
4491 %prec, add a percent_prec attribute.
4492 * src/print-xml.c (print_grammar): For each terminal that has a
4493 precedence or associativity, add a prec or assoc attribute.
4494 (xml_indent): New.
4495 (xml_puts): Use xml_indent.
4496 (xml_printf): Use xml_indent.
4497 * src/print-xml.h (xml_indent): Prototype.
4498
4499 * tests/existing.at (GNU pic Grammar): Fix a rule miscopied from
4500 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
4501
d4a26c48
JD
45022007-12-08 Joel E. Denny <jdenny@ces.clemson.edu>
4503
4504 * data/xslt/bison.xsl (bison:ruleNumber): Rename to...
4505 (bison:ruleByNumber): ... this for clarity.
4506 * data/xslt/xml2dot.xsl (xsl:template match="item"): Update.
4507 * data/xslt/xml2text.xsl (xsl:template match="item"): Update.
4508 (xsl:template match="reduction"): Update.
4509 (xsl:template match="item"): Update.
4510 (xsl:template match="reduction"): Update.
4511
4512 In the XML output, don't print the list of rules where symbols appear.
4513 Compute it in XSLT instead. Discussed at
4514 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00024.html>.
4515 * data/xslt/bison.xsl (bison:ruleByLhs): New.
4516 (bison:ruleByRhs): New.
4517 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Use
4518 bison:ruleByRhs.
4519 (xsl:template match="terminal/rule"): Remove.
4520 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4521 bison:ruleByRhs.
4522 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4523 Remove.
4524 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Use
4525 bison:ruleByRhs and mode="number-link" for rule template.
4526 (xsl:template match="terminal/rule"): Remove.
4527 (xsl:template match="nonterminal"): Use bison:ruleByLhs and
4528 bison:ruleByRhs and mode="number-link" for rule template.
4529 (xsl:template match="nonterminal/left/rule|nonterminal/right/rule"):
4530 Rewrite as...
4531 (xsl:template match="rule" mode="number-link"): ... this.
4532 * src/print-xml.c (print_grammar): Don't print the list of rules.
4533
ef1b4273
JD
45342007-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
4535
4536 Don't let --report affect XML output; always print all information.
4537 Discussed at
4538 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00020.html>.
4539 * src/conflicts.c (log_resolution): Implement.
4540 * src/print-xml.c (print_core): Implement.
4541 (print_state): Implement.
4542 (print_xml): Implement.
4543
4544 * NEWS (2.3a+): Fix quotes.
4545 * src/parse-gram.y (prologue_declaration): For consistency with -v,
4546 don't let %verbose clear the list specified by --report.
4547
0f6cd9e3
AD
45482007-11-26 Akim Demaille <akim@epita.fr>
4549
4550 * data/Makefile.am (dist_pkgdata_DATA): Ship and install bison.xsl.
4551
d80fb37a
JD
45522007-11-24 Joel E. Denny <jdenny@ces.clemson.edu>
4553
4554 In the XML output, list useless and unused symbols and rules with the
4555 useful ones and add a "usefulness" attribute. Discussed starting at
4556 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00017.html>.
4557 * src/gram.c (grammar_rules_partial_print_xml): Remove.
4558 (grammar_rules_print_xml): Print all rules instead of just those
4559 useful in the grammar, and add a "usefulness" attribute.
4560 * src/gram.h (grammar_rules_partial_print_xml): Remove prototype.
4561 * src/print-xml.c (print_rules_useless_in_parser): Remove.
4562 (print_grammar): Print all nonterminals instead of just useful ones,
4563 and add a "usefulness" attribute to nonterminals and terminals.
4564 (print_xml): Don't print a separate "reductions" or
4565 "rules-useless-in-parser" element.
4566 * src/reduce.c (reduce_output): Use reduce_token_unused_in_grammar.
4567 (reduce_xml): Remove.
4568 (reduce_token_unused_in_grammar): New.
4569 (reduce_nonterminal_useless_in_grammar): New.
4570 * src/reduce.h (reduce_xml): Remove prototype.
4571 (reduce_token_unused_in_grammar): Add prototype.
4572 (reduce_nonterminal_useless_in_grammar): Add prototype.
4573 * data/xslt/xml2text.xsl: Update for XML changes.
4574 * data/xslt/xml2xhtml.xsl: Update for XML changes.
4575 * tests/reduce.at (Useless Terminals): Update output.
4576 (Useless Rules): Update output.
4577 (Reduced Automaton): Update output.
4578
4579 Say "Terminals unused in grammar" instead of "Unused terminals".
4580 * NEWS (2.3a+): Update.
4581 * doc/bison.texinfo (Understanding): Update example output.
4582 * src/reduce.c (reduce_output): Implement.
4583 * data/xslt/xml2text.xsl: Implement.
4584 * data/xslt/xml2xhtml.xsl: Implement.
4585
1bb2bd75
JD
45862007-11-18 Joel E. Denny <jdenny@ces.clemson.edu>
4587
4588 Accept --report-file=FILE to override the default `.output' filename.
4589 * NEWS (2.3a+): Mention.
4590 * doc/bison.texinfo (Bison Options): Add an entry.
4591 * src/files.c (compute_output_file_names): Don't override
4592 spec_verbose_file if already set.
4593 * src/getargs.c (usage): Document --report-file.
4594 (REPORT_FILE_OPTION): New anonymous enum member.
4595 (long_options): Add entry for it.
4596 (getargs): Add case for it setting spec_verbose_file.
4597
4598 * build-aux/cross-options.pl: Don't record a short option just because
4599 there's an arg.
4600 * doc/.cvsignore: Add yacc.1.
4601
a005a9c4
AD
46022007-11-14 Akim Demaille <akim@epita.fr>
4603
4604 * doc/yacc.1.in: New.
4605 * configure.ac, doc/Makefile.am: Adjust.
4606 * configure.ac (PACKAGE_COPYRIGHT_YEAR): New substitution, and new
4607 config.h symbol.
4608 Use AC_SUBST for assignments too.
4609 * src/getargs.c (version): Use PACKAGE_COPYRIGHT_YEAR.
4610
cff03fb2
JD
46112007-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
4612
4613 * src/gram.c: Remove comments that duplicate comments in gram.h.
4614
4615 When reporting useless rules and nonterminals, say "useless in grammar"
4616 instead of "useless", and say "useless in parser" instead of "never
4617 reduced". Discussed starting at
4618 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00033.html>.
4619 * NEWS (2.3a+): Mention this change.
4620 * data/xslt/xml2text.xsl: Update output text and expected input XML
4621 element names to match changes below.
4622 * data/xslt/xml2xhtml.xsl: Likewise.
4623 (xsl:template match="bison-xml-report"): Add missing entry in Table of
4624 Contents: "Rules useless in parser due to conflicts".
4625 * doc/bison.texinfo (Decl Summary): Reword a little.
4626 (Understanding): Update example output for changes below.
4627 * src/gram.c: (rule_useful_p): Rename to...
4628 (rule_useful_in_grammar_p): ... this.
4629 (rule_useless_p): Rename to...
4630 (rule_useless_in_grammar_p): ... this.
4631 (rule_never_reduced_p): Rename to...
4632 (rule_useless_in_parser_p): ... this.
4633 (grammar_rules_print): Update for renames.
4634 (grammar_rules_print_xml): Update for renames.
4635 (grammar_rules_never_reduced_report): Rename to...
4636 (grammar_rules_useless_report): ... this since it is used for either
4637 kind of useless rule.
4638 * src/gram.h: Reword comments and update function names in prototypes.
4639 * src/main.c (main): Say "rule useless in parser due to conflicts".
4640 * src/print-xml.c (print_rules_never_reduced): Rename to...
4641 (print_rules_useless_in_parser): ... this, and rename output XML
4642 element "rules-never-reduced" to "rules-useless-in-parser".
4643 (print_xml): Update for rename.
4644 * src/print.c (print_results): Say "Rules useless in parser due to
4645 conflicts".
4646 * src/reduce.c (reduce_grammar_tables): Say "rule useless in grammar".
4647 (nonterminals_reduce): Say "nonterminal useless in grammar".
4648 (reduce_output): Say "Nonterminals useless in grammar".
4649 Say "Rules useless in grammar".
4650 (reduce_xml): Rename output XML element "useless" to
4651 "useless-in-grammar".
4652 (reduce_print): Don't report the count of grammatically useless rules
4653 as "rules never reduced" just because %yacc is specified.
4654 In the correct report of this count, say nonterminal(s) and rule(s)
4655 "useless in grammar".
4656 * tests/conflicts.at (S/R in initial): Update expected output.
4657 (Defaulted Conflicted Reduction): Likewise.
4658 (Unreachable States After Conflict Resolution): Likewise.
4659 * tests/existing.at (GNU pic Grammar): Likewise.
4660 * tests/reduce.at (Useless Nonterminals): Likewise.
4661 (Useless Rules): Likewise.
4662 (Reduced Automaton): Likewise.
4663 (Underivable Rules): Likewise.
4664 (Empty Language): Likewise.
4665
66f0441d
JD
46662007-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
4667
4668 * data/bison.m4 (b4_cat): Put a newline after the end delimiter of the
4669 here document and before the EOF so that BSD's implementation of Bourne
4670 shell doesn't parse the delimiter as part of the here document.
4671 * doc/.cvsignore: Add cross-options.texi.
4672 * src/getargs.c (usage): Add a blank line after the warning categories.
4673
d0ee4105
PB
46742007-11-08 Paolo Bonzini <bonzini@gnu.org>
4675
4676 * data/lalr1.java (Lexer): Remove usage of b4_pure_if.
4677
e8b1fb9b
AD
46782007-11-05 Akim Demaille <akim@epita.fr>
4679
4680 Remove Id: from bison.1.
4681 * doc/Makefile.am (remove_time_stamp): Include the sed invocation.
4682 (perl -0777 -pi -e 's/\.PP\nId): New.
4683 (.x.1): Use it to ignore the version control revision.
4684
2f7a96b5
AD
46852007-11-05 Akim Demaille <demaille@gostai.com>
4686
4687 * build-aux/Makefile.am: Ship cross-options.pl.
4688 * doc/Makefile.am: Always refer to cross-options.texi with
4689 $(srcdir).
4690 (MAINTAINERCLEANFILES): Add it.
4691
f4101aa6
AD
46922007-11-04 Akim Demaille <demaille@gostai.com>
4693
4694 Generate the long/short option cross-table.
4695 * build-aux/cross-options.pl: New.
4696 * doc/Makefile.am (cross-options.texi): New.
4697 * doc/bison.texinfo: Use it.
4698
727a1401
AD
46992007-11-04 Akim Demaille <demaille@gostai.com>
4700
4701 Generate bison.1 using help2man.
4702 * doc/common.x, doc/bison.x: New.
4703 * doc/Makefile.am (bison.1, .x.1): New.
4704 The code is taken from autoconf-2.61/man/Makefile.am.
4705 * configure.ac: Look for help2man.
4706
6aeb9c57
AD
47072007-11-04 Akim Demaille <demaille@gostai.com>
4708
4709 Complete --help.
4710 * src/getargs.c (usage): Document -W, make it clear that -d,
4711 -g and -x have optional arguments.
4712
d7be4085
AD
47132007-11-04 Akim Demaille <demaille@gostai.com>
4714
4715 Find sha1sum when named gsha1sum.
4716 * bootstrap (find_tool): New.
4717 ($SHA1SUM): New.
4718
d9df47b6
JD
47192007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4720
4721 Deprecate %pure-parser and add `%define api.pure'. Discussed starting
4722 at
4723 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00006.html>.
4724 * NEWS (2.3a+): Mention.
4725 * data/bison.m4 (b4_pure_if): Don't define it here.
4726 * data/c.m4 (b4_identification): Depend on individual skeletons to
4727 define b4_pure_flag, b4_push_flag, or b4_pull_flag if they use the
4728 values of the %define variables api.pure or api.push_pull. Define
4729 YYPURE, YYPUSH, and YYPULL accordingly.
4730 * data/glr.c: Define b4_pure_if based on `%define api.pure' unless
4731 glr.cc has already defined b4_pure_flag.
4732 * data/push.c: Define b4_pure_if based on `%define api.pure'.
4733 Remove YYPUSH and YYPULL since they're back in b4_identification again.
42ee26bb 4734 * data/yacc.c: Define b4_pure_if based on `%define api.pure'.
d9df47b6
JD
4735 * doc/bison.texinfo (Pure Decl): Update.
4736 (Push Decl): Update.
4737 (Decl Summary): Add api.pure to %define entry.
4738 In %pure-parser entry, say it's deprecated and reference %define.
4739 (Pure Calling): Update.
4740 (Error Reporting): Update.
4741 (C++ Scanner Interface): Update.
4742 (How Can I Reset the Parser): Update.
4743 (Table of Symbols): In %pure-parser entry, say it's deprecated and
4744 reference %define.
4745 * src/getargs.c (pure_parser): Remove global variable.
4746 * src/getargs.h (pure_parser): Remove extern.
4747 * src/output.c (prepare): Don't define pure_flag muscle.
4748 * src/parse-gram.y (prologue_declaration): Implement %pure-parser as a
4749 wrapper around `%define api.pure'.
4750 * tests/calc.at (Simple LALR Calculator): Update.
4751 (Simple GLR Calculator): Update.
4752 * tests/cxx-type.at (GLR: Resolve ambiguity, pure, no locations):
4753 Update.
4754 (GLR: Resolve ambiguity, pure, locations): Update.
4755 (GLR: Merge conflicting parses, pure, no locations): Update.
4756 (GLR: Merge conflicting parses, pure, locations): Update.
4757 * tests/glr-regression.at (Uninitialized location when reporting
4758 ambiguity): Update
4759 * tests/input.at (Unused %define api.pure): New test case.
4760 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Update definition for
4761 AT_PURE_IF and AT_PURE_AND_LOC_IF.
4762 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4763
c373bf8b
JD
47642007-10-28 Joel E. Denny <jdenny@ces.clemson.edu>
4765
4766 %define push_pull -> %define api.push_pull. Discussed starting at
4767 <http://lists.gnu.org/archive/html/bison-patches/2007-09/msg00005.html>.
4768 * data/push.c: Expect the new name.
4769 * data/yacc.c: Likewise.
4770 * doc/bison.texinfo (Push Decl): Update.
4771 (Decl Summary): Update %define entry.
4772 (Push Parser Function): Update.
4773 (Pull Parser Function): Update.
4774 (Parser Create Function): Update.
4775 (Parser Delete Function): Update.
4776 * tests/calc.at (Simple LALR Calculator): Update.
4777 * tests/input.at (%define enum variables): Update.
4778 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update.
4779 (Push Parsing: Multiple impure instances): Update.
4780 (Push Parsing: Unsupported Skeletons): Update.
4781 * tests/torture.at (Exploding the Stack Size with Alloca): Update.
4782 (Exploding the Stack Size with Malloc): Update.
4783
4784 * NEWS (2.3a+): Add an entry for the push parser, and clean up the
4785 other entries some.
4786
32f19b6b
JD
47872007-10-27 Joel E. Denny <jdenny@ces.clemson.edu>
4788
4789 For the XML output's terminal element, rename @number to @token-number,
4790 and add @symbol-number. In the nonterminal element, rename @number to
4791 @symbol-number. Discussed starting at
4792 <http://lists.gnu.org/archive/html/bison-patches/2007-10/msg00040.html>.
4793 * data/xslt/xml2text.xsl (xsl:template match="terminal"): Update for
4794 renames.
4795 (xsl:template match="nonterminal"): Likewise.
4796 * data/xslt/xml2xhtml.xsl (xsl:template match="terminal"): Likewise.
4797 (xsl:template match="nonterminal"): Likewise.
4798 * src/print-xml.c (print_grammar): Implement.
4799
255a6b90
JD
48002007-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
4801
4802 * data/xslt/xml2dot.xsl (xsl:template match="automaton/state"): After
4803 2007-10-11 change, the child elements here are items not rules.
408476bc 4804 (xsl:template match="item"): New.
255a6b90
JD
4805 (xsl:template match="rule"): Update for new reduced itemset.
4806 (xsl:template match="point"): Remove.
4807 (xsl:template match="empty"): For consistency with --graph, don't
4808 output "/* empty */".
4809 * data/xslt/xml2text.xsl (xsl:template match="terminal"): When invoking
4810 line-wrap, don't pass a negative value as first-line-length since this
4811 won't work with the following changes.
4812 (xsl:template name="line-wrap"): Simplify slightly.
4813 (xsl:template name="ws-search"): Eliminate recursion.
4814 * src/print_graph.c (print_core): Don't print a reduction's lookahead
4815 set next to an item whose dot is not at the end of the RHS even if it
4816 happens to be associated with the same rule.
4817
88c78747
JD
48182007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4819
31984206
JD
4820 Add %define lr.keep_unreachable_states.
4821 * NEWS (2.3a+): Mention it in the entry for unreachable state removal.
4822 * doc/bison.texinfo (Decl Summary): Mention it in the %define entry.
4823 * src/main.c (main): Implement it.
4824 * tests/conflicts.at (Unreachable States After Conflict Resolution):
4825 Extend to test it, and fix a typo.
4826
48272007-10-19 Joel E. Denny <jdenny@ces.clemson.edu>
4828
4829 * NEWS (2.3a+): Add entry for recent .output file lookahead set fix.
88c78747
JD
4830 * doc/bison.texinfo (Understanding): Remove a bogus lookahead set in
4831 the example .output text.
4832 * tests/regression.at (Extra lookahead sets in report): Improve wording
4833 of comments.
4834
b7a70162
WP
48352007-10-17 Wojciech Polak <polak@gnu.org>
4836
4837 * src/print-xml.c (print_grammar): Renamed
4838 <terminal> and <nonterminal> attributes:
4839 "type" to "number" and "symbol" to "name".
4840 * data/xslt/xml2text.xsl (xsl:template match="terminal"):
4841 Use new attribute names.
4842 (xsl:template match="nonterminal"): Likewise.
4843 * data/xslt/xml2xhtml.xsl: Likewise.
4844
a0de5091
JD
48452007-10-17 Joel E. Denny <jdenny@ces.clemson.edu>
4846
4847 * doc/bison.texinfo (Bison Options): Add entry for --print-datadir.
4848 (Option Cross Key): Likewise.
4849
4850 * src/print-xml.c (print_core): Don't print a reduction's lookahead set
4851 next to an item whose dot is not at the end of the RHS even if it
4852 happens to be associated with the same rule.
4853 * src/print.c (print_core): Likewise.
4854 * tests/conflicts.at (Unresolved SR Conflicts): Update output.
4855 (Resolved SR Conflicts): Update output.
4856 * tests/regression.at (Extra lookahead sets in report): New test case.
4857
4c20d18d
WP
48582007-10-11 Wojciech Polak <polak@gnu.org>
4859
4860 * src/print-xml.c (print_core): Remove item set
4861 redundancy.
4862 * data/xslt/bison.xsl (bison:ruleNumber): New key.
4863 Improve processing time. Suggested by Joel E. Denny.
4864 * data/xslt/xml2dot.xsl (xsl:template name="escape"):
4865 Write xsl:param "required" attribute as comment.
4866 * data/xslt/xml2text.xsl (xsl:template match="item"): New.
4867 (xsl:template match="rule"): Support new reduced itemset.
4868 (xsl:template match="point"): Remove.
4869 * data/xslt/xml2xhtml.xsl: Likewise.
4870
f506ad1c
JD
48712007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4872
4873 * src/getargs.c (version): Update copyright year.
4874
21f1b063
JD
48752007-10-09 Joel E. Denny <jdenny@ces.clemson.edu>
4876
4877 Make xml2dot.xsl and --graph produce the same output.
4878 * data/xslt/xml2dot.xsl (xsl:template match="rule"): Use a `&#10;'
4879 instead of a `\n'. That is, don't add escapes yet or they'll be doubly
4880 escaped later.
4881 (xsl:template name="output-node"): Use the new escape template instead
4882 of the string-replace template directly.
4883 (xsl:template name="output-edge"): Likewise.
4884 (xsl:template name="escape"): New, escapes backslashes and newlines in
4885 addition to quotation marks.
4886 * src/graphviz.c (start_graph, output_node, output_edge): Add
4887 whitespace to output for legibility.
4888
4889 Make xml2text.xsl and --report produce the same output, and remove the
4890 XML "conflicts" element since a conflict summary is easily extracted
4891 from the automaton.
4892 * data/xslt/bison.xsl: New.
4893 (xsl:template match="state" mode="bison:count-conflicts): New.
4894 * data/xslt/xml2text.xsl: Import bison.xsl.
4895 (xsl:template match="bison-xml-report"): Instead of styling the
4896 "conflicts" element, style the "automaton" element with mode
4897 "conflicts". Unlike the former, the latter lists S/R and R/R
4898 conflicts for a state on the same line.
4899 (xsl:template match="conflicts"): Remove.
4900 (xsl:template match="conflict"): Remove.
4901 (xsl:template match="terminal"): Line-wrap the list of rules in which
4902 the terminal is used.
4903 (xsl:template match="nonterminal"): Likewise for nonterminals.
4904 (xsl:template match="automaton" mode="conflicts"): New.
4905 (xsl:template match="state" mode="conflicts"): New.
4906 (xsl:template name="line-wrap"): New.
4907 (xsl:template name="ws-search"): New.
4908 * data/xslt/xml2xhtml.xsl: Import bison.xsl.
4909 (xsl:template match="bison-xml-report"): Instead of styling the
4910 "conflicts" element, style the "automaton" element with mode
4911 "conflicts."
4912 (xsl:template match="conflicts"): Remove.
4913 (xsl:template match="conflict"): Remove.
4914 (xsl:template match="automaton" mode="conflicts"): New.
4915 (xsl:template match="state" mode="conflicts): New.
4916 * src/conflicts.c (conflicts_output_xml): Remove.
4917 * src/conflicts.h (conflicts_output_xml): Remove prototype.
4918 * src/print-xml.c (print_xml): Don't invoke conflicts_output_xml.
4919 * src/print.c (print_grammar): Consistently wrap at the 66th column so
4920 the corresponding XSLT is easier. Also, never wrap between a word and
4921 the comma that follows it.
4922
793fbca5
JD
49232007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4924
4925 Improve C++ namespace support. Discussed starting at
4926 <http://lists.gnu.org/archive/html/help-bison/2007-09/msg00016.html>.
4927 * data/c++.m4: (b4_namespace_ref, b4_namespace_open,
4928 b4_namespace_close): New macros that interpret the %define variable
4929 "namespace" so its value can contain "::" to indicate nested
4930 namespaces.
4931 * data/glr.cc (b4_namespace): Don't define, and replace all uses with
4932 the above macros.
4933 * data/lalr1.cc (b4_namespace): Likewise.
4934 * data/location.cc (b4_namespace): Likewise.
4935 * doc/bison.texinfo (Decl Summary): Move `%define push_pull' entry
4936 inside a new table in the general %define entry. Document `%define
4937 namespace' there as well. Point the %name-prefix entry to it since it
4938 explains it more completely in the case of C++.
4939 (C++ Bison Interface): Mention `%define namespace' instead of
4940 %name-prefix.
4941 (Table of Symbols): Remove the `%define push_pull' entry. The %define
4942 entry suffices.
4943 * tests/c++.at (Relative namespace references): New test case.
4944 (Absolute namespace references): New test case.
4945 (Syntactically invalid namespace references): New test case.
4946 * tests/input.at (C++ namespace reference errors): New test case.
4947
35b8730d
JD
49482007-10-08 Joel E. Denny <jdenny@ces.clemson.edu>
4949
4950 Add syncline support and location accessor to internal %define
4951 interfaces.
4952 * data/bison.m4 (b4_percent_define_get_loc): New.
4953 (b4_percent_define_get_syncline): New.
4954 (b4_percent_define_flag_if): Use b4_percent_define_get_loc.
4955 (b4_percent_define_default): Record defining location as line 1 rather
4956 than 0 for the sake of synchronizing #line's, and define
4957 b4_percent_define_syncline(VARIABLE).
4958 (b4_percent_define_check_values): Use b4_percent_define_get_loc.
4959 * src/muscle_tab.c (muscle_syncline_grow): New.
4960 (muscle_code_grow): Use muscle_syncline_grow.
4961 (muscle_percent_define_insert): Use muscle_percent_define_get_loc, and
4962 define b4_percent_define_syncline(VARIABLE).
4963 (muscle_percent_define_get_loc): New.
4964 (muscle_percent_define_get_syncline): New.
4965 (muscle_percent_define_flag_if): Use muscle_percent_define_get_loc, and
4966 remove some unused variables.
4967 (muscle_percent_define_default): Record defining location as line 1
4968 rather than 0 for the sake of synchronizing #line's, and define
4969 b4_percent_define_syncline(VARIABLE).
4970 (muscle_percent_define_check_values): Use
4971 muscle_percent_define_get_loc.
4972 * src/muscle_tab.h (muscle_percent_define_get_loc): Prototype.
4973 (muscle_percent_define_get_syncline): Prototype.
4974 * tests/skeletons.at (%define Boolean variables: invalid skeleton
4975 defaults): Update output for location change.
4976 (Complaining during macro argument expansion): Extend to test
4977 b4_percent_define_get_loc and b4_percent_define_get_syncline errors.
4978
7dc4a694
JD
49792007-10-07 Joel E. Denny <jdenny@ces.clemson.edu>
4980
4981 Fix some error-reporting macro bugs.
4982 * data/bison.m4 (b4_cat): New.
4983 (b4_error, b4_error_at): Use b4_cat to send error directives directly
4984 to stdout so they don't become arguments to other macros. Update
4985 comments and add examples.
4986 (b4_warn, b4_warn_at, b4_complain, b4_complain_at): Update comments and
4987 add examples.
4988 (b4_fatal, b4_fatal_at): Likewise, and invoke m4_exit(1) immediately
4989 after printing the error directive so that M4 doesn't report subsequent
4990 problems that are induced by this problem.
4991 * src/scan-skel.l: Recognize @` digraph outside of directive arguments
4992 instead of just in them. Recognize @\n in both places. Both expand to
4993 the empty string. Needed by b4_cat.
4994 * tests/skeletons.at (Complaining during macro argument expansion):
4995 New test case.
4996 (Fatal errors make M4 exit immediately): New test case.
4997
d4bd2295
JD
49982007-10-04 Joel E. Denny <jdenny@ces.clemson.edu>
4999
5000 Implement --print-datadir.
5001 * src/getargs.c (usage): Mention.
5002 (PRINT_DATADIR_OPTION): New anonymous enum member.
5003 (long_options): Add entry for it.
5004 (getargs): Add case for it calling compute_pkgdatadir.
5005 * src/output.c (output_skeleton): Encapsulate data directory
5006 computation from here...
5007 (prepare): ... and from here...
5008 (compute_pkgdatadir): ... into this new function.
5009 * src/output.h (compute_pkgdatadir): Prototype.
5010
34cdeddf
JD
50112007-09-29 Joel E. Denny <jdenny@ces.clemson.edu>
5012
5013 * src/print-xml.c (escape_bufs): New static global variable
5014 replacing...
5015 (xml_escape_n): ... the static local variable buf here.
5016 (print_xml): Free memory for escape_bufs.
5017 * src/reduce.c (reduce_xml): XML-escape terminal symbol tags.
5018
d782395d
JD
50192007-09-25 Joel E. Denny <jdenny@ces.clemson.edu>
5020
5021 Replace `%push-parser' and `%push-pull-parser' with
5022 `%define push_pull "push"' and `%define push_pull "both"'.
5023 `%define push_pull "pull"' is the default.
5024 * doc/bison.texinfo (Push Decl, Push Parser Function,
5025 Pull Parser Function, Parser Create Function, Parser Delete Function):
5026 Update declarations.
5027 (Decl Summary, Table of Symbols): Replace %push-parser and
5028 %push-pull-parser entries with a %define push_pull entry.
5029 * data/bison.m4 (b4_percent_define_check_values): New macro.
5030 (b4_pull_if, b4_push_if, b4_use_push_for_pull_if): Move these
5031 definitions...
5032 * data/c.m4 (b4_identification): ... and the YYPUSH and YYPULL cpp
5033 definitions...
5034 * data/push.c: ... to here and compute them from the value of the
5035 %define variable push_pull.
5036 * data/c-skel.m4: Instead of choosing the push.c skeleton for push
5037 parsing requests here...
5038 * data/yacc.c: ... hack this to switch to push.c any time
5039 b4_use_push_pull_flag or the %define variable push_pull is set. This
5040 will go away when we mv push.c yacc.c.
5041 * data/c++-skel.m4, data/glr.c, data/java-skel.m4: Don't report that
5042 push parsing is not supported since unused %define variables are
5043 reported anyway.
5044 * src/getargs.c, src/getargs.h (pull_parser, push_parser): Remove.
5045 * src/muscle_tab.h (muscle_percent_define_check_values): Update
5046 comments for consistency with b4_percent_define_check_values.
5047 * src/output.c (prepare): Don't insert b4_pull_flag and b4_push_flag
5048 muscles.
5049 * src/parse-gram.y (PERCENT_PUSH_PARSER, PERCENT_PUSH_PULL_PARSER):
5050 Remove.
5051 (prologue_declaration): Remove %push-parser and %push-pull-parser
5052 rules.
5053 * src/scan-gram.l (%push-parser, %push-pull-parser): Remove rules.
5054 * tests/calc.at: Update declarations.
5055 * tests/input.at (%define enum variables): New test case.
5056 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Update
5057 declaration.
5058 (Push Parsing: Multiple impure instances): Update declaration.
5059 (Push Parsing: Unsupported Skeletons): New test case.
5060 * tests/torture.at (Exploding the Stack Size with Alloca): Update
5061 declaration.
5062 (Exploding the Stack Size with Malloc): Update declaration.
5063
3f999f78
WP
50642007-09-24 Wojciech Polak <polak@gnu.org>
5065
5066 Add XSLT transformations.
5067
5068 * data/xslt/xml2dot.xsl: Transform XML into DOT.
5069 * data/xslt/xml2text.xsl: Transform XML into plain text.
5070 * data/xslt/xml2xhtml.xsl: Transform XML into XHTML.
5071 * data/Makefile.am (xsltdir): New variable.
5072 (dist_xslt_DATA): Add xslt/*.xsl files.
5073
a4f75309
PE
50742007-09-23 Paul Eggert <eggert@cs.ucla.edu>
5075
5076 * src/conflicts.c (log_resolution): Fix indenting bugs I introduced.
5077 Problem reported by Wojciech Polak.
5078 * src/print-xml.c (xml_puts): Work even if LEVEL exceeds INT_MAX/2.
5079 (xml_printf): Undo change I made on 21 September; that is,
5080 indent 2 spaces, not 1.
5081
ad5feac4
JD
50822007-09-23 Joel E. Denny <jdenny@ces.clemson.edu>
5083
5084 Pacify ./configure --enable-gcc-warnings.
5085 * src/print-xml.c, src/print-xml.h (xml_puts): Make third argument
5086 `char const *' instead of `char *'.
5087 * src/state.c (state_rule_lookahead_tokens_print_xml): Remove unused
5088 local variable `sep'.
5089
41d7a5f2
PE
50902007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5091
5092 * src/gram.c (rule_rhs_print_xml): Now static, since it isn't used
5093 elsewhere.
5094 * src/print-xml.c: Prefer "const" after types; that's more consistent.
5095 (xml_printf): Indent just 1 space for level.
5096 (e_char, xlate_char): Remove.
5097 (xml_escape_string): Rewrite to avoid undefined behavior (used
5098 storage that was freed from the stack).
5099 (xml_escape_n): Don't bother checking for subscript error.
5100
3f999f78
WP
51012007-09-21 Wojciech Polak <polak@gnu.org>
5102
5103 Add Bison XML Automaton Report.
41d7a5f2
PE
5104
5105 Add support for an -x option to generate an XML report.
5106 It is not documented yet.
5107 * src/print-xml.c: New file.
5108 * src/print-xml.h: Likewise.
5109 * lib/timevar.def (TV_XML): New var.
5110 * src/Makefile.am (bison_SOURCES): Add print-xml.c, print-xml.h.
5111 * src/conflicts.c: Include print-xml.h.
5112 (solved_conflicts_xml_obstack): New var.
5113 (log_resolution, conflicts_solve, conflicts_free):
5114 Add support for XML report.
5115 (conflicts_output_val): New function.
5116 * src/conflicts.h (conflicts_output_val): New decl.
5117 * src/files.c (spec_xml_file): New var.
5118 (compute_output_file_names, output_file_names_free): Add XML support.
5119 * src/files.h (spec_xml_file): New decl.
5120 * src/getargs.c (xml_flag): New var.
5121 (usage, short_options, long_options, getargs): Add XML support.
5122 * src/getargs.h (xml_flag): New decl.
5123 * src/gram.c: Include print-xml.h.
5124 (rule_lhs_print_xml, rule_rhs_print_xml):
5125 (grammar_rules_partial_print_xml, grammar_rules_print_xml):
5126 New functions.
5127 * src/gram.h: Declare external ones.
5128 * src/main.c: Include print-xml.h.
5129 (main): Add XML support.
5130 * src/reduce.c: Include print-xml.h.
5131 (reduce_xml): New function.
5132 * src/reduce.h: Declare it.
5133 * src/state.c: Include print-xml.h.
5134 (state_new): Add XML support.
5135 (state_rule_lookahead_tokens_print_xml): New function.
5136 * src/state.h: Declare it.
5137 (struct state): New member solved_conflicts_xml.
5138 * src/symtab.c (symbol_class_get_string): New function.
5139 * src/symtab.h: Declare it.
5140
6d8e724d
PE
51412007-09-21 Paul Eggert <eggert@cs.ucla.edu>
5142
5143 * GNUmakefile: Switch to coreutils's version.
5144 * bootstrap: Likewise.
5145 * Makefile.cfg: Adjust to new GNUmakefile.
5146 * README-hacking: Likewise.
5147
5148 Import from gnulib:
5149
5150 2006-08-18 Paul Eggert <eggert@cs.ucla.edu>
5151 Bruno Haible <bruno@clisp.org>
5152
5153 * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5154 and is a script that invokes bison. Tighten the code. Add comments.
5155
922bdd7f
JD
51562007-08-28 Joel E. Denny <jdenny@ces.clemson.edu>
5157
5158 Spell "boolean" as "Boolean". Reported by Akim Demaille.
5159 * data/bison.m4 (b4_percent_define_flag_if): Fix complaint.
5160 * doc/bison.texinfo (Decl Summary): Fix.
5161 * src/muscle_tab.c (muscle_percent_define_flag_if): Fix complaint.
5162 * tests/input.at (Boolean %define variables): Update output.
5163 * tests/skeletons.at (%define boolean variables: invalid skeleton
5164 defaults): Rename to...
5165 (%define Boolean variables: invalid skeleton defaults): ... this and
5166 update output.
5167
1b17b01d
JD
51682007-08-17 Joel E. Denny <jdenny@ces.clemson.edu>
5169
5170 In impure push mode, don't allow more than one yypstate to be allocated
5171 since multiple impure parsers would corrupt yynerrs.
5172 * data/push.c (yypstate_allocated): New static global variable
5173 initialized to 0.
5174 (yypull_parse): If yypstate_new returns 0, don't report it as memory
5175 exhaustion if yypstate_allocated is 1, but still return 2.
5176 (yypstate_new): Invoke yyerror and return 0 if yypstate_allocated is
5177 already 1. Otherwise, set it to 1.
5178 (yypstate_delete): Set it to 0.
5179 * tests/push.at (Push Parsing: Multiple impure instances): New test
5180 case.
5181
9987d1b3
JD
51822007-08-17 Bob Rossi <bob@brasko.net>
5183
5184 * doc/bison.texinfo (Push Decl): Document the push parser.
5185 (Table of Symbols): Ditto.
5186 (Pure Decl): Ditto.
5187 (Decl Summary): Ditto.
5188 (Multiple Parsers, Push Parser Function, Pull Parser Function,
5189 Parser Create Function, Parser Delete Function):
5190 Add new push parser symbols.
5191 (Table of Symbols): Document push-parser, push-pull-parser,
5192 yypush_parse, yypull_parse, yypstate_new and yypstate_delete.
5193
f16b0819
PE
51942007-08-15 Paul Eggert <eggert@cs.ucla.edu>
5195
5196 Update to GPLv3.
5197 * doc/gpl-3.0.texi: New file.
5198 * doc/gpl.texi: Remove.
5199 * COPYING, GNUmakefile, HACKING, Makefile.am, Makefile.cfg:
5200 * Makefile.maint, NEWS, PACKAGING, README, README-alpha:
5201 * README-hacking, TODO, bootstrap, bootstrap.conf:
5202 * configure.ac, data/Makefile.am, data/README, data/bison.m4:
5203 * data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4:
5204 * data/glr.c, data/glr.cc, data/java-skel.m4, data/java.m4:
5205 * data/lalr1.cc, data/lalr1.java, data/location.cc:
5206 * data/push.c, data/yacc.c, data/m4sugar/m4sugar.m4:
5207 * djgpp/Makefile.maint, djgpp/README.in, djgpp/config.bat:
5208 * djgpp/config.sed, djgpp/config.site, djgpp/config_h.sed:
5209 * djgpp/djunpack.bat, djgpp/subpipe.c, djgpp/subpipe.h:
5210 * djgpp/testsuite.sed, doc/Makefile.am, doc/bison.texinfo:
5211 * doc/fdl.texi, doc/refcard.tex, etc/Makefile.am, etc/README:
5212 * etc/bench.pl.in, examples/Makefile.am, examples/extexi:
5213 * examples/calc++/Makefile.am, lib/Makefile.am, lib/abitset.c:
5214 * lib/abitset.h, lib/bbitset.h, lib/bitset.c, lib/bitset.h:
5215 * lib/bitset_stats.c, lib/bitset_stats.h, lib/bitsetv-print.c:
5216 * lib/bitsetv-print.h, lib/bitsetv.c, lib/bitsetv.h:
5217 * lib/ebitset.c, lib/ebitset.h, lib/get-errno.c:
5218 * lib/get-errno.h, lib/lbitset.c, lib/lbitset.h:
5219 * lib/libiberty.h, lib/main.c, lib/subpipe.c, lib/subpipe.h:
5220 * lib/timevar.c, lib/timevar.def, lib/timevar.h:
5221 * lib/vbitset.c, lib/vbitset.h, lib/yyerror.c:
5222 * m4/c-working.m4, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4:
5223 * m4/timevar.m4, src/LR0.c, src/LR0.h, src/Makefile.am:
5224 * src/assoc.c, src/assoc.h, src/closure.c, src/closure.h:
5225 * src/complain.c, src/complain.h, src/conflicts.c:
5226 * src/conflicts.h, src/derives.c, src/derives.h, src/files.c:
5227 * src/files.h, src/flex-scanner.h, src/getargs.c:
5228 * src/getargs.h, src/gram.c, src/gram.h, src/graphviz.c:
5229 * src/lalr.c, src/lalr.h, src/location.c, src/location.h:
5230 * src/main.c, src/muscle_tab.c, src/muscle_tab.h:
5231 * src/nullable.c, src/nullable.h, src/output.c, src/output.h:
5232 * src/parse-gram.c, src/parse-gram.h, src/parse-gram.y:
5233 * src/print.c, src/print.h, src/print_graph.c:
5234 * src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c:
5235 * src/reduce.h, src/relation.c, src/relation.h:
5236 * src/revision.h, src/scan-code.h, src/scan-code.l:
5237 * src/scan-gram.h, src/scan-gram.l, src/scan-skel.h:
5238 * src/scan-skel.l, src/state.c, src/state.h, src/symlist.c:
5239 * src/symlist.h, src/symtab.c, src/symtab.h, src/system.h:
5240 * src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h:
5241 * tests/Makefile.am, tests/actions.at, tests/c++.at:
5242 * tests/calc.at, tests/conflicts.at, tests/cxx-type.at:
5243 * tests/existing.at, tests/glr-regression.at:
5244 * tests/headers.at, tests/input.at, tests/java.at:
5245 * tests/local.at, tests/output.at, tests/push.at:
5246 * tests/reduce.at, tests/regression.at, tests/sets.at:
5247 * tests/skeletons.at, tests/synclines.at, tests/testsuite.at:
5248 * tests/torture.at:
5249 Update to GPLv3.
5250
728c4be2
JD
52512007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5252
5253 Get rid of broken %no-parser, -n, and --no-parser implementation and
5254 documentation.
5255 * TODO: Don't mention them.
5256 * doc/bison.1: Likewise.
5257 * doc/bison.texinfo (Decl Summary): Likewise.
5258 (Bison Options): Likewise.
5259 (Option Cross Key): Likewise.
5260 * src/getargs.c (no_parser_flag): Remove global variable.
5261 (usage): Don't print description of -n and --no-parser.
5262 (long_options): Remove --no-parser entry here.
5263 (getargs): Remove -n case in the switch here.
5264 * src/getargs.h (no_parser_flag): Remove extern.
5265 * tests/regression.at (Web2c Actions): Remove comment that mentions
5266 --no-parser.
5267
5d31a216
JD
52682007-08-11 Joel E. Denny <jdenny@ces.clemson.edu>
5269
5270 * tests/push.at (Push Parsing: Memory Leak for Early Deletion): Do not
5271 name user variables starting with `yy'. Just pass NULL instead of a
5272 dummy local &yylval to yypush_parse.
5273 * tests/torture.at (AT_DATA_STACK_TORTURE): Do not name user variables
5274 starting with `yy'.
5275
a2ea208d
JD
52762007-08-03 Joel E. Denny <jdenny@ces.clemson.edu>
5277
5278 * data/yacc.c (yyexhaustedlab): Define it when YYERROR_VERBOSE is
5279 true since it's then always used regardless of whether yyoverflow is
5280 defined. Reported by Christian Burger at
5281 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00031.html>.
5282 * THANKS: Add Christian Burger.
5283
91661ebb
JD
5284 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5285 node names: say "Decl Summary" not "Bison Declaration Summary".
5286
cbd50549
JD
52872007-07-28 Joel E. Denny <jdenny@ces.clemson.edu>
5288
5289 * src/muscle_tab.c (muscle_percent_define_flag_if): In order to
5290 determine whether this function has already complained about an invalid
5291 value for a %define boolean variable, don't check whether Bison has
5292 ever examined the value. As written, the check was a tautology.
5293 Instead, record and check for this complaint using a separate muscle.
5294
eb1b0740
JD
52952007-07-27 Joel E. Denny <jdenny@ces.clemson.edu>
5296
5297 Fix push parsing memory leak reported by Brandon Lucia at
5298 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00032.html>.
5299 * THANKS: Add Brandon Lucia.
5300 * data/push.c (yypstate_delete): Free the stack if it was reallocated
5301 but the parse never completed and thus freed it.
5302 * tests/Makefile.am (TESTSUITE_AT): Add push.at.
5303 * tests/testsuite.at: Include push.at.
5304 * test/push.at: New.
5305 (Push Parsing: Memory Leak for Early Deletion): New test case.
5306
9d774aff
JD
53072007-07-17 Joel E. Denny <jdenny@ces.clemson.edu>
5308
5309 Improve handling of multiple S/R conflicts in the same state and of S/R
5310 conflicts involving multiple reductions.
5311 * src/conflicts.c (resolve_sr_conflict): Don't assign the error action
5312 set for a state here or Bison will abort if it is reassigned on a
5313 later conflicted reduction in the same state.
5314 Similarly, don't finalize and assign the solved conflicts report here
5315 or it will be lost if it is reassigned on a later conflicted reduction
5316 in the same state.
5317 (set_conflicts): Instead, assign them both here after all S/R conflicts
5318 in the state have been fully examined.
5319 * src/print.c (shift_set): Rename to...
5320 (no_reduce_set): ... this.
5321 (print_reductions): Update for rename, and add %nonassoc error action
5322 tokens to no_reduce_set so that, when printing the first remaining
5323 reduction on an error action token, the reduction is enclosed in
5324 brackets.
5325 (print_results): Update for rename.
5326 * tests/conflicts.at (Solved conflicts report for multiple reductions
5327 in a state): New test case.
5328 (%nonassoc error actions for multiple reductions in a state): New test
5329 case.
5330
5331 * src/main.c (main): Don't depend on C99 features.
5332
10159d2a
JD
53332007-07-16 Joel E. Denny <jdenny@ces.clemson.edu>
5334
5335 * build-aux/.cvsignore: Add compile.
b541ffdf
JD
5336 * lib/.cvsignore: Add charset.alias, ref-add.sed, ref-del.sed, and
5337 uniwidth.
10159d2a 5338
953b3935
JD
53392007-07-10 Joel E. Denny <jdenny@ces.clemson.edu>
5340
5341 * bootstrap (slurp): Create target directories that don't exist.
5342 Specifically, we need lib/uniwidth/ because of recent Gnulib changes.
5343
6ce2d93a
JD
53442007-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
5345
5346 * LR0.c (new_itemsets): Fix wording in comments: say item index rather
5347 than item number.
5348 * closure.c (closure): Likewise.
5349 * state.h (reductions): Comment sorting of rules.
5350 (state): Comment sorting of items.
5351
ce3448d5
JD
53522007-07-02 Joel E. Denny <jdenny@ces.clemson.edu>
5353
5354 Fix C++ test cases after recent Gnulib changes. Discussed starting at
5355 <http://lists.gnu.org/archive/html/bug-bison/2007-07/msg00000.html>.
5356 * examples/calc++/Makefile.am (DEFAULT_INCLUDES): Override Automake's
5357 definition in order to avoid Gnulib headers since we don't use config.h
5358 here.
5359 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): Use AT_DATA_GRAMMAR
5360 rather than AT_DATA so that config.h is included.
5361
8a86eef0
JD
53622007-07-01 Joel E. Denny <jdenny@ces.clemson.edu>
5363
5364 * data/glr.c (yy_yypstack, yypstates, yypdumpstack): Use YYFPRINTF
5365 instead of fprintf. Guard these functions with #if YYDEBUG instead of
5366 #ifdef YYDEBUG for consistency with all other uses of YYDEBUG in Bison
5367 and so that YYFPRINTF is guaranteed to be defined here.
5368
b1a81613
JD
53692007-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
5370
5371 * src/muscle_tab.c (muscle_percent_define_invalid_value): Replace
5372 with...
5373 (muscle_percent_define_check_values): ... this more helpful function.
5374 Again, it's not used yet, but it will be.
5375 * src/muscle_tab.h: Likewise.
5376
71b61d4d
JD
5377 Improve some comments in parser table construction.
5378 * src/LR0.c (new_itemsets): Explain sorting of itemset and kernel_base.
5379 (generate_states): Don't mention ruleset, which is internal to closure.
5380 * src/closure.c (closure): Explain sorting of core and itemset, which
5381 is required for this function to behave correctly.
5382 * src/closure.h (closure): Mention sorting.
5383
2a6b783d
JD
53842007-05-28 Joel E. Denny <jdenny@ces.clemson.edu>
5385
5386 * src/lalr.c (state_lookahead_tokens_count): For code readability,
5387 move the check for disabled transitions to an aver since conflict
5388 resolution hasn't happened yet.
5389
5390 * src/lalr.c (state_lookahead_tokens_count): Remove the check that
5391 labels a state as inconsistent just because it has error transitions.
5392 The original form of this check appeared in revision 1.1 of lalr.c,
5393 which was committed on 1991-12-21. Now (at least), changing the
5394 consistency label on such a state appears to have no useful effect in
5395 any of the places it is examined, which I enumerate below. The key
5396 point to understanding each item in this enumeration is that a state
5397 with an error transition is labelled consistent in the first place only
5398 if it has no rules, so the check cannot matter for states that have
5399 rules. (1) Labelling a state as inconsistent will cause set_conflicts
5400 to try to identify its conflicts, and a state must have *rules* to have
5401 conflicts. (2) Labelling a state as inconsistent will affect how
5402 action_row sets the default *rule* for the state. (3) Labelling a
5403 state as inconsistent will cause build_relations to add lookback edges
5404 to *rules* in that state.
5405 * src/state.h (struct state): Word the comment for member consistent
5406 more carefully.
5407
14462c2b
JD
54082007-05-27 Joel E. Denny <jdenny@ces.clemson.edu>
5409
5410 Don't depend on C99 features.
5411 * src/conflicts.c (conflicts_update_state_numbers): Fix for-loop.
5412 * src/lalr.c (lalr_update_state_numbers): Fix for-loop.
5413 * src/reader.c (check_and_convert_grammar): Fix for-loop.
5414 * src/state.c (state_mark_reachable_states): Fix for-loop.
5415 (state_remove_unreachable_states): Fix for-loop.
5416
5417 Don't widen struct state with member reachable just to temporarily
5418 record reachability. Instead, use a local bitset.
5419 * src/state.h (struct state): Remove member.
5420 * src/state.c (state_new): Don't initialize it.
5421 (state_mark_reachable_states): Rename to...
5422 (state_record_reachable_states): ... this, and use bitset.
5423 (state_remove_unreachable_states): Use bitset.
5424
5a43d418
JD
54252007-05-26 Joel E. Denny <jdenny@ces.clemson.edu>
5426
5427 * src/Makefile.am (yacc): Quote target action commands properly so
5428 that the yacc script isn't corrupt. Reported by Hans Aberg at
5429 <http://lists.gnu.org/archive/html/bug-bison/2007-05/msg00003.html>.
5430
0c650a20
JD
5431 * data/glr.c (yylval): As in yacc.c, don't extern in the header for
5432 the case of pure parsers. Reported by Frans Englich at
5433 <http://lists.gnu.org/archive/html/help-bison/2007-05/msg00018.html>.
5434 * THANKS: Add Frans Englich.
5435
61fee93e
JD
5436 * NEWS (2.3a+): In the %code entry, reference section `Bison
5437 Declaration Summary' from the manual now since the %code summary has
5438 moved there.
5439 * doc/bison.texinfo (Prologue Alternatives): Mention that directives
5440 in the rules section must be terminated by semicolons.
5441
f124d423
JD
54422007-05-20 Joel E. Denny <jdenny@ces.clemson.edu>
5443
5444 Extend the front-end API for %define variables to more completely
5445 mirror the back-end. This will be useful in the future.
5446 * data/bison.m4 (b4_percent_define_get, b4_percent_define_ifdef):
5447 Update comments to mention the new front-end counterparts of these
5448 macros.
5449 * src/muscle_tab.c (MUSCLE_COMMON_DECODE): New macro with common code
5450 for muscle_string_decode and muscle_location_decode.
5451 (muscle_string_decode): New static function.
5452 (muscle_location_decode): Use MUSCLE_COMMON_DECODE.
5453 (muscle_percent_define_get, muscle_percent_define_ifdef): New
5454 functions.
5455 (muscle_percent_define_flag_if): Use muscle_percent_define_ifdef and
5456 muscle_percent_define_get to mimic the b4_percent_define_flag_if
5457 implementation more closely.
5458 (muscle_percent_define_invalid_value): New function.
5459 * src/muscle_tab.h (muscle_percent_define_get,
5460 muscle_percent_define_ifdef, muscle_percent_define_invalid_value):
5461 Prototype.
5462
75ad86ee
JD
54632007-05-07 Joel E. Denny <jdenny@ces.clemson.edu>
5464
5465 * NEWS (2.3a+): Mention yesterday's state-removal change.
5466 (2.3a): Remove the %language entry, which was added after 2.3a.
5467 * src/LR0.c, src/closure.c, src/closure.h, src/conflicts.c,
5468 src/conflicts.h, src/lalr.c, src/lalr.h, src/print.c,
5469 src/print_graph.c, src/state.c, src/state.h, tests/conflicts.at,
5470 tests/existing.at: Update copyright date.
5471
5967f0cf
JD
54722007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5473
5474 If conflict resolution makes states unreachable, remove those states,
5475 report rules that are then unused, and don't report conflicts in those
5476 states.
5477 * src/conflicts.c, src/conflicts.h (conflicts_update_state_numbers):
5478 New global function.
5479 * src/lalr.c, src/lalr.h (lalr_update_state_numbers): New global
5480 function.
5481 * src/main.c (main): After conflict resolution, remove the unreachable
5482 states and update all data structures that reference states by number.
5483 * src/state.c (state_new): Initialize each state's reachable member to
5484 false.
5485 (state_mark_reachable_states): New static function.
5486 (state_remove_unreachable_states): New global function.
5487 * src/state.h (struct state): Add member bool reachable.
5488 (state_remove_unreachable_states): Prototype.
5489 * tests/conflicts.at (Unreachable States After Conflict Resolution):
5490 New test case.
5491 * tests/existing.at (GNU pic Grammar): Update test case output now that
5492 an unused rule is discovered.
5493
b09f4f48
JD
54942007-05-06 Joel E. Denny <jdenny@ces.clemson.edu>
5495
5496 Minor code cleanup in parser table construction.
5497 * src/LR0.c (new_itemsets): Use item_number_is_symbol_number.
5498 (new_itemsets, save_reductions): Update for rename to nitemset.
5499 * src/closure.c (nritemset): Rename to...
5500 (nitemset): ... this since the "r" appears to meaningless and isn't
5501 used in the comments.
5502 (closure): Update for rename.
5503 * src/closure.h (nritemset): Update extern to...
5504 (nitemset): ... this.
5505 * src/lalr.c (LA): Fix a typo in comments.
5506 * src/print.c (print_core): Update for rename to nitemset.
5507 * src/print_graph.c (print_graph): Likewise.
5508 * src/state.h: Fix some typos in header comments.
5509
bbb44d83
PE
55102007-04-04 Paul Eggert <eggert@cs.ucla.edu>
5511
9b33de72
PE
5512 * THANKS: Use ASCII for Sebastien Fricker's name. Bison source
5513 still sticks to ASCII. Sorry!
5514
bbb44d83
PE
5515 * README-hacking: New file, taken mostly from coreutils, with changes
5516 for Bison. Contains much of the contents of:
5517 * README-cvs: Remove.
5518 * bootstrap: Sync from gnulib.
5519 * build-aux/.cvsignore: Remove *.t, mkinstalldirs.
5520 * lib/.cvsignore: Add wchar.h, wctype.h. Remove exit.h.
5521
29553547
JD
55222007-03-10 Joel E. Denny <jdenny@ces.clemson.edu>
5523
5524 * doc/bison.texinfo (Destructor Decl): Fix typo reported by Sebastian
5525 Setzer.
5526 (Java Differences): Fix some typos.
5527 * THANKS: Add Sebastian Setzer.
5528
01b477c6
PB
55292007-03-07 Paolo Bonzini <bonzini@gnu.org>
5530
730739e4
AD
5531 * data/java.m4 (b4_single_class_if): Remove.
5532 (b4_abstract_if): Look at "%define abstract".
5533 (b4_lexer_if): New.
5534 (b4_union_name): Rename...
5535 (b4_yystype): ... to this. Map to "%define stype".
5536 (b4_rhs_value, b4_parse_param_decl, b4_lex_param_decl,
5537 b4_maybe_throws): Fix quoting.
5538 (b4_lex_param_call): Move below to keep b4_*_param_decl close.
5539 * data/lalr1.java (Lexer interface): Always define.
5540 (Lexer interface within parser class): Remove.
5541 (YYLexer class): New, used when "%code lexer" is present.
5542 (constructor): When "%code lexer" is used, pass %lex-param
5543 to the lexer constructor.
5544 (yylex, yyparse): Remove %lex-param from method invocations
5545 (YYStack, yyaction, yyparse): Rename b4_union_name to b4_yystype.
5546
5547 * doc/bison.texinfo (Java Bison Interface): Mention "%define
5548 abstract". Rename "%define union_name" to "%define stype".
5549 Rename method names according to previous patch.
5550 (Java Scanner Interface): Describe "%code lexer" instead of
5551 "%pure-parser" and "%define single_class".
5552 (Java Differences): Mention "%code lexer".
5553
5554 * tests/java.at (_AT_DATA_JAVA_CALC_Y): Remove final argument.
5555 Include scanner here, using macros from tests/local.at.
5556 (AT_DATA_CALC_Y): Remove final argument.
5557 (_AT_CHECK_JAVA_CALC): Likewise.
5558 (AT_CHECK_JAVA_CALC): Likewise. Test all four combinations
5559 of %locations and %error-verbose.
5560 (main): Test with and without %lex-param.
5561 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Push AT_LEXPARAM_IF.
5562 (AT_BISON_OPTION_POPDEFS): Pop it.
01b477c6 5563
122bea3a
JMG
55642007-03-07 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5565
5566 DJGPP spefic issue. Inhibit the use of disallowed characters for
5567 file name genertion on Win98, WinXP, etc. These are |<>":?*\
5568 and concern testsuite case 46.
5569 * Makefile.am: djgpp/testsuite.sed added to EXTRA_DIST
5570 * djgpp/testsuite.sed: Inhibit the use of disallowed characters.
5571 * djgpp/config.bat: Inhibit the use of disallowed characters.
5572
9611cfa2
JD
55732007-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
5574
5575 Miscellaneous %define and %code cleanup.
5576 * data/bison.m4 (b4_percent_define_flag_if): Correct comments on how
5577 values are interpreted.
5578 * doc/bison.texinfo (Decl Summary): Clean up and extend %define
5579 documentation a little more.
5580 * src/muscle_tab.c (MUSCLE_USER_NAME_CONVERT,
5581 muscle_percent_define_insert, muscle_percent_code_grow): New
5582 functions/macros.
5583 * src/muscle_tab.h (muscle_percent_define_insert,
5584 muscle_percent_code_grow): Prototype.
5585 * src/parse-gram.y (prologue_declaration): Use
5586 muscle_percent_define_insert and muscle_percent_code_grow when parsing
5587 %define and %code directives.
5588
5589 Make it easy to share %define boolean variables between the front-end
5590 and back-end. Though not used yet, this will be useful in the future.
5591 * data/bison.m4 (b4_check_user_names): Rewrite comments to talk about
5592 Bison uses of names rather than just skeleton uses of names.
5593 (b4_percent_define_get, b4_percent_define_ifdef): Rename
5594 b4_percent_define_skeleton_variables(VARIABLE) to
5595 b4_percent_define_bison_variables(VARIABLE).
5596 (b4_percent_code_get, b4_percent_code_ifdef): Rename
5597 b4_percent_code_skeleton_qualifiers(QUALIFIER) to
5598 b4_percent_code_bison_qualifiers(QUALIFIER).
5599 (b4_check_user_names_wrap): Update for renames.
5600 * src/muscle_tab.c, src/muscle_tab.h (muscle_percent_define_flag_if,
5601 muscle_percent_define_default): New functions mimicking
5602 b4_percent_define_flag_if and b4_percent_define_default.
5603
5604 For %define variables, report locations for invalid values and
bbb44d83 5605 redefinitions.
9611cfa2
JD
5606 * data/bison.m4 (b4_percent_define_flag_if): Read
5607 b4_percent_define_loc(VARIABLE) to report the location of an invalid
5608 value for VARIABLE.
5609 (b4_percent_define_default): Save a special location in
5610 b4_percent_define_loc(VARIABLE) in case the default value for VARIABLE
5611 must later be reported as invalid.
5612 * src/muscle_tab.c (muscle_location_grow, muscle_location_decode): New
5613 functions.
5614 (muscle_percent_define_insert): Record the location of VARIABLE in
5615 muscle percent_define_loc(VARIABLE), and use it to report the previous
5616 location for a redefinition.
5617 (muscle_percent_define_flag_if): Update like b4_percent_define_flag_if.
5618 (muscle_percent_define_default): Update like b4_percent_define_default.
5619 (muscle_grow_user_name_list): Rename to...
5620 (muscle_user_name_list_grow): ... this for consistency and use
5621 muscle_location_grow.
5622 * src/muscle_tab.h (muscle_location_grow): Prototype.
5623 * tests/input.at (%define errors): Update expected output.
5624 * tests/skeletons.at (%define boolean variables: invalid skeleton
5625 defaults): New test case.
5626
0bf92491
JD
56272007-02-28 Joel E. Denny <jdenny@ces.clemson.edu>
5628
5629 * src/print.c (lookahead_set, state_default_rule): Remove.
5630 (print_reductions): Replace state_default_rule invocation with
5631 equivalent use of yydefact, which was computed in token_actions in
5632 tables.c.
5633 (print_results): Don't allocate lookahead_set.
5634
d3b12988
PB
56352007-02-27 Paolo Bonzini <bonzini@gnu.org>
5636
5637 * data/lalr1.java: Prefix all private members with yy.
5638
f57a7536
JD
56392007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
5640
5641 Use YYFPRINTF instead of fprintf where appropriate. Reported by
9b33de72 5642 Sebastien Fricker at
f57a7536 5643 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
9b33de72 5644 * THANKS: Add Sebastien Fricker.
f57a7536
JD
5645 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
5646 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
5647 accept a variable number of arguments.
5648
6404a5bf
JD
56492007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
5650
5651 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
5652
e4e09639
JMG
56532007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5654
5655 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
5656 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
5657 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
5658
d7e0a1a7
PE
56592007-02-11 Paul Eggert <eggert@cs.ucla.edu>
5660
5661 Undo my 2007-02-07 change, switching back to the c-strcase module
5662 introduced in the 2007-02-03 change. Bruno Haible reported that
5663 the 2007-02-07 change would be dangerous in Turkish if we add a
5664 language whose name contains "i", since "i" is not lowercase "I"
5665 in Turkish.
5666 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
5667 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
5668 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
5669 * m4/.cvsignore: Remove strcase.m4.
5670 * src/getargs.c: Revert 2007-02-07 change, as follows.
5671 Include c-strcase.h.
5672 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
5673
deee93a1
JD
56742007-02-11 Bruno Haible <bruno@clisp.org>
5675
5676 Enable the Java related testsuite tests when the only Java compiler
5677 found is a gcj < 4.3. Discussed at
5678 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
5679 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
5680
574add85
JD
56812007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
5682
5683 * data/Makefile.am: Update copyright date.
5684 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
5685 yypstate_new returns NULL.
5686 (yypstate_new): Return NULL if malloc does.
5687 * src/reader.c (packgram): Move translation of rule actions from the
5688 beginning of packgram to...
5689 (check_and_convert_grammar): ... here right before packgram is invoked
5690 so it's easier to write more complete comments, and remove redundant
5691 code.
5692
e785ccf7
JD
56932007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
5694
5695 As in semantic actions, make @$ in %initial-action, %destructor, and
5696 %printer imply %locations.
5697 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
5698 scanning @$.
5699 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
5700 (@$ in %initial-action implies %locations,
5701 @$ in %destructor implies %locations,
5702 @$ in %printer implies %locations): ... these new test cases.
5703
1cfe1ed7
PE
57042007-02-07 Paul Eggert <eggert@cs.ucla.edu>
5705
5706 Undo most of the 2007-02-03 change, switching to the strcase module
5707 now that gnulib strcase has been fixed.
5708 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
5709 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
5710 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
5711 * m4/.cvsignore: Add strcase.m4.
5712 * src/getargs.c: Revert 2007-02-03 change, as follows.
5713 Don't include c-strcase.h.
5714 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
5715 strcasecmp has "unspecified behavior" outside the POSIX locale,
5716 but it works fine in practice if at least one argument is ASCII,
5717 as is the case in Bison.
5718
0049ec86
PB
57192007-02-07 Paolo Bonzini <bonzini@gnu.org>
5720
5721 * tests/java.at: Skip tests if only one of javac/java is present.
5722 Reported by Joel E. Denny.
5723 * tests/atlocal.in: Adjust copyright years.
5724
57252007-02-05 Paolo Bonzini <bonzini@gnu.org>
5726
5727 * data/lalr1.java (Stack): Work around old verifiers that disallow
5728 access to the private fields of an inner class, from the outer class.
5729 We can make Stack's fields public because user code doesn't have access
5730 to the instance of Stack used by parse(). Reported by Paul Eggert.
5731
2c2b7220
PE
57322007-02-03 Paul Eggert <eggert@cs.ucla.edu>
5733
5734 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
5735 the right spot for these files?
5736 * bootstrap.conf (gnulib_modules): Add c-strcase.
5737 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
5738 c-strncasecmp.c.
5739 * src/getargs.c: Include c-strcase.h.
5740 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
5741 to avoid unspecified behavior.
5742
b2b81dae
JD
57432007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
5744
5745 * doc/bison.texinfo (Decl Summary): Correct typo.
5746
c1d19e10
PB
57472007-01-30 Paolo Bonzini <bonzini@gnu.org>
5748
5749 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
5750 Complain if the value does not match empty, "true" or "false".
5751 * data/c++.m4: Adjust default definitions of %define variables.
5752 * data/java.m4: Adjust default definitions of %define variables.
5753 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
5754 to above behavior.
5755 * tests/input.at (Boolean %define variables): Test new behavior.
5756
8405b70c
PB
57572007-01-29 Paolo Bonzini <bonzini@gnu.org>
5758
5759 * NEWS: Mention java.
5760 * TODO: Remove things that are done.
5761 * bootstrap.conf: Add javacomp-script and javaexec-script.
5762 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
5763
5764 * data/Makefile.am: Add new files.
5765 * data/java-skel.m4: New.
5766 * data/java.m4: New.
5767 * data/lalr1.java: New.
5768
5769 * doc/bison.texinfo: Put "A Complete C++ Example" under
5770 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
5771 under Other Languages.
5772
5773 * src/getargs.c (valid_languages): Add Java.
5774 * src/getargs.h (struct bison_language): Update size of string fields.
5775
5776 * tests/Makefile.am: Add java.at.
5777 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
5778 * tests/java.at: New.
5779 * tests/testsuite.at: Include it.
5780
3eb82471
JD
57812007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
5782
5783 Clean up.
5784 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
5785 at_directive_argv arguments so these no longer have to be global
5786 variables. Also, update the implementation for the following changes.
5787 (fail_for_at_directive_too_many_args,
5788 fail_for_at_directive_too_few_args): Add at_directive_name argument.
5789 (at_directive_name): Remove as at_directive_argv[0] will be used for
5790 this now.
5791 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
5792 for the directive name.
5793 (at_directive_argc, at_directive_argv): Make these local within
5794 skel_lex instead of global.
5795 (INITIAL): Update directive start action for above changes.
5796 (SC_AT_DIRECTIVE_ARG): Rename to...
5797 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
5798 (SC_AT_DIRECTIVE_SKIP_WS): Update.
5799 (scan_skel): Move yylex_destroy to...
5800 (skel_scanner_free): ... here.
5801 * tests/skeletons.at (installed skeleton file name): Rename to...
5802 (installed skeleton file names): ... this.
5803
148d66d8
JD
58042007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
5805
5806 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
5807 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
5808 Summary" not "Directives".
5809 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
5810 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
5811 since the former is now the more complete one.
5812 (Prologue Alternatives): Likewise and do the same for %defines.
5813 (Table of Symbols): Add summary of %code, add summary of %define, and
5814 move full %code documentation to...
5815 (Decl Summary): ... here for consistency with other entries in these
5816 sections.
5817 Move %define entry in order to keep this list alphabetized.
5818 Reword %define entry a little to put less emphasis on the skeleton
5819 concept, which most users shouldn't have to think about.
5820
665f0c24
PE
58212007-01-26 Paul Eggert <eggert@cs.ucla.edu>
5822
5823 Adjust to recent gnulib changes.
5824 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
5825 Add string.h, string_.h, unistd_.h, wchar_.h.
5826 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
5827 * src/system.h: Don't include <stpcpy.h>; this is now done by
5828 <string.h>.
5829
592d0b1e
PB
58302007-01-23 Paolo Bonzini <bonzini@gnu.org>
5831
5832 Simplify implementation of unqualified %code, implement macros for
5833 uniform treatment of boolean %define flags. Document %define.
5834 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
5835 b4_percent_code_ifdef): New.
5836 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
5837 * data/c++.m4: Define default value for global_tokens_and_yystype.
5838 * data/glr.cc: Likewise.
5839 * data/location.cc: Use b4_percent_define_flag_if.
5840
148d66d8 5841 * doc/bison.texinfo (Decl Summary): Document %define.
592d0b1e
PB
5842
5843 * src/parse-gram.y (Unqualified %code): Change muscle name to
5844 b4_percent_code().
5845 (content.opt): Default to empty.
5846
a7867f53
JD
58472007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5848
5849 Implement support for relative and absolute skeleton file names.
5850 Discussed starting at
5851 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
5852 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
5853 (Bison Options): Document in --skeleton entry.
5854 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
5855 full_skeleton can't necessarily hold all of pkgdatadir.
5856 If the specified skeleton file name contains a `/', don't prepend
5857 pkgdatadir.
5858 * src/parse-gram.y (prologue_declaration): If the specified skeleton
5859 file name contains a `/', prepend the grammar file directory.
5860 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
5861 * skeletons.at: New file.
5862 (relative skeleton file names): New test case.
5863 (installed skeleton file names): New test case.
5864 * tests/testsuite.at: Include skeletons.at.
5865
5866 * bootstrap: Update copyright to 2007.
5867
830c9b18
PB
58682007-01-17 Paolo Bonzini <bonzini@gnu.org>
5869
5870 * bootstrap: Remove occurrences of .#bootmp from the files.
5871
a8c2e813
AD
58722007-01-17 Akim Demaille <akim@epita.fr>
5873
5874 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
5875 nonterminals.
5876 Use per-type %printer.
5877
279cabb6
JD
58782007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
5879
5880 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
5881 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5882 djgpp/config.site, src/files.c, src/files.h, src/main.c,
5883 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
5884 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
5885 tests/glr-regression.at, tests/input.at, tests/local.at,
5886 tests/output.at, tests/torture.at: Update copyright to 2007.
5887
bb32f4f2
AD
58882007-01-16 Akim Demaille <akim@epita.fr>
5889
5890 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
5891 error code.
5892 (Calc++ Scanner): Exit with failure if we can't open the input
5893 file.
5894 Accept "-" standing for stdin.
5895 (Calc++ Top Level): Print the result only if the parsing was
5896 successful.
5897
7cff04b5
AD
58982007-01-16 Akim Demaille <akim@epita.fr>
5899
5900 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
5901
a4e25e1d
JD
59022007-01-15 Paolo Bonzini <bonzini@gnu.org>
5903 and Joel E. Denny <jdenny@ces.clemson.edu>
5904
5905 Clean up %define and %code implementation in M4 some. Most
5906 importantly, rename all related macros to be in the b4_percent_define
5907 and b4_percent_code namespaces. Also, complete support for `.' in
5908 %define variable names and %code qualifiers.
5909 * data/bison.m4 (b4_check_user_names): Check for special
5910 "SKELETON-NAMESPACE(name)" macros instead of using two nested
5911 m4_foreach loops.
5912 (b4_get_percent_define, b4_get_percent_code): Rename to...
5913 (b4_percent_define_get, b4_percent_code_get): ... these.
5914 Extend documentation with examples.
5915 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
5916 b4_percent_define_skeleton_variables and
5917 b4_percent_code_skeleton_qualifiers.
5918 Expect any value for the %define variable `foo' to be stored in the
5919 macro named `b4_percent_define(foo)'; expect any %code blocks for the
5920 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
5921 expect any unqualified %code blocks to be stored in a macro named
5922 `b4_percent_code_unqualified'.
5923 Use m4_indir so that %define variable names and %code qualifiers can
5924 contain `.', which is allowed by the grammar parser.
5925 (b4_percent_define_default): New macro to set a default value for a
5926 %define variable.
5927 (m4_wrap): Update wrapped code, and fix some underquoting.
5928 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
5929 Expect grammar uses of %define variables and %code qualifiers to be
5930 defined in b4_percent_define_user_variables and
5931 b4_percent_code_user_qualifiers.
5932 * data/c++.m4: Use b4_percent_define_default rather than
5933 m4_define_default. Fix some underquoting. Skeleton usage of %define
5934 variable define_location_comparison now implies skeleton usage of
5935 %define variable filename_type.
5936 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
5937 data/push.c, data/yacc.c: Update macro names.
5938 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
5939 muscle names.
5940
e37c665c
JMG
59412007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
5942
5943 DJGPP specific issues.
5944
5945 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
5946 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
5947
7d2d521f
JD
59482007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5949
5950 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
5951 run parsers in all tests so that Valgrind is invoked during
5952 maintainer-check-valgrind.
5953 (Duplicate representation of merged trees): Free all semantic values.
5954 (Duplicated user destructor for lookahead): Likewise.
5955
e0ac9b4b
JD
59562007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5957
5958 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
5959 command-line prefix.
5960 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
5961 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
5962 miss Valgrind messages.
5963 (Exploding the Stack Size with Malloc): Likewise.
5964
78143faa
JD
59652007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
5966
5967 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
5968 locals. Reported by Juan Manuel Guerrero at
5969 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
5970 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
5971 Fix some indentation also.
5972 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
5973 explaining this issue.
5974
7ecec4dd
JD
59752007-01-09 Paolo Bonzini <bonzini@gnu.org>
5976 and Joel E. Denny <jdenny@ces.clemson.edu>
5977
5978 Simplify union and prologue handling, and escape union and lex/parse
5979 params with digraphs.
5980 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
5981 values to the empty string since these are no longer guaranteed
5982 initialized by the front-end.
5983 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
5984 braces around b4_user_stype since this is no longer done by the
5985 front-end.
5986 * src/files.c, src/files.h (pre_prologue_obstack,
5987 post_prologue_obstack): Remove.
5988 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
5989 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
5990 with digraphs. This fixes lex params and parse params.
5991 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
5992 * src/output.c (prepare): Remove muscle insertion of the prologues.
5993 (output): Remove freeing of pre_prologue_obstack and
5994 post_prologue_obstack.
5995 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
5996 than prologue_augment for prologue parsing so you don't need prologue
5997 obstacks.
5c80250c
JD
5998 (grammar_declaration): For %union RHS, use `braceless' instead of
5999 "{...}" so that braces are already stripped and code is escaped with
6000 digraphs.
7ecec4dd
JD
6001 * src/reader.c (prologue_augment): Remove.
6002 (reader): Remove initialization of pre_prologue_obstack and
6003 post_prologue_obstack.
6004 * src/reader.h (prologue_augment): Remove.
6005
6006 * data/c.m4: Remove stray parenthesis.
6007
16dc6a9e
JD
60082007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6009
6010 Remove quotes from variables names in %define directives and from
6011 qualifiers in %code directives, and restrict the characters that are
6012 allowed in them to M4-friendly ones. For %define, continue to support
6013 the quoted form as a deprecated feature. Discussed starting at
6014 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
6015 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
6016 %code.
6017 * doc/bison.texinfo (Prologue Alternatives): Update.
91661ebb
JD
6018 (Decl Summary): In %defines entry, update mention of `%code requires'
6019 and `%code provides'.
16dc6a9e
JD
6020 (C++ Location Values): Update %define uses.
6021 (Calc++ Parser Interface): Likewise.
6022 (Calc++ Parser): Likewise, and update `%code requires' uses.
148d66d8 6023 (Table of Symbols): Update %code documentation.
16dc6a9e
JD
6024 * src/parse-gram.y (prologue_declaration): For %define variables, use
6025 `variable' instead of `STRING'.
6026 (grammar_declaration): For %code qualifiers, use `ID' instead of
6027 `STRING'.
6028 (variable): New nonterminal that takes an `ID' or a `STRING'.
6029 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
6030 and %define uses.
6031 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
6032 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
6033 (%define errors): Update %define uses.
6034
e9813cd4
JD
60352007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6036
6037 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
6038 instead of muscle_insert for %define values so that M4-special
6039 characters are replaced with digraphs.
6040 * tests/input.at (%define errors): Extend to check weird values.
6041
6afc30cc
JD
60422007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
6043
6044 Instead of having skeletons declare all valid %define variables and
6045 %code qualifiers, provide macros that retrieve the associated values
6046 and build these lists automatically. Thus Bison will now warn when a
6047 variable or qualifier is not used by the skeleton in the current
6048 invocation regardless of whether it might sometimes be used by that
6049 skeleton in other invocations. Also, move all %define value macros to
6050 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
6051 form, which is replaced by %code.
6052 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
6053 (b4_check_user_names): ... this, and change the series of valid name
6054 arguments to a single list argument for names used in the skeleton
6055 similar to the existing list argument for names used in the grammar.
6056 Warn instead of complaining.
6057 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
6058 values and %code code, to format %code code properly, and to build
6059 lists of all %define variables and %code qualifiers used in the
6060 skeleton: b4_skeleton_percent_define_variables and
6061 b4_skeleton_percent_code_qualifiers.
6062 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
6063 Remove, and...
6064 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
6065 the skeleton names lists can finish building first. In place of
6066 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
6067 expect the lists b4_user_percent_define_variables and
6068 b4_user_percent_code_qualifiers.
6069 * data/c++.m4: Where setting default values for b4_parser_class_name,
6070 b4_location_type, b4_filename_type, b4_namespace, and
6071 b4_define_location_comparison, update their names to the
6072 b4_percent_define_ namespace.
6073 * data/glr.c: Don't use b4_check_percent_define_variables and
6074 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6075 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
6076 (b4_parser_class_name, b4_namespace): Define these using
a4e25e1d 6077 b4_get_percent_define for parser_class_name and namespace.
6afc30cc
JD
6078 * data/location.cc: Use b4_get_percent_define.
6079 * data/push.c: Don't use b4_check_percent_define_variables and
6080 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
6081 * data/yacc.c: Likewise, and don't call m4_exit in
6082 b4_use_push_for_pull_if or m4_wrap code will never execute.
6083 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
6084 Rename to...
6085 (muscle_grow_user_name_list): ... this for consistency with the
6086 terminology used in bison.m4.
6087 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
6088 %define variable names, and rename muscle used_percent_define_variables
6089 to user_percent_define_variables.
6090 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
6091 user_percent_code_qualifiers.
6092 (content): Remove.
6093 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
6094 {CODE} form is no longer accepted.
6095 * tests/input.at (Reject bad %code qualifiers): Rename to...
6096 (Reject unused %code qualifiers): ... this, and update test output.
6097 (%define error): Update test output.
6098
7eb8a0bc
JD
60992007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
6100
6101 Check for unrecognized %define variables similar to checking for
6102 unrecognized %code qualifiers. Check for redefined %define variables.
6103 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
6104 generalizes...
6105 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
6106 (b4_check_percent_define_variables): New, also wraps it.
6107 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
6108 variables using b4_check_percent_define_variables.
6109 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
6110 all those exercised in the test suite and all those listed in the
6111 `Default values' section of c++.m4. Are there others?
6112 * data/push.c, data/yacc.c: Declare no valid %define variables.
6113 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
6114 similar to muscle_find, but it works even when the muscle stores a
6115 const value.
6116 (muscle_grow_used_name_list): New function for constructing the used
6117 name list muscles that b4_check_for_unrecognized_names requires.
6118 * src/parse-gram.y (prologue_declaration): Warn if a variable is
6119 %define'd more than once. Define the b4_used_percent_define_variables
6120 muscle with muscle_grow_used_name_list.
6121 (grammar_declaration): Abbreviate %code code with
6122 muscle_grow_used_name_list.
6123 * tests/input.at (%define errors): New.
6124
3fc65ead
JD
61252007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6126
6127 Provide warn_at, complain_at, and fatal_at function callbacks to the
6128 skeletons, and use this for %code qualifier complaints.
6129 * data/bison.m4 (b4_error_at): New, invoked by...
6130 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
6131 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
6132 @fatal_at(...@) directives.
6133 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
6134 qualifiers in b4_used_percent_code_qualifiers and to use
6135 b4_complain_at.
6136 * src/location.c, src/location.h (boundary_set_from_string): New global
6137 function.
6138 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
6139 function.
6140 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
6141 to b4_used_percent_code_qualifiers.
6142 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
6143 function.
6144 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
6145 (lineno): Rename to...
6146 (out_lineno): ... this so I don't misunderstand it again.
6147 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
6148 here; these newlines are in the input but not the output file.
6149 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
6150 (at_directive_perform): ... this new static function, and add handling
6151 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
6152 directives.
6153 * tests/input.at (Reject bad %code qualifiers): Update test output with
6154 locations and extend.
6155
6156 * tests/output.at (Output file name: [, Output file name: ]): Remove
6157 bogus comment about these tests failing.
6158
1c7b7e1d
JD
61592007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
6160
6161 Clean up b4_check_percent_code_qualifiers a little.
6162 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
6163 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
6164 documentation and add examples.
6165 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
6166 qualifiers here.
6167
08af01c2
JD
61682007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
6169
6170 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
6171 unreliable -- especially when they're hidden inside another macro.
6172 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
6173 data/c.m4: Remove m4_divert(-1).
6174 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
6175 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
6176 m4_divert_push(0) and m4_divert_pop(0).
279cabb6 6177 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
08af01c2
JD
6178 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
6179 pushed and popped by m4sugar, should be first on the stack.
6180
6181 Provide warn, complain, and fatal function callbacks to the skeletons.
6182 This provides more flexibility than m4_fatal, improves the error
6183 message format, and captures messages for translation. Discussed
6184 starting at
6185 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
6186 * data/bison.m4 (b4_error): New, invoked by...
6187 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
6188 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
6189 directives. Because these M4 macros might be called when the current
6190 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
6191 the previous removal of uses of m4_divert, which caused trouble.
6192 (b4_check_percent_code_qualifiers): Use b4_complain instead of
6193 m4_fatal to report unrecognized %code qualifiers.
6194 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
6195 push parser requests.
6196 * data/glr.c: Use b4_complain instead of m4_fatal to report
6197 non-deterministic push parser requests.
6198 Update @output usage to @output(...@) form.
6199 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
6200 report missing %defines. Update @output usage to @output(...@) form.
6201 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
6202 @output(...@) form.
6203 * src/main.c (main): Invoke skel_scanner_free.
6204 * src/scan-skel.h (skel_scanner_free): Prototype new function.
6205 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
6206 obstack_for_string from flex-scanner.h.
6207 (YY_DECL): Use to declare skel_lex static.
6208 (decode_at_digraphs): Remove; now handled in the new
6209 SC_AT_DIRECTIVE_ARG start condition.
6210 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
6211 functions.
6212 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
6213 at_directive_argv): New static globals.
6214 (INITIAL): Use fail_for_invalid_at.
6215 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
6216 recognize the start of a generalized `@directive(...@)' form and
6217 start...
6218 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
6219 directive args (using the new obstack_for_string), to decode the
6220 contained @ diagraphs, and to perform the directive. It recognizes
6221 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
6222 @output(...@).
6223 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
6224 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
6225 `@,'.
6226 (scan_skel): Initialize obstack_for_string on the first call.
6227 (skel_scanner_free): New function to free obstack_for_string.
6228 * tests/input.at (Reject bad %code qualifiers): Update test output.
6229
8e0a5e9e
JD
62302007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
6231
6232 Consolidate the 4 prologue alternative directives (%code, %requires,
6233 %provides, and %code-top) into a single %code directive with an
6234 optional qualifier field. Discussed at
6235 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
6236 * NEWS (2.3a+): Rewrite the existing entry for the prologue
6237 alternatives.
6238 * doc/bison.texinfo (Prologue Alternatives): Update.
6239 (Decl Summary): Update to %code "requires" and %code "provides".
6240 (Calc++ Parser): Update to %code "requires".
148d66d8 6241 (Table of Symbols): Remove entries for %requires, %provides, and
8e0a5e9e
JD
6242 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
6243 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
6244 are replaced by b4_percent_code_provides and b4_percent_code_requires,
6245 which are skeleton-specific.
6246 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
6247 declare what %code qualifiers it supports and to complain if any other
6248 qualifiers were used in the grammar.
6249 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
6250 and b4_user_code([b4_percent_code_provides]) in place of
6251 b4_user_requires and b4_user_provides.
6252 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
6253 Add b4_user_code([b4_percent_code_top]) and
6254 b4_user_code([b4_percent_code]).
6255 Invoke b4_check_percent_code_qualifiers.
6256 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6257 PERCENT_REQUIRES): Remove.
6258 (grammar_declaration): Remove RHS's for %code-top, %provides, and
6259 %requires. Rewrite the %code RHS as the unqualified form defining the
6260 muscle b4_percent_code. Add another RHS for the qualified %code form,
6261 which defines muscles of the form b4_percent_code_QUALIFIER and the
6262 b4_used_percent_code_qualifiers muscle.
6263 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
6264 PERCENT_REQUIRES): Remove.
6265 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
6266 %code "requires" and %code "provides".
6267 * tests/input.at (Reject bad %code qualifiers): New.
6268
95021767
JD
62692007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6270
6271 Use the new code_props interface for destructors and printers.
6272 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
6273 printer_location members, and change the type of the destructor and
6274 printer members to code_props.
6275 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
6276 symbol_printer_get, semantic_type_destructor_set,
6277 semantic_type_printer_set, default_tagged_destructor_set,
6278 default_tagless_destructor_set, default_tagged_printer_set,
6279 default_tagless_printer_set): Use code_props in arguments and return
6280 types in place of char const * and location.
6281 (symbol_destructor_location_get, symbol_printer_location_get): Remove
6282 since the locations are now contained in the return of
6283 symbol_destructor_get and symbol_printer_get.
6284 * src/output.c (symbol_destructors_output, symbol_printers_output):
6285 Replace with...
6286 (symbol_code_props_output): ... this to eliminate duplicate code.
6287 (output_skeleton): Update to use symbol_code_props_output.
6288 * src/reader.c (symbol_should_be_used): Update use of
6289 symbol_destructor_get.
6290 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
6291 Update uses of the various _destructor_set and _printer_set functions.
6292 * src/symtab.c: (default_tagged_destructor_location,
6293 default_tagless_destructor_location, default_tagged_printer_location,
6294 default_tagless_printer_location): Remove since we...
6295 (default_tagged_destructor, default_tagless_destructor,
6296 default_tagged_printer, default_tagless_printer): ... change the type
6297 of these to code_props.
6298 (symbol_new, semantic_type_new, symbol_destructor_set,
6299 semantic_type_destructor_set, symbol_destructor_get,
6300 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
6301 symbol_check_alias_consistency, default_tagged_destructor_set,
6302 default_tagless_destructor_set, default_tagged_printer_set,
6303 default_tagless_printer_set): Update.
6304 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
6305 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
6306 code_props members.
6307 (symbol_print): Use SYMBOL_CODE_PRINT.
6308
f6857bbf
JD
63092007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
6310
6311 Use the new code_props interface for rule actions.
6312 * src/symlist.h (symbol_list): Replace action, action_location, and
6313 used members with a code_props action_props member.
6314 * src/reader.c (symbol_should_be_used, grammar_rule_check,
6315 grammar_midrule_action, grammar_current_rule_merge_set,
6316 grammar_current_rule_symbol_append, packgram): Update.
6317 * src/scan-code.h (translate_rule_action): Remove, no longer used.
6318 * src/scan-code.l (handle_action_dollar): Update.
6319 (translate_rule_action): Remove, no longer used.
6320 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
6321
7c0c6181
JD
63222007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6323
6324 Use the new code_props interface in parse-gram.y.
6325 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
6326 Update all uses of translate_* functions to use the new code_props
6327 interface and to use gram_scanner_last_string_free and
6328 code_scanner_last_string_free where possible.
6329 (grammar_declaration): symbol_list_destructor_set and
6330 symbol_list_printer_set now perform the translation, so don't do it
6331 here. Use gram_scanner_last_string_free where possible.
6332 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
6333 translate_code): Remove, no longer used.
6334 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
6335 symbol_list_printer_set): Perform code translation here rather than
6336 depending on the caller to do so.
6337
6338 * src/symlist.h (struct symbol_list): Correct some documentation typos.
6339 * src/scan-gram.h (gram_last_string): Remove declaration.
6340 * src/scan-gram.l (last_string): Declare it static.
6341
28e52c0d
JD
63422007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
6343
6344 Encapsulate code properties and related functionality for the various
6345 destructors, printers, and actions into a code_props structure and
6346 interface. This patch merely implements code_props in scan-code.h and
6347 scan-code.l. Future patches will rewrite other modules to use it.
6348 Discussed starting at
6349 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
6350 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
6351 consistently initialize const structs that have an empty location
6352 field.
6353 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
6354 to ensure consistency.
6355 * src/scan-code.h (code_props): New structure.
6356 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
6357 function, macro, and const global variable for initializing a
6358 code_props with no code.
6359 (code_props_plain_init, code_props_symbol_action_init,
6360 code_props_rule_action_init, code_props_translate_code): The rest of
6361 the new code_props functional interface. Among other things, the init
6362 functions set the code_props kind field so that
6363 code_props_translate_code will know whether to behave like
6364 translate_symbol_action, translate_rule_action, or translate_code.
6365 These old translate functions must remain until all other modules are
6366 updated to use the new code_props interface.
6367 (code_scanner_last_string_free): New function similar to
6368 gram_scanner_last_string_free.
6369 (code_scanner_free): Add documentation.
6370 * src/scan-code.l: Implement the new interface.
6371 (code_lex): Make it static, add a code_props* argument, and remove the
6372 rule argument.
6373 (last_string): New static global similar to the one in scan-gram.l.
6374 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
6375 instead of rule.
6376 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
6377 code_props since Bison may one day use this information for destructors
6378 and printers.
6379 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
6380 (handle_action_dollar): Use symbol_list_n_get and set used flag
6381 directly since symbol_list_n_used_set is removed.
6382 (translate_action): Add a code_props* argument and remove the rule,
6383 action, and location arguments. Pass the code_props* on to code_lex.
6384 (translate_rule_action, translate_symbol_action, translate_code):
6385 Rewrite as wrappers around the new code_props interface.
6386 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
6387 it would eventually need to break the encapsulation of code_props.
6388
96034983
JD
63892007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6390
6391 * etc/.cvsignore: New.
6392
945e396c
JD
63932007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
6394
6395 Add maintainer-push-check to run maintainer-check using push parsing in
6396 place of pull parsing where available.
6397 * Makefile.am (maintainer-push-check): New.
6398 * data/bison.m4 (b4_use_push_for_pull_if): New.
6399 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
6400 appropriately based on their existing values.
6401 (yypush_parse): Don't print push-parser-specific diagnostics if push
6402 parsing is being used in place of pull parsing.
6403 * data/yacc.c: If push parsing should replace pull parsing, redirect to
6404 push.c.
6405 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
6406 variable, and insert b4_use_push_for_pull_flag into muscles.
6407 * tests/Makefile.am (maintainer-push-check): New.
6408
7d596384
JD
64092006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6410
6411 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
6412 (whether successful or failed) so that yypush_parse can be invoked
6413 again to start a new parse using the same yypstate.
6414 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
6415 check multiple yypull_parse invocations on the same yypstate. For pull
6416 mode, extend to check multiple yyparse invocations.
6417 (Exploding the Stack Size with Alloca): Extend to try with
6418 %push-pull-parser.
6419 (Exploding the Stack Size with Malloc): Likewise.
6420
6421 * tests/calc.at (Simple LALR Calculator): Don't specify
6422 %skeleton "push.c" since %push-pull-parser implies that now.
6423 * tests/headers.at (export YYLTYPE): Don't check for the push
6424 declarations. Otherwise, this test case can't be used to see if push
6425 mode can truly emulate pull mode.
6426 * tests/input.at (Torturing the Scanner): Likewise.
6427 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
6428 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
6429 AT_YACC_IF, which now includes the case of push mode since %skeleton
6430 need not be used for push mode. This will be more intuitive once
6431 push.c is renamed to yacc.c.
6432
7172e23e
JD
64332006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
6434
6435 For push mode, convert yyparse from a macro to a function, invoke yylex
6436 instead of passing a yylexp argument to yypull_parse, and don't
6437 generate yypull_parse or yyparse unless %push-pull-parser is declared.
6438 Discussed starting at
6439 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
6440 * data/bison.m4 (b4_pull_if): New.
6441 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
6442 * data/push.c: Improve M4 quoting a little.
6443 (b4_generate_macro_args, b4_parenthesize): Remove.
6444 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
6445 any time a pull parser is requested.
6446 Don't #define this as a wrapper around yypull_parse. Instead, when
6447 both push and pull are requested, make it a function that does that
6448 same thing.
6449 (yypull_parse): If there's a b4_prefix, #define this to
6450 b4_prefix[pull_parse] when both push and pull are requested.
6451 Don't define this as a function unless both push and pull are
6452 requested.
6453 Remove the yylexp argument and hard-code yylex invocation instead.
6454 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
6455 %push-parser.
6456 * src/getargs.c (pull_parser): New global initialized to true.
6457 * getargs.h (pull_parser): extern it.
6458 * src/output.c (prepare): Insert pull_flag muscle.
6459 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
6460 (prologue_declaration): Set both push_parser and pull_parser = true for
6461 %push-pull-parser. Set push_parser = true and pull_parser = false for
6462 %push-parser.
6463 * src/scan-gram.l: Don't accept %push_parser as an alternative to
6464 %push-parser since there's no backward-compatibility concern here.
6465 Scan %push-pull-parser.
6466 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
6467 instead of %push-parser.
6468 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
6469 prototype it in the module that calls yyparse.
6470 * tests/input.at (Torturing the Scanner): Likewise.
6471 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
6472
2e7944cb
JD
64732006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
6474
6475 Update etc/bench.pl. Optimize push mode a little (the yyn change
6476 deserves most of the credit).
6477 * Makefile.am (SUBDIRS): Add etc subdirectory.
6478 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
6479 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
6480 yytoken, yyval, and yyloc declarations to...
6481 (yyparse or yypush_parse): ... here to improve performance. For
6482 yypush_parse invocations after the first, be sure to assign yyn its old
6483 value again.
6484 (yypstate_new): Don't bother initializing the yyresult field since the
6485 initial value isn't used.
6486 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
6487 remove the #define that, in push mode, set it to yyps->NAME.
6488 * etc/Makefile.am: New.
6489 * etc/bench.pl: Remove and build it instead from...
6490 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
6491 "tests/bison" from the build directory by default rather than just
6492 invoking "bison" from $PATH.
6493 (calc_grammar): Update push parser code: don't declare yylval globally,
6494 don't define yyparse_wrapper, and don't #define yyparse.
6495 (bench_grammar): Update to check all working combinations of yacc.c,
6496 push.c, impure, pure, pull, and push.
6497
c3d50342
JD
64982006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6499
6500 For push mode, add pull wrappers around yypush_parse.
6501 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
6502 (yypull_parse): New function wrapping yypush_parse.
6503 (yyparse): New #define wrapping yypull_parse.
6504 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
6505 is declared.
6506 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
6507 prototype yylex in the module that calls yyparse, and don't prototype
6508 yyparse there. Otherwise, the yyparse expansion won't compile.
6509 * tests/input.at (Torturing the Scanner): Likewise.
6510
94ebeba5
JD
65112006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
6512
6513 Enable push parsers to operate in impure mode. Thus, %push-parser no
6514 longer implies %pure-parser. The point of this change is to move
6515 towards being able to test the push parser code by running the entire
6516 test suite as if %push-parser had been declared.
6517 * data/push.c (yypush_parse): For impure mode, remove the
6518 yypushed_char, yypushed_val, and yypushed_loc arguments.
6519 Instead, declare these as local variables initialized to the global
6520 yychar, yylval, and yylloc.
6521 For the first yypush_parse invocation only, restore the initial values
6522 of these global variables when it's time to read a token since they
6523 have been overwritten.
6524 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
6525 %push-parser.
6526 * tests/calc.at (Simple LALR(1) Calculator): Always declare
6527 %pure-parser along with %push-parser since this test case was designed
6528 for pure push parsers.
6529 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
6530 (AT_YACC_OR_PUSH_IF): New.
6531 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
6532 add a note that it's still wrong for some cases (as it has been for a
6533 while).
6534 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
6535 %push-parser no longer implies %pure-parser.
6536
a0633178
JD
65372006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6538
6539 Remove some unnecessary differences between the pull parser code and
6540 the push parser code. This patch enables yynerrs in push mode.
6541 * data/push.c: Reformat M4 a little.
6542 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
6543 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
6544 because push mode is on. Instead, if pure mode is on, move yynerrs
6545 to...
6546 (b4_declare_parser_state_variables): ... here.
6547 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
6548 to yyps->NAME so it can be used in yypush_parse.
6549 (yypush_parse): Don't omit uses of yynerrs in push mode.
6550
8646b6a3
JD
65512006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6552
6553 Fix bug such that the first pushed token's value and location are
6554 sometimes overwritten (sometimes by %initial-action) before being used.
6555 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
6556 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
6557 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
6558 more closely mimic the pull parser logic.
6559 Don't copy the pushed token to yychar, yylval, and yylloc until it's
6560 time to read a token, which is after any initialization of yylval and
6561 yylloc.
6562 (gottoken): Rename label to...
6563 (yyread_pushed_token): ... for clarity and to avoid infringing on the
6564 user namespace.
6565
9baf4d74
JD
65662006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
6567
6568 Rearrange initialization of the parser state variables so that the
6569 skeleton doesn't have to have a copy for pull mode and another for push
6570 mode. This patch also fixes at least a bug such that yylloc was not
6571 initialized (with b4_location_initial_line and
6572 b4_location_initial_column) upon calling yypush_parse. However, that
6573 initialization now overwrites the first token's location;
6574 %initial-action assigning @$ already did the same thing, and both bugs
6575 will be fixed in a later patch.
6576 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
6577 (b4_declare_parser_state_variables): Remove initialization of yytoken,
6578 yyss, yyvs, yyls, and yystacksize.
6579 (yypstate_new): Remove initialization of some yypstate fields: yystate,
6580 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
6581 yylsp.
6582 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
6583 yyps->NAME so it can be used in yypush_parse.
6584 (yyparse or yypush_parse): For yypush_parse, don't print the
6585 "Starting parse" diagnostic for invocations after the first.
6586 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
6587 yypush_parse, only do it for the first invocation.
6588 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
6589 initialization to occur in yypush_parse but only on the first
6590 invocation.
6591
23522164
JD
65922006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6593
6594 * data/push.c: Add CPP guards around push parser declarations in both
6595 the header and the code file.
6596 In the code file, move the push parser declarations to the same place
6597 they appear in the header file.
6598 Clean up the M4 some, especially the inconsistent underquoting in
6599 some b4_c_function_def and b4_c_function_decl uses.
6600
bb010fe5
JD
66012006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6602
6603 Encapsulate the push parser state variables into an M4 macro so the
6604 push skeleton doesn't have to list them again for pull mode's yyparse.
6605 For push mode, remove yypush_parse's local equivalents of these
6606 variables to eliminate unnecessary copying between the two sets at
6607 run-time. This patch also fixes at least a bug related to multiple
6608 %initial-action invocations in push mode.
6609 * data/push.c (b4_declare_parser_variables): Rename to...
6610 (b4_declare_scanner_communication_variables): ... this for clarity and
6611 update both uses.
6612 (b4_declare_yyparse_variables): Remove and move its contents to the one
6613 spot where it was invoked.
6614 (b4_declare_parser_state_variables): New macro containing the parser
6615 state variables required by push mode.
6616 (struct yypstate): Replace all fields but yynew with
6617 b4_declare_parser_state_variables.
6618 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
6619 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
6620 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
6621 (yyparse or yypush_parse): For yyparse in pull mode, replace local
6622 parser state variable declarations with
6623 b4_declare_parser_state_variables.
6624 Don't initialize parser state variables when calling yypush_parse since
6625 yypstate_new already does that.
6626 Invoke the user's initial action only upon the first yypush_parse
6627 invocation.
6628 Remove all code that copies between the local parser state variables
6629 and the yypstate.
6630
2d212f8c
JD
66312006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
6632
6633 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
6634 prevent a name collision in a future patch where these names will
6635 sometimes be #define'd.
6636 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
6637 since it no longer has the same name as the existing argument.
6638 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
6639
e6e704dc
JD
66402006-12-19 Paolo Bonzini <bonzini@gnu.org>
6641 and Joel E. Denny <jdenny@ces.clemson.edu>
6642
6643 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
6644 that the argument is case-insensitive, and there's no `=' here.
6645 For the %skeleton entry, mention that %language is better.
6646 (Bison Options): Likewise for --language and --skeleton. Move the
6647 --skeleton entry so that the `Tuning the parser' section is sorted
6648 alphabetically on long options.
6649 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
6650 %language directive in detail here; cross-reference the %language
6651 documentation instead.
6652 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
6653 `%require "2.3b"' so that the example is always up-to-date.
148d66d8 6654 (Table of Symbols): Add entries for %language and %skeleton.
e6e704dc
JD
6655 * examples/extexi (normalize): Instead of replacing every %require
6656 argument with the current Bison version, just substitute for
6657 `@value{VERSION}'. This guarantees that we're testing what actually
6658 appears in the documentation.
6659 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
6660 rather than `@VERSION@'.
6661
0e021770
PE
66622006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6663
fd575f05
PE
6664 * NEWS: Reword the %language news a bit, and put it earlier.
6665
0e021770
PE
6666 * src/getargs.c (skeleton_arg): Last arg is now location const *.
6667 Rewrite to simplify the logic.
6668 (language_argmatch): Likewise.
fd575f05
PE
6669 (program_name): We now own this var.
6670 * src/getargs.h (struct bison_language): Use char[] rather than
6671 const char *.
0e021770
PE
6672
6673 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
6674 Java is supported.
6675 * src/complain.c (program_name): Remove decl; no longer needed.
6676 * src/main.c (program_name): Remove; now belongs to getargs.
6677
66782006-12-18 Paolo Bonzini <bonzini@gnu.org>
6679
6680 * NEWS: Document %language.
6681
6682 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
6683
6684 * data/c-skel.m4, data/c++-skel.m4: New files.
6685 * data/glr.c: Complain on push parsers.
6686
6687 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
6688 over %skeleton.
148d66d8 6689 (Decl Summary): Document %language and %skeleton.
0e021770
PE
6690 (Command line): Document -L.
6691
6692 * examples/extexi: Rewrite %require directive.
6693 * examples/calc++/Makefile.am: Pass VERSION to extexi.
6694
6695 * src/files.c (compute_exts_from_gc): Look in language structure
6696 for .y extension.
6697 (compute_file_name_parts): Check whether .tab should be added.
6698 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
6699 (language, skeleton_arg, language_argmatch): New.
6700 (long_options): Add --language.
6701 (getargs): Use skeleton_arg, add -L/--language.
6702 * src/getargs.h: Include location.h.
6703 (struct bison_language, language, skeleton_arg, language_argmatch): New.
6704 * src/output.c (prepare): Pick default skeleton from struct language.
6705 Don't dispatch C skeletons here.
6706 * src/parse-gram.y (PERCENT_LANGUAGE): New.
6707 (prologue_declaration): Add "%language" rule, use skeleton_arg.
6708 * src/scan-gram.l ("%language"): New rule.
6709
6710 * tests/calc.at: Test %skeleton and %language.
6711 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
6712 (AT_GLR_IF): Look for %skeleton "glr.cc".
6713 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
6714 (AT_YACC_IF): Reject %language.
6715
5691bf57
PE
67162006-12-18 Paul Eggert <eggert@cs.ucla.edu>
6717
db06f0ce
PE
6718 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
6719 since it wasn't used; only the typedef name 'semantic_type' is needed.
6720 Also, omit trailing white space.
6721
5691bf57
PE
6722 * bootstrap: Sync from coreutils.
6723 (gnulib_extra_files): Add build-aux/announce.gen.
6724 (slurp): Adjust .gitignore files like .cvsignore files.
6725 * build-aux/announce-gen: Remove from CVS, since bootstrap
6726 now creates this.
6727
791934e4
JD
67282006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
6729
6730 Make %push-parser imply %pure-parser. This fixes several bugs; see
6731 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
6732 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
6733 pure_parser = true.
6734 * data/push.c: Don't bother testing b4_push_if when deciding whether
6735 to expand b4_declare_parser_variables globally.
6736 (yypush_parse): Likewise in here.
6737
6738 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
6739 (yy_reduce_print): Reformat M4 for readability.
6740
ee5abb37
JD
67412006-12-15 Bob Rossi <bob@brasko.net>
6742 and Joel Denny <jdenny@ces.clemson.edu>
6743
6744 * data/push.c (yypstate): Add typedef, and update all uses of
6745 struct yypstate to just yypstate.
6746 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
6747
16ca01f9
JD
67482006-12-14 Bob Rossi <bob@brasko.net>
6749
6750 * data/push.c (yypush_parse): Declare prototype regardless of
6751 %locations option.
6752
ab8e7e1a
JD
67532006-12-14 Bob Rossi <bob@brasko.net>
6754
6755 * data/push.c (yyparse): Remove the prototype and the #define when in
6756 push-parser mode.
6757
9bf32be3
JD
67582006-12-13 Bob Rossi <bob@brasko.net>
6759
6760 * data/push.c (yypstate_init): Rename to...
6761 (yypstate_new): ... this and use b4_c_function_def.
6762 (yypstate_delete): New.
6763 (yypush_parse): Change parameters yynval and yynlloc to be const.
6764 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
6765 yypstate_delete functions.
6766
f02e2948
JD
67672006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
6768
6769 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
6770 strange test case titles. Reported by Bob Rossi.
6771
38eb7751
PE
67722006-12-13 Paul Eggert <eggert@cs.ucla.edu>
6773
6774 * TODO: Add pointer to Sylvain Schmitz's work on static detection
6775 of potential ambiguities in GLR grammers.
6776
bd9d212b
JD
67772006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
6778
6779 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
6780 `bison ', use m4_index instead of m4_substr since chopping up a string
6781 containing M4-special characters causes problems here.
6782
6783 Fix a couple of bugs related to special characters in user-specified
6784 file names, and make it easier for skeletons to compute output file
6785 names with the same file name prefix as Bison-computed output file
6786 names.
6787 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
6788 b4_parser_file_name and b4_spec_defines_file instead of
6789 @output_parser_name@ and @output_header_name@, which are now redundant.
6790 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
6791 b4_parser_file_name, b4_spec_defines_file, and the new
6792 @basename(FILENAME@) instead of @output_parser_name@ and
6793 @output_header_name@, which inappropriately escaped the file names as
6794 C string literals.
6795 * src/files.c (all_but_ext): Remove static qualifier.
6796 (compute_output_file_names): Move `free (all_but_ext)' to...
6797 (output_file_names_free): ... here since all_but_ext is needed later.
6798 * src/files.h (all_but_ext): Extern.
6799 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
6800 exactly what MUSCLE_INSERT_STRING used to do.
6801 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
6802 characters are escaped properly.
6803 * src/output.c (prepare): Define muscle file_name_all_but_ext as
6804 all_but_ext.
6805 For pkgdatadir muscle, maintain previous functionality by using
6806 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
6807 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
6808 digraphs would never be expanded. Hopefully no one has M4-special
6809 characters in his Bison installation path.
6810 * src/scan-skel.l: Don't parse @output_header_name@ and
6811 @output_parser_name@ anymore since they're now redundant.
6812 In @output, use decode_at_digraphs.
6813 Parse a new @basename command that invokes last_component.
6814 (decode_at_digraphs): New.
6815 (BASE_QPUTS): Remove unused.
6816 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
6817 (Output file name): New tests.
6818
3f7ca628
JD
68192006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
6820
6821 Warn about output files that are generated by the skeletons and that
6822 conflict with other output files.
6823 * data/glr.c: Don't generate the header file here when glr.cc does.
6824 * src/files.c (file_names, file_names_count): New static globals.
6825 (compute_output_file_names): Invoke output_file_name_check for files
6826 not generated by the skeletons and remove existing checks.
6827 (output_file_name_check): New function that warns about conflicting
6828 output file names.
6829 (output_file_names_free): Free file_names.
6830 * src/files.h (output_file_name_check): Declare.
6831 * src/scan-skel.l: Invoke output_file_name_check for files generated by
6832 the skeletons.
6833 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
6834 (Conflicting output files): New tests.
6835
178e123e
PE
68362006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6837
6838 * doc/bison.texinfo: Fix a couple of typos.
6839
68402006-12-08 Bob Rossi <bob@brasko.net>
8def5cd0
JD
6841
6842 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
6843 Rename to...
6844 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
6845 update all uses.
6846 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
6847 (yypush_parse): Rename yypvars argument to yyps and remove redundant
6848 local pv.
6849 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
6850 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
6851
ea17f233
JD
68522006-12-07 Bob Rossi <bob@brasko.net>
6853 and Joel Denny <jdenny@ces.clemson.edu>
6854
6855 * data/push.c (yypvarsinit): Change return type from void* to struct
6856 yypvars*. No longer cast to void* on return.
6857 (struct yypvars): Remove yylen since it need not be remembered between
6858 yypushparse invocations.
6859 (yypushparse): Don't copy between yylen and pv->yylen.
6860
55a30bda
JD
68612006-12-05 Bob Rossi <bob@brasko.net>
6862
6863 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
6864 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
6865 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
6866 (struct yypvars): Remove b4_declare_parser_variables.
6867 (yypvarsinit): Remove init code for removed variables.
6868 (global scope): Do not declare b4_declare_parser_variables if
6869 push or pure mode.
6870 (yypushparse): Add b4_declare_parser_variables.
6871 Init new local variables, and remove init code for removed
6872 yypvars variables.
6873 (yyparse): Delete.
6874 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
6875 and yyparse for other modes.
6876 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
6877 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
6878 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
6879 (AT_PURE_LEX_IF): True if pure or push parser.
6880
85894313
JD
68812006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
6882
6883 Document Yacc prologue alternatives and default %destructor's and
6884 %printer's as experimental. Don't mention Java yet. Discussed at
6885 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
6886 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
6887 (2.3a): Annotate this entry to say the old forms of these features were
6888 also experimental.
6889 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
148d66d8 6890 Table of Symbols): Say they're experimental. Comment out any mention
85894313
JD
6891 of Java (we'll want this back eventually).
6892
02975b9a
JD
68932006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
6894
6895 Support a file name argument to %defines. Deprecate `=' in
6896 %file-prefix, %name-prefix, and %output. Discussed at
6897 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
6898 * NEWS (2.3a+): Mention.
148d66d8 6899 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
02975b9a
JD
6900 form of %defines, and remove `=' from entries for %file-prefix,
6901 %name-prefix, and %output.
6902 * src/parse-gram.y (prologue_declaration): Implement.
6903 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
6904 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
6905 all but one occurrence of %name-prefix.
6906 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
6907 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
6908 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
6909 occurrence of each of %file-prefix and %output. Add check for %defines
6910 with argument.
6911 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
6912 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
6913 Remove the `=' from %output.
6914
287b314e
JD
69152006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
6916
6917 Don't escape $ in test case titles since Autoconf 2.61 now does that
6918 correctly.
6919 * tests/actions.at (Default %printer and %destructor are not for error
6920 or $undefined): Here.
6921 (Default %printer and %destructor are not for $accept): Here.
6922 * tests/input.at (Invalid $n and @n): Here.
6923
3ebecc24
JD
69242006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
6925
6926 Rename <!> to <>. Discussed starting at
6927 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
6928 * NEWS (2.3a+): Update.
148d66d8 6929 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
3ebecc24
JD
6930 Update.
6931 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
6932 * src/scan-gram.l (INITIAL): Implement.
6933 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
6934 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
6935 comment.
6936 * tests/actions.at (Default tagless %printer and %destructor,
6937 Default tagged and per-type %printer and %destructor,
6938 Default %printer and %destructor are not for error or $undefined,
6939 Default %printer and %destructor are not for $accept,
6940 Default %printer and %destructor for mid-rule values): Update.
6941 * tests/input.at (Default %printer and %destructor redeclared,
6942 Unused values with default %destructor): Update.
6943
26b8a438
JD
69442006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
6945
6946 Don't let %prec take a nonterminal.
6947 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
6948 token.
6949 * tests/input.at (%prec takes a token): New test checking that %prec
6950 won't take a nonterminal.
6951
07c39ae9
JD
69522006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6953
405d53b7
JD
6954 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
6955 it was double-quoted.
07c39ae9
JD
6956 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
6957 grammar is maintained with Bison's highest standards.
6958 * src/getargs.c: Fix some typos in Doxygen comments.
6959
580b8926
JD
69602006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
6961
6962 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
6963 later. Reported by Paul Eggert in
6964 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
6965 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
6966 * src/scan-code.l (translate_action): Don't bother invoking
6967 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
6968 (code_scanner_free): Instead of invoking
6969 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
6970 which frees more.
6971 * src/scan-gram.l (gram_scanner_free): Likewise.
6972 * src/scan-skel.l (scan_skel): Likewise.
6973
4502eadc
JD
69742006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
6975
6976 * src/files.c (tr): Change return type to void.
6977 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
6978 has been called previously for the same key.
6979 (muscle_find): Return storage instead of value so that
6980 --enable-gcc-warnings doesn't produce warnings that the return discards
6981 const. aver that the value and storage are the same since storage
6982 could potentially be NULL when value is not.
6983 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
6984 same as 0.
6985
7746c8f6
PE
69862006-11-08 Paul Eggert <eggert@cs.ucla.edu>
6987
6988 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
6989 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
6990 us a slightly cleaner distribution, and also works.
6991 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
6992 gnulib changes.
6993
eb095650
PE
69942006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
6995 and Paul Eggert <eggert@cs.ucla.edu>
6996
6997 Don't let Bison leak memory except when it complains.
6998 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
6999 (spec_defines_file, dir_prefix): Now char *, not const char *,
7000 since they are freed.
7001 * src/files.c: Likewise.
7002 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
7003 Likewise.
7004 (tr): Now operates in-place. All uses changed.
7005 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
7006 values.
7007 (compute_file_name_parts, compute_output_file_names): Don't store
7008 read-only data in variables that will be freed.
7009 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
7010 src_extension, and header_extension.
7011 (output_file_names_free): New public function to free
7012 spec_verbose_file, spec_graph_file, spec_defines_file,
7013 parser_file_name, and dir_prefix.
7014 * src/getargs.c (getargs): Don't store read-only data in variables that
7015 will be freed.
7016 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
7017 (which previously existed but was unused), and quotearg_free.
7018 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
7019 * src/muscle_tab.c: Likewise.
7020 (muscle_entry): Make the value char const *,
7021 and add a new storage member that is char * and can be freed.
7022 (muscle_entry_free): New private function.
7023 (muscle_init): Use it instead of free.
7024 (muscle_insert, muscle_grow): Update and use new storage member.
7025 (muscle_code_grow): Free the string passed to muscle_grow
7026 since it's not needed anymore.
7027 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
7028 add a new `char *code' member.
7029 ("{...}"): Declare semantic type as code.
7030 * src/scan-code.h (translate_rule_action):
7031 (translate_symbol_action, translate_code, translate_action): Return
7032 `char const *' rather than `char *' since external code should not free
7033 these strings.
7034 * src/scan-code.l: Likewise.
7035 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
7036 which is "{...}" in the parser.
7037 * tests/Makefile.am (maintainer-check-valgrind): Set
7038 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
7039 Valgrind.
7040 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
7041 complain.
7042 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
7043 expecting a non-zero exit status sets --leak-check=summary and
7044 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
7045 this case, and we don't want to hear about it.
7046
ac564be4
PE
70472006-11-08 Paul Eggert <eggert@cs.ucla.edu>
7048
7049 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
7050 instead of from the template, to simplify configuration a bit.
7051 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
7052 and m4/wint_t.m4, as they are needed with the latest gnulib.
7053
17bd8a73
JD
70542006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7055
7056 Disable unset/unused mid-rule value warnings by default, and recognize
7057 --warnings=midrule-values to enable them. Discussed starting at
7058 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
7059 * NEWS (2.3a+): Mention.
7060 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
7061 warnings): Add entry for midrule-values subargument.
7062 * src/reader.c (symbol_should_be_used): Don't return true just because
7063 the value is a set/used mid-rule value unless
7064 --warnings=midrule-values was specified.
7065 * tests/input.at (Unused values, Unused values before symbol
7066 declarations): Run tests with and without --warnings=midrule-values.
7067
7068 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
7069 than LIST_FREE directly.
7070
89eb3c76
JD
70712006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7072
7073 Finish implementing --warnings=error, which should not be implied by
7074 --warnings=all (or by its synonyms -W and --warnings without
7075 subarguments).
7076 * src/complain.c (set_warning_issued): New function to report that
7077 warnings are being treated as errors and to record an error if so.
7078 Invoke...
7079 (warn_at, warn): ... here.
7080 * src/getargs.c (warnings_args, warnings_types): Reorder so that
7081 "error - warnings are errors" does not appear above "all - all of the
7082 above".
7083 (getargs): For -W and --warnings without subarguments, don't let
7084 FLAGS_ARGMATCH set warnings_error in warnings_flag.
7085 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
7086
ba7560e2
JD
70872006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
7088
7089 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
7090 empty subargument list. For example: `bison --warnings= parser.y'.
7091
31283fc3
JD
70922006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7093
7094 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
7095 the parser header file so that gcc doesn't warn.
7096
12e35840
JD
70972006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7098
7099 Split the default %destructor/%printer into two kinds: <*> and <!>.
7100 Discussed starting at
7101 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
7102 * NEWS (2.3a+): Mention.
7103 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
7104 previous change today related to mid-rules.
148d66d8 7105 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
3ebecc24 7106 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
12e35840
JD
7107 (TYPE_TAG_ANY): Add as <*>.
7108 (TYPE_TAG_NONE): Add as <!>.
7109 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
7110 for <*> and <!>.
7111 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
7112 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
7113 * src/symlist.c (symbol_list_default_new): Split into tagged and
7114 tagless versions.
7115 (symbol_list_destructor_set, symbol_list_printer_set): Split
7116 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
7117 SYMLIST_DEFAULT_TAGLESS.
7118 * src/symlist.h: Update symbol_list_default*_new prototypes.
7119 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
7120 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
7121 * src/symtab.c (default_destructor, default_destructor_location,
7122 default_printer, default_printer_location): Split each into tagged and
7123 tagless versions.
7124 (symbol_destructor_get, symbol_destructor_location_get,
7125 symbol_printer_get, symbol_printer_location_get): Implement tagged
7126 default and tagless default cases.
7127 (default_destructor_set, default_printer_set): Split each into tagged
7128 and tagless versions.
7129 * src/symtab.h: Update prototypes.
7130 * tests/actions.at (Default %printer and %destructor): Rename to...
7131 (Default tagless %printer and %destructor): ... this, and extend.
7132 (Per-type %printer and %destructor): Rename to...
7133 (Default tagged and per-type %printer and %destructor): ... this, and
7134 extend.
7135 (Default %printer and %destructor for user-defined end token): Extend.
7136 (Default %printer and %destructor are not for error or $undefined):
7137 Update.
7138 (Default %printer and %destructor are not for $accept): Update.
7139 (Default %printer and %destructor for mid-rule values): Extend.
7140 * tests/input.at (Default %printer and %destructor redeclared): Extend.
7141 (Unused values with default %destructor): Extend.
7142
f91b1629
JD
71432006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
7144
7145 Don't apply the default %destructor/%printer to an unreferenced midrule
7146 value. Mentioned at
7147 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
7148 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
7149 like $@n instead of just @n so that the default %destructor/%printer
7150 logic doesn't see them as user-defined symbols.
7151 (symbol_is_dummy): Check for both forms of the name.
7152 * src/reader.c (packgram): Remove the `$' from each midrule symbol
7153 name for which the midrule value is referenced in any action.
7154 * tests/actions.at (Default %printer and %destructor for mid-rule
7155 values): New test.
7156 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
7157 for change to dummy symbol names.
7158
519d0004
JD
71592006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7160
7161 Warn about unset midrule $$ if the corresponding $n is used.
7162 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
7163 $n usage.
7164 (packgram): Before invoking grammar_rule_check on any rule, make sure
7165 all actions have already been scanned in order to set `used' flags.
7166 Otherwise, checking that a midrule's $$ is set will not always work
7167 properly because the midrule check must forward-reference the midrule's
7168 parent rule.
7169 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
7170 warning.
7171
a501eca9
JD
71722006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
7173
7174 More improvements to the documentation of the prologue alternatives:
7175 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
7176 Bison manual.
7177 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
7178 some text to clarify the relative importance of the new directives and
7179 to show how these directives may be viewed as code labels.
7180
2cbe6b7f
JD
71812006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
7182
7183 Similar to the recently removed %before-header, add %code-top as the
7184 alternative to the pre-prologue. Mentioned at
7185 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
7186 Also, let the prologue alternatives appear in the grammar section.
7187 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
7188 (prologue_declaration): Move the existing prologue alternatives to...
7189 (grammar_declaration): ... here and add %code-top.
7190 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
7191
7192 Clean up and extend documentation for the prologue alternatives.
7193 * NEWS (2.3a+): Describe prologue alternatives.
7194 * doc/bison.texinfo (Prologue): Move discussion of prologue
7195 alternatives to...
7196 (Prologue Alternatives): ... this new section, and extend it to discuss
7197 all 4 directives in detail.
148d66d8
JD
7198 (Table of Symbols): Clean up discussion of prologue alternatives and
7199 add %code-top.
2cbe6b7f 7200
e557d3ea
JMG
72012006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
7202
7203 DJGPP specific issues.
7204
7205 * djgpp/config.bat: config.hin has been moved to lib. Adjust
7206 config.bat accordingly.
7207 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
7208 * djgpp/config.site: Likewise.
7209
136a0f76
PB
72102006-10-16 Paolo Bonzini <bonzini@gnu.org>
7211
27bd5d67
PB
7212 Replace %*-header with %provides, %requires, %code. See discussion at
7213 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
7214
136a0f76
PB
7215 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
7216 (b4_user_start_header): Remove.
7217 * data/glr.c: Use new macros instead of b4_*start_header
7218 and b4_*end_header.
7219 * data/glr.cc: Likewise.
7220 * data/lalr1.cc: Likewise.
7221 * data/push.c: Likewise.
7222 * data/yacc.c: Likewise.
7223
7224 * doc/bison.texinfo: Remove %before-header, rename
7225 %{start,end,after}-header to %requires, %provides, %code.
7226
7227 * src/parse-gram.y: Likewise (also rename token names accordingly).
7228 * src/scan-gram.l: Likewise.
7229 * tests/actions.at: Likewise.
7230
10f429ef
PE
72312006-10-14 Paul Eggert <eggert@cs.ucla.edu>
7232
7233 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
7234 Problem reported by Joel E. Denny.
7235
72362006-10-14 Jim Meyering <jim@meyering.net>
7237
7238 (Sync from coreutils.)
7239 Work also when the working directory (with e.g. coreutils sources)
7240 is version controlled with git, rather than CVS.
7241 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
7242 rather than CVS.
7243 In messages and comments, say e.g., "checked-out sources",
7244 rather than "CVS sources".
7245 (version_controlled_file): New function. Work for git as well as
7246 for CVS. Don't use grep's -q option.
7247 (slurp): Call it here, in place of CVS-specific code.
7248
c4bd5bf7
JD
72492006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
7250
7251 Fix testsuite for ./configure --enable-gcc-warnings:
7252 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
7253 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
7254 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
7255 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
7256 * test/regression.at (Diagnostic that expects two alternatives):
7257 Likewise.
7258
46356ea4
PE
72592006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7260
231ed89a
PE
7261 * bootstrap.conf (gnulib_modules): Add config-h.
7262 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
7263 worry about HAVE_CONFIG_H.
7264 * lib/abitset.c: Likewise.
7265 * lib/bitset.c: Likewise.
7266 * lib/bitset_stats.c: Likewise.
7267 * lib/bitsetv-print.c: Likewise.
7268 * lib/bitsetv.c: Likewise.
7269 * lib/ebitset.c: Likewise.
7270 * lib/get-errno.c: Likewise.
7271 * lib/lbitset.c: Likewise.
7272 * lib/subpipe.c: Likewise.
7273 * lib/timevar.c: Likewise.
7274 * lib/vbitset.c: Likewise.
7275 * lib/bitset.c: Include "bitset.h" first, to test interface.
7276 * lib/bitset_stats.c: Include "bitset_stats.h" first.
7277 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
7278 * lib/bitsetv.c: Include "bitsetv.h" first.
7279 * lib/get-errno.c: Include "get-errno.h" first.
7280 * m4/.cvsignore: Add config-h.m4.
7281 * tests/actions.at (Default %printer and %destructor for ...):
7282 Adjust expected line numbers in output to reflect removal of #if
7283 HAVE_CONFIG_H lines.
7284 * tests/glr-regression.at (Missed %merge type warnings when ...):
7285 Likewise.
7286 * tests/regression.at (Braced code in declaration in rules section):
7287 Likewise.
7288 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
7289 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
7290 Include <config.h> unconditionally.
7291
46356ea4
PE
7292 * bootstrap: Sync from coreutils, as follows:
7293
7294 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7295
7296 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
7297 variable was sometimes used without being initialized. This
7298 messed up the installation of the INSTALL file in some cases.
7299
7300 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7301
7302 * bootstrap (usage, main program, symlink_to_gnulib): Add option
7303 --copy. Inspired by a suggestion from Bruno Haible.
7304
7305 2006-10-03 Jim Meyering <jim@meyering.net>
7306
7307 * bootstrap: Undo last change to this file, since now gnulib-tool
7308 sticks with the automake default in generating dependencies.
7309
dd4bf078
PE
73102006-10-12 Paul Eggert <eggert@cs.ucla.edu>
7311
cf2a5f7c
PE
7312 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
7313 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
7314
7315 * doc/bison.1: Add copyright notice.
7316
7317 * data/glr.c: Don't include <stdarg.h>; not used.
7318
35fe0834
PE
7319 * NEWS: The -g and --graph options now output graphs in Graphviz
7320 DOT format, not VCG format.
7321 * doc/bison.1: Likewise.
7322 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
fcab4a2e
PE
7323 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
7324 of this change in
7325 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
35fe0834
PE
7326 * TODO: Remove Graphviz entry.
7327 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
7328 remove vcg.c, vcg.h, vcg_defaults.h.
7329 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
7330 * src/graphviz.c, src/graphviz.h: New files.
7331 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
7332 * src/files.h: Make comment more generic.
7333 * src/main.c (main): Likewise.
7334 * src/print_graph.h: Likewise.
7335 * src/getargs.c (usage): Make usage description more generic.
7336 * src/print_graph.c: Include graphviz.h rather than vcg.h.
7337 (static_graph, fgraph): Remove. All uses changed to pass
7338 arguments instead of sharing a static var.
7339 (print_core, print_actions, print_state, print_graph):
7340 Output graphviz format rather than VCG format.
7341 * tests/.cvsignore: Remove *.vcg; add *.dot.
7342 * tests/output.at: Expect *.dot files, not *.vcg files.
7343
dd4bf078
PE
7344 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
7345 accommodates the 2006-10-08 change.
7346
efdd7421
PE
73472006-10-11 Bob Rossi <bob@brasko.net>
7348
7349 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
7350 (b4_yyssa, b4_yyerror_range): New macros.
7351 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
7352 (yypvarsinit): Remove init of removed fields.
7353 (yypushparse): Remove use of removed fields; use new macros instead.
7354
96a1981a
PE
73552006-10-11 Paul Eggert <eggert@cs.ucla.edu>
7356
7357 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
7358 in a push parser. Reindent slightly to match yacc.c better.
7359
73602006-10-11 Bob Rossi <bob@brasko.net>
7361
46356ea4
PE
7362 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
7363 yymsg_alloc fields.
7364 (yypvarsinit, yypushparse): Remove init of removed fields.
7365 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
96a1981a 7366
c1630a8b
PE
73672006-10-09 Paul Eggert <eggert@cs.ucla.edu>
7368
7369 * THANKS: Add Paolo Bonzini and Bob Rossi.
7370
90b9908d
PB
73712006-10-08 Paolo Bonzini <bonzini@gnu.org>
7372
7373 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
7374 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
7375 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
7376 b4_define_user_cde and uses): Remove.
7377 (b4_comment, b4_prefix, b4_sync_start): New.
7378 * data/bison.m4: New file, with most of the content removed from c.m4.
7379 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
7380 * src/output.c (output_skeleton): Pass bison.m4.
7381 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
7382 only if specified.
7383
cf806753
PE
73842006-10-05 Paul Eggert <eggert@cs.ucla.edu>
7385
7386 Fix test failure reported by Tom Lane in
7387 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
7388 and try to make such failures easier to catch in the future.
7389 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
7390 that's now the caller's responsibility.
7391 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
7392 Set yychar = YYEOF if it's negative.
7393 * tests/actions.at (yylex): Abort if asked to read past EOF.
7394 * tests/conflicts.at (yylex): Likewise.
7395 * tests/cxx-type.at (yylex): Likewise.
7396 * tests/glr-regression.at (yylex): Likewise.
7397 * tests/input.at (yylex): Likewise.
7398 * tests/regression.at (yylex): Likewise.
7399 * tests/torture.at (yylex): Likewise.
7400
0e2f006a
PE
74012006-10-01 Paul Eggert <eggert@cs.ucla.edu>
7402
7403 Fix problems with translating English-language diagnostics.
7404 * bootstrap: Fix bug introduced in recent bootstrap changes, with
7405 respect to bison-runtime pot generation. The YY_ stuff
7406 wasn't being captured.
7407 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
7408 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
7409 * runtime-po/POTFILES.in: Add data/push.c.
7410
e3ddc1e3
PE
74112006-09-29 Paul Eggert <eggert@cs.ucla.edu>
7412
7413 Merge bootstrap changes from coreutils.
7414
7415 2006-09-28 Jim Meyering <jim@meyering.net>
7416
7417 Automatically generated dependencies are important even
7418 when all of the sources in a directory come from gnulib.
7419 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
7420 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
7421
7422 2006-09-23 Jim Meyering <jim@meyering.net>
7423
7424 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
7425
7426 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7427
7428 * bootstrap: Add support for --force.
7429 (usage): New function. Describe usage less tersely.
7430 (CVS_only_file): New var.
7431
01e972b3
PE
74322006-09-21 Paul Eggert <eggert@cs.ucla.edu>
7433
7434 * data/push.c (YYPUSH_MORE): Make it an enum instead.
7435 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
7436 Adjust white space and comments to match GNU style better.
7437
c63d3e90
PE
74382006-09-20 Bob Rossi <bob@brasko.net>
7439
7440 * data/push.c (yyresult_get): Remove function.
7441 (YYPUSH_MORE): Add #define.
7442 (yypushparse): Modify return value.
7443
e70f46d1
PE
74442006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7445
7446 * stamp-h.in: Remove; no longer needed.
7447 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
7448 Remove config.h, config.hin, intl (no longer created).
7449 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
7450 stamp-h1.
7451
7452 Sync bootstrap from coreutils, as follows:
7453
7454 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
7455
7456 * bootstrap (symlink_to_gnulib): New function.
7457 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
7458 to copies-of-gnulib.
7459 (cp_mark_as_generated, slurp, gnulib_files):
7460 Avoid making a copy if it's the same as the old version.
7461 (gnulib_files): Add support for this variable (used by Bison).
7462
a92be413
PE
74632006-09-20 Paul Eggert <eggert@cs.ucla.edu>
7464
7465 * src/getargs.c (usage): Rework to use conventions similar to
7466 coreutils, to make translation a bit easier and the code a bit
7467 smaller. Problem reported by Tim Van Holder.
7468
4f82b42a
PE
74692006-09-15 Paul Eggert <eggert@cs.ucla.edu>
7470
3b2942e6
PE
7471 Use some of gnulib's new modules, taken from coreutils.
7472
7473 * bootstrap: Sync from coreutils, except add support for gnulib_files.
7474 * bootstrap.conf: New file.
7475 (gnulib_modules): Add configmake, inttypes, unistd.
7476 (XGETTEXT_OPTIONS): Add complain, complain_at,
7477 fatal, fatal_at, warn, warn_at, unexpected_end.
7478 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
7479 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
7480 (gl_EARLY): Add.
7481 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
7482 (gl_INIT): Add
7483 (GNULIB_AUTOCONF_SNIPPET): Remove.
7484 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
7485 the pickiest.
7486 * lib/.cvsignore: Add inttypes_.h.
7487 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
7488 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
7489 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
7490 no-longer-necessary initializations.
7491 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
7492 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
7493 use the unistd module.
7494 * src/system.h: Likewise.
7495 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
7496 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
7497 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
7498 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
7499 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
7500 * src/system.h: Include inttypes.h unconditionally, now that we
7501 use the inttypes module. Don't bother to include stdint.h, since
7502 inttypes.h now does that for us.
7503 (LOCALEDIR): Remove, now that we use the configmake module.
7504 * src/getargs.c: Include configmake.h.
7505 * src/main.c: Likewise.
7506 * src/output.c: Likewise.
7507 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
7508 not from $abs_top_builddir, since config.h moved.
7509
7510
4f82b42a
PE
7511 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
7512 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
7513
7514 * src/parse-gram.y (symbol_declaration): Don't put statements
7515 before declarations; it's not portable to C89.
7516 * src/scan-code.l (handle_action_at): Likewise.
7517
7518 * src/scan-code.l: Always initialize braces_level; the old code
7519 left it uninitialized and therefore had undefined behavior.
7520
7521 Don't attempt to redefine 'assert', since it runs afoul of
7522 systems where standard headers (mistakenly) include <assert.h>.
7523 Instead, define and use our own alternative, called 'aver'.
7524 * src/reader.c: Don't include assert.h, since we no longer
7525 use assert.
7526 * src/scan-code.l: Likewise.
7527 * src/system.h (assert): Remove, replacing with....
7528 (aver): New function, taking a bool arg. All uses changed.
7529 * src/tables.c (pack_vector): Ensure that aver arg is bool,
7530 not merely an integer.
7531
31c10e38
PE
75322006-09-15 Bob Rossi <bob@brasko.net>
7533
7534 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
7535 * data/c.m4 (YYPUSH): New.
7536 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
7537 * src/getargs.c (push_parser): New var.
7538 * src/getargs.h (push_parser): New declaration.
7539 * src/output.c (prepare): Add macro insertion of `push_flag'.
7540 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
7541 (prologue_declaration): Parse %push-parser.
7542 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
7543 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
7544 list of removed lines from the traces observed.
7545 (AT_CHECK_CALC_LALR): Added push parser tests.
7546
fa7b79c0
PE
75472006-09-13 Paul Eggert <eggert@cs.ucla.edu>
7548
21fe08ca
PE
7549 * NEWS: Version 2.3a.
7550 * configure.ac (AC_INIT): Likewise.
7551
e8ec4d9b
PE
7552 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
7553 "#define YYSTYPE int" that caused "make maintainer-check" to fail
7554 due to header ordering dependencies. I don't know why the #define
7555 was there.
7556
fa7b79c0
PE
7557 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
7558 runtime cost when YYDEBUG is not defined, and so that some tests
7559 that used to fail now work. Problem and initial suggestion by
7560 Paolo Bonzini.
7561 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
7562 * data/glr.cc (b4_parser_class_name):
7563 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
7564 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
7565 (yydebug_) [YYDEBUG]: New member.
7566 (yycdebug_): Now defined only if YYDEBUG.
7567 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
7568 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
7569 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
7570 if YYYDEBUG.
7571 (debug_stream, set_debug_stream, debug_level, set_debug_level):
7572 Define only if YYDEBUG.
7573 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
7574 set_debug_level.
7575 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
7576 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
7577 AT_CHECK_CALC_GLR_CC that are working now.
7578
4ec13d60
PE
75792006-09-12 Paul Eggert <eggert@cs.ucla.edu>
7580
7581 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
7582 We don't need them in glr.cc, and glr.c defines them.
7583 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
7584 assumes that defining it to anything is the same as defining
7585 it to 1. Problem reported by Paolo Bonzini.
7586
8e1687ae
PE
75872006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
7588
7589 * data/c.m4 (b4_null, b4_case): Define.
7590 * src/output.c (prepare_symbols): Use b4_null.
7591 (user_actions_output): Use b4_case.
7592
3dc5e96b
PE
75932006-09-11 Paul Eggert <eggert@cs.ucla.edu>
7594
aef3da86
PE
7595 * data/glr.c (b4_shared_declarations): Put start-header first,
7596 before any #includes that we generate, so that feature-test
7597 macros work. Problem reported by Michael Deutschmann in
7598 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
7599 * data/lalr1.cc: Likewise.
7600 * doc/bison.texinfo (Prologue): Document that feature-test macros
7601 should be defined before any Bison declarations.
7602 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
7603 that depend on location.hh after, not before, Bison decls, since
7604 we now include location.hh after the first user prologue.
7605
3dc5e96b
PE
7606 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
7607 Sander Brandenburg in
7608 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
7609 Also, fix minor white space and comment issues.
aef3da86
PE
7610 (Prologue): Mention that it's better to define feature-test macros
7611 before Bison declarations. Problem reported by Michael Deutschmann.
7612
7613 * README-cvs: Fix typo: "&" should be "&&". Problem reported
7614 by Jim Meyering.
7615 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
7616 This adjusts to recent gnulib changes.
3dc5e96b 7617
b2a0b7ca
JD
76182006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7619
7620 Finish implementation of per-type %destructor/%printer. Discussed
7621 starting at
7622 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
7623 and
7624 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
7625 * NEWS (2.3+): Add a description of this feature to the default
7626 %destructor/%printer description.
7627 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
7628 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
7629 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
7630 list node contains a semantic type.
7631 * src/symtab.c, src/symtab.h: Extend with a table that associates
7632 semantic types with their %destructor's and %printer's.
7633 (semantic_type_from_uniqstr, semantic_type_get,
7634 semantic_type_destructor_set, semantic_type_printer_set): New functions
7635 composing the public interface of that table.
7636 (symbol_destructor_get, symbol_destructor_location_get,
7637 symbol_printer_get, symbol_printer_location_get): If there's no
7638 per-symbol %destructor/%printer, look up the per-type before trying
7639 the default.
7640 * tests/actions.at (Per-type %printer and %destructor): New test case.
7641 * tests/input.at (Default %printer and %destructor redeclared):
7642 Extend to check that multiple occurrences of %symbol-default in a
7643 single %destructor/%printer declaration is an error.
7644 (Per-type %printer and %destructor redeclared, Unused values with
7645 per-type %destructor): New test cases.
7646
3be03b13
JD
76472006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
7648
7649 Require default %destructor/%printer to be declared using
7650 %symbol-default instead of an empty symbol list, and start working on
7651 new per-type %destructor/%printer. Discussed at
7652 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
7653 * NEWS (2.3+): Add %symbol-default to example.
7654 * bison.texinfo (Freeing Discarded Symbols): Likewise.
148d66d8 7655 (Table of Symbols): Add entry for %symbol-default.
3be03b13
JD
7656 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
7657 (generic_symlist, generic_symlist_item): New nonterminals for creating
7658 a list in which each item is a symbol, semantic type, or
7659 %symbol-default.
7660 (grammar_declaration): Use generic_symlist in %destructor and %printer
7661 declarations instead of symbols.1 or an empty list.
7662 (symbol_declaration, precedence_declaration, symbols.1): Update actions
7663 for changes to symbol_list.
7664 * src/reader.c: Update for changes to symbol_list.
7665 * src/scan-code.l: Likewise.
7666 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
7667 * src/symlist.c, src/symlist.h: Extend such that a list node may
7668 represent a semantic type or a %symbol-default in addition to just an
7669 ordinary symbol. Add switched functions for setting %destructor's and
7670 %printer's.
7671 * tests/actions.at, tests/input.at: Add %symbol-default to all default
7672 %destructor/%printer declarations.
7673
3508ce36
JD
76742006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
7675
7676 Whether the default %destructor/%printer applies to a particular symbol
7677 isn't a question of whether the user *declares* that symbol (in %token,
7678 for example). It's a question of whether the user by any means
7679 *defines* the symbol at all (by simply using a char token, for
7680 example). $end is defined by Bison whereas any other token with token
7681 number 0 is defined by the user. The error token is always defined by
7682 Bison regardless of whether the user declares it with %token, but we
7683 may one day let the user define error as a nonterminal instead.
7684 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
7685 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
7686 the meaning of "user-defined".
7687 * tests/actions.at (Default %printer and %destructor for user-declared
7688 end token): Rename to...
7689 (Default %printer and %destructor for user-defined end token): ...
7690 this.
7691
7692 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
7693 computation of whether to apply the default, don't maintain a list of
7694 every Bison-defined symbol. Instead, just check for a first character
7695 of '$', which a user symbol cannot have, and check for the error token.
7696
9350499c
JD
76972006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
7698
7699 Don't apply the default %destructor or %printer to the error token,
7700 $undefined, or $accept. This change fits the general rule that the
7701 default %destructor and %printer are only for user-declared symbols,
7702 and it solves several difficulties that are described in the new test
7703 cases listed below.
7704 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
7705 * tests/actions.at (Default %printer and %destructor are not for error
7706 or $undefined, Default %printer and %destructor are not for $accept):
7707 New test cases.
7708
4d7370cb
JD
77092006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
7710
7711 Allow %start after the first rule.
7712 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
7713 when parsing the first rule.
7714 (check_and_convert_grammar): Search for it here after all grammar
7715 declarations have been parsed. Skip midrules, which have dummy LHS
7716 nonterminals.
7717 * src/symtab.c (symbol_is_dummy): New function.
7718 * src/symtab.h (symbol_is_dummy): Declare it.
7719 * tests/input.at (%start after first rule): New test.
7720
6d0ef4ec
JD
77212006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7722
7723 Redo some of the previous commit: add back the ability to use
7724 non-aliased/undeclared string literals since it might be useful to
7725 those declaring %token-table.
7726 * src/reader.c (check_and_convert_grammar): Undo changes in previous
7727 commit: don't worry about complaints from symbols_pack.
7728 * src/symtab.c (symbol_new, symbol_class_set,
7729 symbol_check_alias_consistency): Undo changes in previous commit: count
7730 each string literal as a new symbol and token, assign it a symbol
7731 number, and don't complain about non-aliased string literals.
7732 (symbols_pack): Since symbol_make_alias still does not decrement symbol
7733 and token counts but does still set aliased tokens to the same number,
7734 symbol_pack_processor now leaves empty slots in the symbols array.
7735 Remove those slots.
7736 * tests/regression.at (Undeclared string literal): Remove test case
7737 added in previous commit since non-aliased string literals are allowed
7738 again.
7739 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
7740 remove unnecessary string literal declarations.
7741 * tests/sets.at (Firsts): Likewise.
7742
965537bc
JD
77432006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
7744
7745 Don't allow an undeclared string literal, but allow a string literal to
7746 be used before its declaration.
7747 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
7748 symbols_pack complained.
7749 * src/symtab.c (symbol_new): Don't count a string literal as a new
7750 symbol.
7751 (symbol_class_set): Don't count a string literal as a new token, and
7752 don't assign it a symbol number since symbol_make_alias does that.
7753 (symbol_make_alias): It's not necessary to decrement the symbol and
7754 token counts anymore. Don't assume that an alias declaration occurs
7755 before any uses of the identifier or string, and thus don't assert that
7756 one of them has the highest symbol number so far.
7757 (symbol_check_alias_consistency): Complain if there's a string literal
7758 that wasn't declared as an alias.
7759 (symbols_pack): Bail if symbol_check_alias_consistency failed since
7760 symbol_pack asserts that every token has been assigned a symbol number
7761 although undeclared string literals have not.
7762 * tests/regression.at (String alias declared after use, Undeclared
6d0ef4ec 7763 string literal): New test cases.
965537bc
JD
7764 (Characters Escapes, Web2c Actions): Declare string literals as
7765 aliases.
7766 * tests/sets.at (Firsts): Likewise.
7767
47aee066
JD
77682006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
7769
7770 In the grammar scanner, STRING_FINISH unclosed constructs and return
7771 them to the parser in order to improve error messages.
7772 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
7773 SC_BRACED_CODE, SC_PROLOGUE): Implement.
7774 * tests/input.at (Unclosed constructs): New test case.
7775 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
7776 seen.
7777
7778 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
7779 unused global.
7780
1f6b3679
JD
77812006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
7782
7783 Handle string aliases for character tokens correctly.
7784 * src/symtab.c (symbol_user_token_number_set): If the token has an
7785 alias, check and set its alias's user token number instead of its own,
7786 which is set to indicate the alias. Previously, every occurrence of
7787 the character token in the grammar overwrote that alias indicator with
7788 the character code.
7789 * tests/input.at (String aliases for character tokens): New test.
7790
219741d8
JD
77912006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
7792
7793 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
7794
11daa4e7
PE
77952006-08-11 Paul Eggert <eggert@cs.ucla.edu>
7796
7797 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
7798 to prevent failures when building on older platforms.
7799 Check for autopoint failure.
7800 Set XGETTEXT_OPTIONS to values that check for C format strings,
7801 so that translators are warned about them (this also helps
7802 prevent core dumps).
7803
7804 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
7805 function, since it simplifies our code a bit.
7806
7807 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
7808 rather than -W, so we don't get bogus warnings about sign comparisons.
7809 Add -Wpointer-arith, since that warning is useful (it reports code
7810 that does not conform to C89 and that some compilers reject).
7811 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
7812 since it's no longer needed.
7813
f9bfc42a
JD
78142006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
7815
7816 Clean up scanners a bit.
7817 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
7818 definitions so gcc won't warn when obstack_for_string is unused.
7819 * src/scan-code.l: config.h and system.h are already #include'd by
7820 scan-code-c.c, so get rid of them here.
7821 * src/scan-gram.l: Likewise.
7822 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
7823 definitions rather than duplicating the rest of it.
7824 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
7825
06e8700a
JD
78262006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
7827
7828 Suppress signed/unsigned comparison warnings for yycheck.
7829 * data/c.m4 (b4_safest_int_type): New macro.
7830 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
7831 a signed int type, cast it to b4_safest_int_type first.
7832 * data/yacc.c: Likewise.
7833 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
7834 also overwritten.
7835
9c437126
PE
78362006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
7837
7838 * doc/bison.texinfo: Fix some typos.
7839
284d8a13
PE
78402006-08-02 Paul Eggert <eggert@cs.ucla.edu>
7841
7842 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
7843 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
7844
7845 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
7846 the latest gnulib does this a different way.
7847 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
7848 translation was patched, so stop omitting it.
7849
ec5479ce
JD
78502006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7851
7852 Enable declaration of default %printer/%destructor. Make the parser
7853 use these for all user-declared grammar symbols for which the user does
7854 not declare a specific %printer/%destructor. Thus, the parser uses it
7855 for token 0 if the user declares it but not if Bison generates it as
7856 $end. Discussed starting at
7857 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
7858 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
7859 and
7860 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
7861 * NEWS (2.3+): Mention.
7862 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
7863 declare a %destructor for a mid-rule's semantic value. It's just
7864 impossible to declare one specific to it.
7865 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
7866 code. Describe default %destructor form.
7867 * src/parse-gram.y (grammar_declaration): Parse default
7868 %printer/%destructor declarations.
7869 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
7870 and symbol_destructor_location_get rather than accessing the destructor
7871 and destructor_location members of struct symbol.
7872 (symbol_printers_output): Likewise but for %printer's.
7873 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
7874 again.
7875 * src/symtab.c (default_destructor, default_destructor_location,
7876 default_printer, default_printer_location): New static global
7877 variables to record the default %destructor and %printer.
7878 (symbol_destructor_get, symbol_destructor_location_get,
7879 symbol_printer_get, symbol_printer_location_get): New functions to
7880 compute the appropriate %destructor and %printer for a symbol.
7881 (default_destructor_set, default_printer_set): New functions to set the
7882 default %destructor and %printer.
7883 * src/symtab.h: Prototype all those new functions.
7884 * tests/actions.at (Default %printer and %destructor): New test to
7885 check that the right %printer and %destructor are called, that they're
7886 not called for $end, and that $$ and @$ work correctly.
7887 (Default %printer and %destructor for user-declared end token): New
7888 test to check that the default %printer and %destructor are called for
7889 a user-declared end token.
7890 * tests/input.at (Default %printer and %destructor redeclared, Unused
7891 values with default %destructor): New tests to check related grammar
7892 warnings and errors.
7893
868d2d96
JD
78942006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
7895
7896 Clean up handling of %destructor for the end token (token 0).
7897 Discussed starting at
7898 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
7899 and
7900 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
7901
7902 Make the skeletons consistent in how they pop the end token and invoke
7903 its %destructor.
7904 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
7905 state, which has token number 0, since this would invoke the
7906 %destructor for the end token.
7907 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
7908 until after shifting the end token, or else it won't be popped.
7909 * data/yacc.c (yyparse): Likewise.
7910
7911 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
7912 it's the end token. Upon termination, destroy an unshifted lookahead
7913 even when it's the end token.
7914 * data/lalr1.cc (yy::parser::parse): Likewise.
7915 * data/yacc.c (yyparse): Likewise.
7916
7917 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
7918 value warnings for the end token when the user gives the end token a
7919 %destructor.
7920
7921 * tests/actions.at (Printers and Destructors): Test all the above.
7922
62a9592d
PE
79232006-07-24 Paul Eggert <eggert@cs.ucla.edu>
7924
7925 Update to latest gnulib and gettext versions.
7926 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
7927 Add fopen-safer.
7928 (gnulib_files): Add m4/warning.m4. Don't worry about files
7929 overwritten by autopoint.
7930 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
7931 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
7932 rejects them.
7933 Don't use autoreconf; instead, invoke autopoint etc. by hand,
7934 so that we can remove the intl files at a better time.
7935 (intl_files_to_remove): Remove aclocal.m4, since it gets
7936 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
7937 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
7938 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
7939 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
7940 Remove datarootdir hack; no longer needed.
7941 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
7942 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
7943 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
7944 strdup.h.
7945 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
7946 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
7947
10d6970f
PE
79482006-07-20 Paul Eggert <eggert@cs.ucla.edu>
7949
7950 * bootstrap: Adjust to today's change to gnulib-tool by invoking
7951 it with --assume-autoconf='latest-stable'.
7952
50a33993
JD
79532006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
7954
7955 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
7956 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
7957 YYSTYPE' and `{'.
7958 * src/muscle_tab.h (muscle_grow): Replace the header comments with
7959 those from muscle_tab.c since the old ones are misleading.
7960
2ce4ed68
AD
79612006-07-13 Akim Demaille <akim@epita.fr>
7962
7963 Support %define "KEY" {VALUE}.
7964 * src/scan-code.h, src/scan-code.l (translate_action)
7965 (translate_rule_action, translate_symbol_action, translate_code):
7966 Return char *, not const char *.
7967 * src/parse-gram.y (declaration): Rename as...
7968 (prologue_declaration): this.
7969 (string_content): Remove this nonterminal, use STRING.
7970 (braceless, content, content.opt): New nonterminal.
7971 Use them.
7972 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
7973 as value.
7974 * src/scan-gram.l (getargs.h): Don't include it.
7975
db7e5eb5
PE
79762006-07-12 Paul Eggert <eggert@cs.ucla.edu>
7977
7978 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
7979 rather than a for-loop that declares a local bool variable. This
7980 should work around a compatibility problem with a Cray x1e C++
7981 compiler reported by Hung Nguyen in
7982 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
7983 The for-loop was introduced in the 2004-11-17 change but I don't
7984 know why it was needed.
7985
a5d80ba5
AD
79862006-07-12 Akim Demaille <akim@epita.fr>
7987
7988 * data/c.m4: Comment changes.
7989
23eb2a69
AD
79902006-07-10 Akim Demaille <akim@lrde.epita.fr>
7991
7992 * src/complain.c (error_message, ERROR_MESSAGE): New.
7993 To factor...
7994 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
7995 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
7996
ddc8ede1
PE
79972006-07-09 Paul Eggert <eggert@cs.ucla.edu>
7998
7999 * NEWS: Instead of %union, you can define and use your own union type
8000 YYSTYPE if your grammar contains at least one <type> tag.
8001 Your YYSTYPE need not be a macro; it can be a typedef.
8002 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
8003 (Union Decl, Decl Summary): Document this.
8004 * data/glr.c (YYSTYPE): Implement this.
8005 * data/glr.cc (YYSTYPE): Likewise.
8006 * data/lalr1.cc (YYSTYPE): Likewise.
8007 * data/yacc.c (YYSTYPE): Likewise.
8008 * src/output.c (prepare): Output tag_seen_flag.
8009 * src/parse-gram.y (declaration, grammar_declaration):
8010 Use 'union_seen' rather than 'typed' to determine whether
8011 %union has been seen, since grammars can now be typed without
8012 %union.
8013 (symbol_declaration, type.opt, symbol_def):
8014 Keep track of whether a tag has been seen.
8015 * src/reader.c (union_seen, tag_seen): New vars.
8016 (typed): remove.
8017 * src/reader.h (union_seen, tag_seen, typed): Likewise.
8018 * src/scan-code.l (untyped_var_seen): New variable.
8019 (handle_action_dollar): Adjust to above changes.
8020 (handle_action_dollar, handle_action_at):
8021 Improve overflow checking for outlandish numbers.
8022 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
8023 avoid new diagnostics generated by above changes.
8024 * tests/regression.at (YYSTYPE typedef): Add test to check
8025 for type tags without %union.
8026
8027 * src/symlist.c (symbol_list_length): Return int, not unsigned
8028 int, since callers expect int. This may need to get revisited
8029 once we have proper integer overflow checking.
8030
8031 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
8032 object is now static.
8033
8034 * src/getargs.c (flags_argmatch): Return void, not int,
8035 to pacify ./configure --enable-gcc-warnings.
8036
8037 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
8038 since last_string is already defined to FLEX_PREFIX (last_string).
8039
7b42569e
AD
80402006-07-09 Akim Demaille <akim@lrde.epita.fr>
8041
8042 Implement --warnings/-W.
8043 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
8044 replaced by...
8045 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
8046 Adjust callers.
8047 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
8048 (warnings_args, warnings_types): New.
8049 (getargs, short_options, long_options): Accept -W/--warnings.
8050 Sort the options by alphabetical order, upper case letter right
8051 before its lower case.
8052
3b452f4e
JD
80532006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
8054
8055 Change %merge result type clash warnings to errors. Discussed at
8056 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
8057 * src/reader.c (record_merge_function_type): Use complain_at.
8058 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8059 declared later): Update test case results.
8060
b8a41559
AD
80612006-07-09 Akim Demaille <akim@lrde.epita.fr>
8062
8063 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
8064 to be in alphabetical order.
8065 (trace_args): Spelling fixes.
8066
cd9e1ba2
PE
80672006-07-09 Paul Eggert <eggert@cs.ucla.edu>
8068
8069 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
8070 so they don't collide with user-defined macros.
8071 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
8072 this was never guaranteed, and now that we're using gnulib stdint,
8073 which defines int_fast16_t to long int, the problem is exposed.
8074
cb48f191
PE
80752006-07-08 Paul Eggert <eggert@cs.ucla.edu>
8076
b8445a15
PE
8077 * data/c.m4 (b4_basename): Simplify a bit, since we don't
8078 need the full POSIX semantics (and weren't implementing them
8079 anyway).
8080
cb48f191
PE
8081 Adjust to Autoconf 2.60 and today's gnulib.
8082 * bootstrap (gnulib_modules): Add stdint.
8083 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
8084 no longer copies it.
8085 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
8086 since stdint needs the former and wcwidth (which is now required
8087 by mbswidth) needs the latter.
8088 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
8089 work around a compatibility glitch between gettext 0.14.6 and
8090 Autoconf 2.60.
8091 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
8092 Do not check for uintptr_t, since new stdint module does the right
8093 thing.
8094 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
8095 Add stdint.h, stdint_.h, wcwidth.h.
8096 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
8097 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
8098 stdint.m4, wchar_t.m4, wcwidth.m4.
8099 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
8100 usual order for ../lib/*.h files.
8101 (file_name_split): Use last_component, not base_name, to adjust
8102 to gnulib changes.
8103 * src/parse-gram.h: Include <strverscmp.h> in the usual order
8104 for ../lib/*.h files.
8105 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
8106 Define unconditionally, since we now assume the stdint module.
8107 * src/scan-skel.l: Include <dirname.h>.
8108 (BASE_QPUTS): Use last_component, not base_name.
8109 * src/system.h: Include <unlocked-io.h> in the usual order
8110 for ../lib/*.h files. Include <stdint.h> unconditionally,
8111 since we now use the stdint module.
8112 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
8113 HAVE_UINTPTR_T, since we now use the stdint module.
8114 (base_name): Remove decl, since files now include <dirname.h>
8115 to get the decl.
8116
cd48d21d
AD
81172006-07-08 Akim Demaille <akim@lrde.epita.fr>
8118
8119 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
8120 New, default to 1.
8121 * data/yacc.c, data/glr.c, data/location.cc: Use them.
8122 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
8123 default.
8124 * tests/calc.at: Adjust.
8125
8ec0a172
AD
81262006-07-08 Akim Demaille <akim@lrde.epita.fr>
8127
b8445a15 8128 * data/c.m4 (b4_basename): New.
8ec0a172
AD
8129 (b4_syncline): Also output the location of its invocation (from
8130 the skeleton).
8131 (b4_user_action, b4_define_user_action, b4_user_actions)
8132 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
8133 (b4_user_stype): New.
8134 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
8135
4a678af8
JD
81362006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8137
8138 In the grammar file, the first column is 1 not 0 on the first line as
8139 on every other line.
8140 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
8141 * tests/input.at (Torturing the Scanner): Update output.
8142
8143 * src/scan-gram.l (scanner_cursor): Declare it static.
8144
dd60572a
JD
81452006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
8146
8147 In warnings, say "previous declaration" rather than "first
8148 declaration".
8149 * src/symtab.c (redeclaration): Do that here.
8150 * src/reader.c (record_merge_function_type): In the case of a result
8151 type clash, report the previous declaration rather than the very first
8152 one in the grammar file.
8153 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8154 declared later): Add a third declaration to check this behavior.
8155 * tests/input.at (Incompatible Aliases): Update output.
8156
2073e1b6
AD
81572006-06-27 Akim Demaille <akim@epita.fr>
8158
8159 * doc/Doxyfile.in: New.
8160 * doc/Makefile.am: Use it.
8161 * src/lalr.h, src/symtab.h: Initial doxygenation.
8162
8ee5b538
JD
81632006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8164
8165 Don't miss %merge result type warnings just because the LHS types are
fab044e6
JD
8166 declared after the %merge. This continues the effort of the previous
8167 patch.
8ee5b538
JD
8168 * src/reader.c (get_merge_function): Don't set the merger type yet.
8169 (record_merge_function_type): New function for setting the merger type
8170 and checking for clashes.
8171 (grammar_current_rule_merge_set): Set the location of the %merge for
8172 the current rule.
8173 (packgram): Invoke record_merge_function_type for each rule now that
8174 all symbol type declarations have been parsed.
8175 * src/reader.h (merger_list.type_declaration_location): New member
8176 storing the location of the first %merge from which the type for this
8177 merging function was derived.
8178 * src/symlist.h (symbol_list.merger_declaration_location): New member
8179 storing the location of a rule's %merge, if any.
8180 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
8181 declared later): New test to catch the error fixed by the above patch.
8182
ffa4ba3a
JD
81832006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8184
8185 Get action warnings (grammar_rule_check) right even when symbol
fab044e6
JD
8186 declarations appear after the rules. Discussed at
8187 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
8188 and
8189 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
8190 Don't mistake the type of $$ in a midrule to be that of its parent
8191 rule's $$.
ffa4ba3a
JD
8192 * src/reader.c (grammar_current_rule_end): Don't invoke
8193 grammar_rule_check yet since not all symbol declarations may have been
8194 parsed yet.
8195 (grammar_midrule_action): Likewise.
8196 Don't record whether the midrule's $$ has been used yet since actions
8197 haven't been translated yet.
8198 Record the midrule's parent rule and its RHS index within the parent
8199 rule.
8200 (grammar_current_rule_action_append): Don't translate the action yet
8201 since not all symbol declarations may have been parsed yet and, thus,
8202 warnings about types for $$, $n, @$, and @n can't be reported yet.
8203 (packgram): Translate the action and invoke grammar_rule_check now that
8204 all symbol declarations have been parsed.
8205 * src/scan-code.l (handle_action_dollar): Now that this is invoked
8206 after parsing the entire grammar file, the symbol list here in the case
8207 of a midrule is actually the midrule's empty RHS, so reference its
8208 parent rule's RHS where necessary.
8209 On the other hand, now that you can already know it's a midrule, you
8210 aren't forced to think $$ has the same type as its parent rule's $$.
8211 (handle_action_at): In the case of a midrule, reference the parent rule
8212 where necessary.
8213 * src/symlist.c (symbol_list_new): Initialize new midrule-related
8214 members.
8215 (symbol_list_length): Now that this is invoked after all rules have
8216 been parsed, a NULL symbol (rather than a NULL symbol list node)
8217 terminates a rule. symbol_list_print already does this correctly.
8218 * src/symlist.h (symbol_list.midrule_parent_rule,
8219 symbol_list.midrule_parent_rhs_index): New members so that midrules can
8220 remember their relationships with their parents.
8221 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
8222 fixed by the above patch.
8223 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
8224 implementing...
8225 (Unused values): ... this old test case and...
8226 (Unused values before symbol declarations): ... this new test case.
8227 This one is the same as `Unused values' except that all symbol
8228 declarations appear after the rules in order to catch the rest of the
8229 errors fixed by the above patch.
8230
e256e17f
JD
82312006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
8232
300a1930
JD
8233 More cleanup.
8234 * src/reader.c (current_rule): Declare it static since it's no longer
8235 used outside this file.
8236 (grammar_current_rule_action_append): Remove redundant arguments from
8237 translate_rule_action invocation.
8238 * src/reader.h (current_rule): Remove this unused extern.
8239 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
8240 * src/scan-code.l (translate_rule_action): Likewise.
e256e17f 8241
381ecb06
JD
82422006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
8243
8244 Clean up yesterday's patch.
8245 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
8246 to...
8247 * src/reader.c (grammar_current_rule_action_append): ... here for
8248 consistency with grammar_current_rule_symbol_append.
8249 * tests/regression.at (Braced code in declaration in rules section):
8250 Make yyerror and yylex static as usual.
8251
4210cd0b
JD
82522006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
8253
8254 Fix bug that mistakes braced code in a declaration in the rules section
8255 to be a rule action. Mentioned at
8256 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
8257 * src/scan-gram.l: Move midrule action detection from the start of the
8258 scanning of any braced code to...
8259 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
8260 action. For readability, use $2 and @2 rather than the equivalent
8261 global variables.
8262 * tests/regression.at (Braced code in declaration in rules section):
8263 New test to catch the error fixed by the above patch.
8264
8265 Work on code readability some.
8266 * src/scan-code.l (current_rule): Get rid of this misleading and
8267 redundant declaration: it's actually extern'ed in reader.h.
8268 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
8269 translate_action): Add a rule argument and use it instead of the global
8270 current_rule.
8271 (translate_rule_action): This already receives current_rule through an
8272 argument, so pass it on to translate_action instead of assigning
8273 current_rule to current_rule.
8274 (translate_symbol_action, translate_code): Pass rule = NULL to
8275 translate_action.
8276
34f98f46
JD
82772006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
8278
8279 Rename %before-definitions to %start-header and %after-definitions to
8280 %end-header. Don't use these declarations to separate pre-prologue
8281 blocks from post-prologue blocks. Add new order-independent
8282 declarations %before-header and %after-header as alternatives to the
8283 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
8284 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
8285 * NEWS (2.3+): Update for these changes.
8286 * data/glr.c (b4_before_definitions): Update to...
8287 (b4_start_header): ... this.
8288 (b4_after_definitions): Update to...
8289 (b4_end_header): ... this.
8290 * data/glr.cc: Likewise.
8291 * data/lalr1.cc: Likewise.
8292 * data/yacc.c: Likewise.
8293 * doc/bison.texinfo (The prologue): Update names, and replace remaining
8294 prologue blocks with %*-header declarations.
8295 (Calc++ Parser): Likewise.
91661ebb 8296 (Decl Summary): Update names.
148d66d8 8297 (Table of Symbols): Update description.
34f98f46
JD
8298 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
8299 (PERCENT_END_HEADER): ... this.
8300 (PERCENT_BEFORE_DEFINITIONS): Update to...
8301 (PERCENT_START_HEADER): ... this.
8302 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8303 (declaration): Update token names and m4 macro names.
8304 When parsing %end-header and %start-header, invoke translate_code
8305 before muscle_code_grow, and no longer set global booleans to remember
8306 whether these declarations have been seen.
8307 Parse new %after-header and %before-header.
8308 * src/reader.c (before_definitions, after_definitions): Remove.
8309 (prologue_augment): Accept a new bool argument to specify whether to
8310 augment the pre-prologue or post-prologue.
8311 * src/reader.h (before_definitions, after_definitions): Remove these
8312 extern's.
8313 (prologue_augment): Add new bool argument.
8314 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
8315 (PERCENT_END_HEADER): ... this.
8316 (PERCENT_BEFORE_DEFINITIONS): Update to...
8317 (PERCENT_START_HEADER): ... this.
8318 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
8319 * tests/actions.at (Printers and Destructors): Update names.
8320
31b2b07e
JD
83212006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
8322
8323 Add comparison operators for C++ location classes. Discussed at
8324 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
8325 * data/c++.m4 (b4_define_location_comparison): New boolean %define
8326 declaration indicating whether filename_type has an operator==. If
8327 filename_type is `std::string', it defaults to `1', `0' otherwise.
8328 * data/location.cc: Iff b4_define_location_comparison is `1', add
8329 operator== and operator!= for class position and for class location.
8330
8331 Some minor fixes.
8332 * src/scan-action.l: Remove unused file.
8333 * src/symtab.c (symbol_printer_set): Use printer_location not
8334 destructor_location.
8335 * src/symtab.h (struct symbol): Replace incorrect source comment for
8336 printer members.
8337 * tests/input.at (Incompatible Aliases): Update output with correct
8338 printer location.
8339
9bc0dd67
JD
83402006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
8341
8342 Don't put the pre-prologue in the header file. For the yacc.c code
8343 file and the glr.c header and code files, move the pre-prologue before
8344 the token definitions. Add new %before-definitions and
8345 %after-definitions to declare code that will go in both the header file
8346 and code file. Discussed at
8347 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
8348 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
8349 and
8350 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
8351 * NEWS (2.3+): Describe these changes.
8352 * data/glr.c (b4_pre_prologue): Move from within to before...
8353 (b4_shared_declarations): ... this.
8354 Add new b4_before_definitions before b4_token_enums.
8355 Add new b4_after_definitions at the end.
8356 * data/glr.cc (b4_pre_prologue): Replace with...
8357 (b4_before_definitions): ... this in the header file.
8358 (b4_after_definitions): New near the end of the header file.
8359 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
8360 code file right before including the header file.
8361 (b4_before_definitions): New in the previous position of
8362 b4_pre_prologue in the header file.
8363 (b4_after_definitions): New near the end of the header file.
8364 * data/yacc.c: Clean up some m4 quoting especially in the header file.
8365 (b4_token_enums_defines): In the code file, move to right before
8366 YYSTYPE for consistency with the header file.
8367 (b4_before_definitions): New right before b4_token_enums_defines in
8368 both the header and code file.
8369 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
8370 header and code file.
8371 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
8372 of prologues for %union dependencies.
91661ebb
JD
8373 (Decl Summary): In %defines description, mention the effect of
8374 %before-definitions and %after-definitions on the header file.
9bc0dd67
JD
8375 (Calc++ Parser): Forward declare driver in a %before-definitions rather
8376 than in the pre-prologue so that make check succeeds.
148d66d8 8377 (Table of Symbols): Add entries for %before-definitions and
9bc0dd67
JD
8378 %after-definitions.
8379 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
8380 %before-definitions.
8381 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
8382 (declaration): Parse those declarations and append to
8383 b4_before_definitions and b4_after_definitions, respectively.
8384 * src/reader.c (before_definitions, after_definitions): New bools to
8385 track whether those declarations have been seen.
8386 (prologue_augment): Add to the post-prologue if %union,
8387 %before-definitions, or %after-definitions has been seen.
8388 * src/reader.h (before_definitions, after_definitions): New extern's.
8389 * src/scan-gram.l: Scan the new declarations.
8390 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
8391 prologue block in a %before-definitions or a %after-definitions based
8392 on whether the %union is declared.
8393 * tests/regression.at (Early token definitions with --yacc, Early token
8394 definitions without --yacc): Move tests for token definitions into the
8395 post-prologue since token names are no longer defined in the
8396 pre-prologue.
8397
203b9274
AD
83982006-06-20 Akim Demaille <akim@epita.fr>
8399
8400 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
8401 (symbol_get): Use it.
8402 * src/parse-gram.y: Use it.
8403
a7ee59cf
JD
84042006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
8405
8406 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
8407 build succeeds when configured with --enable-gcc-warnings.
8408
5a2baae7
PE
84092006-06-19 Paul Eggert <eggert@cs.ucla.edu>
8410
33ad1a9c
PE
8411 * src/parse-gram.y (char_name): New function.
8412 (CHAR, STRING, string_content): For %printer, properly escape.
8413 (ID): Prefer fputs to fprintf.
8414 (id): Reindent to be consistent with other rules.
8415 Properly quote char.
8416
5a2baae7
PE
8417 The Translation Project changed its way of publishing translations
8418 to maintainers. I haven't received any responses to my request
8419 for supporting the old way, or for documenting the new way. I
8420 have modified 'bootstrap' to use screen scraping
8421 (in this case, HTML scraping). This is unreliable and inelegant,
8422 but I don't see any better way. Yuck.
8423 * bootstrap (TP_URL, WGET_COMMAND): New vars.
8424 (get_translations): New function, which uses HTML scraping to
8425 deduce locations of latest translations.
8426 Use this function to grab both bison and bison-runtime .po files.
8427 Don't bother priming the pump for the runtime-po domain any more,
8428 as it's now translated better than bison is.
8429
58d7a1a1
AD
84302006-06-19 Akim Demaille <akim@epita.fr>
8431
8432 * src/scan-gram.l: No longer "parse" things after `%union' until
8433 `{'. Rather, return a single "%union" token.
8434 No longer make symbols: return strings, and leave the conversion
8435 to symbols to the parser.
8436 (SC_PRE_CODE, token_type): Remove.
8437 * src/parse-gram.y (%union): New field `character'.
8438 Sort tokens.
8439 (CHAR): New token.
8440 (ID, ID_COLON): Now that the scanner no longer makes them
8441 identifiers, adjust all uses to invoke symbol_get.
8442 (id_colon): New, wraps the conversion from string to symbol.
8443 (%union): Accept a possible union_name.
8444 (symbol): Now can be a char.
8445 * data/c.m4 (b4_union_name): Leave a default value.
8446 * data/glr.c, data/yacc.c: Use it.
8447
b931235e
JD
84482006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
8449
8450 For associating token numbers with token names for "yacc.c", don't use
8451 #define statements unless `--yacc' is specified; always use enum
8452 yytokentype. Most important discussions start at:
8453 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
8454 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
8455 and
8456 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
8457 * NEWS (2.3+): Mention.
8458 * data/c.m4 (b4_yacc_if): New.
8459 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
8460 token #define's.
8461 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
8462 on token name definitions.
8463 * src/getargs.c (usage): Capitalize `Yacc' in English.
8464 * src/output.c (prepare): Define b4_yacc_flag.
8465 * tests/regression.at (Early token definitions): Test that tokens names
8466 are defined before the pre-prologue not just before the post-prologue.
8467 Remove this test case and copy to...
8468 (Early token definitions with --yacc): ... this to test #define's.
8469 (Early token definitions without --yacc): ... and this to test enums.
8470
9e6e7ed2
PE
84712006-06-11 Paul Eggert <eggert@cs.ucla.edu>
8472
8473 * NEWS: Reword the post-2.3 change to not be so optimistic about
8474 removing the old "look-ahead" spelling.
8475 Update previous look-ahead/lookahead change reports.
8476 * REFERENCES: look-ahead -> lookahead (since that's
8477 what he actually wrote).
8478 * doc/refcard.tex: look ahead -> lookahead,
8479 look-ahead -> lookahead
8480
742e4900
JD
84812006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
8482
8483 For consistency, use `lookahead' instead of `look-ahead' or
8484 `look_ahead'. Discussed starting at
8485 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
8486 and then at
8487 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
8488 * NEWS: For the next release, note the change to `--report'.
8489 * TODO, doc/bison.1: Update English.
8490 * doc/bison.texinfo: Update English.
8491 (Understanding Your Parser, Bison Options): Document as
8492 `--report=lookahead' rather than `--report=look-ahead'.
8493 * src/conflicts.c: Update English in comments.
8494 (lookahead_set): Rename from look_ahead_set.
8495 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
8496 (resolve_sr_conflict): Rename local look_ahead_tokens to
8497 lookahead_tokens, and update other uses.
8498 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
8499 count_rr_conflicts, conflicts_free): Update uses.
8500 * src/getargs.c (report_args): Move "lookahead" before alternate
8501 spellings.
8502 (report_types): Update uses.
8503 (usage): For `--report' usage description, state `lookahead' spelling
8504 rather than `look-ahead'.
8505 * src/getargs.h (report.report_lookahead_tokens): Rename from
8506 report_look_ahead_tokens.
8507 * src/lalr.c: Update English in comments.
8508 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
8509 (state_lookahead_tokens_count): Rename from
8510 state_look_ahead_tokens_count.
8511 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8512 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
8513 Rename local n_look_ahead_tokens to n_lookahead_tokens.
8514 Update other uses.
8515 Update English in output.
8516 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
8517 * src/print.c: Update English in comments.
8518 (lookahead_set): Rename from look_ahead_set.
8519 (print_reduction): Rename argument lookahead_token from
8520 look_ahead_token.
8521 (print_core, state_default_rule, print_reductions, print_results):
8522 Update uses.
8523 * src/print_graph.c: Update English in comments.
8524 (print_core): Update uses.
8525 * src/state.c: Update English in comments.
8526 (reductions_new): Update uses.
8527 (state_rule_lookahead_tokens_print): Rename from
8528 state_rule_look_ahead_tokens_print, and update other uses.
8529 * src/state.h: Update English in comments.
8530 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
8531 (state_rule_lookahead_tokens_print): Rename from
8532 state_rule_look_ahead_tokens_print.
8533 * src/tables.c: Update English in comments.
8534 (conflict_row, action_row): Update uses.
8535 * tests/glr-regression.at
8536 (Incorrect lookahead during deterministic GLR,
8537 Incorrect lookahead during nondeterministic GLR): Rename
8538 print_look_ahead to print_lookahead.
8539 * tests/torture.at: Update English in comments.
8540 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
8541 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
8542 (Many lookahead tokens): Update uses.
8543 * data/glr.c: Update English in comments.
8544 * lalr1.cc: Likewise.
8545 * yacc.c: Likewise.
8546 * src/conflicts.h: Likewise.
8547 * src/lalr.h: Likewise.
8548 * src/main.c: Likewise.
8549 * src/output.c: Likewise.
8550 * src/parse-gram.c: Likewise.
8551 * src/tables.h: Likewise.
8552 * tests/calc.at: Likewise.
8553
3c40d0b5
JD
85542006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
8555
8556 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
8557
5d278082
PE
85582006-06-07 Paul Eggert <eggert@cs.ucla.edu>
8559
8560 * TODO: Add request from Nelson H. F. Beebe to be able to install
8561 Bison without installing the yacc script.
8562
9e668899
JD
85632006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8564
8565 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
8566 and yytext if they're already #define'd.
8567 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
8568 * src/scan-code-c.c: ... here.
8569 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
8570 <config.h>.
8571
0c8e079f
JD
85722006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
8573
8574 Get Bison to build again when configured with --enable-gcc-warnings.
8575 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
8576 missing #include's.
8577 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
8578 loc argument as it shadows a global.
8579 * src/scan-gram.l: Remove stray comma that prevents boundary_set
8580 invocation.
8581
8582 * src/.cvsignore: Add scan-code.c.
8583
2346344a
AD
85842006-06-07 Akim Demaille <akim@epita.fr>
8585
8586 * src/scan-gram.l: Move the "add a trailing ; to actions" code
8587 to...
8588 * src/scan-code.l: here.
8589 * tests/input.at (Torturing the Scanner): Fix another location
8590 error.
8591
4862bdfd
AD
85922006-06-07 Akim Demaille <akim@epita.fr>
8593
8594 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
8595
e9071366
AD
85962006-06-06 Akim Demaille <akim@epita.fr>
8597
8598 Extract the parsing of user actions from the grammar scanner.
8599 As a consequence, the relation between the grammar scanner and
8600 parser is much simpler. We can also split "composite tokens" back
8601 into simple tokens.
8602 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
8603 * src/scan-gram.l (add_column_width, adjust_location): Move to and
8604 rename as...
8605 * src/location.h, src/location.c (add_column_width)
8606 (location_compute): these.
8607 Fix the column count: the initial column is 0.
8608 (location_print): Be robust to ending column being 0.
8609 * src/location.h (boundary_set): New.
8610 * src/main.c: Adjust to scanner_free being renamed as
8611 gram_scanner_free.
8612 * src/output.c: Include scan-code.h.
8613 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
8614 Use boundary_set.
8615 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
8616 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
8617 which is now, again, a separate token.
8618 Adjust all dependencies.
8619 Whereever actions with $ and @ are used, use translate_code.
8620 (action): Remove this nonterminal which is now useless.
8621 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
8622 (grammar_current_rule_action_append): Use translate_code.
8623 (packgram): Bound check ruleno, itemno, and rule_length.
8624 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
8625 (last_string, last_braced_code_loc, max_left_semantic_context)
8626 (scanner_initialize, scanner_free, scanner_last_string_free)
8627 (gram_out, gram_lineno, YY_DECL_): Move to...
8628 * src/scan-gram.h: this new file.
8629 (YY_DECL): Rename as...
8630 (GRAM_DECL): this.
8631 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
8632 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
8633 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
8634 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
8635 Move these declarations, and...
8636 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
8637 these to...
8638 * src/flex-scanner.h: this new file.
8639 * src/scan-gram.l (rule_length, rule_length_overflow)
8640 (increment_rule_length): Remove.
8641 (last_braced_code_loc): Rename as...
8642 (gram_last_braced_code_loc): this.
8643 Adjust to the changes of the parser.
8644 Move all the handling of $ and @ into...
8645 * src/scan-code.l: here.
8646 * src/scan-gram.l (handle_dollar, handle_at): Remove.
8647 (handle_action_dollar, handle_action_at): Move to...
8648 * src/scan-code.l: here.
8649 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
8650 scan-code.h, scan-code-c.c, scan-gram.h.
8651 (EXTRA_bison_SOURCES): Add scan-code.l.
8652 (BUILT_SOURCES): Add scan-code.c.
8653 (yacc): Be robust to white spaces.
8654
8655 * tests/conflicts.at, tests/input.at, tests/reduce.at,
8656 * tests/regression.at: Adjust the column numbers.
8657 * tests/regression.at: Adjust the error message.
7891a7c4 8658
184e42f0
JD
86592006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8660
8661 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8662 Use Akim's wording from
8663 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
8664
7891a7c4
JD
86652006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
8666
8667 Between Bison releases, manually append `+' to the previous Bison
8668 release number, and use that as a signal to automatically print the
8669 ChangeLog's CVS Id keyword from --version. Discussed starting at
8670 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
8671 * ChangeLog: Add Id header.
8672 * configure.ac (AC_INIT): Append `+' to `2.3'.
8673 * src/.cvsignore: Add revision.c.
8674 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
8675 (BUILT_SOURCES): Add revision.c.
8676 (revision.c): New target rule. This file defines a new global variable
8677 named revision. It initializes it with either the Id from ChangeLog
8678 or, if VERSION doesn't contain `+', with the empty string.
8679 * src/getargs.c (version): Print the value of revision.
8680 * src/revision.h: Extern revision.
8681
4ad3ed84
PE
86822006-06-05 Paul Eggert <eggert@cs.ucla.edu>
8683
8684 * NEWS: Version 2.3.
8685 * configure.ac (AC_INIT): Likewise.
8686
02103984
PE
86872006-05-30 Paul Eggert <eggert@cs.ucla.edu>
8688
8689 * data/glr.c (YYRECOVERING): Define to be a function-like macro
8690 with no arguments, not as an object-like macro. This is for
8691 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
8692 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
8693 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
8694 Document this.
8695
2c08afa5
JD
86962006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
8697
8698 * src/getargs.c (usage): Back out yesterday's modification of the
8699 --help output so that we don't have to wait for translation before
8700 releasing 2.3.
8701
6077da58
PE
87022006-05-29 Paul Eggert <eggert@cs.ucla.edu>
8703
8704 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
8705 Problem reported by Akim Demaille.
8706
2a26b6c2
JD
87072006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
8708
8709 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
8710
aefef0d6
PE
87112006-05-26 Paul Eggert <eggert@cs.ucla.edu>
8712
8713 * data/yacc.c (yy_reduce_print): Omit trailing white space in
8714 generated source code. Problem reported by Frans Englich in
8715 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
8716
fcd8e201
PE
87172006-05-22 Paul Eggert <eggert@cs.ucla.edu>
8718
8719 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
8720 shell, not within 'make', so that 'make' by an ordinary builder
8721 (using GNU make) does not worry about configuring gzip. This also
8722 works around a bug reported independently by Keith Thompson and by
8723 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
8724 stderr rather than stdout, messing up the build logs.
8725
7b5cdcbd
JD
87262006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8727
8728 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
8729 to make sure that YYID will never be unused. This fixes a 'make
8730 maintainer-check' failure caused by the recent changes to the 'Trivial
8731 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
8732 not used.
8733 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
8734
5ad0a449
JD
87352006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
8736
8737 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
8738 state before an empty RHS is always resolved here. Only the location
8739 of that state is guaranteed to be resolved, and that's enough. This
8740 fixes the remaining bug reported by Derek M. Jones in
8741 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8742 * tests/glr-regression.at (Uninitialized location when reporting
8743 ambiguity): Test the above case.
8744 Also, the embedded comments in this test case claim it checks the case
8745 of an empty RHS that has inherited the initial location. However, the
8746 corresponding LHS was already resolved, so yyresolveLocations didn't
8747 actually have reason to modify it. Fix this by forcing
8748 nondeterministic operation at the beginning of the parse.
8749
50cce58e
PE
87502006-05-20 Paul Eggert <eggert@cs.ucla.edu>
8751
8752 * data/c.m4 (b4_yy_symbol_print_generate):
8753 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
8754 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
8755 of the bugs reported today by Derek M Jones in
8756 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
8757 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
8758 defined to be a type name without parens or brackets.
8759 (Location Type): Similarly for YYLTYPE.
8760 * tests/regression.at (Trivial grammars): Put in a test for this
8761 bug that will be caught by 'make maintainer-check' (though not,
8762 alas, by 'make check' unless your compiler is picky).
8763
ab8d9dc5
PE
87642006-05-19 Paul Eggert <eggert@cs.ucla.edu>
8765
0d2c8934 8766 * NEWS: Version 2.2.
ab8d9dc5
PE
8767 * configure.ac (AC_INIT): Likewise.
8768
9138c575
JD
87692006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
8770
8771 * data/glr.c (yyreportTree): Make room in yystates for the state
8772 preceding the RHS. This fixes the segmentation fault reported by Derek
8773 M. Jones in
8774 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
8775 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
8776 to the user. Reported for yyreportTree by Derek M. Jones later in the
8777 same thread.
8778 * THANKS: Add Derek M. Jones.
8779 Update my email address.
8780 Fix typo in Steve Murphy's name.
8781
276f48df
PE
87822006-05-14 Paul Eggert <eggert@cs.ucla.edu>
8783
d6645148
PE
8784 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
8785 checking against YYLAST that caused the parser to miss a potential
8786 alternative in its diagnostic.
8787 Problem reported by Maria Jose Moron Fernandez in
8788 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
8789 * data/lalr1.cc (yysyntax_error_): Likewise.
8790 * data/yacc.c (yysyntax_error): Likewise.
8791 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
8792 tokens, in case we run into an older C compiler.
8793 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
8794 Use them to check for the off-by-one error fixed above.
8795
276f48df
PE
8796 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
8797 YYSIZE_T, not size_t.
8798 * tests/regression.at (Trivial grammars): New test, to catch
8799 the error fixed by the above patch.
8800
cd8b5791
AD
88012006-05-14 Akim Demaille <akim@lrde.epita.fr>
8802
8803 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
8804 scheme.
8805 Reported by Steve Murphy.
8806
34376418
AD
88072006-05-14 Akim Demaille <akim@lrde.epita.fr>
8808
8809 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
8810 * data/glr.cc: b4_location_flag is now b4_locations_flag.
8811
327afc7c
AD
88122006-05-14 Akim Demaille <akim@lrde.epita.fr>
8813
8814 Implement --trace=m4.
8815 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
8816 * src/output.c (output_skeleton): When set, pass -dV to m4.
8817
8818 Factor the handling of flags in m4.
8819 * src/output.c (prepare): Rename the muscle names debug, defines,
8820 error_verbose to debug_flag, defines_flag, error_verbose_flag.
8821 * data/c.m4: Adjust.
8822 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
8823 Use b4_define_flag_if to define other b4_FLAG_if macros.
8824 (b4_location_if): As a consequence, rename as...
8825 (b4_locations_if): this, for consistency.
8826 Adjust all the skeletons.
8827
ba9ecd19
AD
88282006-05-14 Akim Demaille <akim@lrde.epita.fr>
8829
8830 * etc/bench.pm: Shorten bench names.
8831
4e83ea15
AD
88322006-05-14 Akim Demaille <akim@lrde.epita.fr>
8833
8834 * src/output.h, src/output.c (error_verbose): Move to...
8835 * src/getargs.h, src/getargs.c: here.
8836 Sort the flags.
8837 Adjust dependencies.
8838
6e93d810
PE
88392006-05-13 Paul Eggert <eggert@cs.ucla.edu>
8840
8841 * data/c.m4 (b4_copyright): Put the special exception for Bison
8842 skeletons here, so we don't have to put it in each skeleton. All
b15296ff
PE
8843 uses changed. Suggested by Akim Demaille. Also, wrap the
8844 copyright notice, in case it is longer than 80 columns. Replace
8845 comma by newline after title.
6e93d810 8846
eaea13f5
PE
88472006-05-11 Paul Eggert <eggert@cs.ucla.edu>
8848
8849 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
8850 incompatibility, not a bug. Mention that it wasn't fixed as of
8851 flex 2.5.33.
8852
3cf084ec
AD
88532006-05-11 Akim Demaille <akim@lrde.epita.fr>
8854
8855 * examples/extexi: Enforce the precedence of concatenation over
8856 >>.
0a9f1c7d 8857 Reported by Tommy Nordgren.
3cf084ec 8858
32c96bd7
AD
88592006-05-11 Akim Demaille <akim@lrde.epita.fr>
8860
8861 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
8862 with the member "token".
f94705b2 8863 Reported by Martin Nylin.
32c96bd7 8864
eaea13f5
PE
88652006-05-08 Paul Eggert <eggert@cs.ucla.edu>
8866
8867 * data/glr.c: Switch to Bison 2.2 special-exception language in
8868 the copyright notice. Use more-regular format for titles and
8869 copyright notices.
8870 * data/glr.cc: Likewise.
8871 * data/location.cc: Likewise.
8872 * data/yacc.cc: Likewise.
8873 * doc/bison.texinfo (Conditions): Document this.
8874 * NEWS: likewise. Upgrade version to 2.2.
8875
6e2d1146
AD
88762006-04-27 Akim Demaille <akim@lrde.epita.fr>
8877
8878 * data/glr.cc: Remove dead code.
8879
47671055
PE
88802006-04-25 Paul Eggert <eggert@cs.ucla.edu>
8881
8882 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
8883 that variable and the line breaks the bootstrap. Problem reported
8884 by Juan M. Guerrero.
8885
ed2e6384
AD
88862006-04-24 Akim Demaille <akim@lrde.epita.fr>
8887
8888 * doc/bison.texinfo (Multiple start-symbols): New.
8889
3cedc2dc
AD
88902006-04-24 Akim Demaille <akim@lrde.epita.fr>
8891
8892 * etc/README, etc/bench.pl: New.
8893
b2ddc3f3
AD
88942006-04-03 Akim Demaille <akim@lrde.epita.fr>
8895
8896 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
8897 rule.
8898 Reported by Mickael Labau.
8899 * tests/input.at (Torturing the Scanner): Test it.
8900
91e3ac9a
PE
89012006-03-16 Paul Eggert <eggert@cs.ucla.edu>
8902
8903 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
8904 Problem reported by Bob Rossi.
8905
89062006-03-13 Paul Eggert <eggert@cs.ucla.edu>
8907
8908 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
8909 and didn't really work.
8910 For the index, use @ifnotinfo, not @iftex.
8911 Minor cleanups of spacing and terminology.
8912
5cf61e93
AD
89132006-03-12 Akim Demaille <akim@lrde.epita.fr>
8914
8915 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
8916 of AT_NAME_PREFIX when %name-prefix is not used.
8917
aa08666d
AD
89182006-03-12 Akim Demaille <akim@lrde.epita.fr>
8919
8920 Apply --prefix to C++ skeletons too: they change the namespace.
8921 The test suite already exercize these cases.
8922 * data/c++.m4 (b4_namespace): New.
8923 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
8924 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
8925 * data/yacc.c, data/glr.c: Remove a useless `[]'.
8926 * doc/bison.texinfo: Document it.
8927 (Option Cross Key): Use @multitable in all formats. It looks
8928 nicer, even in TeX outputs.
8929 (Rules): Use the same code whatever the output type is.
8930 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
8931 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
8932 * tests/calc.at: Use it, instead of hard coding `yy'.
91e3ac9a 8933
45567173
AD
89342006-03-10 Akim Demaille <akim@lrde.epita.fr>
8935
8936 * TODO: Remove dead items.
8937
e9d8f881 89382006-03-10 Akim Demaille <akim@lrde.epita.fr>
55ba27be
AD
8939
8940 * doc/FAQ: Remove, merged into...
8941 * doc/bison.texinfo (FAQ): this.
8942 * doc/Makefile.am (EXTRA_DIST): Adjust.
8943
c095d689
AD
89442006-03-10 Akim Demaille <akim@lrde.epita.fr>
8945
8946 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
8947 even if empty.
8948 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
8949 * doc/bison.texinfo (Calc++ Scanner): Use it.
8950
6e0f8287
PE
89512006-03-09 Paul Eggert <eggert@cs.ucla.edu>
8952
8953 Fix two nits reported by twlevo, plus one more that I discovered.
8954
8955 * src/assoc.h (assoc_to_string): Give a name to the arg, as
8956 this is the usual Bison style.
8957 * src/location.h (location_print): Likewise.
8958
8959 * src/reader.h (token_name): Likewise.
8960
d6b771c3
PE
89612006-03-08 Paul Eggert <eggert@cs.ucla.edu>
8962
8963 Fix some nits reported by twlevo.
8964 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
8965 and "POSIX". Use more-modern syntax for URLs. Mention C++
8966 and ask for Java. Don't hardwire OS version numbers. Add
8967 copyright notice.
8968 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
8969 * src/conflicts.c (solved_conflicts_obstack): Now static.
8970
1e137b71
JD
89712006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
8972
8973 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
8974 page. Say "you can use it" not "you may use it" as on the web page;
8975 we're describing capabilities not granting permission.
8976
73f2e47e
PE
89772006-03-06 Paul Eggert <eggert@cs.ucla.edu>
8978
6d05403d
PE
8979 * data/glr.c (yyresolveLocations): Rename local variables to avoid
8980 shadowing warnings. Use usual patter for iterating through RHS.
8981 * tests/glr-regression.at
8982 (Uninitialized location when reporting ambiguity):
8983 Modify yylex so that it uses its argument, rather than trying
8984 to rely on ARGSUSED (which doesn't work for gcc with warnings).
8985 const char -> char const.
8986
73f2e47e
PE
8987 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
8988 Don't use tabs inside commands; it messes up 'ps'.
8989 Problem reported by twlevo.
8990
8710fc41
JD
89912006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
8992
8993 * tests/glr-regression.at (Uninitialized location when reporting
8994 ambiguity): New test case.
8995 * data/glr.c (yyresolveLocations): New function, which uses
8996 YYLLOC_DEFAULT.
8997 (yyresolveValue): Invoke yyresolveLocations before reporting an
8998 ambiguity.
8999 * doc/bison.texinfo (Default Action for Locations): Note
9000 YYLLOC_DEFAULT's usage for ambiguity locations.
9001 (GLR Semantic Actions): Cross-reference those notes.
9002
ae952af2
JD
90032006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
9004
9005 * tests/glr-regression.at (Leaked semantic values when reporting
9006 ambiguity): Remove unnecessary union and type declarations.
9007 (Leaked lookahead after nondeterministic parse syntax error): New test
9008 case.
9009 * data/glr.c (yyparse): Check for zero stacks remaining before
9010 attempting to shift the lookahead so that you don't lose it.
9011
35ee866a
JD
90122006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9013
9014 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
9015 * tests/glr-regression.at (Leaked semantic values when reporting
9016 ambiguity): New test case.
9017 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
9018 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
9019 now unnecessary yystackp parameter.
9020 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
9021 destructors can be called.
9022
9023 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
9024 in existing testcases.
9025
520181ab
JD
90262006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
9027
9028 Don't leak semantic values for parent RHS when a user action cuts the
9029 parser, and clean up related code a bit.
9030 * tests/glr-regression.at (Leaked merged semantic value if user action
35ee866a
JD
9031 cuts parse): Rename to...
9032 (Leaked semantic values if user action cuts parse): ... this. Add check
520181ab
JD
9033 for leaked parent RHS values.
9034 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
9035 between an unresolved state (non-empty chain of semantic options) and
9036 an incomplete one (signaled by an empty chain).
ae952af2 9037 (yyresolveStates): Document the interface. Move all manipulation of a
520181ab
JD
9038 successfully or unsuccessfully resolved yyGLRState to...
9039 (yyresolveValue): ... here so that yyresolveValue always leaves a
9040 yyGLRState with consistent data and thus is easier to understand.
9041 Remove the yyvalp and yylocp parameters since they are always just
9042 taken from the yys parameter. When reporting a discarded merged value
9043 in debugging output, note that it is incompletely merged. Document the
9044 interface.
9045 (yyresolveAction): If resolving any of the RHS states fails, destroy
9046 them all rather than leaking them. Thus, as long as user actions are
9047 written to clean up the RHS correctly, yyresolveAction always cleans up
9048 the RHS of a semantic option. Document the interface.
9049
18d9185c
PE
90502006-02-27 Paul Eggert <eggert@cs.ucla.edu>
9051
9052 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
9053 led to a segmentation fault in GNU Pascal. Problem reported
9054 by Waldek Hebisch.
9055
841a7737
JD
90562006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
9057
9058 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
9059 mid-rule action inside a nonterminal symbol in order to declare a
9060 destructor for its semantic value.
9061
fc3f467f
PE
90622006-02-16 Paul Eggert <eggert@cs.ucla.edu>
9063
9064 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
9065 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
9066 __cplusplus && ! defined _STDLIB_H && !
9067 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
9068 defined free))]: Include <stdlib.h> rather than rolling our own
9069 declarations of malloc and free, to avoid problems with
9070 incompatible declarations (using 'throw') C++'s stdlib.h. This
9071 should fix Debian bug 340012
9072 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
9073 reported by Guillaume Melquiond.
9074
a3af26dd
PE
90752006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9076
4d7bc38c
PE
9077 * NEWS: Clarify symbols versus types in unused-value warnings.
9078
a3af26dd
PE
9079 * configure.ac (AC_INIT): Bump version number.
9080
4e26c69e
PE
90812006-02-13 Paul Eggert <eggert@cs.ucla.edu>
9082
9083 * NEWS: Version 2.1a.
9084 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
9085 since C99 requires this.
9086
498e897c
PE
90872006-02-11 Paul Eggert <eggert@cs.ucla.edu>
9088
9089 * m4/c-working.m4: New file.
9090 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
9091
57bb17ca
PE
90922006-02-10 Paul Eggert <eggert@cs.ucla.edu>
9093
9094 * Makefile.maint: Merge from coreutils.
9095
0be105dc
PE
90962006-02-09 Paul Eggert <eggert@cs.ucla.edu>
9097
9098 More portability fixes for problems summarized by Nelson H. F. Beebe.
9099
9100 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
9101 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
9102 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
9103 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
9104 messes up because C++ code is compiled in 32-bit mode but linked
9105 in 64-bit mode.
9106
6fc0c024
PE
91072006-02-08 Paul Eggert <eggert@cs.ucla.edu>
9108
9109 More portability fixes for problems summarized by Nelson H. F. Beebe.
9110
7870f699
PE
9111 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
9112 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
9113
6fc0c024
PE
9114 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
9115 nodist_PROGRAMS, since we don't need to actually compile the
9116 example if we're just doing a plain 'make'. This avoids bothering
9117 the installer unnecessarily about problems due to weird C++
9118 compilers.
9119
fe6c2fde
PE
91202006-02-06 Paul Eggert <eggert@cs.ucla.edu>
9121
9122 More portability fixes for problems summarized by Nelson H. F. Beebe.
9123
9124 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
9125 than #include "...", and compile with -I'.'. The old method was
9126 not portable, according to Posix and the C standard, and it does
9127 not work with Sun C 5.7, where previous #line directives affect
9128 the working directory used in later #include "..." directives.
9129
927b425b
JMG
91302006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9131
9132 Various DJGGP specific issues in /djgpp
9133
d9735e9e
PE
91342006-02-02 Paul Eggert <eggert@cs.ucla.edu>
9135
9136 More portability fixes for problems summarized by Nelson H. F. Beebe.
9137
9138 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
9139 '#include <map>' works and that you can apply ++ to iterators.
9140
5a6755af
PE
91412006-02-01 Paul Eggert <eggert@cs.ucla.edu>
9142
67a0dc4f
PE
9143 Work around portability problems summarized by Nelson H. F. Beebe in
9144 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
9145
8c86f0ef
PE
9146 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9147 that '#include <string>' works.
9148
de35dd59
PE
9149 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
9150 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
9151 "warning: sorry: semantics of inline function static data `const
9152 unsigned char translate_table[262]' are wrong (you'll wind up with
9153 multiple copies)".
9154
67a0dc4f
PE
9155 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
9156 or, xor to not_, and_, or_, and xor_, respectively. This works
9157 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
9158 random system header somewhere that includes the equivalent of
9159 <iso646.h>.
9160
5a6755af
PE
9161 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
9162 -E" works; it apparently doesn't work with PathScale EKO Compiler
67a0dc4f 9163 Suite Version 2.0.
5a6755af 9164
3f001415
JD
91652006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
9166
9167 During deterministic GLR operation, user actions should be able to
9168 influence the parse by changing yychar. To make this easier to fix and
9169 to make glr.c easier to evolve in general, don't maintain yytoken in
9170 parallel with yychar; just compute yytoken when needed.
9171 * tests/glr-regression.at (Incorrect lookahead during deterministic
9172 GLR): Check that setting yychar in a user action has the intended
9173 effect.
9174 * data/glr.c (yyGLRStack): Remove yytokenp member.
9175 (yyclearin): Don't set *yytokenp.
9176 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
9177 yychar rather than *yytokenp to determine the current lookahead.
9178 Compute yytoken locally when needed.
9179 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
9180 point to.
9181
9182 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
9183 after `--report' documentation.
9184
e2a8c0f5
PE
91852006-01-30 Paul Eggert <eggert@cs.ucla.edu>
9186
9187 * src/parse-gram.y (grammar_declaration): Location of printer
9188 symbol is @1, not list->location. Bug reported by twlevo.
9189 * tests/input.at (Incompatible Aliases): Adjust to above change.
9190
6b702268
PE
91912006-01-29 Paul Eggert <eggert@cs.ucla.edu>
9192
27622431
PE
9193 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
9194 all the test at once. This makes the output easier to read in the
9195 normal case.
9196
6b702268
PE
9197 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
9198 got from <http://bro-ids.org/download.html>. The bug is that
9199 when two actions appeared in succession, the second one was
9200 scanned before the first one was added to the grammar rule
9201 as a midrule action. Bison then output the incorrect warning
9202 "parse.y:905.17-906.36: warning: unused value: $3".
9203 * src/parse-gram.y (BRACED_CODE, action): These are no longer
9204 associated with a value.
9205 (rhs): Don't invoke grammar_current_rule_action_append.
9206 (action): Invoke it here instead.
9207 * src/reader.c (grammar_midrule_action): Now extern.
9208 (grammar_current_rule_action_append): Don't invoke
9209 grammar_midrule_action; that is now the scanner's job.
9210 * src/reader.h (last_string, last_braced_code_loc):
9211 (grammar_midrule_action): New decls.
9212 * src/scan-gram.l (last_string): Now extern, sigh.
9213 (last_braced_code_loc): New extern variable.
9214 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
9215 rule already has an action.
9216 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
9217 * tests/input.at (AT_CHECK_UNUSED_VALUES):
9218 Add some tests to check that the above changes fixed the bug.
9219
d40ba6c2
PE
92202006-01-27 Paul Eggert <eggert@cs.ucla.edu>
9221
9222 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
9223 All used changed. Check whether the symbol has a destructor,
9224 not whether it is typed.
9225 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
9226 that the values are still reported as unused. All line numbers
9227 adjusted.
9228
401aace6
PE
92292006-01-23 Paul Eggert <eggert@cs.ucla.edu>
9230
9231 Work around a bug in bro 0.8, which underparenthesizes its
9232 definition of YYLLOC_DEFAULT.
9233 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
9234 their arguments.
9235 * data/lalr1.cc: Likewise.
9236 * data/yacc.cc: Likewise.
9237
06f01bc4
PE
92382006-01-22 Paul Eggert <eggert@cs.ucla.edu>
9239
401aace6
PE
9240 Work around a bug in Pike 7.0, and give the Pike folks a
9241 better way to override the usual int widths.
9242 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
9243 user can override the types.
9244 (short): #undef, to work around a bug in Pike 7.0.
9245 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
9246 (union yyalloc.yyss): Use yytype_int16 rather than short.
9247 All uses changed.
9248 (yysigned_char): Remove.
9249 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
9250 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
9251 * tests/regression.at (Web2c Actions): Adjust to above changes.
9252
9253 * src/reader.c (check_and_convert_grammar): New function.
9254 (reader): Close the input file even if something went wrong during
9255 parsing. Minor file descriptor leak reported by twlevo.
9256
06f01bc4
PE
9257 * src/assoc.c (assoc_to_string): Use a default: abort (); case
9258 to pacify gcc -Wswitch-default.
9259 * src/scan-gram.l (adjust_location): Use a default: break; case
9260 to pacify gcc -Wswitch-default.
9261 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
9262 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
9263 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
9264 Move these decls to scan-skel.l, since they don't need to be
9265 visible elsewhere.
9266 * src/scan-skel.l: Accept the above decls.
9267 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
9268 is used.
9269
02650b7f
PE
92702006-01-21 Paul Eggert <eggert@cs.ucla.edu>
9271
9272 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
9273 since we don't want to insist on a version number at the start
9274 of the changelog every time.
9275 * Makefile.maint: Sync from coreutils a bit better.
9276 (sc_trailing_blank): Renamed from sc_trailing_space.
9277 All uses changed.
9278 (sc_no_if_have_config_h, sc_require_config_h):
9279 (sc_prohibit_assert_without_use): New rules.
9280 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
9281 (sc_dd_max_sym_length): Fix leading spaces in rule.
9282 (sc_system_h_headers): Prefix with @.
9283 (sc_useless_cpp_parens, m4-check): Output line numbers.
9284 (changelog-check): Allow version only in head.
9285 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
9286 satisfy new Makefile.maint rule.
9287 * data/glr.c: Likewise.
9288 * data/glr.cc: Likewise.
9289 * data/lalr1.cc: Likewise.
9290 * data/yacc.c: Likewise.
9291 * lib/ebitsetv.c: Likewise.
9292 * lib/lbitset.c: Likewise.
9293 * lib/subpipe.c: Likewise.
9294 * lib/timevar.c: Likewise.
9295 * src/system.h: Likewise.
9296 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
9297 * djgpp/Makefile.maint: Add copyright notice.
9298 * djgpp/README.in: Likewise.
9299 * djgpp/config.bat: Likewise.
9300 * djgpp/config.site: Likewise.
9301 * djgpp/config_h.sed: Likewise.
9302 * djgpp/djunpack.bat: Likewise.
9303 * djgpp/config.sed: Fix copyright notice to match standard format.
9304 * djgpp/subpipe.h: Likewise.
9305 * lib/bitsetv-print.c: Likewise.
9306 * lib/bitsetv.c: Likewise.
9307 * lib/subpipe.h: Likewise.
9308 * lib/timevar.c: Likewise.
9309 * lib/timevar.h: Likewise.
9310 * djgpp/subpipe.c: Use standard recipe for config.h.
9311 * lib/abitset.c: Likewise.
9312 * lib/bitset.c: Likewise.
9313 * lib/bitset_stats.c: Likewise.
9314 * lib/bitsetv-print.c: Likewise.
9315 * lib/bitsetv.c: Likewise.
9316 * lib/ebitsetv.c: Likewise.
9317 * lib/get-errno.c: Likewise.
9318 * lib/lbitset.c: Likewise.
9319 * lib/subpipe.c: Likewise.
9320 * lib/timevar.c: Likewise.
9321 * lib/vbitset.c: Likewise.
9322 * tests/local.at: Likewise.
9323 * src/scan-gram.l: Don't include verify.h, since system.h does
9324 that for us.
9325 * .x-sc_require_config_h: New file.
9326 * .x-sc_unmarked_diagnostics: New file.
9327
287c78f6
PE
93282006-01-20 Paul Eggert <eggert@cs.ucla.edu>
9329
287c78f6
PE
9330 Be a bit more systematic about using 'abort'.
9331 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
9332 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
9333 Put 'default: abort ();' before some other case, to satisfy older
9334 pedantic compilers.
9335 * lib/bitset_stats.c (bitset_stats_init): Likewise.
9336 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
9337 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
9338 * src/conflicts.c (resolve_sr_conflict): Likewise.
68cae94e
PE
9339 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
9340 (get_decision_str, get_orientation_str, get_node_alignment_str):
9341 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
9342 (get_linestyle_str, get_arrowstyle_str): Likewise.
9343 * src/conflicts.c (resolve_sr_conflict):
9344 Use a default case rather than one for the one remaining enum
9345 value, to catch invalid enum values as well.
9346 * src/lalr.c (set_goto_map, map_goto):
9347 Prefer "assert (FOO);" to "if (!FOO) abort ();".
9348 * src/nullable.c (nullable_compute, token_definitions_output):
9349 Likewise.
9350 * src/reader.c (packgram, reader): Likewise.
9351 * src/state.c (transitions_to, state_new, state_reduction_find):
9352 Likewise.
9353 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
9354 (symbol_pack): Likewise.
9355 * src/tables.c (conflict_row, pack_vector): Likewise.
287c78f6
PE
9356 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
9357 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
68cae94e
PE
9358 * src/system.h: Don't include <assert.h>.
9359 (assert): New macro.
9360
9361 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
9362 (Destructor Decl, Parser Function, Pure Calling):
9363 Describe rules for braces inside C code more carefully.
287c78f6 9364
c66dfadd
PE
93652006-01-19 Paul Eggert <eggert@cs.ucla.edu>
9366
c21493b8
PE
9367 Fix some porting glitches found by Nelson H. F. Beebe.
9368 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
9369 compilers that don't understand that abort () does not return.
9370 * src/state.c (transitions_to): Likewise.
9371 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
9372 that '#include <cstdlib>' works.
9373 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
9374 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
9375 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
9376 for the benefit of some pre-C99 compilers.
9377
b6e3facf
PE
9378 * bootstrap: Undo changes to gnulib files that autoreconf made.
9379
c66dfadd
PE
9380 Minor fixups to get 'make maintainer-check' to work.
9381 * configure.ac: Don't use -Wnested-externs, as it's incompatible
9382 with the new verify.h implementation.
9383 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
9384 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
9385 * data/yacc.c (YYUSE): Likewise.
9386 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
9387 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
9388 * src/parse-gram.y (declaration): Don't pass a string constant
9389 to a function that expects char *, since GCC might complain
9390 about the constant value.
9391 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
9392 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
9393 before #defining them.
9394 * tests/glr-regression.at
9395 (Incorrectly initialized location for empty right-hand side in GLR):
9396 In yyerror, use the msg arg.
9397 (Corrupted semantic options if user action cuts parse):
9398 (Incorrect lookahead during deterministic GLR):
9399 (Incorrect lookahead during nondeterministic GLR):
9400 Don't name a local var 'index'; it shadows string.h's 'index'.
9401
ed94ef2a
AD
94022006-01-19 Akim Demaille <akim@epita.fr>
9403
9404 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
9405 location, not just parts of it.
9406
e9ad4aec
PE
94072006-01-18 Paul Eggert <eggert@cs.ucla.edu>
9408
d6ca7905
PE
9409 * NEWS: Document the fact that multiple %unions are now allowed.
9410 * doc/bison.texinfo (Union Decl): Likewise.
51cbef6f
PE
9411 * TODO: This feature is now implemented, so remove it from
9412 the wishlist.
d6ca7905 9413
ef1b70e0
PE
9414 * Makefile.maint: Merge with coreutils Makefile.maint.
9415 (CVS_LIST): Use build-aux version if available.
9416 (VERSION_REGEXP): New macro.
9417 (syntax-check-rules): Add sc_no_if_have_config_h,
9418 sc_prohibit_assert_without_use, sc_require_config_h,
9419 sc_useless_cpp_parens.
9420 (sc_obsolete_symbols): Check for O_NDELAY.
9421 (sc_dd_max_sym_length): Track coreutils.
9422 (sc_unmarked_diagnostics): Look in all files, not just *.c.
9423 (sc_useless_cpp_parens): New rule.
9424 (news-date-check): Look for version or today's date.
9425 (changelog-check): Don't require version number near head.
9426 (copyright-check): Use current year instead of hardwiring 2005.
9427 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
9428 (announcement): Add --gpg-key-ID.
9429
9430 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
9431 with "file system".
9432
2073ce56 9433 Avoid undefined behavior that addressed just before the start of an
e9ad4aec
PE
9434 array. Problem reported by twlevo.
9435 * src/reader.c (packgram): Prepend a new sentinel before ritem.
9436 * src/lalr.c (build_relations): Rely on new sentinel.
9437 * src/gram.c (gram_free): Adjust to new sentinel.
9438
b7691f15
JD
94392006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
9440
9441 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
9442 yylookaheadNeeds. All uses updated.
9443 (yysplitStack): Rename local yynewLookaheadStatuses to
9444 yynewLookaheadNeeds.
9445 * data/glr-regression.at (Incorrect lookahead during nondeterministic
9446 GLR): In comments, change `lookahead status' to `lookahead need'.
9447
ddee1b06
PH
94482006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9449
9450 * data/glr.c (yysplitStack): A little stylistic rewrite.
9451
12f4614d
PH
94522006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
9453
9454 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
9455
32c29292
JD
94562006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
9457
9458 * doc/bison.texinfo: Fix some typos.
9459 (GLR Semantic Actions): New subsection discussing special
9460 considerations because GLR semantic actions might be deferred.
9461 (Actions): Mention look-ahead usage of yylval.
9462 (Actions and Locations): Mention look-ahead usage of yylloc.
9463 (Special Features for Use in Actions): Add YYEOF entry and mention it
9464 in the yychar entry.
9465 In the yychar entry, remove mention of the local yychar case (pure
9466 parser) since this is irrelevant information when writing semantic
148d66d8 9467 actions and since it's already discussed in `Table of Symbols' where
32c29292
JD
9468 yychar is otherwise described as an external variable.
9469 In the yychar entry, don't call it the `current' look-ahead since it
9470 isn't when semantic actions are deferred.
9471 In the yychar and yyclearin entries, add note about deferred semantic
9472 actions.
9473 Add yylloc and yylval entries discussing look-ahead usage.
9474 (Look-Ahead Tokens): When discussing yychar, don't call it the
9475 `current' look-ahead, and do mention yylval and yylloc.
9476 (Error Recovery): Cross-reference `Action Features' when mentioning
9477 yyclearin.
148d66d8 9478 (Table of Symbols): In the yychar entry, don't call it the `current'
32c29292
JD
9479 look-ahead.
9480 In the yylloc and yylval entries, mention look-ahead usage.
9481
de366a2f 94822006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
2781dbd1
JD
9483
9484 * tests/glr-regression.at: Update copyright year to 2006.
9485
bf70fa87
JD
94862006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9487
9488 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
9489 use during nondeterministic operation to track which stacks have
9490 actually needed the current lookahead.
9491 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
9492 Allocate, deallocate, resize, and otherwise shuffle space for
9493 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
9494 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
9495 appropriately during nondeterministic operation.
9496 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
9497 members to store the current lookahead to be used by the deferred
9498 user action.
9499 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
9500 from which the RHS is taken. Set the lookahead members of the new
9501 yySemanticOption according to the lookahead status for stack yyk.
9502 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
9503 yyaddDeferredAction.
9504 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
9505 members of yySemanticOption before invoking yyuserAction, and then set
9506 them back to their current values afterward.
9507 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
9508 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
9509 * tests/glr-regression.at: Remove `.' from the ends of recent test case
9510 titles for consistency.
9511 (Leaked merged semantic value if user action cuts parse): In order to
9512 suppress lint warnings, use arguments in merge function, and assign
9513 char value < 128 in main.
9514 (Incorrect lookahead during deterministic GLR): New test case.
9515 (Incorrect lookahead during nondeterministic GLR): New test case.
9516
05449a2c
JD
95172006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
9518
de366a2f 9519 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
05449a2c
JD
9520 !yyvaluep as signal that no semantic value is available to print.
9521 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
9522 to print a semantic value.
9523
4158e0a1 95242006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
fd2493f7 9525
4158e0a1
JD
9526 * tests/glr-regression.at: For consistency with my newer test cases,
9527 don't thank myself.
9528
d659304d
JD
95292006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
9530
9531 * data/glr.c (yyresolveValue): When merging semantic options, if at
9532 least one user action succeeds but a later one cuts the parse, then
9533 destroy the semantic value before returning rather than leaking it.
9534 (yyresolveStates): If a user action cuts the parse and thus
9535 yyresolveValue fails, ignore the (unset) semantic value rather than
9536 corrupting the yyGLRState, and empty the semantic options list since
9537 the user actions should have called all necessary destructors.
9538 Simplify code with YYCHK.
9539 * tests/glr-regression.at (Corrupted semantic options if user action
9540 cuts parse): New test case.
9541 (Undesirable destructors if user action cuts parse): New test case.
9542 Before applying any of this patch, this test case never actually failed
9543 for me... but only because the corrupted semantic options usually
9544 masked this bug.
9545 (Leaked merged semantic value if user action cuts parse): New test
9546 case.
9547
6ec2c0f2
AD
95482006-01-05 Akim Demaille <akim@epita.fr>
9549
9550 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
9551
1b9c21fb
PE
95522006-01-04 Paul Eggert <eggert@cs.ucla.edu>
9553
9554 * data/c.m4 (b4_c_modern): New macro, with a new provision for
9555 _MSC_VER. Problem reported by Cenzato Marco.
9556 (b4_c_function_def): Use it.
9557 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
9558 b4_c_modern.
9559 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
9560 than rolling our own.
9561
84866159
AD
95622006-01-04 Akim Demaille <akim@epita.fr>
9563
9564 Also warn about non-used mid-rule values.
9565 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
9566 member.
9567 (symbol_list_new): Adjust.
9568 * src/reader.c (symbol_typed_p): New.
9569 (grammar_rule_check): Use it.
9570 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
9571 Check its rule.
9572 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
9573 Use it.
9574 * tests/actions.at (Exotic Dollars): Adjust.
9575
378f4bd8
AD
95762006-01-04 Akim Demaille <akim@epita.fr>
9577
9578 * src/reader.c (grammar_midrule_action): If $$ is set in a
9579 mid-rule, move the `used' bit to its lhs.
9580 * tests/input.at (Unused values): New.
9581 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
9582
e2a21b6f
PE
95832006-01-03 Paul Eggert <eggert@cs.ucla.edu>
9584
54662697
PE
9585 * doc/bison.texinfo (Bison Options): Say more accurately what
9586 --yacc does.
9587 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
9588 about declarations in the grammar when in Yacc mode, as POSIX does
9589 not require a diagnostic when the grammar uses extensions.
9590
9591 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
9592
073f9288
PE
9593 Warn about dubious constructions like "%token T T".
9594 Reported by twlevo.
9595 * src/symtab.h (struct symbol.declared): New member.
9596 * src/symtab.c (symbol_new): Initialize it to false.
9597 (symbol_class_set): New arg DECLARING, specifying whether
9598 this is a declaration that we want to warn about, if there
9599 is more than one of them. All uses changed.
9600
1221b78a
PE
9601 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
9602 Allow multiple %union directives, whose contents concatenate.
9603 * src/parse-gram.y (grammar_declaration): Likewise.
9604 Use muscle_code_grow, so that we don't need stype_line any more.
9605 All uses changed.
9606
9607 * src/muscle_tab.c (muscle_grow): Fix comment.
9608
e2a21b6f
PE
9609 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
9610 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
9611 Update copyright year to 2006.
9612
8f7e3cf9
AD
96132006-01-03 Akim Demaille <akim@epita.fr>
9614
9615 Have glr.cc pass (some of) the calc.at tests.
9616 * data/glr.cc (b4_parse_param_orig): New.
9617 (b4_parse_param): Improve its definition, and bound it more
9618 clearly in the skeleton.
9619 (b4_epilogue): Append, instead of prepending, in order to keep
9620 #line consistency.
9621 Simplify the generation of auxiliary functions: locations and
9622 purity are mandated.
9623 (b4_global_tokens_and_yystype): Honor it.
9624 * data/location.cc (c++.m4): Don't include it.
9625 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
9626 and AT_SKEL_CC_IF.
9627 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
9628 AT_LALR1_CC_IF.
9629 Be sure to initialize the first position's filename.
9630 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
9631 mandated anyway.
9632 (AT_CHECK_CALC_GLR_CC): New.
9633 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
9634
3953ed88
AD
96352006-01-02 Akim Demaille <akim@epita.fr>
9636
9637 * src/output.c (output_skeleton): Don't hard wire the inclusion of
9638 c.m4.
0a96ba81 9639 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
3953ed88
AD
9640 * data/glr.cc: Do not include stack.hh.
9641
9ecafbbf
AD
96422006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
9643
9644 * data/glr.c: Reformat whitespace with tabs.
9645 (b4_lpure_formals): Remove this unused m4 macro.
9646 * tests/cxx-type.at: Reformat whitespace with tabs.
9647 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
9648 since it's a member. Rename type to isNterm for clarity.
9649
c4d497a0
AD
96502005-12-29 Akim <akim@sulaco.local>
9651
9652 Let glr.cc catch up with symbol_value_print.
9653 * data/glr.cc (b4_yysymprint_generate): Replace by...
9654 (b4_yy_symbol_print_generate): this.
9655 (yy_symbol_print, yy_symbol_value_print): Declare them.
9656
4517da37
PE
96572005-12-28 Paul Eggert <eggert@cs.ucla.edu>
9658
9659 * src/location.h (boundary): Note that a line or column equal
9660 to INT_MAX indicates an overflow.
9661 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
9662 (rule_length_overflow, increment_rule_length, add_column_width):
9663 New functions.
9664 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
9665 (<SC_BRACED_CODE>"}"):
9666 Use increment_rule_length rather than incrementing it by hand.
9667 (adjust_location, handle_syncline): Diagnose overflow.
9668 (handle_action_dollar, handle_action_at):
9669 Fix bug with monstrosities like $-2147483648.
9670 Remove now-unnecessary checks.
9671 (scan_integer): Verify assumptions and remove now-unnecessary checks.
9672 (convert_ucn_to_byte): Verify assumptions.
9673 (handle_syncline): New arg LOC. All callers changed.
9674 Don't store through a value derived from char const * pointer.
9675
9676 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
9677 GCC warnings.
9678
e3233bf6
PE
96792005-12-27 Paul Eggert <eggert@cs.ucla.edu>
9680
9681 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
9682 Remove unnecessary forward static decls.
9683
8f3596a6
AD
96842005-12-27 Akim Demaille <akim@epita.fr>
9685
9686 * src/reader.c (grammar_current_rule_check): Also check that $$
9687 is used.
9688 Take the rule to check as argument, hence rename as...
9689 (grammar_rule_check): this.
9690 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
9691 Rename as...
9692 (grammar_rule_begin, grammar_rule_end): these, for consistency.
9693 (grammar_midrule_action, grammar_symbol_append): Now static.
9694 * tests/torture.at (input): Don't rely on the default action
9695 being always performed.
9696 * tests/calc.at: "Set" $$ even when the action is "cut" with
9697 YYERROR or other.
9698 * tests/actions.at (Exotic Dollars): Instead of using unused
9699 values, check that the warning is issued.
9700
721be13c
PE
97012005-12-22 Paul Eggert <eggert@cs.ucla.edu>
9702
9703 * NEWS: Improve wording for unused-value warnings.
9704
a0af42fc
AD
97052005-12-22 Akim Demaille <akim@epita.fr>
9706
9707 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
9708 (b4_yysymprint_generate): Rename as...
9709 (b4_yy_symbol_print_generate): this.
9710 Generate yy_symbol_print instead of yysymprint.
9711 Generate also yy_symbol_value_print, and use it.
9712
affac613
AD
97132005-12-22 Akim Demaille <akim@epita.fr>
9714
721be13c 9715 * NEWS: Warn about unused values.
affac613
AD
9716 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
9717 a `used' member.
9718 (symbol_list_n_get, symbol_list_n_used_set): New.
9719 (symbol_list_n_type_name_get): Use symbol_list_n_get.
9720 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
9721 * src/reader.c (grammar_current_rule_check): Check that values are
9722 used.
9723 * src/symtab.c (symbol_print): Accept 0.
9724 * tests/existing.at: Remove the type information.
9725 Empty the actions.
9726 Remove useless actions (beware of mid-rule actions: perl -000
9727 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
9728 * tests/actions.at (Exotic Dollars): Use unused values.
9729 * tests/calc.at: Likewise.
9730 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9731 Likewise.
9732
9733 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
9734 rule_useful_p.
9735
9d9b8b70
PE
97362005-12-21 Paul Eggert <eggert@cs.ucla.edu>
9737
8bb4c753
PE
9738 Undo 2005-12-01 tentative license wording change. The wording is
9739 still being reviewed by the lawyers, and we don't want to wait for
9740 them before publishing a test release. For now, revert to the
9741 previous wording.
9742 * NEWS: Undo 2005-12-01 change.
9743 * data/glr.c: Revert to previous license wording.
9744 * data/glr.cc: Likewise.
9745 * data/lalr1.cc: Likewise.
9746 * data/location.cc: Likewise.
9747 * data/yacc.c: Likewise.
9748
9d9b8b70
PE
9749 * NEWS: Reword %destructor vs YYABORT etc.
9750 * data/glr.c: Use American spacing, for consistency.
9751 * data/glr.cc: Likewise.
9752 * data/lalr1.cc: Likewise.
9753 * data/yacc.c: Likewise.
9754 * data/yacc.c: Reformat comments slightly.
9755 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
9756 for consistency. Fix some spelling errors and reword recently-included
9757 text slightly.
9758 * tests/cxx-type.at: Cast results of malloc, for C++.
9759
2c3b392a
AD
97602005-12-21 Joel E. Denny <address@hidden>
9761
9762 * tests/cxx-type.at: Construct a tree, count the parents of shared
9763 nodes, and free each node once and only once. Previously, the memory
9764 for semantic values was leaked instead.
9765
d6cff4dc
AD
97662005-12-21 Joel E. Denny <address@hidden>
9767
9768 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
9769 (yylval, yylloc): If pure, #define to yystackp->yyval and
9770 yystackp->yyloc similar to yychar and yynerrs.
9771 (yyparse): If pure, remove local yylval and yylloc. Add local
9772 yystackp to accommodate pure definitions of yylval and yylloc.
9773 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
9774 yylvalp and yyllocp to &yylval and &yylloc.
9775 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
9776 namespace. Previously, nerrs and char were missing, but lval and lloc
9777 weren't necessary.
9778 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
9779 yylvalp and yyllocp parameters since, if pure, these are now always
9780 accessible through yystackp. If not pure, they are still accessible
9781 globally.
9782 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
9783 `if (YYID (N))' to pacify lint.
9784
a85284cf
AD
97852005-12-21 Akim Demaille <akim@epita.fr>
9786
9787 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
9788 destroy the RHS symbols of a rule.
9789 * data/yacc.c (yylen): Initialize to 0.
9790 Keep its value to the number of items to possibly shift.
9791 In particular, a regular successful parse that ends on YYFINAL by
9792 a (internal) YYACCEPT must not have yylen != 0.
9793 (yyerrorlab, yyreturn): Pop the RHS.
9794 Reorder a bit to emphasize the `shifting' bits of code.
9795 (YYPOPSTACK): Now accept a number of items to pop.
9796 * data/lalr1.cc: Likewise.
9797 * data/glr.c: Formatting changes.
9798 Use goto instead of fall through.
9799 * doc/bison.texinfo (Destructor Decl): Complete.
9800
d508c281
JMG
98012005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
9802
9803 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
9804 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
9805 * djgpp/config.bat: Replace every occurence of the file name
9806 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9807 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9808 * djgpp/config.sed: Replace every occurence of the file name
9809 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
9810 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
9811 * djgpp/djunpack.bat: DJGPP specific file.
9812 * djgpp/fnchange.lst: DJGPP specific file.
9813 * djgpp/README.in: Add new information about how to unpack the bison
9814 source on MSDOS and other systems which have 8.3 file name restrictions
9815 using djunpack.bat and fnchange.lst.
9816
3e7a2cd9
PE
98172005-12-12 Paul Eggert <eggert@cs.ucla.edu>
9818
9819 * bootstrap (build_cvs_prefix): Remove; unused.
9820 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
9821 when getting gnulib.
9822
98232005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
9824
9825 * data/glr.c: Reorder typedef declarations for structs to match order
9826 of struct declarations.
9827 Rename yystack everywhere to yystackp except in yyparse where it's not
9828 a pointer.
9829 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
9830 consistency.
9831 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
9832 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
9833 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
9834 lint.
9835
877519f8
PE
98362005-12-09 Paul Eggert <eggert@cs.ucla.edu>
9837
0eca5a39
PE
9838 * tests/sets.at (Accept): Fix typos in regular expression used to
9839 sed out the final state number.
9840
2cec9080
PE
9841 Work around portability problem on Solaris 10: flex-generated
9842 files include <stdio.h> before <config.h>, which messes up
9843 because the latter defines __EXTENSIONS__. Address the problem
9844 by creating two new little files that include <config.h> first,
9845 then include the flex-generated files. Rewrite everyone else
9846 to include <config.h> first, as well.
9847 * lib/timevar.c: Always include "config.h".
9848 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
9849 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
9850 (EXTRA_bison_SOURCES): New macro.
9851 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
9852 * src/system.h: Don't include config.h.
9853 * src/LR0.c: Include <config.h> first.
9854 * src/assoc.c: Likewise.
9855 * src/closure.c: Likewise.
9856 * src/complain.c: Likewise.
9857 * src/conflicts.c: Likewise.
9858 * src/derives.c: Likewise.
9859 * src/files.c: Likewise.
9860 * src/getargs.c: Likewise.
9861 * src/gram.c: Likewise.
9862 * src/lalr.c: Likewise.
9863 * src/location.c: Likewise.
9864 * src/main.c: Likewise.
9865 * src/muscle_tab.c: Likewise.
9866 * src/nullable.c: Likewise.
9867 * src/output.c: Likewise.
9868 * src/parse-gram.y: Likewise.
9869 * src/print.c: Likewise.
9870 * src/print_graph.c: Likewise.
9871 * src/reader.c: Likewise.
9872 * src/reduce.c: Likewise.
9873 * src/relation.c: Likewise.
9874 * src/state.c: Likewise.
9875 * src/symlist.c: Likewise.
9876 * src/symtab.c: Likewise.
9877 * src/tables.c: Likewise.
9878 * src/uniqstr.c: Likewise.
9879 * src/vcg.c: Likewise.
9880
877519f8
PE
9881 * src/parse-gram.y: Fix minor problems uncovered by lint.
9882 (current_lhs, current_lhs_location): Now static.
9883 (current_assoc): Remove unused variable.
9884
9885 Cleanups so that Bison-generated parsers have less lint.
9886 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
9887 Prepend /*ARGSUSED*/, for lint's sake.
9888 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
9889 definition if 'lint' is defined.
9890 (YYID): New macro (or function, if lint).
9891 All uses of /*CONSTCOND*/0 replaced by YYID(0).
9892 * data/yacc.c: Likewise.
9893 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
9894 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
9895 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
9896 is C++ only.
9897 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
9898 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
9899 Use YYID(0) rather than 0, for lint.
9900 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
9901 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
9902
f5228370
PE
99032005-12-07 Paul Eggert <eggert@cs.ucla.edu>
9904
9905 * tests/glr-regression.at
9906 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
9907 Close memory leak reported by twlevo.
9908
69ce078b
PE
99092005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
9910
6ff99711
PE
9911 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
9912 all stacks.
9913 (yyparse): Iterate another stack in order to call user destructors.
69ce078b
PE
9914 * tests/glr-regression.at (No users destructors if stack 0 deleted):
9915 New test case.
9916 (Duplicated user destructor for lookahead): This test now is expected
9917 to succeed.
9918
af3412cd
PE
99192005-12-01 Paul Eggert <eggert@cs.ucla.edu>
9920
32b5b719 9921 * NEWS: Document the following change.
af3412cd
PE
9922 * data/yacc.c: Say "parser skeleton" rather than "file", since
9923 it's no longer just a file.
9924 * data/glr.c: Grant a special exception for C GLR parsers, that
9925 reads like the already-existing exception for C LALR(1) parsers.
9926 * data/glr.cc: Likewise.
9927 * data/lalr1.cc: Likewise.
9928 * data/location.cc: Likewise.
9929 * data/yacc.c: Reword the "written by" statement to clarify that
9930 it was the parser skeleton, not the entire output file.
9931 * data/glr.c: Written by Paul Hilfinger.
9932 * data/glr.cc: Written by Akim Demaille.
9933 * data/lalr1.cc: Likewise.
9934
035aa4a0
PE
99352005-11-18 Paul Eggert <eggert@cs.ucla.edu>
9936
d9963c85
PE
9937 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
9938 Fix typos in previous change that broke 'make check'.
9939 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
9940 supported in C.
9941 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
9942 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
9943 We can revert this once things settle down.
9944
035aa4a0
PE
9945 * src/conflicts.c (conflicts_print): Don't print file name twice
9946 when %expect fails because there were no conflicts.
9947 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
9948 change.
9949 * tests/conflicts.at (%expect not enough, %expect too much):
9950 (%expect with reduce conflicts): Adjust to new behavior.
9951
99522005-11-18 Akim Demaille <akim@epita.fr>
9953
9954 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
9955 errors.
9956 * NEWS: Document this.
9957 * doc/bison.texinfo (Expect Decl): Likewise.
9958
d1ff7a7c
AD
99592005-11-16 Akim Demaille <akim@epita.fr>
9960
9961 Generalize the display of semantic values and locations in traces.
9962 * data/glr.c (yy_reduce_print): Fix indices (again).
9963 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
9964 literal integers.
9965 * data/lalr1.cc (yyreduce_print): Rename as...
9966 (yy_reduce_print): this.
9967 Display values and locations.
9968 * data/yacc.c (yy_reduce_print): Likewise.
9969 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
9970 (yysymprint): Move higher to be visible from yy_reduce_print).
9971 (yyparse): Adjust.
9972 * tests/calc.at: Adjust the expected length of the traces.
9973
6de5398d
AD
99742005-11-14 Akim Demaille <akim@epita.fr>
9975
9976 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
9977 from 1 to N, while values and location start at 0.
9978 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
9979
a1373f55
AD
99802005-11-14 Akim Demaille <akim@epita.fr>
9981
9982 * data/glr.c (yy_reduce_print): Fix the $ number.
9983
613d8952
AD
99842005-11-14 Akim Demaille <akim@epita.fr>
9985
9986 "Use" parse parameters.
9987 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
9988 * data/glr.c, data/glr.cc: Use them.
9989 * data/glr.c (YYUSE): Have a C++ definition that supports
9990 non-pointer types.
9991
b2741627
AD
99922005-11-14 Akim Demaille <akim@epita.fr>
9993
9994 * data/glr.c (yyexpandGLRStack): Declare only if defined.
9995
5059b5c8
AD
99962005-11-14 Akim Demaille <akim@epita.fr>
9997
42249483
AD
9998 * data/glr.cc: New.
9999 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
5059b5c8 10000
4626a15d
AD
100012005-11-12 Akim Demaille <akim@epita.fr>
10002
10003 Let position and location be PODs.
10004 * data/location.cc (position::initialize, location::initialize): New.
10005 (position::position, location::location): Define only if
10006 b4_location_constructors is defined.
10007 * data/lalr1.cc (b4_location_constructors): Define it for backward
10008 compatibility.
10009 * doc/bison.texinfo (Initial Action Decl): Use initialize.
10010
100112005-11-12 Akim Demaille <akim@epita.fr>
98ae9643
AD
10012
10013 * data/lalr1.cc: Move the body of the ctor and dtor into the
10014 parser file (instead of the header).
10015 Wrap the implementations in a "namespace yy".
10016
100172005-11-12 Akim Demaille <akim@epita.fr>
10018
10019 Have glr.c include its header file when created.
10020 * data/glr.c (b4_shared_declarations): New.
10021 Output them verbatim in the parser if !%defines, otherwise
10022 output then in the header file, and include it instead.
10023
1989d947
AD
100242005-11-11 Akim Demaille <akim@epita.fr>
10025
10026 * data/glr.c: Comment changes.
10027
100282005-11-11 Akim Demaille <akim@epita.fr>
62b08cfc
AD
10029
10030 When yydebug, report semantic and location values for reductions.
10031 * data/glr.c (yy_reduce_print): Report the semantic values and the
10032 locations.
10033 (YY_REDUCE_PRINT): Adjust.
10034 (yyglrReduce): Use them.
10035 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
10036 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
10037 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
10038 traces.
10039
02998094
AD
100402005-11-10 Akim Demaille <akim@epita.fr>
10041
10042 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
10043 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
10044 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
10045
5210672f
PE
100462005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
10047
10048 * m4/cxx.m4, examples/Makefile.am: Don't build
10049 examples/calc++ if no C++ compiler is available. (trivial change)
10050
a8991a1d
AD
100512005-11-09 Akim Demaille <akim@epita.fr>
10052
10053 * src/scan-skel.l: Use a couple of asserts.
10054
36b5e963
AD
100552005-11-03 Akim Demaille <akim@epita.fr>
10056
10057 In some (weird) cases, the final state number is incorrect.
10058 Reported by Alexandre Duret-Lutz.
10059 * src/LR0.c (state_list_append): Remove the computation of
10060 final_state.
10061 (save_reductions): Do it here.
10062 (get_state): Alpha conversion.
10063 (generate_states): Use a for loop.
10064 * src/gram.h (item_number_is_rule_number)
10065 (item_number_is_symbol_number): New.
10066 * src/state.c: Use assert.
10067 * src/system.h: Include assert.h.
10068 * tests/sets.at (Accept): New.
10069
44e7ead1
PH
100702005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
10071
10072 * data/glr.c (yyfill): Adjust comment.
36b5e963 10073 (yyresolveAction): Initialize default location properly
44e7ead1
PH
10074 for empty right-hand sides.
10075 (yydoAction): Ditto.
10076 Add comment explaining apparently dead code.
36b5e963
AD
10077 * tests/glr-regression.at
10078 (Incorrectly initialized location for empty right-hand side in GLR):
44e7ead1 10079 New test.
36b5e963 10080
e10a80ee
PE
100812005-10-30 Paul Eggert <eggert@cs.ucla.edu>
10082
10083 * bootstrap (cleanup_gnulib): New function. Use it to clean up
10084 gnulib when interrupted. This fixes some race conditions and
10085 works around some portability problems (one noted by Paul
10086 Hilfinger).
10087
067b32ee
AD
100882005-10-22 Akim <akim@epita.fr>
10089
10090 * Makefile.cfg: Adjust to config -> build-aux.
10091 Reported by twledo.
10092
4b367315
AD
100932005-10-21 Akim Demaille <akim@epita.fr>
10094
10095 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
10096 the %parse-params.
10097 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
10098 * data/yacc.c (b4_Pure_if): Rename as...
10099 (b4_yacc_pure_if): this.
10100 (YY_SYMBOL_PRINT, yyparse): Adjust.
10101 * doc/bison.texinfo: Formatting changes.
10102
24cc23d9
AD
101032005-10-21 Akim Demaille <akim@epita.fr>
10104
10105 Finish the transition config -> build-aux.
10106 * configure.ac, Makefile.am: Use build-aux.
10107 * config/prev-version, config/announce-gen, config/Makefile.am:
10108 Move to...
10109 * build-aux/prev-version, build-aux/announce-gen,
10110 * build-aux/Makefile.am: here.
10111
d4476375
AD
101122005-10-14 Akim Demaille <akim@epita.fr>
10113
10114 * examples/calc++/test: Use set -x only when VERBOSE.
10115
302c0aee
PE
101162005-10-13 Paul Eggert <eggert@cs.ucla.edu>
10117
10118 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
10119 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
10120
7625ec2c
AD
101212005-10-13 Akim Demaille <akim@epita.fr>
10122
10123 * src/scan-skel.l: Output the base name parts of the parser and
10124 header file names.
302c0aee 10125 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
7625ec2c
AD
10126 additional checks.
10127 Use this to exercise C++ outputs in subdirs.
10128 Reported by Oleg Smolsky.
10129
ba0fe3c7
PE
101302005-10-12 Paul Eggert <eggert@cs.ucla.edu>
10131
10132 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
10133 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
10134 Problem reported by John P. Hartmann.
10135 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
10136 already defined it.
10137
9b8a5ce0
AD
101382005-10-12 Akim Demaille <akim@epita.fr>
10139
10140 * src/parse-gram.y (version_check): Exit 63 to please missing
10141 (stands for "version mismatch).
10142 * tests/input.at, doc/bison.texinfo: Adjust.
10143
4f6e011e
PE
101442005-10-10 Paul Eggert <eggert@cs.ucla.edu>
10145
10146 Work around portability problems with Visual Age C compiler
10147 (xlc and xlC_r) reported by John P. Hartmann.
10148 * data/location.cc (initial_column, initial_line): Remove.
10149 All uses replaced by 0 and 1.
10150 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
10151 that xlc complains about.
10152 * src/scan-skel.l (skel_wrap): Likewise.
4d7aa45e 10153 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
ba0fe3c7 10154 as __STDC__.
4d7aa45e
PE
10155 * data/yacc.c (YYMODERN_C): New macro, which also looks at
10156 __STDC_VERSION__. Use it everywhere instead of looking at
10157 __STDC__ and __cplusplus.
4f6e011e 10158
a1b3bf8c
AD
101592005-10-10 Akim Demaille <akim@epita.fr>
10160
10161 * examples/calc++/test: Be quiet unless VERBOSE.
10162
412e44aa
PE
101632005-10-05 Paul Eggert <eggert@cs.ucla.edu>
10164
2a4647a3
PE
10165 * data/c.m4 (yydestruct, yysymprint):
10166 Use YYUSE instead of casting to void.
10167 * data/glr.c (YYUSE): New macro.
10168 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10169 Use it instead of rolling our own.
10170 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10171 (YYCHK1):
10172 Use /*CONSTCOND*/ to suppress lint warnings.
10173 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
10174 (YY_STACK_PRINT): Use 'false' not '0'.
10175 (YYUSE): New macro.
10176 (yysymprint_, yydestruct_): Use it instead of rolling our own.
10177 * data/yacc.c (YYUSE): New macro.
10178 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
10179 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
10180 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
10181
10182
412e44aa
PE
10183 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
10184 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
10185
88c6637f
PE
101862005-10-04 Paul Eggert <eggert@cs.ucla.edu>
10187
2f4f028d
PE
10188 Undo the parts of the unlocked-I/O change that substituted
10189 putc or puts for printf. This might hurt performance a bit,
10190 but some people prefer the printf style.
10191 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
10192 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
10193 All uses replaced by YYFPRINTF and YYDPRINTF.
10194 * data/yacc.c: Likewise.
10195 * lib/bitset.c (bitset_print): Likewise.
10196 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
10197 putc and puts.
10198 * lib/lbitset.c (debug_lbitset): Likewise.
10199 * src/closure.c (print_firsts, print_fderives): Likewise.
10200 * src/gram.c (grammar_dump): Likewise.
10201 * src/lalr.c (look_ahead_tokens_print): Likewise.
10202 * src/output.c (escaped_output): Likewise.
10203 (user_actions_output): Break apart two printfs.
10204 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
10205 * src/reduce.c (reduce_print): Likewise.
10206 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
10207 * src/system.h: Include unlocked-io.h rathe than stdio.h.
10208
88c6637f
PE
10209 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
10210 Use assignments rather than casts-to-void to suppress
10211 unused-variable warnings. This pacifies 'lint'.
10212 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
10213 unused-variable warnings.
10214
fb32e373
JMG
102152005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10216
10217 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
10218
edb8f44f
PE
102192005-10-02 Paul Eggert <eggert@cs.ucla.edu>
10220
fb9c0b33
PE
10221 Use unlocked I/O for a minor performance improvement on hosts like
10222 GNU/Linux and Solaris that support unlocked I/O. The basic idea
10223 is to use the gnlib unlocked-io module, and to prefer putc and
10224 puts to printf when either will work (since the latter doesn't
10225 come in an unlocked flavor).
10226 * bootstrap (gnulib_modules): Add unlocked-io.
10227 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
10228 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
10229 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
10230 and similarly for puts and putc and printf.
10231 * data/yacc.c: Likewise.
10232 * lib/bitset.c (bitset_print): Likewise.
10233 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
10234 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
10235 to printf.
10236 * lib/lbitset.c (debug_lbitset): Likewise.
10237 * src/closure.c (print_firsts, print_fderives): Likewise.
10238 * src/gram.c (grammar_dump): Likewise.
10239 * src/lalr.c (look_ahead_tokens_print): Likewise.
10240 * src/output.c (escaped_output): Likewise.
10241 (user_actions_output): Coalesce two printfs.
2f4f028d 10242 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
fb9c0b33
PE
10243 * src/reduce.c (reduce_print): Likewise.
10244 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
2f4f028d 10245 * src/system.h: Include unlocked-io.h rather than stdio.h.
fb9c0b33 10246
edb8f44f
PE
10247 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
10248 this confuses xgettext.
10249
b50d2359
AD
102502005-10-02 Akim Demaille <akim@epita.fr>
10251
10252 * bootstrap (gnulib_modules): Add strverscmp.
10253 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
10254 * m4/.cvsignore: Add strverscmp.m4.
10255 * src/parse-gram.y (%require): New token, new rule.
10256 (version_check): New.
10257 * src/scan-gram.l (%require): Adjust.
10258 * tests/input.at (AT_REQUIRE): New.
10259 Use it.
10260 * doc/bison.texinfo (Require Decl): New.
10261 (Calc++ Parser): Use %require.
10262
21667f64
AD
102632005-10-02 Akim Demaille <akim@epita.fr>
10264
10265 * data/location.cc: New.
10266
2b81e969
AD
102672005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
10268 Akim Demaille <akim@epita.fr>
10269
10270 Make sure -odir/foo.cc creates dir/location.hh etc.
10271 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
10272 (spec_file_prefix, spec_verbose_file, spec_graph_file)
10273 (spec_defines_file): Now const.
10274 (dir_prefix): New.
10275 (short_base_name): Remove.
10276 * src/files.c: Adjust.
10277 (dirname.h): Include.
10278 (base_name): Don't prototype it.
10279 (finput): Remove, duplicates gram_in.
10280 (full_base_name, short_base_name): Replace by...
10281 (all_but_ext, all_but_tab_ext): these.
10282 (compute_base_names): Rename as...
10283 (compute_file_name_parts): this.
10284 Update to compute the new variables, including dir_prefix.
10285 Adjust dependencies.
10286 * src/output.c (prepare): Output them.
10287 * src/reader.c: Adjust to use gram_in, not finput.
10288 * src/scan-skel.l (@dir_prefix@): New.
10289
ad6a9b97
JMG
102902005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
10291
10292 * lib/subpipe.c: New function end_of_output_subpipe() added
10293 to allow support for non-posix systems. This is a no-op function
10294 for posix systems.
10295
10296 * lib/subpipe.h: New function end_of_output_subpipe() added
10297 to allow support for non-posix systems. This is a no-op function
10298 for posix systems.
10299
10300 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
10301 handle the lack of pipe/fork functionality on non-posix systems.
10302
10303 * djgpp/Makefile.maint: DJGPP specific file.
10304
10305 * djgpp/README.in: DJGPP specific file.
10306
10307 * djgpp/config.bat: DJGPP specific configuration file.
10308
10309 * djgpp/config.sed: DJGPP specific configuration file.
10310
10311 * djgpp/config.site: DJGPP specific configuration file.
10312
10313 * djgpp/config_h.sed: DJGPP specific configuration file.
10314
10315 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
10316
10317 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
10318
fc695704
AD
103192005-10-02 Akim Demaille <akim@epita.fr>
10320
10321 * data/location.cc: New, extract from...
10322 * data/lalr1.cc: here.
10323 (location.hh): Include it after the user prologue, in case the
10324 filename type is defined by the user.
10325 Forward declation location and position before the pre-prologue.
10326 (yyresult_): Rename as...
10327 (yyresult): this, it's a local variable, not an attribute.
10328 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
10329
103302005-10-01 Akim Demaille <akim@epita.fr>
5215c87f
AD
10331
10332 * examples/extexi: Restore the #line generation.
10333
fb9712a9
AD
103342005-09-30 Akim Demaille <akim@epita.fr>,
10335 Alexandre Duret-Lutz <adl@gnu.org>
10336
10337 Move the token type and YYSTYPE in the parser class.
10338 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
10339 (parser::token): New, from the moved free definition of tokens.
10340 (parser::semantic_value): Now a full definition instead of an
10341 indirection to YYSTYPE.
10342 (b4_post_prologue): No longer included in the header file, but
10343 in the implementation file.
10344 * doc/bison.texi (C+ Language Interface): Update.
10345 * src/parse-gram.y: Support unary %define.
10346 * tests/actions.at: Define global_tokens_and_yystype for backward
10347 compatibility until we update the tests.
10348 * tests/calc.at: Idem.
10349 (first_line, first_column, last_line, last_column): Define for lalr1.cc
10350 to simplify the code.
10351
55f0c7b1
PE
103522005-09-29 Paul Eggert <eggert@cs.ucla.edu>
10353
10354 Port to SunOS 4.1.4, which lacks strtoul and strerror.
10355 Ah, the good old days! Problem reported by Peter Klein.
10356 * bootstrap (gnulib_modules): Add strerror, strtoul.
10357 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
10358 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
10359
fb9712a9 103602005-09-29 Akim Demaille <akim@epita.fr>
d4fb5e3c
AD
10361
10362 * data/c.m4 (b4_error_verbose_if): New.
10363 * data/lalr1.cc: Use it.
10364 (YYERROR_VERBOSE_IF): Remove.
10365 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
10366 parser members, replaced by...
10367 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
10368 local variables.
10369 (yysyntax_error_): Takes the state number as argument.
10370 (yyreduce_print_): Use the argument yyrule, not the former
10371 attribute yyn_.
10372
8a6f72f3
PE
103732005-09-26 Paul Eggert <eggert@cs.ucla.edu>
10374
10375 * bootstrap (gnulib_modules): Add verify.
10376 * lib/.cvsignore: Add verify.h.
10377 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
10378 * src/system.h (verify): Remove.
10379 Include verify.h instead.
10380 * src/tables.c (tables_generate): Use new API for 'verify'.
10381
0d50976f
PE
103822005-09-21 Paul Eggert <eggert@cs.ucla.edu>
10383
ebc3737e
PE
10384 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
10385 local variables whose names begin with 'yy'.
10386 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
10387 Trivial changes from Joel E. Denny.
10388
0d50976f
PE
10389 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
10390 it itself.
10391 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
10392 don't use alloca any more.
10393
10394 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
10395 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
62c4328e 10396 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
0d50976f
PE
10397 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
10398 to match yacc.c, to test more hosts.
10399
a05b79df
PE
104002005-09-20 Paul Eggert <eggert@cs.ucla.edu>
10401
55289366
PE
10402 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
10403 doesn't affect behavior.
10404 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
10405 Solaris, AIX, MSC.
10406 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
10407 This works a bit better with glibc, if user code has already included
10408 stdlib.h.
10409 * doc/bison.texinfo (Bison Parser): Document that users can't
10410 arbitrarily use malloc and free for other purposes. Document
10411 that <alloca.h> and <malloc.h> might be included.
10412 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
10413 user must declare alloca.
10414
a05b79df
PE
10415 * HACKING (release): Forwarn the Translation Project about
10416 stable releses.
10417
3ab2ca22
AD
104182005-09-20 Akim Demaille <akim@epita.fr>
10419
10420 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
10421
a9739e7c
PE
104222005-09-19 Paul Eggert <eggert@cs.ucla.edu>
10423
a702593e
PE
10424 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
10425 (YYSTACK_ALLOC_MAXIMUM): Use it.
10426 (yysyntax_error): New function.
10427 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
10428 multiple syntax errors are reported, and alloca is being used.
10429 Instead, reallocate buffers twice as big each time, so that
10430 we waste at most half the allocated memory. Start with a small
10431 (128-byte) buffer that will suffice in most cases anyway.
10432 Use yysyntax_error to do most of the work.
10433
10434 * doc/bison.texinfo (Error Reporting, Table of Symbols):
10435 yynerrs is the number of errors reported, not the number of
10436 errors encountered.
10437
a9739e7c
PE
10438 * tests/glr-regression.at (Duplicated user destructor for lookahead):
10439 Mark it as expected to fail.
10440 Cast result of malloc; problem reported by twlevo@xs4all.nl.
10441 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
10442 Don't start user-code symbols with "yy", to avoid name space problems.
10443
f479c6c6
AD
104442005-09-19 Akim Demaille <akim@epita.fr>
10445
10446 Remove the traits, failed experiment.
10447 It never proved useful, and anyway because of the current
10448 definition, it was not possible to have several specialization of
10449 this traits, making it useless.
10450 * data/lalr1.cc (yy:traits): Remove.
10451 Inline its definitions in the parser class.
10452
e2586f82
AD
104532005-09-19 Akim Demaille <akim@epita.fr>
10454
10455 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
10456 least Mac OSX with a /usr/local install of gettext.
10457
2e8cf949
AD
104582005-09-19 Akim Demaille <akim@epita.fr>
10459
10460 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
10461 and yytoken for similarity with the other skeletons.
10462
c7fb0b90
AD
104632005-09-19 Akim Demaille <akim@epita.fr>
10464
4e26c69e 10465 * NEWS, configure.ac: update version number to 2.1a.
c7fb0b90 10466
1bd0deda
PE
104672005-09-16 Paul Eggert <eggert@cs.ucla.edu>
10468
10469 * NEWS: Version 2.1.
10470
10471 * NEWS: Remove notice of yytname change, since it was never in an
10472 official release.
10473 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
10474 diagnostic.
10475 * src/output.c (prepare): Likewise.
10476 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
10477 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
10478 is not defined. This is an awful hack, but it's enough for now.
10479 All callers changed.
10480 * tests/glr-regression-at (make_value): Args are const pointers now,
10481 to avoid GCC warning.
10482 (Duplicated user destructor for lookahead): New test. Currently
10483 skipped. It fails on my host but I'm not sure it'll always fail.
10484
104852005-09-16 Akim Demaille <akim@epita.fr>
c1432f65
AD
10486
10487 * src/symtab.h (struct symbol): Declare the printer and destructor
10488 as const, to avoid accidental calls to free.
10489 (symbol_destructor_set, symbol_printer_set): Adjust.
10490 * src/symtab.c: Adjust.
10491
1bd0deda 104922005-09-16 Akim Demaille <akim@epita.fr>
cf147260
AD
10493
10494 * data/c.m4 (b4_token_enums): New.
10495 (b4_token_defines): Rename as...
10496 (b4_token_enums_defines): this.
10497 (b4_token_defines): New, output only the #defines.
10498 * data/yacc.c, data/glr.c: Adjust.
10499 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
10500 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
10501 as default values.
10502
dbcdae2d
AD
105032005-09-16 Akim Demaille <akim@epita.fr>
10504
10505 * data/lalr1.cc (yylex_): Remove, inline its code.
10506 (yyreport_syntax_error_): Remove, replaced by...
10507 (yysyntax_error_): this which returns a string and leaves to the
10508 caller the call to the users' error function.
10509 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
10510 Move from members of the parser object...
10511 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
10512 to local variables of the parse function.
10513
70d8f291
AD
105142005-09-16 Akim Demaille <akim@epita.fr>
10515
10516 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
10517 since it's in Bison's name space.
10518
b47dbebe
PE
105192005-09-15 Paul Eggert <eggert@cs.ucla.edu>
10520
ae199bf1
PE
10521 * data/glr.c (yyresolveValue): Add default case to pacify
10522 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
10523
b47dbebe
PE
10524 * NEWS: Document when yyparse started to return 2.
10525 * doc/bison.texinfo (Parser Function): Document when yyparse
10526 returns 2.
10527
10528 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
10529 (b4_filename_type): Renamed back from b4_file_name_type. All uses
10530 changed.
10531 (class position): file_name -> filename (reverting). All uses changed.
10532
105332005-09-14 Paul Eggert <eggert@cs.ucla.edu>
10534
10535 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
10536 do anything if $@ exists. This reverts part of the 2005-07-07
10537 patch.
10538
00292f66
PE
105392005-09-11 Paul Eggert <eggert@cs.ucla.edu>
10540
10541 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
10542 contains obsolete information and isn't worth distributing as a
10543 separate file anyway.
10544 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
10545 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
10546 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
10547 (yyparse): Abort if user code uses longjmp to throw an unexpected
10548 value.
10549
a420f962
PE
105502005-09-09 Paul Eggert <eggert@cs.ucla.edu>
10551
00292f66
PE
10552 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
10553 Suggested by twlevo@xs4all.nl.
10554
127287e9
PE
10555 * data/glr.c (YYCHK1): Do not assume YYE is in range.
10556 This avoids a diagnostic from gcc -Wswitch-enum.
10557 Problem reported by twlevo@xs4all.nl.
10558
a420f962
PE
10559 * doc/bison.texinfo: Don't use "filename", as per GNU coding
10560 standards. Use "file name" or "file" or "name", depending on
10561 the context.
10562 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
10563 not to hack/foo.tab.c.
10564 (Calc++ Top Level): 2nd arg of main is not const.
48b16bbc
PE
10565 * data/glr.c: b4_filename -> b4_file_name.
10566 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
10567 All uses changed.
10568 (class position): filename -> file_name. All uses changed.
10569 * data/yacc.c: b4_filename -> b4_file_name.
10570 * lib/bitset.h: filename -> file_name in local vars.
10571 * lib/bitset_stats.c: Likewise.
10572 * src/files.c: Likewise.
10573 * src/scan-skel.l ("@output ".*\n): Likewise.
10574 * src/files.c (file_name_split): Renamed from filename_split.
10575 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
a420f962
PE
10576
105772005-09-08 Paul Eggert <eggert@cs.ucla.edu>
10578
10579 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
10580 to accommodate latest gnulib.
10581
10582 * tests/glr-regression.at (Duplicate representation of merged trees):
10583 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
10584
10585 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
10586 needed.
10587
42a6501d
PE
105882005-08-26 Paul Eggert <eggert@cs.ucla.edu>
10589
10590 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
10591 All uses changed. Invoke user destructor after an error during a
10592 split parse (trivial change from Joel E. Denny).
10593
10594 * tests/glr-regression.at
10595 (User destructor after an error during a split parse): New test case.
10596 Problem reported by Joel E. Denny in:
10597 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
10598
ef9a1faf
PE
105992005-08-25 Paul Eggert <eggert@cs.ucla.edu>
10600
5b4aaf78
PE
10601 * README-cvs: Give URLs for recommended tools.
10602 Mention Gzip version problem, and bootstrapping issues.
10603 Remove troubleshooting section, as it's somewhat obsolete.
10604
b5240ba5
PE
10605 * bootstrap (no_cache): New var, to accommodate different wget
10606 variants. Use it instead of '-C off'. Problem reported by
10607 twlevo@xs4all.nl.
10608
ef9a1faf
PE
10609 * data/glr.c (yydestroyStackItem): New function.
10610 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
10611 debugging information. Problem reported by Joel E. Denny.
10612
e6efa9da
AD
106132005-08-25 Akim Demaille <akim@epita.fr>
10614
10615 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
10616
adc90f13
PE
106172005-08-24 Paul Eggert <eggert@cs.ucla.edu>
10618
10619 * data/glr.c (yyrecoverSyntaxError, yyreturn):
10620 Don't invoke destructor on unresolved entries.
10621 * tests/glr-regression.at
10622 (User destructor for unresolved GLR semantic value): New test case.
10623 Problem reported by Joel E. Denny in:
10624 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
10625
f9315de5
PE
106262005-08-21 Paul Eggert <eggert@cs.ucla.edu>
10627
15d29c1f
PE
10628 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
10629 Add strnlen.c.
10630 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
10631 lib-prefix.m4, po.m4.
10632
dd5f2af2
PE
10633 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
10634 in yydestruct diagnostic, since it might not be an error.
10635 Problem reported by Joel Denny near end of
10636 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
6250acbd 10637 * data/lalr1.cc (yyerturn): Likewise.
dd5f2af2
PE
10638 * data/yacc.c (yyreturn): Likewise.
10639 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
10640
10641 * src/files.c: Remove obsolete FIXME comment.
10642
10643 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
10644 with the other templates, and to fix bogus run-on messages such
10645 as the one reported at the end of
10646 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
10647 All callers changed to avoid the newline.
10648 (yyprocessOneStack): Output two lines rather than one, to accommodate
10649 the above change. This changes the debug output format slightly.
10650
f9315de5
PE
10651 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
10652 reported by Joel E. Denny in
10653 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
10654 (trivial change).
10655 * tests/glr-regression.at (Duplicate representation of merged trees):
10656 New test, from Joel E. Denny in:
10657 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
10658 * THANKS: Add Joel E. Denny.
10659
10660 * configure.ac (AC_INIT): Bump to 2.0c.
10661
04098407
PE
106622005-07-24 Paul Eggert <eggert@cs.ucla.edu>
10663
10664 * NEWS: Version 2.0b.
10665
ca5d2013
PE
10666 * Makefile.am (SUBDIRS): Put examples before tests, so that
10667 "make check" doesn't finish with "All 1 tests passed".
10668
3d54b576
PE
10669 * tests/regression.at (Token definitions): Don't rely on
10670 AT_PARSER_CHECK for data that contains backslashes. It currently
10671 uses 'echo', and 'echo' isn't portable if its argument contains
10672 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
10673 that the byte '\0xff' is not printable in the C locale; it is,
10674 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
10675 not printable, so use '\0x81' to test.
10676
d53ae497
PE
10677 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
10678 version of GCC, since the macro is used with non-GCC compilers.
10679
fc01665e
PE
10680 Fix core dump reported by Pablo De Napoli in
10681 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
10682 * tests/regression.at (Invalid inputs with {}): New test.
10683 * src/parse-gram.y (token_name): Translate type before using
10684 it as an index.
10685
04098407
PE
10686 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
10687 the user's name space. All uses changed to __attribute__
10688 ((__unused__)).
10689 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
10690 Add __attribute__ ((__noreturn__)).
10691
10692 * etc/clcommit: Remove. We weren't using it, and it failed
10693 "make maintainer-distcheck".
10694 * Makefile.maint: Merge from coreutils.
10695 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
10696 (syntax-check-rules): Change list of rules as described below.
10697 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
10698 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
10699 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
10700 (sc_trailing_space): New rules.
10701 (sc_xalloc_h_in_src): Remove.
10702 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
10703 (sc_space_tab, sc_error_exit_success, sc_changelog):
10704 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
10705 (makefile-check, po-check, author_mark_check):
10706 (makefile_path_separator_check, copyright-check):
10707 Use grep -n, to make it easier to find violations.
10708 Use CVS_LIST and CVS_LIST_EXCEPT.
10709 (header_regexp, h_re): Remove.
10710 (dd_c): New macro.
10711 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
10712 (my-distcheck): Use more-modern GCC flags.
10713 (signatures, %.asc): Remove.
10714 (rel-files, announcement): Remove signatures.
10715 Restore old updating code, even though we don't use it, so
10716 that we're the same as coreutils.
10717 (alpha, beta, major): Depend on news-date-check.
10718 Make the upload commands.
10719
10720 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
10721 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
10722 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
10723 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
10724 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
10725 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
10726 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
10727 * tests/sets.at: Likewise.
10728
10729 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
10730 we comment out the Autoconf version number.
10731 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
10732 it's error-prone and "make maintainer-distcheck" rejects it.
10733
10734 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
10735 Indent calls to "error" to pacify "make maintainer-distcheck",
10736 when the calls are not intended to be translated.
10737 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
10738
10739 * src/Makefile.am (DEFS): Use +=, to pacify
10740 "make maintainer-distcheck".
10741 (bison_SOURCES): Add scan-skel.h.
10742 (sc_tight_scope): New rule, from coreutils.
10743
10744 * src/files.c (src_extension, header_extension):
10745 Now static, not extern.
10746 * src/getargs.c (short_options): Likewise.
10747 * src/muscle_tab.c (muscle_table): Likewise.
10748 * src/parse-gram.y (current_class, current_type, current_prec):
10749 Likewise.
10750 * src/reader.c (grammar_end, previous_rule_end): Likewise.
10751 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
10752 * src/main.c (main): Cast bindtextdomain and textdomain calls to
10753 void, to avoid warning when NLS is disabled.
10754 * src/output.c: Include scan-skel.h.
10755 (scan_skel): Remove decl, since scan-skel.h does this.
10756 (output_skeleton):
10757 Indent calls to "error" to pacify "make maintainer-distcheck".
10758 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
10759 * src/reader.h (gram_end, gram_lineno): New decls to pacify
10760 "make maintainer-distcheck".
10761 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
10762 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
10763 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
10764 (skel_lex_destroy, scan_skel): Move these decls to...
10765 * src/scan-skel.h: New file.
10766 * src/uniqstr.c (uniqstr_assert):
10767 Indent calls to "error" to pacify "make maintainer-distcheck".
10768
10769 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
10770 not @VAR@.
10771
10772 * tests/torture.at: Revamp to avoid misuse of atoi that
10773 "make maintainer-distcheck" complained about.
10774
10775 * examples/extexi (message): Don't print a message more than once,
10776 and omit line-number decoration that makes Emacs compile think
10777 that informative messages are worth worrying about.
10778
107792005-07-22 Paul Eggert <eggert@cs.ucla.edu>
10780
10781 * configure.ac: Update version number.
10782
10783 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
10784 accidentally.
10785 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
10786 autogenerated by the maintainer.
10787 * examples/calc++/.cvsignore: Add *.yy.
10788
10789 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
10790 * lib/bitset_stats.c (bitset_stats_init): Likewise.
10791 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10792
10793 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
10794
10795 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
10796 from maintainer-distcheck about casting the argument of 'free'.
10797
10798 * NEWS: Mention recent yytname changes.
10799 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
10800
10801 * bootstrap: For translations that have not yet been upgraded to
10802 the new runtime-po domain, prime the pump by extracting the
10803 relevant strings from the obsolete translations. This code can be
10804 removed once the bison-runtime domain has been translated by each
10805 team.
10806
10807 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
10808 now that token names are already quoted.
10809
10810 Fix problem reported by Anthony Heading.
10811 * data/glr.c (YYTOKEN_TABLE): New macro.
10812 (yytname): Define if YYTOKEN_TABLE.
10813 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
10814 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
10815 (YYERROR_VERBOSE): Define the same way the other skeletons do.
10816 * src/output.c (prepare_symbols): Output token_table_flag.
10817
0ffda363
PE
108182005-07-21 Paul Eggert <eggert@cs.ucla.edu>
10819
10820 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
10821 again if the first call fails.
10822
10823 * data/glr.c (yytnamerr): New function.
10824 (yyreportSyntaxError): Use it to dequote most string literals.
10825 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
10826 with other skeletons. All uses changed.
10827 (yytnameerr_): New function.
10828 (yyreport_syntax_error): Use it to dequote most string literals.
10829 * data/yacc.c (yytnamerr): New function.
10830 (yyerrlab): Use it to decode most string literals.
10831 * doc/bison.texinfo (Decl Summary, Calling Convention):
10832 Clarify quoting convention of yytname.
10833 * src/output.c (prepare_symbols): Quote all names. This undoes
10834 the 2005-04-17 change, which is now accomplished (mostly) via
10835 changes in the parsers as described above.
10836 * tests/regression.at (Token definitions, Web2c Actions):
10837 Undo most 2005-04-17 change here, too.
10838
108392005-07-20 Paul Eggert <eggert@cs.ucla.edu>
10840
10841 Fix more problems reported by twlevo@xs4all.nl.
10842 * tests/cxx-type.at: Don't pipe output of ./types through sed to
10843 remove trailing spaces. This loses the exit status of ./types,
10844 and isn't needed since ./types shouldn't be emitting trailing
10845 spaces.
10846 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
10847 as the stack isn't valid in that case.
10848
10849 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
10850 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
10851 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
10852 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
10853 is used.
10854 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
10855 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
10856 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
10857 Likewise.
10858
10859 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
10860 overly-picky compilers that reject 'char *foo = "bar";'.
10861
10862 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
10863 to FILE * parameter, not to stderr. This fixes a typo introduced
10864 in the 2005-07-12 change.
10865
10866 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
10867 warnings from GCC 4.
10868
10869 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
10870 (yyglrShiftDefer, yysplitStack):
10871 Remove unused parameters b4_pure_formals. All uses changed.
10872 (yyglrShift): Remove unused parameters b4_user_formals.
10873 All uses changed.
10874 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
10875
6100a9aa
PE
108762005-07-18 Paul Eggert <eggert@cs.ucla.edu>
10877
258b75ca
PE
10878 Destructor cleanups and regularization among the three skeletons.
10879 * NEWS: Document the behavior changes.
10880 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
10881 stack before failing, as the cleanup code will do it for us now.
10882 * data/lalr1.cc (yyerrlab): Likewise.
10883 * data/glr.c (yyparse): Pop everything off the stack before
10884 freeing it, so that destructors get called properly.
10885 * data/lalr1.cc (yyreturn): Likewise.
10886 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
10887 This is more consistent.
10888 * doc/bison.texinfo (Destructor Decl): Mention more reasons
10889 why destructors might be called. 1.875 -> 2.1.
10890 (Destructor Decl, Decl Summary, Table of Symbols):
10891 Some English-language cleanups for %destructor.
10892 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
10893 Add output line for destructor of start symbol.
10894 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
10895 because of that same extra output line.
10896
1a059451
PE
10897 * NEWS: Document minor wording changes in diagnostics of
10898 Bison-generated parsers.
10899 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
10900 Remove unused formals. All uses changed.
10901 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
10902 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
10903 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
10904 Rename yyoverflowab to yyexhaustedlab.
10905 When memory exhaustion occurs during syntax-error reporting,
10906 report it separately rather than in a single diagnostic; this
10907 eases translation.
10908 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
10909 (Memory Exhausted): Renamed from Parser Stack Overflow.
10910 Revamp wording slightly to prefer "memory exhaustion".
10911 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
10912
97460c78
PE
10913 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
10914
30757c8c
PE
10915 Add i18n support to the GLR skeleton. Partially fix the C++
10916 skeleton; a C++ expert needs to finish this. Remove debugging
10917 msgids; there's little point to having them translated, since they
10918 can be understood only by someone who can read the
10919 (English-language) source code.
10920
10921 Generate runtime-po/bison-runtime.pot automatically, so that we
10922 don't have to worry about garbage getting in that file. We'll
10923 make sure after the next official release that old msgids don't
10924 get lost. See
10925 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
10926
10927 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
10928 Now auto-generated.
10929 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
10930 Fix typos in explanations of the runtime file.
10931 * bootstrap: Change gettext keyword from YYI18N to YY_.
10932 Use standard Makefile.in.in in runtime-po, since we'll arrange
10933 for backward-compatible bison-runtime.po files in a different way.
10934 * data/glr.c (YY_): New macro, from yacc.c.
10935 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
10936 Translate messages intended for users.
10937 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
10938 the wording in the other skeletons. We don't know that the memory
10939 is virtual.
10940 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
10941 Use same method that yacc.c uses.
10942 Don't translate debugging messages.
10943 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
10944 it doesn't work (yet), and requires C++ expertise to fix.
10945 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
10946 Move defn to a more logical place, to be consistent with other
10947 skeletons.
10948 Don't translate debugging messages.
10949 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
10950 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
10951 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
10952 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
10953
ac8c5689
PE
10954 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
10955 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
10956 void, not int.
10957 * tests/glr-regression.at (Badly Collapsed GLR States):
10958 Likewise.
10959 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
10960 yylex should return 0 at EOF rather than aborting.
10961
6100a9aa
PE
10962 Improve tests for stack overflow in GLR parser.
10963 Problem reported by twlevo@xs4all.nl.
10964 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
10965 All uses removed.
10966 (yyStackOverflow): Just longjmp, but with value 2 so that caller
10967 can handle the problem.
10968 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
10969 (yyparse): New local variable yyresult to record the result.
10970 Use result of setjmp to set it, rather than storing itinto
10971 struct.
10972 (yyDone): Remove label.
10973 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
10974 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
10975 if YYABORT is used).
10976 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
10977 yyparse status; put status > 1 into diagnostic.
10978 Check that status==2 works.
10979 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
10980 Use exit status 3 for failure to open (which shouldn't happen).
10981
15f40952
PE
109822005-07-17 Paul Eggert <eggert@cs.ucla.edu>
10983
67fd79c4
PE
10984 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
10985 1 on syntax error; just let yyparse do its thing.
10986 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
10987 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
10988 (Exploding the Stack Size with Alloca):
10989 (Exploding the Stack Size with Malloc):
10990 Expect exit status 2, not 1, since the parser is supposed to blow
10991 its stack. Problem reported by twlevo@xs4all.nl.
10992
15f40952
PE
10993 * data/glr.c (yyparse): Don't assume that the initial calls
10994 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
10995 Print a stack-overflow message and fail instead.
10996 Initialize the line-number information before creating the stack,
10997 so that the stack-overflow message can report line zero safely.
10998
f32c66b5
PE
109992005-07-14 Paul Eggert <eggert@cs.ucla.edu>
11000
a22ff96f 11001 Fix problems reported by twlevo@xs4all.nl.
e2688cd9
PE
11002 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
11003 (yyuserMerge): Provide a default case if b4_mergers is empty.
11004 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
11005 * tests/glr-regression.at
11006 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
c70fdfcd 11007 Add casts to pacify C++ compilers.
1beb0b24
PE
11008 * tests/glr-regression.at (Improper merging of GLR delayed action
11009 sets): Declare yylex before using it.
f32c66b5 11010 * tests/Makefile.am (maintainer-check-g++): Fix a stray
a22ff96f
PE
11011 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
11012 test for valgrind; valgrind is independent of g++.
11013 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
11014 for compatibility with POSIX 1003.1-2001 (if running coreutils).
11015 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
11016 Use a destructor, so that we can expand the stack. Change
11017 YYSTYPE to char * so that we can free it. Cast result of malloc.
f32c66b5 11018
d741bd1b
PE
110192005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11020
11021 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
11022 a valgrind failure. Problem reported by twlevo@xs4all.nl.
11023
0410a6e0
PE
110242005-07-13 Paul Eggert <eggert@cs.ucla.edu>
11025
11026 * PACKAGING: New file, suggested by Bruno Haible and taken from
11027 similar wording in gettext's PACKAGING file.
11028 * NEWS: Mention PACKAGING.
11029 * Makefile.am (EXTRA_DIST): Add PACKAGING.
11030
f7ab6a50
PE
110312005-07-12 Paul Eggert <eggert@cs.ucla.edu>
11032
baf785db 11033 * NEWS: Document recent i18n improvements.
f7ab6a50
PE
11034 * bootstrap: Get runtime translations into runtime-po.
11035 Create runtime-po files automatically, if possible.
11036 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
11037 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
11038 does not infringe on the user's name space.
11039 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
11040 * doc/bison.texinfo (Internationalization): Revamp the English
11041 and Texinfo syntax a bit, to try to make it clearer.
11042 (Bison Options, Option Cross Key): Mention --print-localedir.
11043 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
11044 YYENABLE_NLS. Quote a bit more.
11045 * runtime-po/.cvsignore: New file.
11046 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
11047 * runtime-po/Rules-quot: Remove; now created by bootstrap.
11048 * runtime-po/quot.sed: Likewise.
11049 * runtime-po/boldquot.sed: Likewise.
11050 * runtime-po/en@quot.header: Likewise.
11051 * runtime-po/en@boldquot.header: Likewise.
11052 * runtime-po/insert-header.sin: Likewise.
11053 * runtime-po/remove-potcdate.sin: Likewise.
11054 * runtime-po/Makevars: Likewise.
11055 * runtime-po/LINGUAS: Likewise.
11056 * runtime-po/de.po: Likewise; we will rely on the translation project
11057 to maintain this, so "bootstrap" should get it.
0410a6e0 11058 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
f7ab6a50
PE
11059 its value.
11060 * src/main.c (main): Bind the bison-runtime domain, too.
11061
110622005-07-12 Bruno Haible <bruno@clisp.org>
11063
11064 * data/yacc.c: Include <libintl.h> when NLS is enabled.
11065 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
11066 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
11067 * runtime-po: New directory.
11068 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
11069 $(DOMAIN).pot-update rule, so that old messages are never dropped.
11070 * runtime-po/Rules-quot: New file, copied from po/.
11071 * runtime-po/quot.sed: Likewise.
11072 * runtime-po/boldquot.sed: Likewise.
11073 * runtime-po/en@quot.header: Likewise.
11074 * runtime-po/en@boldquot.header: Likewise.
11075 * runtime-po/insert-header.sin: Likewise.
11076 * runtime-po/remove-potcdate.sin: Likewise.
11077 * runtime-po/Makevars: New file.
11078 * runtime-po/POTFILES.in: New file.
11079 * runtime-po/LINGUAS: New file.
11080 * runtime-po/bison-runtime.pot: New file.
11081 * runtime-po/de.po: New file.
11082 * m4/bison.m4: New file.
11083 * Makefile.am (SUBDIRS): Add runtime-po.
11084 (aclocaldir, aclocal_DATA): New variables.
11085 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
11086 Define aclocaldir.
11087 * src/getargs.c (usage): Document --print-localedir option.
11088 (PRINT_LOCALEDIR_OPTION): New enum item.
11089 (long_options): Add --print-localedir option.
11090 (getargs): Handle --print-localedir option.
11091 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
11092 (Internationalization): New section.
11093
22dda0f0
AD
110942005-07-12 Akim Demaille <akim@epita.fr>
11095
11096 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
11097 for consistency with the rest of the code.
11098 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
11099 Add separators.
11100
82b248ad
AD
111012005-07-12 Akim Demaille <akim@epita.fr>
11102
11103 * src/parse-gram.y: Use %printer instead of YYPRINT.
11104
fa0e9314
AD
111052005-07-12 Akim Demaille <akim@epita.fr>
11106
867a3e00
AD
11107 * src/symtab.h, src/symtab.c (symbol_print): New.
11108 * src/symlist.h, src/symlist.c (symbol_list_print): New.
11109 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
11110
111112005-07-12 Akim Demaille <akim@epita.fr>
11112
11113 * data/glr.c (b4_syncline): Fix (swap) the definitions of
fa0e9314
AD
11114 b4_at_dollar and b4_dollar_dollar.
11115
e054b190
PE
111162005-07-11 Paul Eggert <eggert@cs.ucla.edu>
11117
11118 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
11119 and Pennello's paper.
11120
34160ec4
PE
111212005-07-09 Paul Eggert <eggert@cs.ucla.edu>
11122
407d4a75
PE
11123 * data/yacc.c (yyparse): Undo previous patch. Instead,
11124 set yylsp[0] and yyvsp[0] only if the initial action
11125 sets yylloc and yylval, respectively.
11126
34160ec4
PE
11127 * data/yacc.c (yyparse): In the initial action, set
11128 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
11129 This avoids the use of undefined variables if the initial
11130 action does not set yylloc and/or yylval.
11131
c3d5a4a7
PE
111322005-07-07 Paul Eggert <eggert@cs.ucla.edu>
11133
b34d96c1
PE
11134 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
11135 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
11136 Remove from CVS. These files are automatically generated.
11137 * examples/extexi: Clarify that this file is now part of Bison,
11138 not GNU M4, and that it works with any POSIX-compatible Awk.
11139 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
11140 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
11141 so that we also get calc++-parser.yy. Geneate it.
11142 Use $(AWK), not gawk, since any conforming Awk will do.
11143 Put comment before action, since older 'make' can't handle comment
11144 in action.
11145 $(BUILT_SOURCES): List all built sources, not just some of them.
11146 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
11147 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
11148 $($(calc_sources_generated)): Remove unnecessary test for existence
11149 of target. (This had a shell syntax error anyway; a stray "x".)
11150 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
11151 calc++-parser.yy.
11152 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
11153
c3d5a4a7
PE
11154 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
11155 implied by the other modules.
11156
828c373b
AD
111572005-07-06 Akim Demaille <akim@epita.fr>
11158
11159 Bind examples/calc++ to the package.
11160 * examples/calc++/Makefile: Remove, replaced by...
11161 * examples/calc++/Makefile.am: ... this new file.
11162 * examples/calc++/test: Remove input.
11163 * examples/calc++/compile: Remove.
11164 * examples/Makefile.am: New.
11165 * configure.ac, Makefile.am: Adjust.
11166 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
11167
63cb01d6
PE
111682005-07-05 Paul Eggert <eggert@cs.ucla.edu>
11169
fd2df2ed
PE
11170 * data/glr.c (yyFail): Drastically simplify; since the format argument
11171 never had any % directives, we can simply pass it to yyerror.
11172 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
11173 be modified later, as that is the usual style in glr.c.
11174 Problems reported by Paul Hilfinger.
11175
63cb01d6
PE
11176 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
11177 and size overflow errors.
11178 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
11179 in case the user prolog sets feature-test macros like _GNU_SOURCE.
11180 (YYSIZEMAX): New macro.
11181 (yystpcpy): New function, taken from yacc.c.
11182 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
11183 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
11184 so that we don't have to maintain their signatures.
11185 (yyFail): Check for buffer overflow, by using vsnprintf rather
11186 than vsprintf. Allocate a bigger buffer if possible.
11187 Report an error if buffer allocation fails.
11188 (yyStackOverflow): New function.
11189 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
11190 the initialization was successful. It might fail if storage was
11191 exhausted.
11192 (yyexpandGLRStack): Add more checks for storage allocation failure.
11193 Use yyStackOverflow to report failures.
11194 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
11195 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
11196 Don't assume stack number fits in int.
11197 (yysplitStack): Check for storage allocation failure.
11198 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
11199 can print diagnostics on storage allocation failure. All callers
11200 changed.
11201 (yyresolveValue): Use yybool for boolean.
11202 (yyreportSyntaxError): Check for size-calculation overflow.
11203 This code is taken from yacc.c.
11204 (yyparse): Check for storage allocation errors when allocating
11205 the initial stack.
11206
1c59e0a1
AD
112072005-07-05 Akim Demaille <akim@epita.fr>
11208
11209 Extract calc++ from the documentation.
11210 * doc/bison.texinfo (Calc++): Add the extraction marks.
11211 * examples/extexi: New, from the aborted GNU Programming 2E.
11212 Separate the different paragraph of a file with empty lines.
11213 * examples/Makefile: Use it to extract the whole calc++ example.
11214
8a0adb01
AD
112152005-06-24 Akim Demaille <akim@epita.fr>
11216
11217 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
11218 class typedefs.
11219
12545799
AD
112202005-06-22 Akim Demaille <akim@epita.fr>
11221
11222 * doc/bison.texinfo (C++ Language Interface): First stab.
11223 (C++ Parsers): Remove.
11224
99be0235
AD
112252005-06-22 Akim Demaille <akim@epita.fr>
11226
11227 * data/lalr1.cc (yylex_): Honor %lex-param.
11228
0ffd4fd1
AD
112292005-06-22 Akim Demaille <akim@epita.fr>
11230
11231 Start a set of simple examples.
11232 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
11233 * examples/calc++/calc++-driver.hh,
11234 * examples/calc++/calc++-parser.yy,
11235 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
11236 * examples/calc++/compile, examples/calc++/test: New.
11237
0925ebb4
PE
112382005-06-09 Paul Eggert <eggert@cs.ucla.edu>
11239
11240 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
11241 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
11242 which stems from the 2005-05-27 patch.
11243
43d3b664
PH
112442005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
11245
11246 * data/glr.c: Modify treatment of unused parameters to permit use
11247 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
11248
3062864d
PE
112492005-05-30 Paul Eggert <eggert@cs.ucla.edu>
11250
11251 Fix infringement on user name space reported by Janos Zoltan Szabo.
11252 * data/yacc.c (yyparse): strlen -> yystrlen.
11253
989b5b8e
AD
112542005-05-30 Akim Demaille <akim@epita.fr>
11255
11256 * data/lalr1.cc (_): New.
11257 Translate the various messages.
11258
bedf57f5
PE
112592005-05-27 Paul Eggert <eggert@cs.ucla.edu>
11260
11261 Fix infringement on user name space reported by Bruno Haible.
11262 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
11263 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
11264 the user's name space.
11265 (alloca): Include <stdlib.h> to get it, if it's not built in.
11266 (YYMALLOC, YYFREE): Define only if needed.
11267 (malloc, free): Declare, but only if needed, as this infringes on
11268 the user name space.
11269
4d1801f1
PE
112702005-05-25 Paul Eggert <eggert@cs.ucla.edu>
11271
11272 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
11273 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
11274 with %d format.
11275 * lib/ebitset.c (min, max): Undef before defining.
11276 * lib/vbitset.c (min, max): Likewise.
11277 * lib/subpipe.c (create_subpipe): Save local variables in case
11278 vfork clobbers them.
11279
112802005-05-24 Bruno Haible <bruno@clisp.org>
11281
11282 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
11283 error message syntax used by gcc-4.0.
11284
b94a9e1e
PE
112852005-05-23 Paul Eggert <eggert@cs.ucla.edu>
11286
85ac3861
PE
11287 * README: Mention m4 1.4.3. Remove obsolete advice about
11288 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
11289
b94a9e1e
PE
11290 * bootstrap: Remove workaround for problem I encountered with
11291 gettext 0.14.1; it seems to be fixed now.
11292
51c30d21
PE
112932005-05-22 Paul Eggert <eggert@cs.ucla.edu>
11294
009ce67d
PE
11295 * NEWS: Version 2.0a.
11296
f2a97c62
PE
11297 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
11298 the previous change.
11299
c8775f93
PE
11300 Various maintainer cleanups.
11301 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
11302 conftest*, for benefit of CVS commands run at the same time as
11303 "configure". Add build-aux, since "bootstrap" now creates it and
11304 its subfiles.
11305 * Makefile.cfg (move_if_change): Remove.
11306 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
11307 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
11308 (po_repo, do-po-update, po-update, wget_files, get-targets):
11309 (config.guess-url_prefix, config.sub-url_prefix):
11310 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
11311 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
11312 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
11313 Remove.
11314 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
11315 this is now the recommended name.
11316 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
11317 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
11318 ylwrap. These files now go into build-aux.
11319 * config/move-if-change: Remove.
11320 * config/prev-version.txt: Bump from 1.75 to 2.0.
11321
3ea5f0ec
PE
11322 * bootstrap: Add stdio-safer, unistd-safer modules.
11323 Remove m4/glibc2.m4 (introduced by latest gnulib, but
11324 we don't need it).
11325 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
11326 fopen-safer.c, stdio-safer.h, unistd-safer.h.
11327 * lib/subpipe.c: Include "unistd-safer.h".
11328 (create_subpipe): Make sure all the newly-created
11329 file descriptors are > 2, so that diagnostics don't
11330 get sent down them (which might cause Bison to hang, in theory).
11331 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
11332 * src/files.c (xfopen): Use fopen_safer, not fopen.
11333
51c30d21
PE
11334 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
11335 yesterday's yacc.c fix.
11336
cea1469d
PE
113372005-05-21 Paul Eggert <eggert@cs.ucla.edu>
11338
3ea5f0ec
PE
11339 * data/glr.c, data/lalr1.cc: Update copyright date.
11340
cea1469d
PE
11341 Fix a destructor bug reported by Wolfgang Spraul in
11342 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
11343 * data/yacc.c (yyabortlab): Don't call destructor, and
11344 don't set yychar to EMPTY.
11345 (yyoverflowlab): Don't call destructor.
11346 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
11347 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
11348 since we no longer output the message "discarding lookahead token
11349 end of input ()".
11350
5e6f62f2
PH
113512005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
11352
11353 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
11354 fix a small glitch in debugging output.
11355 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
11356 after YY_SYMBOL_PRINT where needed.
11357
11358 (struct yyGLRState): Add some comments.
11359 (struct yySemanticOption): Add some comments.
11360 (union yyGLRStackItem): Add comment.
11361
11362 (yymergeOptionSets): Correct this to properly perform the union,
11363 avoiding infinite reported by Michael Rosien.
11364 Update comment.
11365
11366 * tests/glr-regression.at: Add test for GLR merging error reported
11367 by M. Rosien.
cea1469d 11368
0fb669f9
PE
113692005-05-13 Paul Eggert <eggert@cs.ucla.edu>
11370
11371 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
11372 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
11373 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
11374 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
11375 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
11376 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
11377 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
11378 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
11379 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
11380 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
11381 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
11382 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
11383 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
11384 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
11385 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
11386 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
11387 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
11388 src/derives.h, src/files.c, src/files.h, src/getargs.c,
11389 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
11390 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
11391 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
11392 src/output.h, src/parse-gram.c, src/parse-gram.h,
11393 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
11394 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
11395 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
11396 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
11397 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
11398 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
11399 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
11400 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
11401 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
11402 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
11403 tests/reduce.at, tests/regression.at, tests/sets.at,
11404 tests/synclines.at, tests/testsuite.at, tests/torture.at:
11405 Update FSF postal mail address.
11406
51f4735e
PE
114072005-05-11 Paul Eggert <eggert@cs.ucla.edu>
11408
11409 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
11410 Problem reported by Ralf Menzel.
11411
80ce3401
PE
114122005-05-01 Paul Eggert <eggert@cs.ucla.edu>
11413
11414 * tests/actions.at: Test that stack overflow invokes destructors.
11415 From Marcus Holland-Moritz.
11416 * data/yacc.c (yyerrlab): Move the code that destroys the stack
11417 from here....
11418 (yyreturn): to here. That way, destructors are called properly
11419 even if the stack overflows, or the user calls YYACCEPT or
11420 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
11421 (yyoverflowlab): Destroy the lookahead.
11422
114232005-04-24 Paul Eggert <eggert@cs.ucla.edu>
11424
11425 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
11426
72f000b0
PE
114272005-04-17 Paul Eggert <eggert@cs.ucla.edu>
11428
11429 * NEWS: Bison-generated C parsers no longer quote literal strings
11430 associated with tokens.
11431 * src/output.c (prepare_symbols): Don't escape strings,
11432 since users don't want to see C escapes.
11433 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
11434 in diagnostics.
c19683bb 11435 * tests/input.at (Torturing the Scanner): Likewise.
72f000b0
PE
11436 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
11437
1094323f
PE
114382005-04-16 Paul Eggert <eggert@cs.ucla.edu>
11439
11440 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
11441 the data size is known to be too small and we can't increase it.
11442 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
11443
ca407bdf
PE
114442005-04-15 Paul Eggert <eggert@cs.ucla.edu>
11445
11446 * src/parse-gram.y: Include quotearg.h.
11447 (string_as_id): Quote $1 before using it as a key, since the
11448 lexer no longer quotes it for us.
11449 (string_content): Don't strip quotes, since lexer no longer
11450 quotes it for us.
11451 * src/scan-gram.l: Include quotearg.h.
11452 ("\""): Omit quote.
11453 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
11454 a key, since the rest of the lexer doesn't quote it.
11455 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
11456 * tests/regression.at (Token definitions): Check for backslashes
11457 in token strings.
11458
11459 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
11460 (YYSIZE_T): Define to unsigned long int when using an older compiler.
11461 (yyparse): Revamp code to generate long syntax error message, to
11462 make it easier to translate, and to avoid problems with arithmetic
11463 overflow. Change "virtual memory" to "memory" in diagnostic, since
11464 we don't know whether the memory is virtual.
11465
1ce59070
PE
114662005-04-13 Paul Eggert <eggert@cs.ucla.edu>
11467
11468 * NEWS: Bison-generated C parsers now use the _ macro to
11469 translate strings.
11470 * data/yacc.c (_) [!defined _]: New macro.
11471 All English strings wrapped inside this macro.
11472 * doc/bison.texinfo (Bison Parser): Document _.
11473 * po/POTFILES.in: Include src/parse-gram.c, since it now
11474 includes translateable strings that parse-gram.y doesn't.
11475
a749a695
PE
114762005-04-12 Paul Eggert <eggert@cs.ucla.edu>
11477
11478 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
11479 reverting the 2004-10-11 change to this function.
11480 (symbol_check_alias_consistency): Don't call symbol_type_set
11481 if the type name is already correct.
11482 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
11483
8fb1053b
PE
114842005-03-25 Paul Eggert <eggert@cs.ucla.edu>
11485
11486 * tests/regression.at (Token definitions): Don't use a token named
11487 c, as that generates a "#define c ..." that runs afoul of buggy
11488 stdlib.h that uses the identifier c as a member of struct
11489 drand48_data. Problem reported by Horst Wente.
11490
ff498c4a
PE
114912005-03-21 Paul Eggert <eggert@cs.ucla.edu>
11492
11493 * bootstrap: Change translation URL from
11494 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
11495 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
11496 redirection glitches. Problem reported by twlevo@xs4all.nl.
11497
65211d70
PE
114982005-03-20 Paul Eggert <eggert@cs.ucla.edu>
11499
11500 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
11501 after operands; POSIX says this isn't portable for the c99 command.
11502
9577fb1f
PE
115032005-03-18 Paul Eggert <eggert@cs.ucla.edu>
11504
11505 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
11506 immediately if a data overrun has occurred; this may help us track
11507 down what may be a spurious failure on MacOS.
11508
78b178f7
PE
115092005-03-17 Paul Eggert <eggert@cs.ucla.edu>
11510
a2599d0f
PE
11511 Respond to problems reported by twlevo@xs4all.nl.
11512
11513 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
11514
78b178f7
PE
11515 * src/vcg.h: Comment fix.
11516 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
11517 (G_CMAX): Change to -1 instead of INT_MAX.
11518
11519 * data/yacc.c (yyparse): Omit spaces before #line.
78b178f7 11520
7296e729
PE
115212005-03-15 Paul Eggert <eggert@cs.ucla.edu>
11522
11523 * src/tables.c (state_number_to_vector_number): Put it inside an
11524 "#if 0", since it's not currently used. Problem reported by
11525 Roland McGrath.
11526
05ac60f3
PE
115272005-03-06 Paul Eggert <eggert@cs.ucla.edu>
11528
11529 * src/output.c (escaped_output): Renamed from
11530 escaped_file_name_output, since we now use it for symbol tags as
11531 well. All uses changed.
11532 (symbol_destructors_output, symbol_printers_output):
11533 Escape symbol tags too.
11534 Problem reported by Matyas Forstner in
11535 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
11536
11537 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
11538 not needed.
11539 * src/output.c (user_actions_output, token_definitions_output,
11540 symbol_destructors_output, symbol_printers_output): Likewise.
11541 * src/reader.c (prologue_augment): Likewise.
11542 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
11543
11544 * src/vcg.c (output_edge): Don't quote linestyle arg.
11545 Problem reported by twlevo@xs4all.nl.
11546
7eb453ac
PE
115472005-02-28 Paul Eggert <eggert@cs.ucla.edu>
11548
11549 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
11550 example, reported by Derek M Jones. Also, make the example even
11551 more outrageous, to better illustrate how bad the problem is.
11552
4c04c52a
PE
115532005-02-24 Paul Eggert <eggert@cs.ucla.edu>
11554
11555 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
11556 putsym. Typo reported by Sebastian Piping.
11557
a61e1620
PE
115582005-02-23 Paul Eggert <eggert@cs.ucla.edu>
11559
11560 * doc/bison.texinfo (Language and Grammar): some -> same
11561 (Epilogue): int he -> in the
11562 Typos reported by Sebastian Piping via Justin Pence.
11563
9ec93868
PE
115642005-02-07 Paul Eggert <eggert@cs.ucla.edu>
11565
11566 * tests/glr-regression.at (Improper handling of embedded actions
11567 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
11568 embedded actions and $-N in GLR parsers", work around an Autoconf bug
11569 with dollar signs in test names.
11570 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
11571 for a similar reason.
11572
73ce7e7e
PE
115732005-01-28 Paul Eggert <eggert@cs.ucla.edu>
11574
11575 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
11576 wants to redefine G_VIEW.
11577
2e72b98e
PE
115782005-01-27 Paul Eggert <eggert@cs.ucla.edu>
11579
11580 * src/vcg.c (get_view_str): Remove case for normal_view.
11581 Problem reported by twlevo@xs4all.nl.
11582
e0d634e5
PE
115832005-01-24 Paul Eggert <eggert@cs.ucla.edu>
11584
ccf830a4
PE
11585 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
11586 Problem reported by twlevo@xs4all.nl.
11587
e0d634e5
PE
11588 * doc/bison.texinfo: Change @dircategory from "GNU programming
11589 tools" to "Software development". Requested by Richard Stallman
11590 via Karl Berry.
11591
7bbc8cb0
PE
115922005-01-23 Paul Eggert <eggert@cs.ucla.edu>
11593
11594 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
11595 Problem reported by twlevo@xs4all.nl.
11596
08b770bc
PE
115972005-01-21 Paul Eggert <eggert@cs.ucla.edu>
11598
11599 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
11600 keyword; it's not needed with modern compilers, and it doesn't
11601 affect correctness with older compilers. Suggested by
11602 twlevo@xs4all.nl.
11603
95f22ad2
PE
116042005-01-17 Paul Eggert <eggert@cs.ucla.edu>
11605
11606 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
11607 gcc -Wswitch-default.
11608 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
11609 * data/yacc.c (yyparse): Likewise.
11610
d229d15c
PE
116112005-01-12 Paul Eggert <eggert@cs.ucla.edu>
11612
11613 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
11614 already. Let config.h define any nonstandard values.
11615
ecadd90f
PE
116162005-01-10 Paul Eggert <eggert@cs.ucla.edu>
11617
11618 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
11619 for the benefit of slower hosts. Problem reported by
11620 Nelson H. F. Beebe.
11621
213744b5
PE
116222005-01-07 Paul Eggert <eggert@cs.ucla.edu>
11623
11624 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
11625 being defined and not used.
11626 * data/lalr1.cc (yyparse): Likewise.
11627 Use "if (false)" rather than "if (0)".
11628
249d3236
PE
116292005-01-05 Paul Eggert <eggert@cs.ucla.edu>
11630
11631 * TODO: Mention that we should allow NUL bytes in tokens.
11632
987cc1fb
PE
116332005-01-02 Paul Eggert <eggert@cs.ucla.edu>
11634
11635 * src/scan-skel.l (<<EOF>>): Don't close standard output.
11636 Problem reported by Hans Aberg.
11637
08fe02d9
PE
116382005-01-01 Paul Eggert <eggert@cs.ucla.edu>
11639
11640 * src/getargs.c (version): Happy new year; update overall
11641 program copyright date from 2004 to 2005.
11642
11643 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
11644 Problem reported by Hans Aberg.
11645 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
11646 (Output file names.): Add a test for the case when standard output
11647 is closed.
11648
010c0266
PE
116492004-12-26 Paul Eggert <eggert@cs.ucla.edu>
11650
11651 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
11652 to fix an oversight in the Bison 2.0 manual.
11653
da12206a
PE
116542004-12-25 Paul Eggert <eggert@cs.ucla.edu>
11655
11656 * NEWS: Version 2.0. Reformat the existing news items since
11657 1.875, so that related items are grouped together.
3a4734aa 11658 * configure.ac (AC_INIT): Bump version to 2.0.
da12206a
PE
11659 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
11660
c935d934
PE
11661 * tests/torture.at (Exploding the Stack Size with Alloca): Set
11662 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
11663 otherwise, we're not testing alloca. Unfortunately there's no
11664 simple way to consult HAVE_ALLOCA here.
11665
da12206a
PE
11666 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
11667 for yymsg, too.
11668
11669 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
11670 hand. This avoids a warning about comparing int to size_t when
11671 GCC warnings are enabled.
11672
0a2c5137
PE
116732004-12-22 Paul Eggert <eggert@cs.ucla.edu>
11674
d7e14fc0
PE
11675 * NEWS: Bison-generated parsers no longer default to using the
11676 alloca function (when available) to extend the parser stack, due
11677 to widespread problems in unchecked stack-overflow detection.
11678 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
11679 responsibility to set it to a positive value. This lets the user
11680 specify a value that is not a preprocessor constant.
11681 * data/yacc.c (YYMAXDEPTH): Likewise.
11682 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
11683 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
11684 to be a compile-time constant. However, explain the constraints on it.
11685 Also, explain the constraints on YYINITDEPTH.
11686 (Table of Symbols): Explain that alloca is no longer the default.
11687 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
11688 to 1.
11689
0a2c5137
PE
11690 * doc/bison.texinfo (Location Default Action): Mention that n must
11691 be zero when k is zero. Suggested by Frank Heckenbach.
11692
e019c247
AD
116932004-12-22 Akim Demaille <akim@epita.fr>
11694
11695 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
11696 (parser::state_type, parser::semantic_type, parser::location_type):
11697 Private, not public.
11698 (parser::parse): Return ints, not bool.
11699 Returning a bool introduces a problem: 0 corresponds to false, and
11700 it seems weird to return false on success. Returning true changes
11701 the conventions for yyparse.
11702 Alternatively we could return void and send an exception.
11703 There is no clear consensus (yet?).
11704 (state_stack, semantic_stack, location_stack): Rename as...
11705 (state_stack_type, semantic_stack_type, location_stack_type): these.
11706 Private, not public.
11707 * tests/c++.at: New.
11708 * tests/testsuite.at, tests/Makefile.am: Adjust.
11709
72731bb7
AD
117102004-12-21 Akim Demaille <akim@epita.fr>
11711
11712 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
11713
9a0d8bec
AD
117142004-12-21 Akim Demaille <akim@epita.fr>
11715
11716 Don't impose std::string for filenames.
11717
11718 * data/lalr1.cc (b4_filename_type): New.
11719 (position::filename): Use it.
11720 (parser.hh): Move the inclusion of stack.hh and location.hh below
11721 the user code, so that needed headers for the filename type can be
11722 included first.
72731bb7
AD
11723 Forward declare them before the user code.
11724 * tests/Makefile.am (check-local, installcheck-local): Pass
11725 TESTSUITEFLAGS to the TESTSUITE.
9a0d8bec 11726
99880de5
AD
117272004-12-20 Akim Demaille <akim@epita.fr>
11728
11729 Use more STL like names: my_class instead of MyClass.
11730
11731 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
11732 (SemanticStack, SemanticType, StateStack, StateType)
11733 (TokenNumberType, Stack, Slice, Traits, Parser::location)
11734 (Parser::value): Rename as...
11735 (location_stack, location_type, rhs_number_type, semantic_stack)
11736 (semantic_type, state_stack, state_type, token_number_type, stack)
11737 (slice, traits, parser::yylloc, parser::yylval): these.
11738
11739 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
11740
9bec482e
PE
117412004-12-19 Paul Eggert <eggert@cs.ucla.edu>
11742
11743 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
11744 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
11745
f6fbd3da
PE
117462004-12-17 Paul Eggert <eggert@cs.ucla.edu>
11747
11748 Remove uses of 'short int' and 'unsigned short int'. This raises
11749 some arbitrary limits. It uses more memory but nowadays that's
11750 not much of an issue.
11751
11752 This change does not affect the generated parsers; that's a different
11753 task, as some users will want to conserve memory there.
11754
11755 Ideally we should use size_t to represent all object counts, and
11756 something like ptrdiff_t to represent signed differences of object
11757 counts; but that will require more code-cleanup than I have the
11758 time to do right now.
11759
11760 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
11761 Use size_t, not int or short int, to count objects.
11762 * src/closure.c (nritemset, closure): Likewise.
11763 * src/closure.h (nritemset, closure): Likewise.
11764 * src/nullable.c (nullable_compute): Likewise.
11765 * src/print.c (print_core): Likewise.
11766 * src/print_graph.c (print_core): Likewise.
11767 * src/state.c (state_compare, state_hash): Likewise.
11768 * src/state.h (struct state): Likewise.
11769 * src/tables.c (default_goto, goto_actions): Likewise.
11770
11771 * src/gram.h (rule_number, rule): Use int, not short int.
11772 * src/output.c (prepare_rules): Likewise.
11773 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
11774 errs, reductions): Likewise.
11775 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
11776 Likewise.
11777 * src/tables.c (vector_number, tally, action_number,
11778 ACTION_NUMBER_MINIMUM): Likewise.
11779 * src/output.c (muscle_insert_short_int_table): Remove.
11780
efeed023
AD
117812004-12-17 Akim Demaille <akim@epita.fr>
11782
11783 * data/lalr1.cc: Extensive Doxygenation.
11784 (error_): Rename as...
11785 (error): this, since it is visible to the user.
11786 Adjust callers.
11787 (Parser::message): Now an automatic variable from...
11788 (Parser::yyreport_syntax_error_): here.
11789 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
11790 Parser::error.
11791 * tests/input.at: Escape $.
11792
bc82c5a5
PE
117932004-12-16 Paul Eggert <eggert@cs.ucla.edu>
11794
11795 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
11796 Parenthesize rhs to avoid obscure problems with mistakes like
11797 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
11798 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11799 b4_rhs_location): Likewise.
11800 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
11801 b4_rhs_location): Likewise.
11802
fd19f271
AD
118032004-12-16 Akim Demaille <akim@epita.fr>
11804
11805 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
11806 yacc.c: be sure to stay within yycheck_.
11807 * tests/actions.at: Re-enable C++ tests.
11808
10454ea4
AD
118092004-12-16 Akim Demaille <akim@epita.fr>
11810
11811 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
11812 real.
11813
c5b95ccf
AD
118142004-12-16 Akim Demaille <akim@epita.fr>
11815
11816 Use #define to handle the %name-prefix.
11817
11818 * data/glr.c, data/yacc.c: Comment changes.
11819 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
11820 so that one can refer to yylex in the parser file, and have it
11821 renamed, as is the case with other skeletons.
11822
617a8f12
AD
118232004-12-16 Akim Demaille <akim@epita.fr>
11824
11825 Move lalr1.cc internals into yy*.
11826
11827 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
11828 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
11829 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
11830 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
11831 (empty_, final_, terror_, errcode_, ntokens_)
11832 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
11833 (looka_, ilooka_, error_range_, nerrs_):
11834 Rename as...
11835 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
11836 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
11837 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
11838 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
11839 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
11840 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
11841 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
11842 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
11843 these.
11844
1e547e6e
PE
118452004-12-15 Paul Eggert <eggert@cs.ucla.edu>
11846
11847 Fix some problems reported by twlevo at xs4all.
11848 * src/symtab.c (symbol_new): Report an error if the input grammar
11849 contains too many symbols. This is better than calling abort() later.
11850 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
11851 (struct node, struct graph):
11852 Rename member expand to stretch. All uses changed.
11853 (struct graph): Remove member layoutalgorithm. All uses removed.
11854 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
11855 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
11856 All uses changed.
11857 (N_STRETCH): Rename from N_EXPAND. All uses changed.
11858
735d6bd4
AD
118592004-12-15 Akim Demaille <akim@epita.fr>
11860
11861 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
11862 Add more Doxygen comments.
11863 (symprint_, stack_print_, reduce_print_, destruct_, pop)
11864 (report_syntax_error_, translate_): Rename as...
11865 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
11866 (yypop_, yyreport_syntax_error_, yytranslate_): this.
11867
2e1f5829
AD
118682004-12-15 Akim Demaille <akim@epita.fr>
11869
11870 * data/lalr1.cc (lex_): Rename as...
11871 (yylex_): this.
11872 Move the trace here.
11873 Take the %name-prefix into account.
11874 Reported by Alexandre Duret-Lutz.
11875
a3cb6248
AD
118762004-12-15 Akim Demaille <akim@epita.fr>
11877
11878 Simplify the C++ parser constructor.
11879
11880 * data/lalr1.cc (debug_): Rename as...
11881 (yydebug_): so that the parser's internals are always in the yy*
11882 pseudo namespace.
11883 Adjust uses.
11884 (b4_parse_param_decl): Remove the leading comma as it is now only
11885 called as unique argument list.
11886 (Parser::Parser): Remove the constructor accepting a location and
11887 an initial debugging level.
11888 Remove from the other ctor the argument for the debugging level.
11889 (debug_level_type, debug_level, set_debug_level): New.
11890
11891 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
11892 constructor calls.
11893
07fed891
AD
118942004-12-15 Akim Demaille <akim@epita.fr>
11895
11896 Remove b4_root related material: failure experiment
a3cb6248 11897 (which goal was to allow to derive from a class).
07fed891
AD
11898
11899 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
11900 definitions and uses.
11901
e603eaa5
PE
119022004-12-14 Paul Eggert <eggert@cs.ucla.edu>
11903
11904 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
11905 not 2, since it's not portable to subtract 1 from the start of an
11906 array. The new item 0 is never set or used. All uses changed.
11907
11908 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
11909 the default definition of YYLLOC_DEFAULT. Problem reported
11910 by Frank Heckenbach.
11911
fafb007d
PE
119122004-12-12 Paul Eggert <eggert@cs.ucla.edu>
11913
11914 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
11915 the normal case and one for the error case. Just use the
11916 first one uniformly. Problem reported by Frank Heckenbach.
11917 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
11918 use exactly the same macro in both places.
11919 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
11920 so that the normal-case YYRHSLOC works for the error case too.
11921 All uses changed.
11922 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
11923 (YYLLOC_DEFAULT): Use the same macro as glr.c.
11924 * doc/bison.texinfo (Location Default Action): Don't claim that
11925 we have an array of locations. Use the same macro for both glr
11926 and lalr parsers. Mention YYRHSLOC. Mention what happens when
11927 the index is 0.
11928
48814dcd
PE
119292004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11930
a4e1a53b
PE
11931 * HACKING: Update email addresses to send announcements to.
11932
48814dcd
PE
11933 * configure.ac (AC_INIT): Bump version to 1.875f.
11934
337116ba
PE
119352004-12-10 Paul Eggert <eggert@cs.ucla.edu>
11936
11937 * NEWS: Version 1.875e.
11938 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
11939
11940 * src/scan-skel.l: Include "complain.h", for "fatal".
11941
11942 * src/relation.h (relation_print, relation_digraph):
11943 Relation sizes are of type relation_node, not size_t (this is
11944 merely a doc fix, since the two types are equivalent).
11945 (relation_transpose): Relation sizes are of type relation_node,
11946 not int.
11947 * src/relation.c: Likewise.
11948 (top, infinity): Now of type relation_node, not int.
11949 (traverse, relation_transpose): Use relation_node, not int.
11950
11951 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
11952 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
11953 (yyparse): Remove unused local introduced in 2004-10-25 patch.
11954
11955 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
68b082af 11956 specifying whether the test should be skipped. Use it tp
337116ba 11957 specify that the [%defines %skeleton "lalr1.cc"] tests currently
68b082af 11958 fail on some hosts, and should be skipped.
337116ba 11959
da2a7671
PE
119602004-12-08 Paul Eggert <eggert@cs.ucla.edu>
11961
11962 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
11963 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
11964 unless otherwise specified below.
11965
11966 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
11967 to allocate kernel_base, kernel_items, kernel_size, since
11968 they needn't be initialized to 0.
11969 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
11970 * src/closure.c (new_closure): Likewise, for itemset.
11971 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
11972 * src/lalr.c (set_goto_map): Likewise, for temp_map.
11973 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
11974 (build_relations): Likewise for edge, states1, includes.
11975 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
11976 * src/reader.c (packgram): Likewise, for ritem, rules.
11977 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
11978 * src/relation.c (relation_digraph): Likewise for VERTICES.
11979 (relation_transpose): Likewise for new_R, end_R.
11980 * src/symtab.c (symbols_token_translations_init): Likewise for
11981 token_translations.
11982 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
11983 (token_actions): Likewise for yydefact, actrow, conflrow,
11984 conflict_list.
11985 (save_column): Likewise for froms[symno], tos[symno].
11986 (goto_actions): Likewise for state_count.
11987 (pack_table): Likewise for base, pos, check.
11988 (tables_generate): Likewise for width.
11989
11990 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
11991 for initial core. Just have a separate core, so we needn't worry
11992 about whether kernel_size and kernel_base are initialized.
11993
11994 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
11995 kernel_size, kernel_items): Remove unnecessary initialization.
11996 * src/conflicts.c (conflicts): Likewise.
11997 * src/derives.c (derives): Likewise.
11998 * src/muscle_tablc (muscle_insert): Likewise.
11999 * src/relation.c (relation_digraph): Likewise.
12000 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
12001 conflrow, conflict_table, conflict_list, table, check):
12002 Likewise.
12003
12004 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
12005 This is because all callers pass unsigned int.
12006 * src/closure.h (new_closure): Likewise.
12007
12008 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
12009 (build_relations): Initialize includes[i] in all cases.
12010 * src/reader.c (packgram): Always initialize rules[ruleno].prec
12011 and rules[ruleno].precsym. Initialize members in order.
12012 * src/relation.c (relation_transpose): Always initialize new_R[i]
12013 and end_R[i].
12014 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
12015
12016 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
12017 conflict_list[0] was always 0, but now it isn't initialized.
12018
12019 * src/table.c (table_grow): When conflict_table grew, the grown
12020 area wasn't cleared. Fix this.
12021
12022 * lib/.cvsignore: Add strdup.c, strdup.h.
12023 * m4/.cvsignore: Add strdup.m4.
12024
00baeeac
PE
120252004-12-07 Paul Eggert <eggert@cs.ucla.edu>
12026
12027 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
12028 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
12029 GOTO_NUMBER_MAXIMUM, since we occasionally compute
12030 ngotos + 1 without checking for overflow.
12031 (build_relations): Use END_NODE, not -1, to denote end of edges.
12032 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
12033 build_relations): Use goto_number, not int, for goto numbers.
12034 * src/tables.c (save_column, default_goto): Likewise.
12035
be3d9d42
AD
120362004-11-23 Akim Demaille <akim@epita.fr>
12037
12038 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
12039 of #defining from yystype.
12040 Don't typedef yystype, C++ does not need it.
12041 This lets it possible to forward declare it as union.
12042
78e526d5
PE
120432004-11-23 Paul Eggert <eggert@cs.ucla.edu>
12044
12045 * bootstrap (gnulib_modules): Add extensions.
12046 Problem reported by Jim Meyering.
12047
afbb696d
PE
120482004-11-22 Paul Eggert <eggert@cs.ucla.edu>
12049
12050 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
12051 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
12052 src/system.h, src/tables.c: XFREE -> free, to accommodate
12053 recent change to gnulib xalloc.h.
78e526d5 12054 Problem reported by Jim Meyering.
afbb696d 12055
c1f8f16a
AD
120562004-11-17 Akim Demaille <akim@epita.fr>
12057
12058 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
12059
db7e5eb5 120602004-11-17 Akim Demaille <akim@epita.fr>,
9a1e9989
AD
12061 Alexandre Duret-Lutz <adl@gnu.org>
12062
12063 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
12064 changes.
12065 (YYCDEBUG): Adjust.
12066 Use it instead of cdebug_.
12067 (Parser::debug_stream, Parser::set_debug_stream): New.
12068 (Parser::symprint_): Define cdebug_ for temporary backward
12069 compatibility.
12070 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
12071 debug_stream ().
12072
68e11668
AD
120732004-11-17 Akim Demaille <akim@epita.fr>
12074
12075 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
12076 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
12077 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
12078 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
12079
97cbc73e
PE
120802004-10-27 Paul Eggert <eggert@cs.ucla.edu>
12081
12082 * data/glr.c (yyloc_default): Remove; not used.
12083 Problem reported by Frank Heckenbach.
12084
e342c3be
AD
120852004-10-25 Akim Demaille <akim@epita.fr>
12086
12087 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
12088 Introduce another definition to address simple location arrays.
12089 (yyGLRStack): New member: yyerror_range.
12090 (yyrecoverSyntaxError, yyparse): Update it.
12091 (yyrecoverSyntaxError): Use it when shifting the error token to
12092 have an accurate range, equivalent to the one computed by both
12093 yacc.c and lalr1.cc.
12094 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
12095 that column numbers start at column 0, as per GNU Coding
12096 Standards, the others tests, and the doc.
12097 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
12098 Adjust to the above change (first column is 0).
12099 And adjust the location of the "<error>", now covering the whole
12100 line.
12101
93602feb 121022004-10-22 Akim Demaille <akim@epita.fr>
04098407 12103 and Paul Eggert <eggert@cs.ucla.edu>
93602feb
PE
12104
12105 Remove some arbitrary limits on goto numbers and relations.
12106 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
12107 initial values, since they're never used.
12108 (set_goto_map): ngotos is now unsigned, so test for overflow
12109 by seeing whether it wraps around to zero.
12110 * src/lalr.h (goto_number): Now size_t, not short int.
12111 (GOTO_NUMBER_MAXIMUM): Remove.
12112 * src/relation.c (relation_print, traverse, relation_transpose):
12113 Check for END_NODE rather than looking at sign.
12114 * src/relation.h (END_NODE): New macro.
12115 (relation_node): Now size_t, not short int.
12116
dba08b04
PE
121172004-10-22 Paul Eggert <eggert@cs.ucla.edu>
12118
12119 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
12120 keyword, not an identifier. Problem reported by Baron Schwartz in
12121 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
12122
df09ef2e
AD
121232004-10-11 Akim Demaille <akim@epita.fr>
12124
12125 * src/symtab.c (symbol_check_alias_consistency): Also check
12126 type names, destructors, and printers.
12127 Reported by Alexandre Duret-Lutz.
12128 Recode the handling of associativity and precedence in terms
12129 of symbol_precedence_set.
12130 Accept no redeclaration at all, not even equal to the previous
12131 value.
12132 (redeclaration): New.
12133 Use it to factor redeclaration complaints.
12134 (symbol_make_alias): Don't set the type of the alias, let
12135 symbol_check_alias_consistency do it as for other features.
12136 * src/symtab.h (symbol): Add new member prec_location, and
12137 type_location.
12138 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
12139 * tests/input.at (Incompatible Aliases): New.
12140
146bc99d
PE
121412004-10-09 Paul Eggert <eggert@cs.ucla.edu>
12142
12143 .cvsignore fixes to accommodate gnulib changes,
12144 and the practice of naming build directories "_build".
12145 * .cvsignore: Add "_*". Sort.
12146 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
12147 * m4/.cvsignore: Add "*_gl.m4".
12148
e503aa60
AD
121492004-10-06 Akim Demaille <akim@epita.fr>
12150
12151 * src/parse-gram.y (add_param): Fix the truncation of trailing
12152 spaces.
12153
b4a20338
AD
121542004-10-05 Akim Demaille <akim@epita.fr>
12155
12156 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
12157 whether the reducion was empty or not. This leaves room to
12158 improve the use of YYLLOC_DEFAULT in such a case.
12159 lalr1.cc is still experimental, so changing this is acceptable.
12160 And finally, there are probably not many users who changed the
12161 handling of locations in GLR, so changing is admissible too.
12162
12163 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
12164 empty reduction, set @$ to an empty location ending the previously
12165 stacked symbol.
12166 Adjust uses to make sure the code is triggered on empty
12167 reductions.
12168 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
12169 expected output: empty reductions have empty locations.
12170
f85a5e6f
AD
121712004-09-29 Akim Demaille <akim@epita.fr>
12172
12173 * data/lalr1.cc: Move towards a more standard C++ coding style
12174 for templates: Class < T > -> Class<T>.
12175
b203fc2c
AD
121762004-09-29 Akim Demaille <akim@epita.fr>
12177
12178 * data/lalr1.cc: Reinstall the former ctor, for sake of
12179 compatibility, but warn it will be removed.
12180 Move towards a more standard C++ coding style (i.e., type *var ->
12181 type* var).
12182
5b7e1e73
PE
121832004-09-27 Paul Eggert <eggert@cs.ucla.edu>
12184
3fee967f
PE
12185 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
12186 since it's less likely to work if NULs are involved in the future.
5b7e1e73 12187
0dcca5c2
AD
121882004-09-27 Akim Demaille <akim@epita.fr>
12189
12190 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
12191
6dde1c82
AD
121922004-09-27 Akim Demaille <akim@epita.fr>
12193
12194 * data/lalr1.cc (b4_parse_param_decl_1): New.
b203fc2c 12195 (b4_parse_param_decl): Use it to have different names between attribute
6dde1c82
AD
12196 and argument names.
12197 (b4_cc_constructor_call): Likewise.
12198
b233d555
AD
121992004-09-24 Akim Demaille <akim@epita.fr>
12200
12201 * src/parse-gram.y (add_param): Strip the leading and trailing
12202 blanks from a formal argument declaration.
12203 (YY_LOCATION_PRINT): New.
12204
619404e3
AD
122052004-09-24 Akim Demaille <akim@epita.fr>
12206
12207 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
12208 after the location.
12209
dd8d9022
AD
122102004-09-24 Akim Demaille <akim@epita.fr>
12211
12212 * doc/bison.texinfo (Table of Symbols): Sort.
12213
0092f063
AD
122142004-09-21 Akim Demaille <akim@epita.fr>
12215
12216 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
12217 the useless parentheses.
12218 Suggested by Paul Eggert.
12219
451364ed
AD
122202004-09-20 Akim Demaille <akim@epita.fr>
12221
12222 Let the initial-action act on the look-ahead, and use it for the
12223 "initial push" (corresponding to an hypothetical beginning-of-file).
12224 And let lalr1.cc honor %initial-action.
12225
12226 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
12227 example.
12228 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
12229 (Parser::Parser): Remove the ctor that used to initialize it.
12230 (Parser::parse): Like in the other skeletons, issue the "starting
12231 parse" message before any action.
12232 Honor %initial-action.
12233 Initialize the stacks with the lookahead.
12234 * data/yacc.c: Let $$ and @$ in %initial-action designate the
12235 look-ahead.
12236 Push them in the stacks.
12237 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
12238
18d192f0
AD
122392004-09-20 Akim Demaille <akim@epita.fr>
12240
12241 * doc/bison.texinfo (Initial Action Decl): New.
12242
b8458aa5
AD
122432004-09-20 Akim Demaille <akim@epita.fr>
12244
12245 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
12246 clearer criterion to define it.
12247 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
12248 When reducing on an empty RHS, use the latest stacked location as
12249 location.
12250 yylloc is not always available.
12251 * data/glr.c: Likewise.
12252 Also, honor initial-actions.
12253
3fc16193
AD
122542004-09-20 Akim Demaille <akim@epita.fr>
12255
12256 * data/yacc.c (YY_LOCATION_PRINT): New.
12257 Define when we know YYLTYPE's structure, i.e., when the default
12258 YYLLOC_DEFAULT is used.
12259 * data/c.m4 (b4_yysymprint_generate): Use it.
12260 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
12261 value of the result.
12262 (error_start_): Replace with...
12263 (error_range_): this location array.
12264 This allows to replace code relying on the implementation of
12265 locations by portable code.
12266 * data/yacc.c (yylerrsp): Replace with...
12267 (yyerror_range): this.
12268 Every time a token is popped, update yyerror_range[0], to have an
12269 accurate location for the error token.
12270 * data/glr.c (YY_LOCATION_PRINT): New.
12271 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
12272 deference a pointer.
12273 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
12274 report the location in %printers.
12275
12276 * src/scan-skel.l: Instead of abort, report error messages to ease
12277 understanding skeleton scanning failures.
12278
ecfe33e7
AD
122792004-09-16 Akim Demaille <akim@epita.fr>
12280
12281 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
12282 (iterator, const_iterator): these, to be more in the C++ spirit.
12283 Also, return reverse iterators so that when displaying the stack
12284 we display its bottom first.
12285 (Parser::stack_print_, Parser::reduce_print_): Match the messages
12286 from yacc.c.
12287 We should probably use vector here though.
12288
1576d44d
AD
122892004-09-16 Akim Demaille <akim@epita.fr>
12290
12291 Have more complete shift traces.
12292
12293 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
12294 to report Shifts instead of ad hoc YYDPRINTF invocations,
12295 including for the error token.
12296 * data/lalr1.cc (symprint_): Output the location.
12297 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
12298 output the location within the %printer.
12299 Activate GLR tests, at least to make sure they compile properly.
12300 They still don't pass though.
12301 * tests/calc.at: Adjust expect verbose output, since now "Entering
12302 state..." is on a different line than the "Shifting" message.
12303
9c66f418
AD
123042004-09-08 Akim Demaille <akim@epita.fr>
12305
12306 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
12307 Bison directive from the Bison file to the invocation of this
12308 macro, so that these directives are passed to
12309 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
12310 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
12311 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
12312 the extra Bison directives instead of the whole series.
12313 Change the grammar so that there are recoverable errors, and
12314 unrecoverable errors. Now we can have the parser give up before
12315 consuming the whole input. As a result we now can observe that
12316 the lookahead is freed when needed.
12317 Change the parser source to parse argv[1] instead of a hard coded
12318 string.
12319 Simplify yylex, and give a value and location to EOF.
12320 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
12321 passed directives already coded in the file.
12322 Add some tests to check the location of "error".
12323 For some tests, the C++ parser is correct, and not yacc.c.
12324 For other tests, they provide different, but unsatisfying, values,
12325 so keep the C++ value so that at least one parser is "correct"
12326 according to the test suite.
12327 (Actions after errors): Remove, this is subsumed by the
12328 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
12329
52d5733f
AD
123302004-09-06 Akim Demaille <akim@epita.fr>
12331
12332 * data/lalr1.cc: Adjust the indentation of the labels.
04098407 12333 (Parser::pop): New.
52d5733f
AD
12334 Use it.
12335
a0e68930
AD
123362004-09-06 Akim Demaille <akim@epita.fr>
12337
12338 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
12339 argument, an informative message.
12340 Call YY_SYMBOL_PRINT.
12341 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
12342 * data/lalr1.cc (destruct_): Likewise.
12343 In addition, no longer depend on b4_yysymprint_generate and
12344 b4_yydestruct_generate to generate these functions, do it "by
12345 hand".
12346
e757bb10
AD
123472004-09-03 Akim Demaille <akim@epita.fr>
12348
12349 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
12350 invoked, yydestruct the lookahead.
12351 * tests/calc.at (Calculator $1): Update the expected lengths of
12352 traces: there is an added line for the discarded lookahead.
12353 * doc/bison.texinfo (Destructor Decl): Some rewording.
12354 Define "discarded" symbols.
12355
0fe1f06d
AD
123562004-09-02 Akim Demaille <akim@epita.fr>
12357
12358 * data/lalr1.cc (translate_, destruct_): No reason to be static.
12359
284acc8b
AD
123602004-09-02 Akim Demaille <akim@epita.fr>
12361
12362 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
12363 (YYDSYMPRINTF): Rename as...
12364 (YY_SYMBOL_PRINT): this.
12365 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
12366 two.
12367 Use it instead of direct symprint_ calls.
12368 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
12369 one.
12370
a5eb1ed2
AD
123712004-09-02 Akim Demaille <akim@epita.fr>
12372
b7c72fe1
AD
12373 * data/lalr1.cc (b4_yysymprint_generate): New.
12374 (symprint_): New member function, defined when YYDEBUG.
12375 Use it consistently instead of token/nterm debugging output by
12376 hand.
a5eb1ed2
AD
12377 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
12378 %printer calls to use cdebug_ when using lalr1.cc.
12379
417141dd
AD
123802004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
12381
12382 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
12383 with #ifdef YYDEBUG.
12384
2fa09258
AD
123852004-08-26 Akim Demaille <akim@epita.fr>
12386
12387 * doc/bison.texinfo (Implementing Loops): Rename as...
12388 (Implementing Gotos/Loops): this.
12389
9378b508
PE
123902004-08-13 Paul Eggert <eggert@cs.ucla.edu>
12391
12392 Adjust to latest gnulib.
12393 * bootstrap (gnulib_modules): Add xalloc-die.
12394 Set LC_ALL=C so that file names sort consistently.
12395 Prefer the gnulib copies of gettext.m4, glibc21.m4,
12396 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
12397 uintmax_t.m4, ulonglong.m4.
12398 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
12399 po.m4 since we are now using _gl.m4 instead.
12400
87a8ad5c
PE
124012004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
12402
12403 * src/scan-action.l: Remove. Scanning of semantic actions is
12404 handled in scan-gram.l.
12405
dca81a78
PE
124062004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
12407
12408 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
12409
12410 * src/location.h (struct): The file member is a uniqstr.
12411 (equal_boundaries): Use UNIQSTR_EQ for comparison.
12412
c9cbf7c5
PE
124132004-07-22 Paul Eggert <eggert@cs.ucla.edu>
12414
12415 Fix bug with non-%union parsers that have printers or destructors,
12416 which led to a Bison core dump. Reported by Peter Fales in
12417 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
2fa09258 12418
c9cbf7c5
PE
12419 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
12420 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
12421 not to our own type.
12422 * src/output.c (symbol_destructors_output, symbol_printers_output):
12423 Don't assume %union.
12424 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
12425 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
12426 UNION-FLAG. All callers changed.
12427 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
12428 Use type char, not unsigned int, when declaring an array of char;
12429 this lets us remove a cast.
12430 (Printers and Destructors): Add non-%union test cases.
12431
fa7e68c3
PE
124322004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12433
12434 * doc/bison.texinfo: Minor editorial changes, mostly to the new
12435 GLR writeups. E.g., avoid frenchspacing and the future tense,
12436 change "lookahead" to "look-ahead", and change "wrt" to "with
12437 respect to".
2fa09258 12438
fa7e68c3
PE
124392004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12440
12441 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
12442 New sections, split off from the GLR Parsers section. Put the new
12443 Simple GLR Parser near the start of the GLR section, for clarity.
12444 Rewrite connective text.
12445
99a9344e
PE
124462004-06-21 Frank Heckenbach <frank@g-n-u.de>
12447
12448 * doc/bison.texinfo (Simple GLR Parsers): New section.
12449
8dd162d3
PE
124502004-06-21 Paul Eggert <eggert@cs.ucla.edu>
12451
12452 * NEWS, TODO, doc/bison.texinfo:
12453 Use "look-ahead" instead of "lookahead", to be consistent.
12454 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
12455 while we're fixing "look-ahead".
12456 * src/conflicts.c (shift_set): Renamed from shiftset.
12457 (look_ahead_set): Renamed from lookaheadset.
12458 * src/print.c: Likewise.
12459 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
12460 name for "lookahead".
12461 (report_types, usage): Likewise.
12462 * src/getargs.h (report_look_ahead_tokens): Renamed from
12463 report_lookaheads.
12464 * src/lalr.c (compute_look_ahead_tokens): Renamed from
12465 compute_lookaheads.
12466 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
12467 (look_ahead_tokens_print): Renamed from lookaheads_print.
12468 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
12469 state_rule_lookaheads_print.
12470 * src/state.h: Likewise.
12471 (reductions.look_ahead_tokens): Renamed from lookaheads.
12472 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
12473 AT_DATA_LOOKAHEADS_GRAMMAR.
12474
57a90331
PE
124752004-06-03 Paul Eggert <eggert@cs.ucla.edu>
12476
12477 * README: Update location of patched M4 distribution.
12478
8ed3234a
PE
124792004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
12480
12481 Don't assume the C++ compiler takes the same arguments as the C compiler
12482 (trivial change).
12483 * configure.ac (O0CXXFLAGS): New var.
12484 * tests/atlocal.in (CXXFLAGS): Use it.
12485
07971983
PE
124862004-05-29 Paul Eggert <eggert@cs.ucla.edu>
12487
12488 Fix some "make check" problems with C++ reported by
12489 Albert Chin-A-Young for Tru64 C++ in this thread:
12490 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
12491
12492 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
12493 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
12494 Output to a .cc file for C++, not to a .c file.
12495 * tests/calc.at (AT_CHECK_CALC): Likewise.
12496 * tests/regression.at (AT_CHECK_DANCER): Likewise.
12497 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
12498
29058652
PE
124992004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
12500
12501 * tests/calc.at, tests/actions.at: Workaround for SGI
12502 C++ compiler. (trivial change)
12503
62cb8a99
PE
125042004-05-27 Paul Eggert <eggert@cs.ucla.edu>
12505
fd418816
PE
12506 Spent a few hours checking out which prerequisite versions the
12507 current sources actually require. I went all the way back to
12508 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
12509 a seemingly endless set of combinations of versions more recent
12510 than that. The bottom line is that the current sources require
12511 fairly recent versions of the build tools, and it'll be some work
12512 to change this.
12513 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
12514 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
12515 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
12516 Add comments explaining why those particular versions are
12517 currently needed.
2fa09258 12518
62cb8a99
PE
12519 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
12520 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
161a71f3 12521 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
62cb8a99
PE
12522
12523 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
12524 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
12525
caa52c10
PE
125262004-05-26 Paul Eggert <eggert@cs.ucla.edu>
12527
12528 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
12529 0.11.5. Suggested by Bruno Haible.
12530 * bootstrap: Remove gettext version checking.
12531
12532 * doc/bison.texinfo (Decl Summary): Also mention that %union
12533 can depend on prerequisite types. Problem reported by Tim
12534 Van Holder.
12535
4bfd5e4e
PE
125362004-05-25 Paul Eggert <eggert@cs.ucla.edu>
12537
2cef3017
PE
12538 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
12539 * README-alpha: Don't tell people not to package this.
12540
b9c85d5c
PE
12541 * bootstrap: Don't assume $(...) works; use `...` instead.
12542 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
12543 gettext better.
12544
4bfd5e4e
PE
12545 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
12546 put into the -d output file, and mention what to do if YYSTYPE is
12547 defined as a macro.
12548
6a36ff94
PE
125492004-05-24 Paul Eggert <eggert@cs.ucla.edu>
12550
6712933e
PE
12551 Undo change made earlier today: it caused autopoint to not bring
12552 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
12553 autopoint's.
12554
12555 * bootstrap: Check that gettext version matches what's in
12556 configure.ac. Warn users to ignore robots.txt ERROR 404.
12557 * bootstrap: Undo today's earlier change (logged below).
12558 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
b9c85d5c 12559
6a36ff94
PE
12560 The gettext version checking is causing more trouble than it's
12561 curing; remove it. Problem reported by Paul Hilfinger.
12562
12563 * bootstrap: Issue a warning that one can expect a message
12564 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
12565 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
12566
209ea708
PE
125672004-05-23 Paul Eggert <eggert@cs.ucla.edu>
12568
12569 Ensure that the C++ compiler used for testing actually works on a
12570 simple test program; if not, skip the C++-related tests. Problem
12571 reported by Vin Shelton in:
161a71f3 12572 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
209ea708
PE
12573
12574 * m4/cxx.m4: New file.
12575 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
12576 * tests/atlocal.in (BISON_CXX_WORKS): Add.
12577 * tests/local.at (AT_COMPILE_CXX): Use it.
12578
41ca2549
PE
125792004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12580
383e69dc
PE
12581 * data/glr.c (yylloc): Output this macro even if locations are not
12582 being generated, as the GLR parser needs it even in that case.
12583 Problem reported by Troy A. Johnson
12584 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
12585
41ca2549
PE
12586 * configure.ac (AC_INIT): Update to 1.875e.
12587
e476c87d
PE
125882004-05-21 Paul Eggert <eggert@cs.ucla.edu>
12589
12590 * NEWS: Version 1.875d.
12591 * configure.ac (AC_INIT): Likewise.
12592 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
12593
12594 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
12595 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
12596 lalr1.cc runs afoul of the first, and the last two are no longer
12597 supported by GCC 3.4.0.
12598 * README: Mention GNU m4 1.4 or later; mention m4 patches.
12599 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
12600
233a88ad
PE
126012004-05-06 Paul Eggert <eggert@cs.ucla.edu>
12602
12603 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
12604 unsigned int, for compatibility with latest gnulib hash module.
12605 * src/state.c (state_hash, state_hasher): Likewise.
12606 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
12607 * src/uniqstr.c (hash_uniqstr): Likewise.
e476c87d 12608
12ffdd28
PE
126092004-05-03 Paul Eggert <eggert@cs.ucla.edu>
12610
12611 * NEWS: Unescaped newlines are no longer allowed in char & strings.
12612
12613 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
12614 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
12615 character and string literals.
12616 (unexpected_end): New function.
12617 (unexpected_eof): Use it.
12618 (unexpected_newline): New function.
12619 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
12620 actions.
e476c87d 12621
12ffdd28
PE
12622 * NEWS: Document %expect-rr.
12623
12624 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
12625 Fix typo by replacing $1 with $option.
12626 Remove more 'intl'-related files.
9668e2be 12627 Don't DEFUN AM_INTL_SUBDIR twice.
12ffdd28
PE
12628
12629 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
12630 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
12631 strtoul.c.
12632 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
12633 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
12634 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
12635 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
12636 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
12637 * src/.cvsignore: Add *.output.
12638
12639 * src/parse-gram.y: Put copyright notice inside %{ %} so it
12640 gets copied to the output file.
e476c87d 12641
1f65350a
PE
126422004-04-28 Paul Eggert <eggert@twinsun.com>
12643
12644 Get files from the gnulib and po repositories, instead of relying
12645 on them being in our CVS. Upgrade to latest versions of gnulib
12646 and Automake.
12647
12648 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
12649 * bootstrap: Bootstrap from gnulib and po repositories.
12650 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
12651 * README-cvs: Document these changes. Remove version numbers from
12652 mentions of build tools, since they change so often. Mention Flex.
12653
12654 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
12655 (gl_USE_SYSTEM_EXTENSIONS): Add.
12ffdd28
PE
12656 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
12657 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
1f65350a 12658 does this for us.
12ffdd28
PE
12659 (AC_ISC_POSIX): Remove; we no longer support this
12660 ancient OS, as it gets in the way of latest Autoconf & gnulib.
1f65350a
PE
12661 (AC_HEADER_STDC): Remove: we now assume C89 or better.
12662 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
12663 Do not check for C89 headers, except for locale.h which is used
12664 by the Yacc library and must port to K&R hosts.
12665 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
12666 Do not check for C89 functions, except for setlocale which is
12667 used by the Yacc library.
12668 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
12669 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
12670 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
12671 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
12672 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
12673 AM_GNU_GETTEXT): Remove; now done by:
12674 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
12675 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
12676 for us.
12677
12678 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
12679 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
12680 Define to empty, as gnulib.mk will do the rest for us.
12681 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
12682 for us.
12683 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
12684 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
12685
12686 * src/files.c: Include gnulib's xstrndup.h.
12687
12688 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
12689 (REALLOC): Use xnrealloc, for likewise.
12690 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
12691 (strnlen, memrchr): Remove decls; functions no longer used.
12692 Include <stpcpy.h>.
12693
12694 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
12695 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
12696 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
12697 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
12698 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
12699 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
12700 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
12701 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
12702 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
12703 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
12704 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
12705 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
12706 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
12707 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
12708 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
12709 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
12710 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
12711 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
12712 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
12713 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
12714 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
12715 Remove, as these files are now generated automatically
12716 by bootstrap or automake.
12717
12718 * po/ChangeLog: Remove: all but one entry was a duplicate
12719 of this file, and I moved that 2000-11-02 entry here.
12720
12721 * config/.cvsignore: Add Makefile, depcomp, install-sh.
12722 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
12723 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
12724 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
12725 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
12726 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
12727 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
12728 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
12729 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
12730 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
12731 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
12732 xstrndup.h.
12733 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
12734 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
12735 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
12736 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
12737 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
12738 * src/.cvsignore: Remove *_.c.
12739
12740
12741 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
12742 support it. (The latest stable gzip doesn't.)
12743
127442004-04-27 Paul Eggert <eggert@twinsun.com>
12745
12746 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
12747 case, as stos_ is now used by destructors due to the 2004-02-09
12748 change.
12749
12750 Remove more K&R C support.
12751 * lib/libiberty.y (PARAMS): Remove. All uses removed.
12752 * lib/subpipe.c (errno): Remove decl.
12753 Include <stdlib.h> unconditionally.
12754 (EXIT_FAILURE): Remove macro.
12755 * src/complain.c (vfprintf, strerror): Remove.
12756 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
12757 unconditionally.
12758 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
12759 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
12760 (strchr, strspn, memchr): Remove decls.
12761 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
12762 unconditionally. Do not declare perror.
12763 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
12764 unconditionally.
12765
12766 * src/complain.c (_): Remove useless defn, as system.h defines this.
12767
12768 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
12769 with latest obstack.h.
12770 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
12771 to procedure types, as obstack.h now does that for us.
12772 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
12773
12774 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
12775 so that this include file can stand alone.
12776 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
12777 does this now. Include subpipe.h first after config.h, to
12778 test whether it can stand alone.
12779
12780 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
12781 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
12782 unused declaration.
12783
12784 * tests/synclines.at (%union synch line): Put a dummy member in
12785 the union, because empty unions aren't allowed in C. Caught
12786 by GCC 3.4.0.
12787
4f16766c
PE
127882004-04-13 Jim Meyering <jim@meyering.net>
12789
12790 * src/conflicts.c (conflicts_print): Correct format string typo:
12791 use `%%' to produce literal `%'. (trivial change)
12792
779e7ceb
PE
127932004-03-30 Paul Eggert <eggert@twinsun.com>
12794
12795 * src/getargs.c (version): Update copyright year to 2004.
12796
12797 * data/c.m4 (b4_int_type): Use 'short int' rather than
12798 'short', and similarly for 'long', 'unsigned', etc.
12799 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
12800 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
12801 yy_yypstack, yydumpstack): Likewise.
12802 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
12803 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
12804 Likewise.
12805 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
12806 yy_stack_print, yyparse): Likewise.
12807 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
12808 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
12809 * lib/bitset.c (bitset_print): Likewise.
12810 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
12811 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
12812 * lib/bitsetv.c (bitsetv_dump): Likewise.
12813 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
12814 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
12815 Likewise.
12816 * src/LR0.c (allocate_itemsets): Likewise.
12817 * src/gram.h (rule_number, rule): Likewise.
12818 * src/lalr.h (goto_number): Likewise.
12819 * src/nullable.c (nullable_compute): Likewise.
12820 * src/output.c (prepare_rules): Likewise.
12821 * src/relation.c (relation_print, relation_digraph): Likewise.
12822 * src/relation.h (relation_node): Likewise.
12823 * src/state.h (state_number, transitions, errs, reductions,
12824 struct state): Likewise.
12825 * src/symtab.h (symbol_number, struct symbol): Likewise.
12826 * src/tables.c (vector_number, tally, action_number,
12827 default_goto, goto_actions): Likewise.
12828 * tests/existing.at (GNU Cim Grammar): Likewise.
12829 * tests/regression.at (Web2c Actions): Likewise.
12830
12831 * src/output.c (muscle_insert_short_int_table): Renamed from
12832 muscle_insert_short_table. All uses changed.
12833
d6328241
PH
128342004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
12835
12836 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
12837 (declaration): Replace expected_conflicts with expected_sr_conflicts.
12838 Add %expect-rr rule.
4f16766c 12839
d6328241
PH
12840 * src/scan-gram.l: Recognize %expect-rr.
12841
4f16766c 12842 * src/conflicts.h (expected_sr_conflicts): Rename from
d6328241 12843 expected_conflicts.
4f16766c 12844 (expected_rr_conflicts): Declare.
d6328241
PH
12845
12846 * src/conflicts.c (expected_sr_conflicts): Rename from
12847 expected_conflicts.
12848 (expected_rr_conflicts): Define.
12849 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
12850 for GLR parsers.
12851 Use expected_sr_conflicts in place of expected_conflicts.
12852 Warn if expected_rr_conflicts used in non-GLR parser.
4f16766c 12853
d6328241 12854 * doc/bison.texinfo: Add documentation for %expect-rr.
4f16766c 12855
1452af69
PE
128562004-03-08 Paul Eggert <eggert@gnu.org>
12857
12858 Add support for hex token numbers. Suggested by Odd Arild Olsen in
161a71f3 12859 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
1452af69
PE
12860
12861 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
12862 in lalr1.cc.
12863 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
12864 * src/scan-gram.l (scan_integer): New function.
12865 ({int}): Use it.
12866 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
12867 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
12868 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
12869 Say "long int", not "long", for uniformity with GNU style.
12870
006d217d
PE
128712004-02-25 Paul Eggert <eggert@twinsun.com>
12872
12873 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
12874 compilers. This fixes a problem with Intel's C++ compiler being
12875 chatty, reported by Guido Trentalancia in
161a71f3 12876 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
006d217d 12877
c2729758
ADL
128782004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
12879
12880 Support %destructor and merge error locations in lalr1.cc.
12881
12882 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
12883 (Parser::stos_): Define unconditionally.
12884 (Parser::destruct_): New method. Generate its body with
12885 b4_yydestruct_generate.
12886 (Parser::error_start_): New attribute.
12887 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
12888 token which are discarded.
12889 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
12890 error_start_ when erroneous token are discarded.
12891 (Parser::parse) <yyerrlab1>: Compute the location of the error
12892 token so that it covers all the discarded tokens.
12893 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
12894 it can be called with `%skeleton "lalr1.cc"', and do that.
12895
dd0e0635
PE
128962004-02-02 Paul Eggert <eggert@twinsun.com>
12897
12898 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
12899 $(top_srcdir)/lib and ../lib. This fixes a bug reported
12900 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
12901 There's no need to mention top_builddir since Automake does that
12902 for us.
12903 (INCLUDES): Remove, as Automake says it's obsolescent.
12904 Contents migrated into AM_CPPFLAGS as described above.
12905 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
12906
129072004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
12908
12909 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
12910 (yyreportSyntaxError): Handle case where lookahead token is
12911 YYEMPTY.
12912
be16239b
PH
129132004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12914
12915 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
12916 resulting parsers are compilable with C++.
12917
5fa90832
PE
129182003-12-23 Paul Eggert <eggert@twinsun.com>
12919
12920 * config/depcomp, config/install-sh: Sync with Automake 1.8.
12921 * src/output.c (output_skeleton): Rename local var.
12922 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
12923 Bison tokens, as this runs afoul of the 2003-10-07 change that
12924 disallowed NUL bytes in character constants or string literals.
12925
12926 * tests/local.at: Require Autoconf 2.59's Autotest.
12927 * tests/testsuite.at: Don't include local.at, since we now assume
12928 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
12929 including it.
12930 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
12931 multiple inclusion warnings.
dd0e0635 12932
b165c324
AD
129332003-12-02 Akim Demaille <akim@epita.fr>
12934
12935 * doc/bison.texinfo (How Can I Reset the Parser): More about start
12936 conditions.
12937 From Bruno Haible.
12938
26e06a21
ADL
129392003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
12940
12941 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
12942
92ac3705
PE
129432003-10-07 Paul Eggert <eggert@twinsun.com>
12944
6a5ecb38
PE
12945 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
12946 if testsuite doesn't exist.
12947
92ac3705
PE
12948 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
12949 literals, unfortunately.
12950 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
12951 Complain about NUL bytes in character constants or string literals.
12952
91d2c560
PE
129532003-10-05 Paul Eggert <eggert@twinsun.com>
12954
12955 * NEWS: Don't document %no-default-prec, as it's still
12956 too experimental.
12957 * doc/bison.texinfo: Document %no-default-prec only if
12958 the defaultprec flag is set. Normally it's not.
12959
0cc3da3a
PE
129602003-10-04 Paul Eggert <eggert@twinsun.com>
12961
12962 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
12963 non-modifiable lvalue, instead of a modifiable one.
12964 * doc/bison.texinfo (Actions): Document that $$ can
12965 be assigned to. Do not claim that $$ and $N are
12966 array element references: user code should not rely on this.
12967
22fccf95
PE
129682003-10-01 Paul Eggert <eggert@twinsun.com>
12969
12970 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
12971 (grammar_declaration): Use it.
12972 * src/scan-gram.l: New token %no-default-prec.
12973 * tests/conflicts.at: Revamp tests to use %no-default-prec.
12974 * NEWS, doc/bison.texinfo: Document the above.
12975
fc8f2965
AD
129762003-10-01 Akim Demaille <akim@epita.fr>
12977
12978 VCG no longer supports long_straight_phase.
12979
12980 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
12981 * src/print_graph.c (print_graph): Adjust.
12982
39a06c25
PE
129832003-09-30 Frank Heckenbach <frank@g-n-u.de>
12984 and Paul Eggert <eggert@twinsun.com>
12985
12986 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
12987 Table of Symbols): Document %default-prec.
12988 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
12989 (grammar_declaration): Set default_prec on %default-prec.
12990 * src/scan-gram.l (%default-prec): New token.
12991 * src/reader.h (default_prec): New flag.
12992 * src/reader.c: Likewise.
12993 (packgram): Handle it.
12994 * tests/conflicts.at (%default-prec without %prec,
12995 %default-prec with %prec, %default-prec 1): New tests.
fc8f2965 12996
39a06c25
PE
129972003-09-30 Paul Eggert <eggert@twinsun.com>
12998
12999 * tests/testsuite.at: Include local.at, not input.at, fixing
13000 a typo in the 2003-08-25 patch.
13001
62b6aef9
AD
130022003-08-27 Akim Demaille <akim@epita.fr>
13003
13004 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
13005 GCC warnings.
13006
89e1cc61
AD
130072003-08-26 Akim Demaille <akim@epita.fr>
13008
13009 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
13010 "<\#" to avoid magic from Gnus when posting parts of this script.
13011
a08460b0
AD
130122003-08-26 Akim Demaille <akim@epita.fr>
13013
13014 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
13015 (Parser::parse): here.
13016 Adjust: nerrs and errstatus is now replaced by...
13017 (Parser::nerrs_, Parser::errstatus_): New.
13018
603f1cfd
AD
130192003-08-25 Akim Demaille <akim@epita.fr>
13020
13021 * config/announce-gen, Makefile.cfg: New.
13022 * Makefile.am: Adjust.
13023 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
13024 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
13025
cd3684cf
AD
130262003-08-25 Akim Demaille <akim@epita.fr>
13027
13028 When reducing initial empty rules, Bison parser read an initial
13029 location that is not defined. This results in garbage, and that
13030 affects Bison's own parser. Therefore we need (i) to extend Bison
13031 to support a means to initialize this location, and (ii) to use
13032 this CVS Bison to fix CVS Bison's parser.
13033
13034 * src/reader.h, reader.c (epilogue_augment): Remove, replace
13035 with...
13036 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
13037 * src/parse-gram.y: Adjust.
13038 (%initial-action): New.
13039 (%error-verbose): Since we require CVS Bison, there is no reason
13040 not to use it.
13041 * src/scan-gram.l: Adjust.
13042 * src/Makefile.am (YACC): New, to make sure we use our own parser.
13043 * data/yacc.c (yyparse): Use b4_initial_action.
13044
4e03e201
AD
130452003-08-25 Akim Demaille <akim@epita.fr>
13046
13047 * doc/bison.texinfo: Don't promote stdout for error messages.
13048
8c182d05
AD
130492003-08-25 Akim Demaille <akim@epita.fr>
13050
13051 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
13052 From Alexandre Duret-Lutz.
13053
6a60c4cf
PE
130542003-08-25 Akim Demaille <akim@epita.fr>
13055
13056 Version 1.875c.
13057
25f66e1a
AD
130582003-08-25 Akim Demaille <akim@epita.fr>
13059
13060 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
13061 Use them.
13062
5348bfbe
AD
130632003-08-25 Akim Demaille <akim@epita.fr>
13064
13065 * data/lalr1.cc (Parser::reduce_print_): New.
13066 Use it.
13067
47301314
AD
130682003-08-25 Akim Demaille <akim@epita.fr>
13069
13070 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
13071 error recovery loops. This patch is based on
161a71f3 13072 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
47301314
AD
13073 Also, augment the similarity between lalr1.cc and yacc.c.
13074 Note: the locations of error recovery rules are not correct yet.
13075
13076 * data/lalr1.cc: Comment changes to augment the similarity between
13077 lalr1.cc and yacc.c.
13078 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
13079 (yyerrlab1): Remove, but where it used to be (now the bottom part of
13080 yyerrlab), when hitting EOF, pop the whole stack here instead of
13081 merely falling thru the default error handling mechanism.
13082 (yyerrorlab): New label, with the old contents of YYERROR,
13083 plus the following change: pop the stack of rhs corresponding
13084 to the production that invoked YYERROR. That is how Yacc
13085 behaves (required by POSIX).
13086 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
13087 fail.
13088
1f7a61ff
AD
130892003-08-25 Akim Demaille <akim@epita.fr>
13090
13091 Tune local.at so that people can "autom4te -l autotest calc.at -o
13092 calc" for instance, to extract a sub test suite.
13093
13094 * tests/testsuite.at: Move the initialization, Autotest version
13095 requirement, and AT_TESTED invocation into...
13096 * tests/local.at: here.
13097 * tests/testsuite.at: Include it for compatibility with Autoconf
13098 2.57.
13099 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
13100 be ignore.
13101
327b5b56
PE
131022003-08-04 Paul Eggert <eggert@twinsun.com>
13103
13104 Rework code slightly to avoid gcc -Wtraditional warnings.
13105 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
13106 The returned value is now stored in *YY0. All callers changed.
13107 * src/output.c (merge_output): Adjust to the above change.
13108
0051e3ed
PE
131092003-07-26 Paul Eggert <eggert@twinsun.com>
13110
13111 * data/glr.c (YYASSERT): New macro.
13112 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
13113 yyresolveStates, yyprocessOneStack):
13114 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
13115 Derived from a suggestion by Frank Heckenbach.
1f7a61ff 13116
137437c6
PE
131172003-07-25 Paul Eggert <eggert@twinsun.com>
13118
5b620e06
PE
13119 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
13120 for portability to K&R C (after ansi2knr, presumably). See
161a71f3 13121 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
5b620e06
PE
13122 by Frank Heckenbach, though I have omitted the structure-initialization
13123 part of his glr-knr.diff patch since I recall that the Portable
13124 C Compiler didn't require that change.
13125
137437c6
PE
13126 Let the user specify how to allocate and free memory.
13127 Derived from a suggestion by Frank Heckenbach in
161a71f3 13128 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
137437c6
PE
13129 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
13130 All uses of free, malloc, realloc changed to use these macros,
13131 and unnecessary casts removed.
13132 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
13133
ddb85ca5
PE
131342003-07-06 Matthias Mann <MatthiasMann@gmx.de>
13135
13136 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
13137 use s.empty() rather than s == "" to test for empty string; see
161a71f3 13138 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
ddb85ca5
PE
13139 (trivial change)
13140
39910e09
AD
131412003-06-25 Akim Demaille <akim@epita.fr>
13142
13143 * config/depcomp, config/install-sh: Update from masters.
13144
0ae99356
PE
131452003-06-20 Paul Eggert <eggert@twinsun.com>
13146
13147 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
13148 and return properly parenthesized result.
13149 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
13150 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
13151 Remove unnecessary parentheses from uses.
13152 * doc/bison.texinfo (Location Default Action): Describe the
13153 conventions for parentheses.
13154
cd05d13c
PE
131552003-06-19 Paul Eggert <eggert@twinsun.com>
13156
81fd08ca
PE
13157 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
13158 yyreportTree): Do not assume that size_t is the same width as int,
13159 when printing sizes. Print sizes using an unsigned format.
13160 Problem reported by Frank Heckenbach in
161a71f3 13161 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
4dcf140b 13162
cd05d13c
PE
13163 Port to Forte Developer 7 C compiler.
13164 * data/glr.c (struct YYLTYPE): If locations are not being used,
13165 declare a single dummy member, as empty structs do not conform
13166 to the C standard.
13167 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
13168 the Forte Developer 7 C compiler complains that end-of-loop
13169 code is not reached.
13170
4dcf140b
PE
131712003-06-17 Paul Eggert <eggert@twinsun.com>
13172
13173 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
13174 avoid warnings from picky compilers about redefinition of PARAMS.
13175
8dd76bee
PE
131762003-06-17 Paul Eggert <eggert@twinsun.com>
13177
13178 Version 1.875b.
13179
13180 * NEWS: Document 1.875b.
13181
13182 * lib/bbitset.h: Do not include config.h; that's the includer's job.
13183 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
13184 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
13185 Don't use 'index' in comments, as it's a builtin fn on some hosts.
13186 * lib/bitset_stats.c: Include gettext.h unconditionally, as
13187 per recent gettext manual's suggestion.
13188 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
13189 Use prototypes, not old-style definitions.
13190 * lib/lbitset.c (lbitset_unused_clear): Likewise.
13191 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
13192 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
13193 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
13194 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
13195 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
13196 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
13197 vbitset_or_and_cmp, vbitset_copy): Likewise.
13198
13199 * lib/libiberty.h: Do not include config.h; that's the includer's job.
13200 Do not include <stdlib.h>.
13201 (PARAMS): Define unconditionally for C89.
13202 (ATTRIBUTE_NORETURN): Remove.
13203 (ATTRIBUTE_UNUSED): Define unconditionally.
13204
13205 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
161a71f3 13206 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
8dd76bee
PE
13207 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
13208 * lib/vbitset.c, lib/vbitset.h: New files.
13209 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
13210 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
13211 from libbitset.
13212
13213 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
13214 `How Can I Reset @code{yyparse}', since texinfo does not allow
13215 arbitrary @ in node names.
13216
13217 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
13218 shouldn't be needed according to the gettext 0.12.1 documentation
13219 but which seem to be needed anyway: codeset.m4 glibc21.m4
f8e8262e 13220 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
8dd76bee 13221 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
f8e8262e 13222 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
cd05d13c 13223
8dd76bee
PE
13224 * lib/.cvsignore: Add stdbool.h.
13225 * m4/.cvsignore: Add nls.m4, po.m4.
13226
13227 Upgrade to CVS gnulib.
13228 * stdbool_.h: File renamed from stdbool.h.in.
13229 * configure.ac (AM_STDBOOL_H): Invoke this instead of
13230 AC_HEADER_STDBOOL.
13231 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
13232 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
13233 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
13234 (MOSTLYCLEANFILES): New var.
13235 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
13236 (stdbool.h): New rule.
13237 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
13238 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
13239 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
13240 m4/quote.m4: Upgrade to today's gnulib.
13241
13242 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
13243 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
13244 the tests right now.
13245 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
13246 yyerror are declared before use; C99 requires this.
13247
25005f6a
PH
132482003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13249
13250 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
13251 first.
13252 (yyrecoverSyntaxError): Correct the logic for setting and testing
13253 yyerrState.
13254 Correct comment on handling EOF.
13255 Allow states with only a default reduction, rather than failing
8dd76bee 13256 (I can't quite reconstruct why these were not allowed before).
25005f6a 13257
137437c6 13258 Fixes to avoid problem that $-N rules in GLR parsers can cause
25005f6a 13259 buffer overruns, corrupting state.
8dd76bee
PE
13260
13261 * src/output.c (prepare_rules): Output max_left_semantic_context
25005f6a
PH
13262 definition.
13263 * src/reader.h (max_left_semantic_context): New variable declaration.
13264 * src/scan-gram.l (max_left_semantic_context): Define.
13265 (handle_action_dollar): Update max_left_semantic_context.
13266 * data/glr.c (YYMAXLEFT): New definition.
13267 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
13268 (yyresolveAction): Ditto.
13269
13270 Fixes to problems with location handling in GLR parsers reported by
13271 Frank Heckenbach (2003/06/05).
13272
13273 * data/glr.c (YYLTYPE): Make trivial if locations not used.
13274 (YYRHSLOC): Add parentheses, and define only if locations used.
13275 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
13276 locations not used.
13277 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
13278 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
8dd76bee 13279
25005f6a
PH
13280 * tests/cxx-type.at: Exercise location information; update tests
13281 to differentiate output with and without locations.
8dd76bee 13282 Remove forward declarations of yylex and yyerror---caused errors
25005f6a
PH
13283 because default YYLTYPE not yet defined.
13284 Change semantic actions to compute strings, rather than printing
13285 them directly (to test proper passing of semantics values). Change
13286 output to prefix notation and update test data and expected results.
13287 (yylex): Track locations.
13288 (stmtMerge): Return value rather than printing, and include arguments
13289 in value.
8dd76bee 13290
711f40b7
PE
132912003-06-03 Paul Eggert <eggert@twinsun.com>
13292
13293 Avoid warnings generated by GCC 2.95.4 when Bison is
13294 configured with --enable-gcc-warnings.
13295 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
13296 yy::]b4_parser_class_name[::translate_,
13297 yy::Stack::operator[] (unsigned),
13298 yy::Stack::operator[] (unsigned) const,
13299 yy::Slice::operator[] (unsigned),
13300 yy::Slice::operator[] (unsigned) const):
13301 Rename local vars to avoid warnings.
13302 * tests/glr-regression.at (Improper handling of embedded actions
13303 and $-N in GLR parsers): Remove unused local variable from yylex.
13304 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
13305 (void) as arg when not pure, since we now assume C89 when building
13306 Bison. Pacify GCC by using parameter.
13307
ac695f7d
PE
133082003-06-02 Paul Eggert <eggert@twinsun.com>
13309
13310 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
13311 yy::Location::lines, yy::Location::columns): Rename arguments
13312 to avoid shadowing; this removes a warning generated by GCC 3.3.
13313
26ec81e0
PE
133142003-06-01 Paul Eggert <eggert@twinsun.com>
13315
13316 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
13317 to g++, as GCC 3.3 complains if you do it.
13318 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
13319 everything that WARNING_CFLAGS has, except omit warnings
13320 not suitable for C++.
13321 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
13322 * tests/atlocal.in (CXXFLAGS): New var.
13323 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
13324
13325 Fix a GLR parser bug I reported in February; see
161a71f3 13326 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
26ec81e0
PE
13327 The problem was that GLR parsers did not conform to the C standard,
13328 because actions like { $1 = $2 + $3; } expanded to expressions
13329 that invoked YYFILL in separate subexpressions, and YYFILL assigned
13330 to a local variable. The C standard says that expressions
13331 like (var = f ()) + (var = f ()) have undefined behavior.
13332 Another problem was that GCC sometimes issues warnings that
13333 yyfill and its parameters are unused.
13334
13335 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
13336 as possibly unused.
13337 (yyfill): New function.
13338 (YYFILL): Use it.
13339 (yyuserAction): Change type of yynormal to bool, so that it matches
13340 the new yyfill signature. Mark it as possibly unused.
13341
13342
13343 Follow up on a bug I reported in February, where a Bison-generated
13344 parser can loop. Provide a test case and a fix for yacc.c. I
13345 don't have a fix for lalr1.cc or for glr.c, unfortunately.
13346 The original bug report is in:
161a71f3 13347 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
26ec81e0
PE
13348
13349 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
13350 macro's size was becoming unwieldy.
13351 (yyerrlab): Do not discard an empty lookahead symbol, as this
13352 might destroy garbage.
13353 (yyerrorlab): New label, with the old contents of YYERROR,
13354 plus the following change: pop the stack of rhs corresponding
13355 to the production that invoked YYERROR. That is how Yacc
13356 behaves, and POSIX requires this behavior.
13357 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
13358 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
13359 Define 'alarm' to do nothing if unistd.h is not available.
13360 Add a new rule "exp: '-' error;" to test the above change to
13361 data/yacc.c. Use 'alarm' to abort any test taking longer than
13362 10 seconds, as it's probably looping.
13363 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
13364 Also, the new yacc.c generates two fewer diagnostics for an
13365 existing test.
13366
d0829076
PE
133672003-05-24 Paul Eggert <eggert@twinsun.com>
13368
c6ae27df
PE
13369 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
13370 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
13371 This fixes a problem reported by John Bowman when the Compaq/HP
13372 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
13373 -ansi -Wall -gall).
13374 * data/yacc.c (union yyalloc): Likewise.
13375 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
26ec81e0 13376
d0829076
PE
13377 Switch from 'int' to 'bool' where that makes sense.
13378
13379 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
13380 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
13381 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
13382 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
13383 Return or accept bool, not int. All callers changed.
13384 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
13385 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
13386 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
13387 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
13388 bitset_or_and_cmp_): Likewise.
13389 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
13390 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
13391 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
13392 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
13393 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
13394 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
13395 bitset_stats_or_and_cmp): Likewise.
13396 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
13397 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
13398 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
13399 ebitset_xor_cmp): Likewise.
13400 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
13401 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
13402 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
13403 lbitset_xor_cmp): Likewise.
13404 * lib/bbitset.h: Include <stdbool.h>.
13405 (struct bitset_vtable): The following members now return bool, not
13406 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
13407 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
13408 or_and_cmp).
13409 * src/conflicts.c (count_rr_conflicts): Likewise.
13410 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
13411 All uses changed.
13412 * lib/ebitset.c (ebitset_obstack_init): Likewise.
13413 * lib/lbitset.c (lbitset_obstack_init): Likewise.
13414 * src/getargs.c (debug_flag, defines_flag, locations_flag,
13415 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13416 graph_flag): Likewise.
13417 * src/getargs.h (debug_flag, defines_flag, locations_flag,
13418 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
13419 graph_flag): Likewise.
13420 * src/output.c (error_verbose): Likewise.
13421 * src/output.h (error_verbose): Likewise.
13422 * src/reader.c (start_flag, typed): Likewise.
13423 * src/reader.h (typed): Likewise.
13424 * src/getargs.c (LOCATIONS_OPTION): New constant.
13425 (long_options, getargs): Use it.
13426 * src/lalr.c (build_relations): Use bool, not int.
13427 * src/nullable.c (nullable_compute): Likewise.
13428 * src/print.c (print_reductions): Likewise.
13429 * src/tables.c (action_row, pack_vector): Likewise.
13430 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
13431 * src/output.c (prepare): Use it.
13432 * src/output.c (token_definitions_output,
13433 symbol_destructors_output, symbol_destructors_output): Use string,
13434 not boolean integer, to keep track of whether to output separator.
13435 * src/print_graph.c (print_core): Likewise.
13436 * src/state.c (state_rule_lookaheads_print): Likewise.
13437
13438 * config/install-sh: Sync from automake 1.7.5.
13439
6b2584b7
PE
134402003-05-14 Paul Eggert <eggert@twinsun.com>
13441
13442 * src/parse-gram.y (rules_or_grammar_declaration): Require a
13443 semicolon after a grammar declaration, in the interest of possible
13444 future changes to the Bison input language.
13445 Do not allow a stray semicolon at the start of the grammar.
13446 (rhses.1): Allow one or more semicolons after any rule, including
13447 just before "|" as required by POSIX.
13448 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
13449 grammar.
13450
caf37a36
ADL
134512003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
13452
13453 %parse-param support for lalr1.cc.
13454
13455 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
13456 b4_cc_constructor_calls, b4_cc_constructor_call,
13457 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
13458 definitions.
13459 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
13460 parse-param arguments.
13461 (yy::b4_parser_class_name): Declare instance variables to
13462 hold parse-param arguments.
13463 * tests/calc.at: s/value/semantic_value/ because value clashes
13464 with a member of yy::b4_parser_class_name. Adjust C++ code
13465 to handle %parse-param. Enable %parse-param test in C++.
13466
3ab37077
PE
134672003-05-12 Paul Eggert <eggert@twinsun.com>
13468
13469 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
13470 English a bit. Fix fclose typo. Change "const char" to "char
13471 const", and use ANSI C rather than K&R for "main". Suggest
13472 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
13473 and suggest yy_switch_to_buffer.
13474
134752003-05-05 Paul Eggert <eggert@twinsun.com>
163ab321
PE
13476
13477 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
13478 C89. This avoids a diagnostic on compilers that define __STDC__
13479 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
161a71f3 13480 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
163ab321 13481
e743727f
PE
134822003-05-03 Paul Eggert <eggert@twinsun.com>
13483
13484 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
13485 Do not overrun array bounds.
13486 This should fix a bug reported today by Olatunji Oluwabukunmi in
161a71f3 13487 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
e743727f 13488
916708d5
AD
134892003-04-29 Akim Demaille <akim@epita.fr>
13490
13491 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
13492 * src/getargs.c, src/getargs.h: here, as bool, not int.
13493 (nondeterministic_parser): New.
13494 * src/parse-gram.y, src/scan-gram.l: Support
13495 %nondeterministic-parser.
13496 * src/output.c (prepare): Use nondeterministic_parser instead
13497 of glr_parser where appropriate.
13498 * src/tables.c (conflict_row, action_row, save_row)
13499 (token_actions, token_actions, pack_vector): Ditto.
13500
a06ea4aa
AD
135012003-04-29 Akim Demaille <akim@epita.fr>
13502
13503 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
13504
211074ca
AD
135052003-04-29 Akim Demaille <akim@epita.fr>
13506
13507 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
13508 with %pure-parser and %locations to exercise the patch from Yakov
13509 Markovitch below.
13510
6175ffe3
PE
135112003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
13512
13513 * data/yacc.c: (b4_lex_param): Corrected for the case where
13514 %lex-param is provided and %pure-parser isn't.
13515
b1e95857
PE
135162003-04-27 Paul Eggert <eggert@twinsun.com>
13517
13518 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
161a71f3 13519 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
b1e95857
PE
13520 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
13521 if it is not defined.
13522 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
13523
acda9df6
PE
135242003-04-26 Paul Eggert <eggert@twinsun.com>
13525
3470c57b
PE
13526 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
13527 Declare to be of type suitable for the ninf value itself, not of
13528 type suitable for the corresponding table, since the latter might
13529 be unsigned but the ninf value might be negative. This fixes a
13530 bug reported by Alexandre Duret-Lutz in
161a71f3 13531 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
3470c57b 13532
acda9df6
PE
13533 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
13534 invokes it. We shouldn't invoke it twice because it will attempt
13535 to put error.o in the archive twice. This fixes a glitch reported
13536 by Martin Mokrejs in
161a71f3 13537 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
acda9df6 13538
b5250f26
PE
135392003-04-21 Paul Eggert <eggert@twinsun.com>
13540
13541 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
13542 to gnulib.
13543
089ac0f1
PE
135442003-04-21 Yakov Markovitch <Markovitch@iso.ru>
13545
13546 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
13547 Fix obvious typo that results in uncompilable GLR parsers
13548 when both %pure-parser and %locations are used. (trivial change)
13549
5ededac6
PE
135502003-04-17 Paul Eggert <eggert@twinsun.com>
13551
1b8f2fff
PE
13552 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
13553 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
13554 Do not insert the expected token via unput, as this runs afoul
13555 of a POSIX-compatibility bug in flex 2.5.31.
13556 All uses changed to BEGIN the parent state,
13557 since we no longer insert the expected token via unput.
13558 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
13559 that is no longer emitted after the above change.
13560
5ededac6
PE
13561 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
13562 the first one. This change is from Paul Hilfinger, and it fixes
13563 regression reported by Werner Lemberg in
161a71f3 13564 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
5ededac6
PE
13565
13566 (resolve_sr_conflict): Don't invoke state_errs_set
13567 unless one or more tokens have been explicitly made errors.
13568 Otherwise, the above change causes Bison to abort.
13569
13570 * tests/existing.at (GNU pic Grammar): New test case, taken from
13571 Lemberg's email.
13572
b8be9132
AD
135732003-03-31 Akim Demaille <akim@epita.fr>
13574
13575 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
13576
d423d460
AD
135772003-03-31 Akim Demaille <akim@epita.fr>
13578
13579 * src/output.c (prepare_symbols): Avoid trailing spaces in the
13580 output.
13581
c7e441b4
AD
135822003-03-31 Akim Demaille <akim@epita.fr>
13583
13584 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
13585 From Paul Hilfinger.
13586
231897ad
AD
135872003-03-29 Akim Demaille <akim@epita.fr>
13588
13589 * m4/error.m4: Do not put under dynamic conditions some code which
13590 expansion is under static control.
13591
5b066063
AD
135922003-03-29 Akim Demaille <akim@epita.fr>
13593
13594 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
13595
22a74fec
AD
135962003-03-29 Akim Demaille <akim@epita.fr>
13597
13598 * doc/bison.texinfo (Strings are Destroyed): New.
13599
0eee27e7
PE
136002003-03-13 Paul Eggert <eggert@twinsun.com>
13601
13602 * .cvsignore: Add configure.lineno.
13603 * src/.cvsignore: Add yacc.
13604 * tests/.cvsignore: Add testsuite.log.
13605 * doc/fdl.texi: Sync with latest FSF version.
13606
f61aad93
PE
136072003-03-12 Paul Eggert <eggert@twinsun.com>
13608
537636c7
PE
13609 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
13610 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
13611 cursor, instead of leaving it undefined. This fixes a bug
13612 reported by Tim Van Holder in
161a71f3 13613 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
537636c7
PE
13614 * tests/input.at (Torturing the Scanner): Test the scanner on
13615 an empty input file, which was Tim Van Holder's test case.
13616
13617 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
13618 <sys/resource.h> can be included, include sys/time.h and
13619 sys/times.h first, if available. This works around the SunOS
13620 4.1.4 porting bug reported by Bruce Becker in
161a71f3 13621 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
537636c7
PE
13622
13623 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
13624 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
13625 AC_HEADER_SYS_WAIT.
13626
f61aad93
PE
13627 Merge changes from gnulib. This was prompted because the CVS
13628 snapshot didn't build on Solaris 7 due to strnlen problems.
13629
13630 These changes need to be merged back into gnulib:
13631 * lib/hash.c: Include <stdbool.h> unconditionally.
13632 * m4/onceonly.m4 (m4_quote): New macro.
13633 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
13634 Quote AC_FOREACH variable-expansions properly.
13635 The 2003-01-03 obstack.h change also needs merging.
13636 {end of changes requiring merging}
5b066063 13637
f61aad93
PE
13638 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
13639 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
13640 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
13641 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
13642 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
13643 New files, imported from gnulib.
13644 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
13645 above.
13646
13647 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
13648 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
13649 gnulib sources.
13650
13651 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
13652 Add.
13653 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
13654 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
13655 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
13656 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
13657 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
13658 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
13659 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
13660 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
13661 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
13662 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
13663 (jm_PREREQ_ARGMATCH): Remove.
13664 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
13665 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
13666
13667 * src/system.h: Include <stdbool.h> unconditionally.
13668
13669 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
13670 assuming at least C89 in the bitset code for some time now.
13671
d2ffe116
AD
136722003-03-03 Akim Demaille <akim@epita.fr>
13673
13674 * ro.po: New.
13675
052826fd
AD
136762003-03-02 Akim Demaille <akim@epita.fr>
13677
13678 * doc/bison.texinfo (Table of Symbols): Reactivate the
13679 documentation for %lex-param, and %parse-param.
13680
c4749565
AD
136812003-03-02 Akim Demaille <akim@epita.fr>
13682
13683 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
13684 generate verbose error messages.
13685 Use the number of tokens as an upper bound in yytname, as it
13686 cannot be a non terminal.
13687
d5286af1
AD
136882003-03-02 Akim Demaille <akim@epita.fr>
13689
13690 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
13691 message.
13692
22e304a6
AD
136932003-03-02 Akim Demaille <akim@epita.fr>
13694
22e304a6
AD
13695 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
13696 Use them to exercise yycheck overrun.
13697 Based on Andrew Suffield's grammar.
13698
67a25fed
AD
136992003-03-02 Akim Demaille <akim@epita.fr>
13700
13701 Create tests/local.at for Bison generic testing macros.
13702
13703 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
13704 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
13705 This new file.
13706 * tests/calc.at (AT_CHECK_CALC): Adjust.
13707 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
13708 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
13709 * tests/local.at: here.
13710 (AT_COMPILE_CXX): Tags the tests using it as c++.
13711 Ignore the test if CXX is not functional.
13712
9c2b381f
PE
137132003-03-01 Paul Eggert <eggert@twinsun.com>
13714
13715 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
13716 not loc->end, since loc->end might contain garbage and this leads
13717 to undefined behavior on some platforms.
13718 (id_loc, token_start): Use (IF_LINTed) initial values that do not
13719 depend on *loc, so that the reader doesn't give the the false
13720 impression that *loc is initialized.
13721 (<INITIAL>"%%"): Do not bother setting code_start, since its value
13722 does not survive the return.
13723
0433ba88
AD
137242003-03-01 Akim Demaille <akim@epita.fr>
13725
13726 * src/scan-gram.l (code_start): Always initialize it when entering
13727 into yylex, as SC_EPILOGUE is activated *before* the corresponding
13728 yylex invocation. An alternative would be making it static, but
13729 then it starts with the second %%'s beginning, instead of its end.
13730
b305ea69
PE
137312003-02-28 Paul Eggert <eggert@twinsun.com>
13732
13733 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
13734 around a UnixWare 7.1.1 porting bug reported by John Hughes in
161a71f3 13735 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
b305ea69 13736
c3d25e01
PE
137372003-02-26 Paul Eggert <eggert@twinsun.com>
13738
13739 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
13740 Remove Sequent/Pyramid discussion (nobody uses them any more).
13741 Merge VMS and MS-DOS discussion; these ports may well be dead
13742 but let's keep mentioning them for now. Put <> around email
13743 addresses. Add copyright notice.
13744
c267ffbc
PE
137452003-02-24 Paul Eggert <eggert@twinsun.com>
13746
13747 * data/glr.c (yy_reduce_print): yylineno -> yylno,
13748 to avoid collision with flex use of yylineno.
13749 Problem reported by Bruce Lilly in
161a71f3 13750 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
c267ffbc
PE
13751 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
13752 * data/yacc.c (yy_reduce_print): Likewise.
13753
13754 * config/depcomp: Sync with Automake 1.7.3.
13755
f939fc12
AD
137562003-02-21 Akim Demaille <akim@epita.fr>
13757
13758 * data/lalr1.cc: Use temporary variables instead of casts to
13759 change integer types.
13760 Suggested by Paul Eggert.
13761
95923bd6
AD
137622003-02-21 Akim Demaille <akim@epita.fr>
13763
13764 * doc/bison.texinfo: Use "location" consistently to refer to @n,
13765 to avoid confusions with lalr1.cc's notion of Position.
13766 Suggested by Paul Eggert.
13767
2cdc240e
AD
137682003-02-20 Akim Demaille <akim@epita.fr>
13769
13770 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
13771 before initial_columns.
13772 (location.hh): Use consistent variable names when defining the
13773 operator<<.
13774 Use "last" so that we subtract from Positions, not from unsigned.
13775
5d003116
AD
137762003-02-20 Akim Demaille <akim@epita.fr>
13777
13778 * data/lalr1.cc (position.hh): New subfile, including the extended
13779 and Doxygen'ed documentation of class Position.
13780 (location.hh): Use it.
13781 Document a` la Doxygen.
ba1ecc07 13782 With the help of Benoit Perrot.
5d003116 13783
d02b25f9
AD
137842003-02-20 Akim Demaille <akim@epita.fr>
13785
13786 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
13787 AT_YACC_IF.
13788 Redefine AT_YYERROR_SEES_LOC_IF using it.
13789 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
13790 not defined.
13791 Don't use the location in yy::Parser::error_ and
13792 yy::Parser::print_ when not %locations.
13793 Activate more lalr1.cc tests.
13794
0d1c3a04
AD
137952003-02-19 Akim Demaille <akim@epita.fr>
13796
13797 * data/lalr1.cc: When displaying a line number, be sure to make it
13798 an int.
13799
60a777aa
AD
138002003-02-19 Akim Demaille <akim@epita.fr>
13801
13802 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
13803 Remove, useless.
13804 (YYABORT, YYACCEPT, YYERROR): New.
13805 * tests/calc.at: Renable the lalr1.cc test.
13806
0b86fc41
AD
138072003-02-19 Akim Demaille <akim@epita.fr>
13808
13809 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
13810 error recovery, mixing with/without pops and discarding of the
13811 lookahead.
13812 Exercise YYERROR.
13813 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
13814
da99a5dc
PE
138152003-02-17 Paul Eggert <eggert@twinsun.com>
13816
13817 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
13818 * tests/testsuite.at (AT_COMPILE): Use them.
13819 This fixes the testsuite problem reported by Robert Lentz in
161a71f3 13820 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
da99a5dc 13821
93b8c255
PE
138222003-02-12 Paul Eggert <eggert@twinsun.com>
13823
13824 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
13825 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
161a71f3 13826 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
93b8c255
PE
13827 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
13828 Check for malloc failure, for consistency with yacc.c.
13829 (yytname_size): Remove, for consistency with yacc.c.
13830
13831 The bug still remains in data/lalr1.cc, as I didn't have time
13832 to fix it there.
13833
7548fed2
AD
138342003-02-06 Akim Demaille <akim@epita.fr>
13835
13836 * configure.ac (GXX): Rename as...
13837 (CXX): this, to keep the original Autoconf semantics.
13838 Require 2.57.
13839 * data/lalr1.cc: Fix b4_copyright invocations.
13840 If YYDEBUG is not defined, don't depend upon name_ being defined.
13841 (location.hh): Include string and iostream.
13842 (Position::filename): New member.
13843 (Position::Position ()): New.
13844 (operator<< (Position)): New.
13845 (operator- (Position, int)): New.
13846 (Location::first, Location::last): Rename as...
13847 (Location::begin, Location::end): these, to mock the conventional
13848 iterator names.
13849 (operator<< (Location)): New.
13850 * tests/atlocal.in (CXX): New.
13851 * tests/testsuite.at (AT_COMPILE_CXX): New.
13852 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
13853 locations in a more synthetic way.
13854 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
13855 lalr1.cc is used.
13856 Adjust the C locations to match those from Emacs: first column is
13857 column 0.
13858 Change all the expected results.
13859 Conform to the GCS: simplify the locations when applicable.
13860 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
13861 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
13862 these CPP macros with the m4 macros new defined by...
13863 (AT_CHECK_PUSHDEFS): this, i.e.:
13864 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
d02b25f9 13865 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
7548fed2
AD
13866 New macros.
13867 (AT_CHECK_POPDEFS): Undefine them.
13868 (AT_CHECK_CALC_LALR1_CC): New.
13869 Use it for the first lalr1.cc test.
13870
43a176ef
AD
138712003-02-04 Akim Demaille <akim@epita.fr>
13872
13873 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
13874 Location as is defined.
13875
fc049e9c
AD
138762003-02-04 Akim Demaille <akim@epita.fr>
13877
13878 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
13879 name_ being defined.
13880
a737b216
PE
138812003-02-03 Paul Eggert <eggert@twinsun.com>
13882
13883 * src/gram.h (start_symbol): Remove unused decl.
13884
13885 Use more-consistent naming conventions for local vars.
13886
13887 * src/derives.c (derives_compute): Change type of local var from
13888 int to rule_number.
13889 * src/gram.c (grammar_rules_partial_print): Likewise.
13890 * src/print.c (print_core): Likewise.
13891 * src/reduce.c (reduce_grammar_tables): Likewise.
13892
13893 * src/gram.c (grammar_dump): Change name of item_number *
13894 local var from r to rp.
13895 * src/nullable.c (nullable_compute): Likewise.
13896
13897 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
13898
13899 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
13900 for symbol or symbol_number var.
13901 * src/reader.c (grammar_start_symbol_set): Likewise.
13902 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
13903 Likewise.
13904 * src/state.c (transitions_to): Likewise.
13905 * src/state.h: Likewise.
13906 * src/tables.c (symbol_number_to_vector_number): Likewise.
13907
13908 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
13909 char * var.
13910
13911 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
13912 var.
13913
13914 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
13915 var.
13916
13917 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
13918 Use str, not s, for char * var. Use ch, not c, for character var.
13919 Use size for size var.
13920
13921 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
13922 char * var.
13923 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
13924 uniqstr var.
13925 * src/uniqstr.h: Likewise.
13926
13927 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
13928 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
13929 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
13930 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
13931 param to have same name as that of enum, so that we don't use
13932 "s" to stand for a non-state.
13933
68e93ad5
AD
139342003-02-02 Akim Demaille <akim@epita.fr>
13935
13936 * src/scan-skel.l: Scan more than one inert character per yylex
13937 invocation.
13938
92898986
PE
139392003-02-01 Paul Eggert <eggert@twinsun.com>
13940
13941 Version 1.875a.
13942
1d9d5d71
PE
13943 * po/LINGUAS: Add ms.
13944
0435d061
AD
139452003-01-30 Akim Demaille <akim@epita.fr>
13946
13947 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
13948
6029a57f
PH
139492003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
13950
13951 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
13952 of $1.
0435d061
AD
13953
13954 Changes in response to error report by S. Eken: GLR mode does not
6029a57f 13955 handle negative $ indices or $ indices in embedded rules correctly.
161a71f3 13956 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
0435d061 13957
6029a57f
PH
13958 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
13959 (b4_rhs_location): Ditto.
0435d061 13960 (yyfill): New function to copy from stack tree into array
6029a57f 13961 incrementally.
0435d061
AD
13962 (yyuserAction): Modify to allow incremental move of semantic values
13963 to rhs array when in GLR mode.
13964 Define YYFILL to use in user-defined actions to fill semantic array
6029a57f
PH
13965 as needed.
13966 Remove dummy use of yystack, as there is now a guaranteed use.
13967 (yydoAction): Modify to allow incremental move of semantic values
13968 to rhs array when in GLR mode.
13969 (yyresolveAction): Ditto.
13970 (yyglrShiftDefer): Update comment.
0435d061 13971 (yyresolveStates): Use X == NULL for pointers, not !X.
6029a57f
PH
13972 (yyglrReduce): Ditto.
13973 (yydoAction): Ditto
0435d061 13974
6029a57f
PH
13975 * tests/glr-regr1.at: Rename to ...
13976 * tests/glr-regression.at: Add new regression test for the problems
13977 described above (adapted from S. Eken).
13978 Update copyright notice.
13979 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
13980 * tests/Makefile.am: Ditto.
13981
6cee6297
PE
139822003-01-28 Paul Eggert <eggert@twinsun.com>
13983
13984 * data/lalr1.cc: Do not use @output_header_name@ unless
13985 b4_defines_flag is set. This fixes two bugs reported by
13986 Tim Van Holder in
161a71f3
PE
13987 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
13988 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
6cee6297 13989
b2a836b5
PE
139902003-01-21 Paul Eggert <eggert@twinsun.com>
13991
13992 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
13993 we don't need to worry about yyerrlab1 being reported as an
13994 "unused label" by non-GCC C compilers. The downside is that if
13995 locations are used then a couple of statements are duplicated each
13996 time YYERROR is invoked, but the upside is that the warnings
13997 should vanish.
13998 (yyerrlab1): Move code to YERROR.
13999 (yyerrlab2): Remove. Change uses back to yyerrlab1.
14000 This reverts some of the 2002-12-27 change.
14001
4196b931
PE
140022003-01-17 Paul Eggert <eggert@twinsun.com>
14003
14004 * src/output.c (symbol_printers_output): Fix typo that led
14005 to core dump. Problem reported by Antonio Rus in
161a71f3 14006 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
4196b931 14007
3ae831b4
AD
140082003-01-13 Akim Demaille <akim@epita.fr>,
14009 Quoc Peyrot <chojin@lrde.epita.fr>,
14010 Robert Anisko <anisko_r@lrde.epita.fr>
14011
14012 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
14013 when the stacks contain one element, as the loop would otherwise
14014 free the last state, and then use the top state (the one we just
14015 popped). This means that the initial elements will not be freed
14016 explicitly, as is the case in yacc.c; it is not a problem, as
14017 these elements have fake values.
14018
e3aa65c5
PE
140192003-01-11 Paul Eggert <eggert@twinsun.com>
14020
14021 * NEWS: %expect-violations are now just warnings, reverting
14022 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
14023 bootstrapping problem reported by Matthias Klose; see
161a71f3 14024 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
e3aa65c5
PE
14025 * src/conflicts.c (conflicts_print): Likewise.
14026 * tests/conflicts.at (%expect not enough, %expect too much,
14027 %expect with reduce conflicts): Likewise.
14028 * doc/bison.texinfo (Expect Decl): Document this. Also mention
14029 that the warning is enabled if the number of conflicts changes
14030 (not necessarily increases).
14031
14032 * src/getargs.c (version): Update copyright year.
14033
f0057011
AD
140342003-01-09 Akim Demaille <akim@epita.fr>
14035
14036 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
14037
1ee6d2a0
PE
140382003-01-08 Paul Eggert <eggert@twinsun.com>
14039
14040 * Makefile.maint (WGETFLAGS):
14041 New macro, containing "-C off" to disable proxy caches.
14042 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
14043 (rel-check): Use $(WGET) instead of wget.
14044
d4fd77c4
PE
140452003-01-06 Paul Eggert <eggert@twinsun.com>
14046
14047 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
14048 the GLR paper of Scott, Johnstone and Hussain.
14049
464c6927
PE
140502003-01-04 Paul Eggert <eggert@twinsun.com>
14051
d600ee67
PE
14052 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
14053 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
14054 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
14055 (EXTRA_LIBRARIES): New var, for liby.a.
14056 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
14057 (EXTRA_SCRIPTS): New var, for yacc.
14058
464c6927
PE
14059 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
14060 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
14061 Problem reported by Nelson H. F. Beebe.
14062
140632003-01-03 Paul Eggert <eggert@twinsun.com>
14064
14065 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
14066 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
14067 when compiling Bison 1.875's `bitset bset = obstack_alloc
14068 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
14069
14070 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
14071 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
14072 grow to a huge size with typical invocation.
d600ee67 14073
464c6927
PE
14074 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
14075 Use the pattern recommended by Autoconf 2.57, except also protect
14076 against double-definition.
14077 * src/system.h: Likewise.
14078 Portability issues reported by Nelson H. F. Beebe.
d600ee67 14079
464c6927
PE
14080 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
14081 All uses changed. Provide a definition in both C and C++.
14082 (yytrue, yyfalse): Define even if defined (__cplusplus).
14083
14084 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
14085 Reported by Nelson H. F. Beebe.
d600ee67 14086
464c6927
PE
14087 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
14088
0f42c7d5
PE
140892003-01-02 Paul Eggert <eggert@twinsun.com>
14090
14091 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
14092 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
14093 Bug reported by Nelson H. F. Beebe.
14094
dc546b0f
PE
140952003-01-01 Paul Eggert <eggert@twinsun.com>
14096
14097 * Version 1.875.
14098
2c09b6a7
PE
140992002-12-30 Paul Eggert <eggert@twinsun.com>
14100
14101 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
14102 Moved here from...
14103 (<INITIAL>","): Here. This causes stray "," to be treated
14104 more uniformly.
14105
dc546b0f 14106 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
2c09b6a7
PE
14107 last brace in braced code when not in Yacc mode, for compatibility
14108 with Bison 1.35. This resurrects the 2001-12-15 patch to
14109 src/reader.c.
14110
14111 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
14112 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
14113
535c0f63
PE
141142002-12-28 Paul Eggert <eggert@twinsun.com>
14115
14116 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
14117 that of SYM's type. This fixes Debian bug 168069, reported by
14118 Thomas Olsson.
d600ee67 14119
963fcc17
PE
141202002-12-28 Paul Eggert <eggert@twinsun.com>
14121
14122 Version 1.75f.
14123
14124 Switch back to the Yacc style of conflict reports, undoing some
14125 of the 2002-07-30 change.
14126 * doc/bison.texinfo (Understanding): Use Yacc style for
14127 conflict reports. Also, use new way of locating rules.
14128 * src/conflicts.c (conflict_report):
14129 Renamed from conflict_report_yacc, removing the old
14130 'conflict_report'. Translate the entire conflict report at once,
14131 so that we don't assume that "," has the same interpretation in
14132 all languages.
14133 (conflicts_output): Use Yacc-style conflict report for each state,
14134 instead of our more-complicated style.
14135 (conflicts_print): Use Yacc-style conflict report, except print
14136 the input file name when not emulating Yacc.
14137 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
14138 Conflicted Reduction, %expect not enough, %expect too much,
14139 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
14140 * tests/existing.at (GNU Cim Grammar): Likewise.
14141 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
14142
14143 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
14144 fatal): Don't invoke fflush; it's not needed and it might even be
14145 harmful for stdout, as stdout might not be open.
14146 * src/reduce.c (reduce_print): Likewise.
14147
b1efe548
PE
141482002-12-27 Paul Eggert <eggert@twinsun.com>
14149
14150 Fix a bug where error locations were not being recorded correctly.
14151 This problem was originally reported by Paul Hilfinger in
161a71f3 14152 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
b1efe548
PE
14153
14154 * data/yacc.c (yyparse): New local var yylerrsp, to record the
14155 top of the location stack's error locations.
14156 (yyerrlab): Set it. When discarding a token, push its location
14157 onto yylerrsp so that we don't lose track of the error's end.
14158 (yyerrlab1): Now is only the target of YYERROR, so that we can
14159 properly record the location of the action that failed. For GCC
14160 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
14161 GCC warning about yyerrlab1 being unused if YYERROR is unused.
14162 (yyerrlab2): New label, which yyerrlab now falls through to.
14163 Compute the error's location by applying YYLLOC_DEFAULT to
14164 the locations of all the symbols that went into the error.
14165 * doc/bison.texinfo (Location Default Action): Mention that
14166 YYLLOC_DEFAULT is also invoked for syntax errors.
14167 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
14168 Error locations include the locations of all the tokens that were
14169 discarded, not just the last token.
d600ee67 14170
983c5c2c
PE
141712002-12-26 Paul Eggert <eggert@twinsun.com>
14172
b1efe548
PE
14173 * src/files.c: Include quote.h.
14174 (compute_output_file_names): Warn if we detect conflicting
14175 outputs to the same file. This should catch the misunderstanding
14176 exemplified by Debian Bug 165349, reported by Bruce Stephens..
14177
14178 * src/conflicts.c (conflicts_print): If the user specifies
14179 "%expect N", report an error if there are any reduce/reduce
14180 conflicts. This is what the manual says should happen.
14181 This fixes Debian bug 130890, reported by Anthony DeRobertis.
14182 * tests/conflicts.at (%expect with reduce conflicts): New test.
14183
983c5c2c
PE
14184 Don't use m4_include on relative file names, as it doesn't work as
14185 desired if there happens to be a file with that name under ".".
d600ee67 14186
983c5c2c
PE
14187 * m4sugar/version.m4: Remove; it was included but it wasn't used.
14188 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
14189 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
14190 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
14191 * src/output.c (output_skeleton): Use full path names when
14192 specifying a file to include; don't rely on include path, as
14193 it's unreliable when the working file contains a file with
14194 that name.
d600ee67 14195
983c5c2c
PE
141962002-12-25 Paul Eggert <eggert@twinsun.com>
14197
14198 Remove obsolete references to bison.simple and bison.hairy.
14199 Problem mentioned by Aubin Mahe in
161a71f3 14200 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
983c5c2c
PE
14201 * data/glr.c: Comment fix.
14202 * doc/bison.1: Remove references. Also, mention "yacc".
14203
14204 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
14205 with -g option.
14206
14207 * src/parse-gram.y (declaration): Use enum "report_states" rather
14208 than its numeric value 1.
14209
14210 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
14211 opening a new one. This fixes Debian bug 165349, reported by
14212 Bruce Stephens.
14213
23f2d9dc
PE
142142002-12-24 Paul Eggert <eggert@twinsun.com>
14215
14216 Version 1.75e.
14217
14218 * Makefile.maint (cvs-update): Don't assume that the shell
14219 supports $(...), as Solaris sh doesn't.
14220
14221 * src/parse-gram.y (lloc_default): Remove test for empty
14222 nonterminals at the end, since it didn't change the result.
14223
142242002-12-24 Paul Eggert <eggert@twinsun.com>
33167b8b
PE
14225
14226 If the user does not define YYSTYPE as a macro, Bison now declares it
14227 using typedef instead of defining it as a macro. POSIX requires this.
14228 For consistency, YYLTYPE is also declared instead of defined.
14229
14230 %union directives can now have a tag before the `{', e.g., the
14231 directive `%union foo {...}' now generates the C code
14232 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
14233 The default union tag is `YYSTYPE', for compatibility with Solaris 9
14234 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
14235 instead of `yyltype'.
14236
14237 `yystype' and `yyltype' are now obsolescent macros instead of being
14238 typedefs or tags; they are no longer documented and will be
14239 withdrawn in a future release.
14240
14241 * data/glr.c (b4_location_type): Remove.
14242 (YYSTYPE): Renamed from yystype.
14243 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
14244 (struct YYLTYPE): Renamed from struct yyltype.
14245 (YYLTYPE): Renamed from yyltype.
14246 (yyltype, yystype): New (and obsolescent) macros,
14247 for backward compatibility.
14248 * data/yacc.c: Likewise.
14249
14250 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
14251 does not specify a union tag. This is for compatibility with
14252 Solaris 9 yacc.
14253
14254 * src/parse-gram.y (add_param): 2nd arg is now char * not char
14255 const *, since it is now modified by stripping surrounding { }.
14256 (current_braced_code): Remove.
14257 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
14258 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
14259 trailing " {...}". Now of type <chars>.
14260 (grammar_declaration): Adjust to bundled tokens.
14261 (code_content): Remove; stripping is now done by add_param.
14262 (print_token_value): Print contents of bundled tokens.
14263 (token_name): New function.
14264
14265 * src/reader.h (braced_code, current_braced_code): Remove.
14266 (token_name): New decl.
14267
14268 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
14269 token_type, not braced_code code_kind. All uses changed.
14270 (SC_PRE_CODE): New state, for scanning after a keyword that
14271 has (or usually has) an immediately-following braced code.
14272 (token_type): New local var, to keep track of which token type
14273 to return when scanning braced code.
14274 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
dc546b0f 14275 <INITIAL>"%parse-param", <INITIAL>"%printer",
33167b8b
PE
14276 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
14277 instead of returning a token type immediately.
14278 (<INITIAL>"{"): Set token type.
14279 (<SC_BRACED_CODE>"}"): Use it.
14280 (handle_action_dollar, handle_action_at): Now returns bool
14281 indicating success. Fail if ! current_rule; this prevents a core dump.
14282 (handle_symbol_code_dollar, handle_symbol_code_at):
14283 Remove; merge body into caller.
14284 (handle_dollar, handle_at): Complain in invalid contexts.
14285
14286 * NEWS, doc/bison.texinfo: Document the above.
14287 * NEWS: Fix years and program names in copyright notice.
14288
879ca4f8
PE
142892002-12-17 Paul Eggert <eggert@twinsun.com>
14290
14291 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
14292 Reporting, Table of Symbols): Omit mentions of %lex-param and
14293 %parse-param from the documentation for now.
14294
1c5fe69d
PE
142952002-12-15 Paul Eggert <eggert@twinsun.com>
14296
14297 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
14298 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
14299 lookahead symbol, and which sets yychar in parser actions) and it
7ea9026a
PE
14300 disagreed with the Bison documentation. Bug
14301 reported by Andrew Walrond.
d600ee67 14302
1c5fe69d
PE
14303 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
14304 as the caller now does that.
14305 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
14306 (YYEMPTY): Parenthesize right hand side, since others use it.
14307 (yyparse): Don't assume that our generated code is the only code
14308 that sets yychar.
14309
d1de5372
PE
143102002-12-13 Paul Eggert <eggert@twinsun.com>
14311
14312 Version 1.75d.
14313
14314 POSIX requires a "yacc" command.
14315 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
14316 (MOSTLYCLEANFILES): Add yacc.
14317 (yacc): New rule.
1c5fe69d 14318 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
d1de5372
PE
14319 as an alias for bison y.
14320
14321 * po/LINGUAS: Add da.
d600ee67 14322
d1de5372
PE
14323 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
14324 problem with latest <getopt.h>.
14325 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
14326
14327 * doc/fdl.texi: Upgrade to 1.2.
14328 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
14329 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
14330 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
14331 gnulib.
14332 * config/install-sh: Sync with autotools.
14333
14334 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
161a71f3 14335 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
d1de5372
PE
14336 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
14337 locations are requested.
14338 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
14339 locations are requested.
14340
d0f3fe23
PE
143412002-12-12 Paul Eggert <eggert@twinsun.com>
14342
14343 Remove unportable casts and storage allocation tricks.
14344 While we're at it, remove almost all casts, since they
14345 usually aren't needed and are a sign of trouble.
14346
14347 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
14348
14349 * src/derives.c (derives_compute): Do not subtract NTOKENS from
14350 the pointer DSET returned by malloc; this isn't portable.
14351 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
14352 Similarly for DERIVES.
14353 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
14354 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
14355 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
14356
14357 * src/derives.c (derives_compute): Do not bother invoking
14358 int_of_rule_number, since rule numbers are integers.
14359
14360 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
14361 rather than XMALLOC (char, N).
14362
14363 * src/files.c (filename_split): Rewrite to avoid cast.
14364
14365 * src/gram.h (symbol_number_as_item_number,
14366 item_number_as_symbol_number, rule_number_as_item_number,
14367 item_number_as_rule_number):
14368 Now inline functions rather than macros, to avoid casts.
14369 * src/state.h (state_number_as_int): Likewise.
14370 * src/tables.c (state_number_to_vector_number,
14371 symbol_number_to_vector_number): Likewise.
14372
14373 * src/gram.h (int_of_rule_number): Remove; no longer used.
14374
14375 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
14376 since the resulting storage is always stored into.
14377
14378 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
14379 where it's needed.
14380
14381 * src/muscle_tab.c (muscle_m4_output):
14382 Now inline. Return bool, not int.
14383 * src/state.c (state_compare): Likewise.
14384 * src/symtab.c (symbol_check_defined,
14385 symbol_check_alias_consistency, symbol_pack, symbol_translation,
14386 hash_compare_symbol, hash_symbol):
14387 Likewise.
14388 * src/uniqstr.c (uniqstr_print): Likewise.
14389 * src/muscle_tab.c (muscle_m4_output_processor):
14390 New function, to avoid casts.
14391 * src/state.c (state_comparator, stage_hasher): Likewise.
14392 * src/symtab.c (symbol_check_defined_processor,
14393 symbol_check_alias_consistency_processor, symbol_pack_processor,
14394 symbol_translation_processor, hash_symbol_comparator,
14395 hash_symbol_hasher): Likewise.
14396 * src/uniqstr.c (uniqstr_print_processor): Likewise.
14397 * src/muscle_tab.c (muscles_m4_output):
14398 Use new functions instead of casting old functions unportably.
14399 * src/state.c (state_hash_new): Likewise.
14400 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
14401 symbols_token_translations_init):
14402 Likewise.
14403 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
14404
14405 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
14406 var instead of casting to long, to avoid casts.
14407 (prepare_states): Use MALLOC rather than alloca, so that we don't
14408 have to worry about alloca.
14409 * src/state.c (state_hash_lookup): Likewise.
14410
14411 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
14412 local var instead of casting to unsigned char, to avoid casts.
14413
14414 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
14415 STATE_ALLOC): Remove.
14416 (transitions_new, errs_new, reductions_new, state_new): Use malloc
14417 rather than calloc, and use offsetof to avoid allocating slightly
14418 too much storage.
14419 (state_new): Initialize all members.
14420
14421 * src/state.c (state_hash): Use unsigned accumulator, not signed.
14422
14423 * src/symtab.c (symbol_free): Remove; unused.
14424 (symbol_get): Remove cast in lhs of assignment.
14425 (symbols_do): Now static. Accept generic arguments, not
14426 hashing-related ones.
14427
14428 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
14429 (symbol_processor): Remove.
14430 (symbols_do): Remove decl; now static.
14431
14432 * src/system.h (alloca): Remove; decl no longer needed.
14433 (<stddef.h>): Include, for offsetof.
14434 (<inttypes.>, <stdint.h>): Include if available.
14435 (uintptr_t): New type, if system lacks it.
14436 (CALLOC, MALLOC, REALLOC): New macros.
14437 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
14438 new macros.
14439
14440 * src/tables.c (table_size): Now int, to pacify GCC.
14441 (table_grow, table_ninf_remap): Use signed table size.
14442 (save_row): Don't bother initializing locals when not needed.
14443 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
14444 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
14445
14446 * src/vcg.h: Correct misspellings.
14447
14448 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
14449
14450
14451 * src/getargs.c (getargs): Don't assume EOF == -1.
14452
26b4a969
PE
144532002-12-09 Paul Eggert <eggert@twinsun.com>
14454
14455 Change identifier spellings to avoid collisions with names
14456 that are reserved by POSIX.
14457
14458 Don't use names ending in _t, since POSIX reserves them.
14459 For consistency, remove _e and _s endings -- they're weren't
14460 needed to remove ambiguity. All uses changed.
14461 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
14462 turn was just renamed from struniq_t.
14463 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
14464 which in turn was just renamed from struniq_processor_t.
14465 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
14466 in turn was renamed from hash_compare_struniq_t.
14467 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
14468 (state_list): Renamed from state_list_t.
14469 * src/assoc.h (assoc): Renamed from assoc_t.
14470 * src/conflicts.c (enum conflict_resolution): Renamed from
14471 enum conflict_resolution_e.
14472 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
14473 (rule_list): Renamed from rule_list_t.
14474 * src/getargs.h (enum trace): Renamed from enum trace_e.
14475 (enum report): Renamed from enum report_e.
14476 * src/gram.h (item_number): Renamed from item_number_t.
14477 (rule_number): Renamed from rule_number_t.
14478 (struct rule_s): Remove the "rule_s" part; not used.
14479 (rule): Renamed from rule_t.
14480 (rule_filter): Renamed from rule_filter_t.
14481 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
14482 (goto_list): Renamed from goto_list_t.
14483 * src/lalr.h (goto_number): Renamed from goto_number_t.
14484 * src/location.h (location): Renamed from location_t.
14485 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
14486 and moved here from:
14487 * src/muscle_tab.h (muscle_entry_t): here.
14488 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
14489 (rule_list): Renamed from rule_list_t.
14490 * src/print_graph.c (static_graph): Renamed from graph.
14491 * src/reader.h (braced_code): Renamed from braced_code_t.
14492 Remove brace_code_e tag.
14493 * src/relation.h (relation_node): Renamed from relation_node_t.
14494 (relation_nodes): Renamed from relation_nodes_t.
14495 (relation): Renamed from relation_t.
14496 * src/state.h (state_number): Renamed from state_number_t.
14497 (struct state): Renamed from struct state_s.
14498 (state): Renamed from state_t.
14499 (transitions): Renamed from transitions_t. Unused (and
14500 misspelled) transtion_s tag removed.
14501 (errs): Renamed from errs_t. Unused errs_s tag removed.
14502 (reductions): Renamed from reductions_t. Unused tag
14503 reductions_s removed.
14504 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
14505 (struct symbol_list): Renamed from struct symbol_list_s.
14506 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
14507 (struct symbol): Renamed from struct symbol_s.
14508 (symbol): Renamed from symbol_t.
14509 * src/tables.c (vector_number): Renamed from vector_number_t.
14510 (action_number): Renamed from action_t.
14511 * src/tables.h (base_number): Renamed from base_t.
14512 * src/vcg.h (enum color): Renamed from enum color_e.
14513 (enum textmode): Renamed from enum textmode_e.
14514 (enum shape): Renamed from enum shape_e.
14515 (struct colorentry): Renamed from struct colorentry_s.
14516 (struct classname): Renamed from struct classname_s.
14517 (struct infoname): Renamed from struct infoname_s.
14518 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
14519 (enum decision): Renamed from enum decision_e.
14520 (enum orientation): Renamed from enum orientation_e.
14521 (enum alignment): Renamed from enum alignment_e.
14522 (enum arrow_mode): Renamed from enum arrow_mode_e.
14523 (enum crossing_type): Renamed from enum crossing_type_e.
14524 (enum view): Renamed from enum view_e.
14525 (struct node): Renamed from struct node_s.
14526 (node): Renamed from node_t.
14527 (enum linestyle): Renamed from enum linestyle_e.
14528 (enum arrowstyle): Renamed from enum arrowstyle_e.
14529 (struct edge): Renamed from struct edge.
14530 (edge): Renamed from edge_t.
14531 (struct graph): Renamed from struct graph_s.
14532 (graph): Renamed from graph_t.
14533 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
14534 Rename value_t -> value.
14535 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
14536 value_t_as_yystype -> value_as_yystype.
14537
14538 Don't include <errno.h> in the mainstream code, since it
14539 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
14540 * lib/get-errno.c, lib/get-errno.h: New files.
14541 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
14542 get-errno.c.
14543 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
14544 * src/output.c (output_skeleton): Likewise.
14545 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
14546 instead of errno.
14547 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
14548 Likewise.
14549 (handle_action_dollar, handle_action_at): Likewise.
14550 * src/system.h: Do not include <errno.h>.
14551 (TAB_EXT): Renamed from EXT_TAB.
14552 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
14553
14554 Avoid str[a-z]*, since <string.h> reserves that name space.
14555 Change all instances of "struniq" in names to "uniqstr", and
14556 likewise for "STRUNIQ" and "UNIQSTR".
14557 * src/uniqstr.c: Renamed from src/struniq.c.
14558 * src/uniqstr.h: Renamed from src/struniq.h.
14559 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
14560 * src/files.c (strsuffix): Remove; unused.
14561 (concat2): Renamed from stringappend. Now static.
14562 * src/files.h (strsuffix, stringappend): Remove; unused.
14563 * src/parse-gram.y (<chars>): Renamed from <string>.
14564 (<uniqstr>): Renamed from <struniq>.
14565 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
14566 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
14567 (struct graph_s.expand): Renamed from struct graph_s.stretch.
14568 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
14569 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
14570 (N_EXPAND): Renamed from N_STRETCH.
14571
14572 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
14573 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
14574 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
14575 Remove; unused.
14576 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
14577 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
14578 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
14579 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
14580 (BASE_MAXIMUM): Renamed from BASE_MAX.
14581 (BASE_MINIMUM): Renamed from BASE_MIN.
14582 (ACTION_MAX): Remove; unused.
14583 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
14584 Unnecessary casts removed from above defines.
14585
14586
14587 Fix misspelling in names.
14588 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
14589 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
14590 G_NODE_ALIGNEMENT.
14591
14592
14593 * lib/timevar.c (timevar_report): Renamed from time_report,
14594 for consistency with other names.
14595 * lib/timevar.h (timevar_report): New decl.
14596 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
14597
14598
14599 Sort include-file uses.
14600
14601 Reorder all include files under src to be in the order "system.h".
14602 then the ../lib include files in angle brackets (alphabetized),
14603 then the . include files in double-quotes (alphabetized). Fix
14604 dependency breakages encountered in this process, as follows:
14605 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
14606 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
14607 * src/state.h: Include "symtab.h".
14608
996b1c7e
PE
146092002-12-08 Paul Eggert <eggert@twinsun.com>
14610
14611 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
14612 since this causes problems when __file__ contains character
14613 sequences like "@" that are treated specially by src/scan-skel.l.
14614 Instead, just use the file's basename. This fixes the bug
14615 reported by Martin Mokrejs in
161a71f3 14616 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
996b1c7e 14617
e19c4e5d
PE
146182002-12-06 Paul Eggert <eggert@twinsun.com>
14619
14620 Add support for rules that do not have trailing semicolons, as
14621 POSIX requires. Improve the quality of locations in Bison
14622 diagnostics.
26b4a969 14623
e19c4e5d
PE
14624 * src/location.c: Include <quotearg.h>.
14625 (empty_location): Now const.
14626 (location_print): New function. Follow the recommendation of the
14627 GNU Coding Standards for locations that span file boundaries.
14628 * src/location.h: Do not include <quotearg.h>; no longer needed.
14629 (boundary): New type.
14630 (location_t): Use it. This allows locations to span file boundaries.
14631 All member uses changed: file -> start.file or end.file (as needed),
14632 first_line -> start.line, first_column -> start.column,
14633 last_line -> end.line, last_column -> end.column.
14634 (equal_boundaries): New function.
14635 (LOCATION_RESET, LOCATION_STEP): Remove.
14636 (LOCATION_PRINT): Remove. All callers changed to use location_print.
14637 (empty_location): Now const.
14638 (location_print): New decl.
14639 * src/parse-gram.y (lloc_default): New function, which handles
14640 empty locations more accurately.
14641 (YYLLOC_DEFAULT): Use it.
14642 (%token COLON): Remove.
14643 (%token ID_COLON): New token.
26b4a969 14644 (rules): Use it.
e19c4e5d
PE
14645 (declarations, rules): Remove trailing semicolon.
14646 (declaration, rules_or_grammar_declaration):
14647 Allow empty (";") declaration.
14648 (symbol_def): Remove empty actions; no longer needed.
14649 (rules_or_grammar_declaration): Remove trailing semicolon.
14650 (semi_colon.opt): Remove.
14651 * src/reader.h: Include location.h.
14652 (scanner_cursor): New decl.
14653 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
14654 rolling our own.
14655 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
14656 of *loc.
14657 (STEP): Remove. No longer needed, now that adjust_location does
14658 the work. All uses removed.
14659 (scanner_cursor): New var.
14660 (adjust_location): Renamed from extend_location. It now sets
14661 *loc and adjusts the scanner cursor. All uses changed.
14662 Don't bother testing for CR.
14663 (handle_syncline): Remove location arg; now updates scanner cursor.
14664 All callers changed.
14665 (unexpected_end_of_file): Now accepts start boundary of token or
14666 comment, not location. All callers changed. Update scanner cursor,
14667 not the location.
14668 (SC_AFTER_IDENTIFIER): New state.
14669 (context_state): Renamed from c_context. All uses changed.
14670 (id_loc, code_start, token_start): New local vars.
14671 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
14672 processing of Yacc white space and equivalents here.
14673 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
14674 instead of returning ID immediately, since we need to search for
14675 a subsequent colon.
14676 (<INITIAL>"'", "\""): Save token_start.
14677 (<INITIAL>"%{", "{", "%%"): Save code_start.
14678 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
14679 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
14680 BEGIN context_state at end, not INITIAL.
14681 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
14682 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
14683 Return correct token start.
14684 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
14685 the start of a character, string or multiline comment is found.
14686 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
14687 Reduction): Adjust reported locations to match the more-precise
14688 results now expected.
14689 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
14690 * tests/reduce.at (Useless Rules, Reduced Automaton,
14691 Underivable Rules): Likewise.
14692 * tests/regression.at (Invalid inputs): No longer `expecting ";"
14693 or "|"' now that so many other tokens are allowed by the new grammar.
14694
14695 * src/complain.h (current_file): Remove duplicate decl;
14696 current_file is now owned by files.h.
14697 * src/complain.c, src/scan-gram.l: Include files.h.
14698
146992002-12-06 Paul Eggert <eggert@twinsun.com>
26b4a969 14700
e19c4e5d
PE
14701 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
14702 promotes to int; it might be unsigned int.
14703 * data/yacc.c (yy_reduce_print): Likewise.
14704
14705 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
14706 be #defined in the prologue, not in the Bison declarations.
14707 This fixes Debian Bug 102878, reported by Shaul Karl.
26b4a969 14708
b64755e3
PE
147092002-12-02 Paul Eggert <eggert@twinsun.com>
14710
14711 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
14712 * lib/strtoul.c: New file, from gnulib.
14713 This fixes a porting bug reported by Peter Klein in
161a71f3 14714 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
b64755e3 14715
6e746484
PE
147162002-11-30 Paul Eggert <eggert@twinsun.com>
14717
b64755e3
PE
14718 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
14719 and put only a forward declaration in the prologue. This is for
14720 consistency with the other scanner helper functions.
14721
6ba55592
PE
14722 Type clashes now generate warnings, not errors, since it
14723 appears that POSIX may allow some grammars with type clashes.
14724 * src/reader.c (grammar_current_rule_check): Warn about
14725 type clashes instead of complaining.
14726 * tests/input.at (Type Clashes): Expect warnings, not complaints.
14727
6e746484
PE
14728 Add Yacc library, since POSIX requires it.
14729 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
14730 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
14731 * lib/main.c, lib/yyerror.c: New files.
14732
14733 gram_error can be static; it need not be extern.
14734 * src/reader.h (gram_error): Remove decl.
14735 * src/parse-gram.y (gram_error): Now static. Add static decl.
14736 (print_token_value): Omit parameter names from forward decl,
14737 for consistency.
14738
88510f9c
PE
147392002-11-29 Paul Eggert <eggert@twinsun.com>
14740
6e746484
PE
14741 * doc/bison.texinfo: Emphasize that yylex and yyerror must
14742 be declared before being used. E.g., one should typically
14743 declare them in the prologue. Use GNU coding style in examples.
14744 Put "const" consistently after the type it modifies. Mention
14745 that C99 supports "inline". Mention that yyerror traditionally
14746 returns "int".
14747
88510f9c
PE
14748 %parse-param and %lex-param now take just one argument, the
14749 declaration; the argument name is deduced from the declaration.
14750
14751 * doc/bison.texinfo (Parser Function, Pure Calling, Error
14752 Reporting, Table of Symbols): Document this.
14753 * src/parse-gram.y (add_param): New function.
14754 (COMMA): Remove.
14755 (declaration): Implement new rule for %parse-param and %lex-param.
14756 * src/scan-gram.l: "," now elicits a warning, rather than being
14757 a token; this is more compatible with byacc.
14758 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
14759
bb92250c
PE
147602002-11-27 Paul Eggert <eggert@twinsun.com>
14761
14762 Rename identifiers to avoid real and potential collisions.
14763
14764 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
14765 to avoid collision with lex macro described by Bruce Lilly in
161a71f3 14766 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
bb92250c
PE
14767 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
14768 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
14769 * src/parse-gram.y (print_token_value): Renamed from yyprint.
14770 All uses changed.
14771 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
14772 The name "yycontrol" violates the name space rules, and this stuff
14773 wasn't being used anyway.
14774 (input): Remove action; this stuff wasn't being used.
14775 (gram_error): Rename local variable yylloc -> loc.
14776 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
14777 (YY_DECL): Don't use "yy" at start of local variables.
14778 All uses changed, e.g., yylloc -> loc.
14779 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
14780 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
14781 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
14782 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
14783
14784 * src/parse-gram.y (gram_error): loc is now const *.
14785 * src/reader.h (gram_error): Likewise.
14786
3af4feb2
PE
147872002-11-24 Paul Eggert <eggert@twinsun.com>
14788
14789 Version 1.75c.
14790
14791 * tests/actions.at (Actions after errors): Use an output format
14792 more similar to that of the Printers and Destructors test.
14793 Test the position of the ';' token too.
14794 (Printers and Destructors): Likewise.
14795 (Printers and Destructors: %glr-parser): Remove for now, to avoid
14796 unnecessarily alarming people when the test fails.
14797
14798 * data/yacc.c (yyerrlab1): Move this label down, so that the
14799 parser does not discard the lookahead token if the user code
14800 invokes YYERROR. This change is required for POSIX conformance.
14801
14802 * lib/error.c: Sync with gnulib.
14803
148042002-11-22 Paul Eggert <eggert@twinsun.com>
14805
14806 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
14807 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
14808 * lib/xmalloc.c: Likewise.
26b4a969 14809
58004308
PE
148102002-11-20 Paul Eggert <eggert@twinsun.com>
14811
14812 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
14813
148142002-11-20 Paul Eggert <eggert@twinsun.com>
26b4a969 14815
58004308
PE
14816 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
14817 should use `if (! x) abort ();' rather than `assert (x);', and
14818 anyway it's one less thing to worry about configuring.
14819
14820 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
14821 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
14822 and replace all instances of assert with abort.
14823 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
14824 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
14825
14826 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
14827 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
14828 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
14829 hash_find_entry, hash_rehash, hash_insert): Likewise.
14830 * src/conflicts.c (resolve_sr_conflict): Likewise.
14831 * src/lalr.c (set_goto_map, map_goto): Likewise.
14832 * src/nullable.c (nullable_compute): Likewise.
14833 * src/output.c (prepare_rules, token_definitions_output): Likewise.
14834 * src/reader.c (packgram, reader): Likewise.
14835 * src/state.c (state_new, state_free, state_transitions_set,
14836 state_reduction_find): Likewise.
14837 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
14838 symbol_pack): Likewise.
14839 * src/tables.c (conflict_row, pack_vector): Likewise.
14840 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
14841 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
14842 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
14843 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
14844
14845 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
14846 (ARGMATCH_CONSTRAINT): New macro.
14847 (ARGMATCH_ASSERT): Use it.
14848
14849 * src/system.h (verify): New macro.
14850 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
14851 rather than assert.
14852 * src/tables.c (tables_generate): Likewise.
14853
14854 * src/struniq.c (struniq_assert): Now returns void, and aborts
14855 if the assertion is false.
14856 (struniq_assert_p): Remove.
14857 * src/struniq.h: Likewise.
14858
76ae8198
PE
148592002-11-18 Paul Eggert <eggert@twinsun.com>
14860
14861 * data/glr.c (yygetLRActions): Replace `yyindex' with
14862 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
14863 This fixes the regression with Sun ONE Studio 7 cc that I reported in
161a71f3 14864 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
76ae8198 14865
d3c4e709
AD
148662002-11-18 Akim Demaille <akim@epita.fr>
14867
14868 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
14869 space.
14870 From Tim Van Holder.
14871
8d8a7238
PE
148722002-11-17 Paul Eggert <eggert@twinsun.com>
14873
14874 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
14875 to "SyntaxError" for consistency with my 2002-11-15 change.
14876
14877 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
14878 not define to {}, since this breaks the common use of `YYDPRINTF
14879 ((...));' if a single statement is desired (e.g. before `else').
14880 Work around GCC warnings by surrounding corresponding calls with
14881 {} if needed.
14882 (yyhasResolvedValue): Remove unused function.
14883 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
14884 loop body.
14885 (yyreportSyntaxError): Renamed from yyreportParseError.
14886 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
14887 All uses changed.
14888 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
14889 extern when possible. Remove unused initializations.
14890
b0937b22
AD
148912002-11-16 Akim Demaille <akim@epita.fr>
14892
14893 Augment the similarity between GLR and LALR traces.
14894
14895 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
14896 (YY_REDUCE_PRINT): New.
14897 (yyparse): Use them.
14898 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
14899 YYDPRINT here.
14900 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
14901 state reached after the reduction/recovery, since...
14902 (yyparse, yyprocessOneStack): Report the state we are entering in.
14903
c5e3e510
AD
149042002-11-16 Akim Demaille <akim@epita.fr>
14905
14906 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
14907 Add support for --trace=skeleton.
14908 * src/scan-skel.l: %option debug.
14909 Scan strings of non-@ or \n instead of character by character.
14910 (scan_skel): Handle trace_skeleton.
14911 (QPUTS): New.
14912 (@output_parser_name@, @output_header_name@): ``Restore'' their
14913 support (used to be M4 macros).
14914 * data/yacc.c: Quote larger chunks, a la glr.c.
14915 * data/lalr1.cc: Likewise.
14916 The header guards are no longer available, so use some other
14917 string than `YYLSP_NEEDED'.
14918
4c6cc1db
AD
149192002-11-16 Akim Demaille <akim@epita.fr>
14920
14921 Make the ``Printers and Destructors'' test more verbose, taking
14922 `yacc.c''s behavior as (possibly wrong) reference.
14923
14924 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
14925 instead of fprint on stdout.
14926 Set and report the last_line of the symbols.
14927 Consistently display values and locations.
14928
6d9e8019
PE
149292002-11-16 Paul Eggert <eggert@twinsun.com>
14930
14931 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
14932
6e649e65
PE
149332002-11-15 Paul Eggert <eggert@twinsun.com>
14934
b25d88f6
PE
14935 * tests/actions.at (Actions after errors): New test case.
14936
6e649e65
PE
14937 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
14938 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
14939 tests/action.at, tests/calc.at, tests/conflicts.at,
14940 tests/cxx-type.at, tests/regression.at:
14941 "parse error" -> "syntax error" for POSIX compatibility.
14942 "parsing stack overflow..." -> "parser stack overflow" so
14943 that code matches Bison documentation.
14944
0f39aab9
AD
149452002-11-15 Akim Demaille <akim@epita.fr>
14946
14947 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
14948 take two BRACED_CODE, not two string_content.
14949 Free the scanner's obstack when we are done.
14950 (code_content): New.
14951 * tests/calc.at: Adjust.
14952 * doc/bison.texinfo: Adjust.
14953 Also, make sure to include the `,' for these declarations.
14954
761c1926
AD
149552002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
14956
14957 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
14958 definition; avoids potential autoreconf problems.
14959
b0f98b10
AD
149602002-11-15 Akim Demaille <akim@epita.fr>
14961
14962 Always check the value returned by yyparse.
14963
14964 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
14965 returned by yyparse.
14966 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
14967 Adjust calls.
14968 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
14969 returned by yyparse.
14970
970785f1
PH
149712002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
14972
14973 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
14974 on input.at test.
14975
8fcc7db1
PE
149762002-11-14 Paul Eggert <eggert@twinsun.com>
14977
7ec1b48e
PE
14978 * src/output.c (output_skeleton): Call xfopen instead of
14979 duplicating xfopen's body.
14980
cfff7583 14981 Fix bugs reported by Nelson H. F. Beebe in
161a71f3 14982 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
cfff7583 14983
8fcc7db1
PE
14984 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
14985 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
14986 Group compiler. Instead, use "$CC -E bar.c". Include the .h
14987 file twice in the grammar, as an extra check.
14988
14989 * tests/input.at (Torturing the Scanner): Surround the
14990 backslash-newline tests with "#if 0", to make it less likely that
14991 we'll run into compiler bugs. Bring back solitary \ inside
14992 comment, but add a closing comment to work around HP C bug. Don't
e3aa65c5 14993 test backslash-newline in C character constant.
8fcc7db1 14994
4e8d992c
AD
149952002-11-14 Akim Demaille <akim@epita.fr>
14996
14997 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
14998 status of the compiler.
f32b346d 14999 Calling `exit 1' is no longer needed.
4e8d992c
AD
15000 Reported by Nelson H. F. Beebe.
15001
9501dc6e
AD
150022002-11-14 Akim Demaille <akim@epita.fr>
15003
15004 * tests/atlocal.in (CPPFLAGS): We have config.h.
15005 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
15006 New.
15007 * tests/actions.at, tests/calc.at, tests/conflicts.at,
15008 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
15009 * tests/regression.at, tests/torture.at: Use them for all the
15010 grammars that are to be compiled.
15011 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
15012 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
15013 * doc/bison.texinfo (GLR Parsers): Document `inline'.
15014
18b519c0
AD
150152002-11-14 Akim Demaille <akim@epita.fr>
15016
15017 * doc/bison.texinfo: Various formatting changes (alignments in
15018 samples, additional @group/@end group, GCS in samples.
15019 Use @deffn instead of simple @table to define the directives,
15020 macros, variables etc.
15021
9a86cdb9
PE
150222002-11-13 Paul Eggert <eggert@twinsun.com>
15023
daa33def 15024 Fix some bugs reported by Albert Chin-A-Young in
161a71f3 15025 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
18b519c0 15026
daa33def 15027 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
8fcc7db1 15028 -o c"; the HP C compiler chatters during compilation.
daa33def
PE
15029 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
15030 * tests/headers.at (export YYLTYPE): Likewise.
15031
15032 * tests/input.at (Torturing the Scanner): Remove lines containing
8fcc7db1 15033 solitary backslashes, as they tickle a bug in the HP C compiler.
daa33def 15034
9a86cdb9
PE
15035 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
15036 comments, since they're not portable. Use GNU coding style.
15037
9c1e26bd
AD
150382002-11-13 Akim Demaille <akim@epita.fr>
15039
15040 * data/yacc.c: Leave bigger chunks of quoted text.
15041 (YYDSYMPRINTF): New.
15042 Use it to report symbol activities.
15043 * data/glr.c (YYDSYMPRINTF): New.
15044 Use it.
15045
87f721cc
PE
150462002-11-12 Paul Eggert <eggert@twinsun.com>
15047
15048 Version 1.75b.
15049
15050 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
15051 (yyglrReduce): Return yyok, not 0.
15052 This should avoid the enumerated-type warnings reported
464c6927 15053 by Nelson H. F. Beebe in
161a71f3 15054 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
87f721cc
PE
15055
15056 * lib/bbitset.h (BITSET_INLINE): Remove.
15057 * lib/bitset.h [! BITSET_INLINE]: Remove.
15058 (bitset_set, bitset_reset, bitset_test): Rename local vars
15059 to avoid shadowing warnings by GCC.
15060
15061 * data/glr.c (inline): Remove #define. It's the user's
15062 responsibility to #define it away, just like 'const'.
464c6927 15063 This fixes one of the bugs reported by Nelson H. F. Beebe in
161a71f3 15064 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
18b519c0 15065
87f721cc
PE
15066 * Makefile.maint (po-check): Scan .l and .y files instead of the
15067 .c and the .h files that they generate. This fixes the bug
15068 reported by Tim Van Holder in:
161a71f3 15069 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
87f721cc
PE
15070 Look for N_ as well as for _. Try to avoid matching #define for
15071 N_ and _.
15072 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
15073 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
15074 * src/scan-gram.l: Revamp regular expressions so that " and '
15075 do not confuse xgettext.
15076
15077 * src/struniq.h (struniq_new): Do not declare the return type
15078 to be 'const'; this violates the C standard.
15079 * src/struniq.c (struniq_new): Likewise.
15080
be14ade5
AD
150812002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
15082
15083 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
15084 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
15085 linker.
15086
05291fbc
AD
150872002-11-12 Akim Demaille <akim@epita.fr>
15088
15089 * Makefile.maint: Sync with Autoconf:
15090 (local_updates): New.
15091
1f5fd52e
AD
150922002-11-12 Akim Demaille <akim@epita.fr>
15093
15094 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
15095
283f1e64
AD
150962002-11-12 Akim Demaille <akim@epita.fr>
15097
15098 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
15099 locations.
15100
886b69d1
AD
151012002-11-12 Akim Demaille <akim@epita.fr>
15102
15103 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
15104 not yyvalue.
15105
3df37415
AD
151062002-11-12 Akim Demaille <akim@epita.fr>
15107
15108 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
15109 Use it to test the GLR parser.
15110
7bd6c77e
AD
151112002-11-12 Akim Demaille <akim@epita.fr>
15112
15113 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
15114 defines it.
15115 * data/glr.c (yystos): New.
15116 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
15117 (YYDSYMPRINT): New.
15118 (yyval): Don't define it, it is handled via M4.
15119 (yyrecoverParseError): Free verbosely the discarded symbols.
15120 * data/yacc.c (yysymprint): Remove, rather...
15121 (b4_yysymprint_generate): invoke.
15122 * data/c.m4 (b4_yysymprint_generate): New.
15123 Accept pointers as arguments, as opposed to the version from
15124 yacc.c.
15125 (b4_yydestruct_generate): Likewise.
15126 * tests/cations.at (Printers and Destructors): Use Bison directives
15127 instead of CPP macros.
15128 Don't rely on internal details.
15129
b0400cc6
AD
151302002-11-12 Akim Demaille <akim@epita.fr>
15131
15132 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
15133 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
15134 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
15135 it against YYEMPTY and so forth), work on yytoken (i.e., set
15136 it to YYEMPTY etc.).
15137 (yydestruct): Replace with a b4_yydestruct_generate invocation.
15138 (b4_symbol_actions): Remove.
15139 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
15140 for 0, end-of-input.
15141
72f889cc
AD
151422002-11-12 Akim Demaille <akim@epita.fr>
15143
15144 * doc/bison.texinfo (Destructor Decl): New.
15145
b1ae9233
AD
151462002-11-12 Akim Demaille <akim@epita.fr>
15147
15148 * src/tables.c (tables_generate): Use free for pointers that
15149 cannot be NULL, not XFREE.
15150 (pack_vector): Use assert, not fatal, for bound violations.
15151 * src/state.c (state_new): Likewise.
15152 * src/reader.c (reader): Likewise.
15153 * src/lalr.c (set_goto_map): Likewise.
72f889cc 15154 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
b1ae9233
AD
15155 the file name.
15156
7ec2d4cd
AD
151572002-11-12 Akim Demaille <akim@epita.fr>
15158
15159 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
15160 Restore.
15161 * src/scan-gram.l (last_string): Is global to the file, not to
15162 yylex.
15163 * src/parse-gram.y (input): Don't append the epilogue here,
15164 (epilogue.opt): do it here, and free the scanner's obstack.
15165 * src/reader.c (epilogue_set): Rename as...
15166 (epilogue_augment): this.
15167 * data/c.m4 (b4_epilogue): Defaults to empty.
15168
573a6cd3
AD
151692002-11-12 Akim Demaille <akim@epita.fr>
15170
15171 * src/getargs.c (long_options): Remove duplicates.
15172 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
15173 Remove.
15174 * doc/bison.rnh: Remove.
15175 * doc/bison.texinfo (VMS Invocation): Remove.
15176
95612cfa
AD
151772002-11-12 Akim Demaille <akim@epita.fr>
15178
15179 * src/struniq.h, src/struniq.c (struniq_t): Is const.
15180 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
15181
15182 Use struniq for symbols.
15183
15184 * src/symtab.h (symbol_t): The tag member is a struniq.
15185 (symbol_type_set): Adjust.
15186 * src/symtab.c (symbol_new): Takes a struniq.
15187 (symbol_free): Don't free the tag member.
15188 (hash_compare_symbol_t, hash_symbol_t): Rename as...
15189 (hash_compare_symbol, hash_symbol): these.
15190 Use the fact that tags as struniqs.
15191 (symbol_get): Use struniq_new.
15192 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
15193 Returns a strniq.
15194 * src/reader.h (merger_list, grammar_currentmerge_set): The name
15195 and type members are struniqs.
15196 * src/reader.c (get_merge_function)
15197 (grammar_current_rule_merge_set): Adjust.
15198 (TYPE, current_type): Are struniq.
15199
15200 Use struniq for file names.
15201
15202 * src/files.h, src/files.c (infile): Split into...
15203 (grammar_file, current_file): these.
15204 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
15205 * src/reduce.c (reduce_print): Likewise.
15206 * src/getargs.c (getargs): Likewise.
15207 * src/complain.h, src/complain.c: Likewise.
15208 * src/main.c (main): Call struniqs_new early enough to use it for
15209 file names.
15210 Don't free the input file name.
15211
3e6656f9
AD
152122002-11-12 Akim Demaille <akim@epita.fr>
15213
15214 * src/symtab.c (symbol_free): Remove dead deactivated code:
15215 type_name are properly removed.
15216 Don't use XFREE to free items that cannot be NULL.
15217 * src/struniq.h, src/struniq.c: New.
15218 * src/main.c (main): Initialize/free struniqs.
15219 * src/parse-gram.y (%union): Add astruniq member.
15220 (yyprint): Adjust.
15221 * src/scan-gram.l (<{tag}>): Return a struniq.
15222 Free the obstack bit that used to store it.
15223 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
15224
7672019c
PE
152252002-11-11 Paul Eggert <eggert@twinsun.com>
15226
15227 Revamp to fix many (but not all) of the C- and M4-related quoting
15228 problems. Among other things, this fixes the Bison bug reported
15229 by Jan Hubicka when processing the Bash grammar; see:
161a71f3 15230 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
7672019c
PE
15231
15232 Use new @ escapes consistently. Represent brackets with @{ and @}
15233 rather than @<:@ and @:>@, since this works a bit better with dumb
15234 editors like vi. Represent @ with @@, since @ is now consistently
15235 an escape. Use @oline@ and @ofile@ rather than __oline__ and
15236 __ofile__, to avoid unexpected expansions. Similarly, use @output
15237 rather than #output.
15238
15239 * data/c.m4 (b4_copyright): Omit file name from comment, since
15240 the file name could contain "*/".
15241 (b4_synclines_flag): Don't quote the 2nd argument; it should already
15242 be quoted. All uses changed.
15243
15244 * data/glr.c: Use new @ escapes consistently.
15245 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
15246 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
15247 Remove, since they couldn't handle arbitrary characters in file
15248 names.
15249 * data/lalr1.cc: Likewise.
15250 * data/yacc.c: Likewise.
15251
15252 * src/files.c (output_infix): Remove; all uses removed.
15253 * src/files.h: Likewise.
15254
15255 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
15256 mishandled funny characters in file names, and anyway it isn't
15257 needed any more.
15258 * data/yacc.c: Likewise.
15259 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
15260
15261 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
15262 * data/yacc.c: Likewise.
15263
15264 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
15265 strings now.
15266 (muscle_init): Quote filename as a C string.
15267 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
15268 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
15269 * src/output.c (escaped_file_name_output): New function.
15270 (prepare_symbols): Quote tokens for M4.
15271 (prepare): Don't insert output_infix, output_prefix,
15272 output_parser_name, output_header_name; this is now down by scan-skel.
15273 Insert skeleton as a C string.
15274
15275 * src/output.c (user_actions_output, symbol_destructors_output,
15276 symbol_printers_output): Quote filenames for C and M4.
15277 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15278
15279 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
15280 escapes other than \\ and \'; this simplifies the code.
15281 (<SC_STRING>): Likewise, for \\ and \".
15282 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
15283 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
15284 Use new escapes @{ and @} for [ and ].
15285
15286 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
15287 them with auto vars.
15288 Switch to new escape scheme, where @ is the escape character uniformly.
15289 Abort if a stray escape character is found. Avoid unbounded input
15290 buffer when parsing non-escaped text.
15291
15292 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
15293 __oline__, #output, $@, and @{ do not have unintended meanings.
15294
acea4f3b
PE
152952002-11-09 Paul Eggert <eggert@twinsun.com>
15296
15297 Fix the test failure due to GCC warnings described in
161a71f3 15298 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
acea4f3b
PE
15299 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
15300 evaluate to 0 if it's impossible for NINF to be in the respective
15301 table.
15302 (yygetLRActions, yyrecoverParseError): Use them.
15303
15304 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
15305 counted in the token inserted at end of file. Now takes
15306 location_t *, not location_t, so that the location can be
15307 adjusted. All uses changed.
15308
15309 * tests/regression.at (Invalid inputs): Adjust wording in
15310 diagnostic to match the new behavior.
15311
15312 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
15313 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
15314 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
15315 abort ();'. This reduces the runtime of the "Many lookaheads"
15316 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
15317 GCC 3.2.
15318
20ef1ad5
PE
153192002-11-07 Paul Eggert <eggert@twinsun.com>
15320
15321 * src/parse-gram.y (CHARACTER): Remove unused token.
15322 All uses removed.
15323
15324 * src/scan-gram.l: Remove stack option. We no longer use the
15325 stack, since the stack was never deeper than 1; instead, use the
15326 new auto var c_context to record the stacked value.
15327
15328 Remove nounput option. At an unexpected end of file, we now unput
15329 the minimal input necessary to end cleanly; this simplifies the
15330 code.
15331
15332 Avoid unbounded token sizes where this is easy.
15333
15334 (unexpected_end_of_file): New function.
15335 Use it to systematize the error message on unexpected EOF.
15336 (last-string): Now auto, not static.
15337 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
15338 (scanner_last_string_free): Remove; not used.
15339 (percent_percent_count): Move decl to just before use.
15340 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
15341 not the (never otherwised-used) CHARACTER.
15342
93724f13
AD
153432002-11-07 Akim Demaille <akim@epita.fr>
15344
15345 Let yyerror always receive the msg as last argument, so that
15346 yyerror can be variadic.
15347
15348 * data/yacc.c (b4_yyerror_args): New.
15349 Use it when calling yyerror.
15350 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
15351 Use it when calling yyerror.
15352 * doc/bison.texinfo (Error Reporting): Adjust.
15353 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
15354 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
15355
6e40b4eb
AD
153562002-11-06 Akim Demaille <akim@epita.fr>
15357
15358 #line should have quoted strings.
15359 Ideally, this should be done by m4_quotearg.
15360
15361 * src/scan-skel.l: Include quotearg.h.
15362 Quote __ofile__.
15363 * src/output.c (symbol_printers_output)
15364 (symbol_destructors_output): Quote the file name.
15365
2dfbfc12
AD
153662002-11-06 Akim Demaille <akim@epita.fr>
15367
15368 * tests/regression.at (Invalid inputs): Adjust to the recent
15369 messages.
15370
437c2d80
AD
153712002-11-06 Akim Demaille <akim@epita.fr>
15372
15373 Restore --no-lines.
15374 Reported by Jim Kent.
15375
15376 * data/c.m4 (b4_syncline): New.
15377 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
15378 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
15379 * src/output.c (user_actions_output): Likewise.
15380 (prepare): Define 'b4_synclines_flag'.
2dfbfc12 15381 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
437c2d80 15382
900c5db5
AD
153832002-11-06 Akim Demaille <akim@epita.fr>
15384
15385 * src/main.c (main): Free `infile'.
15386 * src/scan-gram.l (handle_syncline): New.
15387 Recognize `#line'.
15388 * src/output.c (user_actions_output, symbol_destructors_output)
15389 (symbol_printers_output): Use the location's file name, not
15390 infile.
15391 * src/reader.c (prologue_augment, epilogue_set): Likewise.
15392
e183b123 153932002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
51b4a04c 15394
e183b123 15395 * src/tables.c (matching_state): Don't allow states to match if
51b4a04c 15396 either has GLR conflict entries.
e183b123 15397
193eb6b7
PE
153982002-11-05 Paul Eggert <eggert@twinsun.com>
15399
e183b123
PE
15400 * src/scan-gram.l: Use more accurate diagnostics, e.g.
15401 "integer out of range" rather than "invalid value".
15402 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
15403 accordingly.
15404
193eb6b7
PE
15405 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
15406 Also, remove one static variable in the scanner.
15407
15408 * src/scan-gram.l (braces_level): Now auto, not static.
15409 Initialize to zero if the compiler is being picky.
15410 (INITIAL): Clear braces_level instead of incrementing it.
15411 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
15412 as POSIX 1003.1-2001 requires.
15413 * src/system.h (IF_LINT): New macro, taken from coreutils.
15414 * configure.ac: Define "lint" if --enable-gcc-warnings.
15415
29c01725
AD
154162002-11-05 Akim Demaille <akim@epita.fr>
15417
15418 * src/scan-gram.l: When it starts with `%', complain about the
15419 whole directive, not just that `invalid character: %'.
15420
8aeac3ca
AD
154212002-11-04 Akim Demaille <akim@epita.fr>
15422
15423 * Makefile.maint: Update from Autoconf.
15424 (update, cvs-update, po-update, do-po-update): New.
15425
793a58bb
AD
154262002-11-04 Akim Demaille <akim@epita.fr>
15427
15428 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
15429 and yyerror.
15430 Have yyerror `use' its arguments.
15431 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
15432 returns true when location & yacc & pure & parse-param.
15433 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
15434
c4d720cd
AD
154352002-11-04 Akim Demaille <akim@epita.fr>
15436
15437 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
15438 clashes.
15439 * src/scan-gram.l: Use [\'] instead of ['] to pacify
15440 font-lock-mode.
15441 Use complain_at.
15442 Use quote, not quote_n since LOCATION_PRINT no longer uses the
15443 slot 0.
15444
613a0dc5
PE
154452002-11-03 Paul Eggert <eggert@twinsun.com>
15446
15447 * src/reader.c (get_merge_function, grammar_current_rule_check):
15448 Use consistent diagnostics for reporting type name clashes.
15449 Quote the types with <>, for consistency with Yacc.
15450 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
15451
2a8d363a
AD
154522002-11-03 Akim Demaille <akim@epita.fr>
15453
15454 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
15455 New.
15456 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
15457 (b4_parse_param): Remove.
15458 Use b4_identification.
15459 Propagate b4_pure_args where needed to pass them to yyerror.
15460 * data/glr.m4 (b4_parse_param): Remove.
15461 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
15462 (b4_lpure_formals): New.
15463 Use b4_identification.
15464 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
15465 b4_user_formals and b4_user_args.
15466 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
15467 (yyreportAmbiguity): When using a pure parser, also need
15468 the location, and the parse-params.
15469 Adjust callers.
15470 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
15471 When using a pure parser, also need the parse-params.
15472 Adjust callers.
15473 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
15474 (%pure-parser + %parse-param) LALR and GLR parsers.
15475 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
15476 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
15477 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
15478 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
15479 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
15480 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
15481 * doc/bison.texinfo: Untabify the whole file.
15482 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
15483 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
15484 (Error Reporting): Adjust to these new directives.
15485 Document %error-verbose, deprecate YYERROR_VERBOSE.
15486
9e32add8
AD
154872002-11-03 Akim Demaille <akim@epita.fr>
15488
15489 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
15490 AT_CHECK_CALC_GLR invocations to use % directives, instead of
15491 command line options.
15492 * tests/cxx-type.at: Formatting changes.
15493
b02d90a5
PE
154942002-11-03 Paul Eggert <eggert@twinsun.com>
15495
15496 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
15497 to count columns correctly, and to check for invalid inputs.
9e32add8 15498
b02d90a5
PE
15499 Use mbsnwidth to count columns correctly. Account for tabs, too.
15500 Include mbswidth.h.
15501 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
15502 (extend_location): New function.
15503 (YY_LINES): Remove.
15504
15505 Handle CRLF in C code rather than in Lex code.
15506 (YY_INPUT): New macro.
15507 (no_cr_read): New function.
15508
15509 Scan UCNs, even though we don't fully handle them yet.
15510 (convert_ucn_to_byte): New function.
15511
15512 Handle backslash-newline correctly in C code.
15513 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
15514 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
15515 all uses changed.
15516 (tag, splice): New EREs. Do not allow NUL or newline in tags.
15517 Use {splice} wherever C allows backslash-newline.
15518 YY_STEP after space, newline, vertical-tab.
15519 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9e32add8 15520
b02d90a5
PE
15521 (letter, id): Don't assume ASCII; e.g., spell out a-z.
15522
15523 ({int}, handle_action_dollar, handle_action_at): Check for integer
15524 overflow.
9e32add8 15525
b02d90a5
PE
15526 (YY_STEP): Omit trailing semicolon, so that it's more like C.
15527
15528 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
15529 as well as \000. Check for UCHAR_MAX, not 255.
15530 Allow \x with an arbitrary positive number of digits, as in C.
15531 Check for overflow here.
15532 Allow \? and UCNs, for compatibility with C.
15533
15534 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
15535 with quote slot used by complain_at.
15536
15537 * tests/input.at: Add tests for backslash-newline, m4 quotes
15538 in symbols, long literals, and funny escapes in strings.
15539
15540 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
15541 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
15542 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
15543 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
15544 * m4/mbswidth.m4: New file, from GNU coreutils.
15545
15546 * doc/bison.texinfo (Grammar Outline): Document // comments.
15547 (Symbols): Document that trigraphs have no special meaning in Bison,
15548 nor is backslash-newline allowed.
15549 (Actions): Document that trigraphs have no special meaning.
15550
15551 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
15552 no longer used.
15553
155542002-11-02 Paul Eggert <eggert@twinsun.com>
15555
15556 * src/reader.c: Don't include quote.h; not needed.
15557 (get_merge_function): Reword warning to be consistent with
15558 type clash diagnostic in grammar_current_rule_check.
15559
15560 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
15561 bug in trigraph handling.
15562
15563 * src/output.c (prepare_symbols): When printing token names,
15564 escape "[" as "@<:@" and likewise for "]".
15565
15566 * src/system.h (errno): Remove declaration, as we are now
15567 assuming C89 or better, and C89 guarantees errno.
15568
762b212b
PE
155692002-10-30 Paul Eggert <eggert@twinsun.com>
15570
15571 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
15572 Check for close failures.
15573 * src/files.h (xfclose): Return void, not int, since it always
15574 returned zero.
15575 * src/files.c (xfclose): Likewise. Report I/O error if ferror
15576 indicates one.
15577 * src/output.c (output_skeleton): Use xfclose rather than fclose
15578 and ferror. xfclose now checks ferror.
15579
15580 * data/glr.c (YYLEFTMOST_STATE): Remove.
15581 (yyreportTree): Use a stack-based leftmost state. This avoids
15582 our continuing battles with bogus warnings about initializers.
15583
56100c60
AD
155842002-10-30 Akim Demaille <akim@epita.fr>
15585
15586 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
15587 #if.
15588
51b4a04c
PH
155892002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
15590
15591 * tests/glr-regr1.at: New test for reported regressions.
15592 * tests/testsuite.at: Add glr-regr1.at test.
15593 * tests/Makefile.am: Add glr-regr1.at test.
e183b123 15594
bf1ebda2
PE
155952002-10-24 Paul Eggert <eggert@twinsun.com>
15596
5c16c6b1
PE
15597 Version 1.75a.
15598
bf1ebda2
PE
15599 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
15600 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
15601 we use malloc. Don't assume 'A' through 'Z' are contiguous.
15602 Don't assume strdup exists; POSIX says its an XSI extension.
15603 Check for buffer overflow on input.
15604
b526ee61
AD
156052002-10-24 Akim Demaille <akim@epita.fr>
15606
15607 * src/output.c (output_skeleton): Don't disable M4sugar comments
15608 too soon: it results in comments being expanded.
15609 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
15610 first output.
15611
f1886bb2
AD
156122002-10-24 Akim Demaille <akim@epita.fr>
15613
15614 * data/yacc.c (m4_int_type): New.
15615 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
15616 char' as only yacc.c wants K&R portability.
15617 * data/glr.c (yysigned_char): Remove.
15618 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
15619 Reported by Quoc Peyrot.
15620
c5576256
PE
156212002-10-23 Paul Eggert <eggert@twinsun.com>
15622
15623 * src/main.c (main): With --trace=time, report times even if a
15624 non-fatal error occurs. Formerly, the times were reported in some
15625 such cases but not in others.
15626 * src/reader.c (reader): Just return if a complaint has been issued,
15627 instead of exiting, so that 'main' can report times.
15628
27b0ffea
AD
156292002-10-22 Akim Demaille <akim@epita.fr>
15630
15631 * src/system.h: Include sys/types.
15632 Reported by Bert Deknuydt.
15633
223a7883
PE
156342002-10-23 Paul Eggert <eggert@twinsun.com>
15635
15636 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
15637 Suggested by Art Haas.
15638
156392002-10-22 Paul Eggert <eggert@twinsun.com>
15640
15641 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
15642 decl; not needed any more.
15643 * src/main.c (main): Use return to exit, undoing yesterday's change.
15644 The last OS that we could find where this wouldn't work is
15645 SunOS 3.5, and that's too old to worry about now.
15646
15647 * data/glr.c (struct yyltype): Define members even when not
15648 doing locations. This is more consistent with yacc.c, and it
15649 works around the following bug reports:
161a71f3
PE
15650 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
15651 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
27b0ffea 15652
223a7883
PE
15653 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
15654 @acronym consistently. Standardize on "Yacc" instead of "YACC",
15655 "Algol" instead of "ALGOL". Give a bit more history about BNF.
15656
8b76775a
AD
156572002-10-22 Akim Demaille <akim@epita.fr>
15658
15659 * data/README: New.
15660
6db10d14
PE
156612002-10-21 Paul Eggert <eggert@twinsun.com>
15662
15663 Be consistent about 'bool'; the old code used an enum in one
15664 module and an int in another, and this violates the C standard.
15665 * m4/stdbool.m4: New file, from coreutils 4.5.3.
15666 * configure.ac (AC_HEADER_STDBOOL): Add.
15667 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
15668 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
15669 * src/symtab.c (hash_compare_symbol_t): Likewise.
15670 * src/system.h (bool, false, true): Use a definition consistent
15671 with ../lib/hash.c. All uses changed.
15672
15673 * src/complain.c (warning_issued): Renamed from warn_message_count,
15674 so that we needn't worry about integer overflow (!).
15675 Now of type bool. All uses changed.
15676 (complaint_issued): Renamed from complain_message_count; likewise.
15677
15678 * src/main.c (main): Use exit to exit with failure.
27b0ffea 15679
6db10d14
PE
15680 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
15681 rather than 1 and 0.
15682 * src/main.c (main): Likewise.
15683 * src/getargs.c (getargs): Likewise.
15684 * src/reader.c (reader): Likewise.
15685
15686 * src/getarg.c (getargs): Remove duplicate code for
15687 "Try `bison --help'".
15688
15689 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
15690 What was that "2" for?
15691
15692 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
15693 * src/getargs.c (usage): Likewise.
15694
15695 * src/getargs.c (getargs): When there are too few operands, report
15696 the last one. When there are too many, report the first extra
15697 one. This is how diffutils does it.
15698
92a060fd
PE
156992002-10-20 Paul Eggert <eggert@twinsun.com>
15700
15701 Remove K&R vestiges.
15702 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
15703 * src/complain.c (VA_START): Remove. Assume prototypes.
15704 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
15705 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
15706 fatal): Assume prototypes.
15707 * src/complain.h: Assume prototypes.
15708 * src/system.h (PARAMS): Remove.
15709 Include <limits.h> unconditionally, since it's guaranteeed even
15710 for a freestanding C89 compiler.
15711 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
15712 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
8b76775a 15713
e7cb57c0
AD
157142002-10-20 Akim Demaille <akim@epita.fr>
15715
15716 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
15717 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
15718 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
15719 (yyresolveStates, yyresolveAction, yyresolveStack)
15720 (yyprocessOneStack): Use them.
15721 (yy_reduce_print): New.
15722 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
15723
0245f82d
AD
157242002-10-20 Akim Demaille <akim@epita.fr>
15725
15726 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
15727 arguments and output `void'.
15728 (b4_c_function): Rename as...
15729 (b4_c_function_def): this.
15730 (b4_c_function_decl, b4_c_ansi_function_def)
15731 (b4_c_ansi_function_decl): New.
15732 Change the interpretation of the arguments: before `int, foo', now
15733 `int foo, foo'.
15734 * data/yacc.c (yyparse): Prototype and define thanks to these.
15735 Adjust b4_c_function_def uses.
15736 * data/glr.c (yyparse): Likewise, but ANSI only.
15737
39912f52
AD
157382002-10-20 Akim Demaille <akim@epita.fr>
15739
15740 * src/output.c (prepare): Move the definition of `tokens_number',
15741 `nterms_number', `undef_token_number', `user_token_number_max'
15742 to...
15743 (prepare_tokens): Here.
15744 (prepare_tokens): Rename as...
15745 (prepare_symbols): this.
15746 (prepare): Move the definition of `rules_number' to...
15747 (prepare_rules): here.
15748 (prepare): Move the definition of `last', `final_state_number',
15749 `states_number' to...
15750 (prepare_states): here.
15751 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
15752
20c1e2ad
AD
157532002-10-20 Akim Demaille <akim@epita.fr>
15754
15755 * src/tables.h, src/tables.c, src/output.c: Comment changes.
15756
21964f43
AD
157572002-10-20 Akim Demaille <akim@epita.fr>
15758
15759 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
15760 * data/c.m4: here.
15761
66d30cd4
AD
157622002-10-20 Akim Demaille <akim@epita.fr>
15763
15764 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
15765 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
15766 `pair'.
15767 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
15768 `name' to...
15769 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
15770 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
15771 These.
15772
95f2c9fe
PE
157732002-10-19 Paul Eggert <eggert@twinsun.com>
15774
15775 Do not create a temporary file, as that involves security and
15776 cleanup headaches. Instead, use a pair of pipes.
15777 Derived from a suggestion by Florian Krohm.
15778 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
15779 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
15780 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
15781 (BISON_PREREQ_SUBPIPE): Add.
15782 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
15783 Add subpipe.h, subpipe.c.
15784 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
15785 * po/POTFILES.in: Add lib/subpipe.c.
15786 * src/output.c: Include "subpipe.h".
15787 (m4_invoke): Remove decl.
15788 (scan_skel): New decl.
15789 (output_skeleton): Use pipe rather than temporary file for m4 input.
15790 Check that m4sugar.m4 is readable, to avoid deadlock.
15791 Check for pipe I/O error.
15792 * src/scan-skel.l (readpipe): Remove decl.
15793 (scan_skel): New function, to be used in place of m4_invoke.
15794 Read from stream rather than file.
66d30cd4 15795
95f2c9fe
PE
15796 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
15797 float, as this generates a warning on Solaris 8 + GCC 3.2 with
15798 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
15799 this generates a more-accurate value anyway.
15800
15801 * lib/timevar.c (timervar_accumulate): Rename locals to
15802 avoid confusion with similarly-named more-global.
15803 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
15804
15805 * src/output.c (prepare): Use xstrdup to convert char const *
15806 to char *, to avoid GCC warning.
15807
c19988b7
AD
158082002-10-19 Akim Demaille <akim@epita.fr>
15809
15810 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
15811 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
15812 Use them to have `calc.y' ready for %pure-parser.
15813 * data/yacc.c (YYLEX): Pass a yylex return type to
15814 b4_c_function_call.
15815
ae7453f2
AD
158162002-10-19 Akim Demaille <akim@epita.fr>
15817
15818 Prototype support of %lex-param and %parse-param.
15819
15820 * src/parse-gram.y: Add the definition of the %lex-param and
15821 %parse-param tokens, plus their rules.
15822 Drop the `_' version of %glr-parser.
15823 Add the "," token.
15824 * src/scan-gram.l (INITIAL): Scan them.
15825 * src/muscle_tab.c: Comment changes.
15826 (muscle_insert, muscle_find): Rename `pair' as `probe'.
15827 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
15828 (muscle_entry_s): The `value' member is no longer const.
15829 Adjust all dependencies.
15830 * src/muscle_tab.c (muscle_init): Adjust: use
15831 MUSCLE_INSERT_STRING.
15832 Initialize the obstack earlier.
15833 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
15834 (muscle_pair_list_grow): New.
15835 * data/c.m4 (b4_c_function_call, b4_c_args): New.
15836 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
15837 * tests/calc.at: Use %locations, not --locations.
15838 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
15839
0e575721
AD
158402002-10-19 Akim Demaille <akim@epita.fr>
15841
15842 * src/getargs.c (usage): Take status as argument and exit
15843 accordingly.
15844 Report the traditional `Try ... --help' message when status != 0.
15845 (usage, version): Don't take a FILE * as arg, it is pointless.
15846 (getargs): When there is an incorrect number of arguments, make it
15847 an error, and report it GNUlically thanks to `usage ()'.
15848
724ce7f5
PE
158492002-10-18 Paul Eggert <eggert@twinsun.com>
15850
3a781eb2
PE
15851 * data/glr.c (yyreportParseError): Don't assume that sprintf
15852 yields the length of the printed string, as this is not true
15853 on SunOS 4.1.4. Reported by Peter Klein.
15854
724ce7f5
PE
15855 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
15856 * tests/conflicts.at (%nonassoc and eof): Likewise.
15857 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
15858
473d0a75
AD
158592002-10-17 Akim Demaille <akim@epita.fr>
15860
15861 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
15862 * src/getargs.c (trace_types, trace_args): Adjust.
15863 * src/reader.c (grammar_current_rule_prec_set)
15864 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
15865 Standardize error messages.
15866 And s/@prec/%prec/!
15867 (reader): Use trace_flag to enable scanner/parser debugging,
15868 instead of an adhoc scheme.
15869 * src/scan-gram.l: Remove trailing debugging code.
15870
e76d2469
PE
158712002-10-16 Paul Eggert <eggert@twinsun.com>
15872
93e2236a
PE
15873 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
15874 MUSCLE_TAB_H.
15875
e76d2469
PE
15876 * NEWS: Officially drop support for building Bison with K&R C,
15877 since it didn't work anyway and it's not worth worrying about.
15878 * Makefile.maint (wget_files): Remove ansi2knr.c.
15879 (ansi2knr.c-url_prefix): Remove.
15880 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
15881 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15882 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
15883
5bd1c419
PE
158842002-10-15 Paul Eggert <eggert@twinsun.com>
15885
15886 Stop using the "enum_" trick for K&R-style function definitions;
15887 it confused me, and I was the author! Instead, assume that people
15888 who want to use K&R C compilers (when using these modules in GCC,
15889 perhaps?) will run ansi2knr.
15890
15891 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
15892 All uses of "enum_" changed to "enum ".
15893 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
15894 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
e76d2469 15895
5bd1c419
PE
15896 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
15897 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
15898 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
15899 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
15900 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
15901 abitset_not, abitset_ones, abitset_or, abitset_or_and,
15902 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
15903 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
15904 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
15905 Use function prototypes; this removes the need for declaring
15906 static functions simply to provide their prototypes.
15907 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
15908 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
15909 bitset_count_, bitset_create, bitset_dump, bitset_first,
15910 bitset_free, bitset_init, bitset_last, bitset_next,
15911 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
15912 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
15913 bitset_print, bitset_release_memory, bitset_toggle_,
15914 bitset_type_choose, bitset_type_get, bitset_type_name_get,
15915 debug_bitset): Likewise.
15916 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
15917 * lib/bitset_stats.c (bitset_log_histogram_print,
15918 bitset_percent_histogram_print, bitset_stats_and,
15919 bitset_stats_and_cmp, bitset_stats_and_or,
15920 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
15921 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
15922 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
15923 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
15924 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
15925 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
15926 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
15927 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
15928 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
15929 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
15930 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
15931 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
15932 bitset_stats_zero): Likewise.
15933 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
15934 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
15935 bitsetv_dump, debug_bitsetv): Likewise.
15936 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
15937 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
15938 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
15939 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
15940 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
15941 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
15942 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
15943 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
15944 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
15945 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
15946 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
15947 Likewise.
15948 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
15949 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
15950 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
15951 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
15952 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
15953 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
15954 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
15955 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
15956 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
15957 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
15958 lbitset_xor_cmp, lbitset_zero): Likewise.
e76d2469 15959
ae26e1f0
AD
159602002-10-14 Akim Demaille <akim@epita.fr>
15961
15962 Version 1.75.
15963
d43baf71
AD
159642002-10-14 Akim Demaille <akim@epita.fr>
15965
15966 * tests/Makefile.am (maintainer-check-posix): New.
15967
7ebc83e3
AD
159682002-10-14 Akim Demaille <akim@epita.fr>
15969
15970 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
15971 member.
15972
05846dae
AD
159732002-10-14 Akim Demaille <akim@epita.fr>
15974
15975 * src/tables.c (table_ninf_remap): base -> tab.
15976 Reported by Matt Rosing.
15977
1318e37d
PE
159782002-10-14 Paul Eggert <eggert@twinsun.com>
15979
447fbb17
PE
15980 * tests/action.at, tests/calc.at, tests/conflicts.at,
15981 tests/cxx-type.at, tests/headers.at, tests/input.at,
15982 tests/regression.at, tests/synclines.at, tests/torture.at:
15983 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
15984 so that the tests still work even if POSIXLY_CORRECT is set.
15985 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
05846dae 15986
1318e37d
PE
15987 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
15988 for portability to K&R hosts. Fix typo: signed char is guaranteed
15989 only to 127, not to 128.
15990 * data/glr.c (yysigned_char): New type.
15991 * data/yacc.c (yysigned_char): Likewise.
15992 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
15993
cc0f0794
PE
159942002-10-13 Paul Eggert <eggert@twinsun.com>
15995
5038f418
PE
15996 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
15997 true due to limited range of data type" warning from GCC.
15998
cc0f0794
PE
15999 * data/c.m4 (b4_token_defines): Protect against double-inclusion
16000 by wrapping enum yytokentype's definition inside #ifndef
16001 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
16002
6fed0802
AD
160032002-10-13 Akim Demaille <akim@epita.fr>
16004
16005 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
16006 Un yy- yyrhs to avoid the name clash with the global YYRHS.
16007
32f0598d
AD
160082002-10-13 Akim Demaille <akim@epita.fr>
16009
16010 * Makefile.maint: Update from Autoconf 2.54.
16011 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
16012
7ea9a33f
AD
160132002-10-13 Akim Demaille <akim@epita.fr>
16014
16015 * src/print.c (print_state): Separate the list of solved conflicts
16016 from the other items.
16017 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
16018
ea99527d
AD
160192002-10-13 Akim Demaille <akim@epita.fr>
16020
16021 Let nondeterministic skeletons be usable with deterministic
16022 tables.
16023
16024 With the patch, GAWK compiled by GCC without -O2 passes its test
16025 suite using a GLR parser driven by LALR tables. It fails with -O2
16026 because `struct stat' gives two different answers on my machine:
16027 88 (definition of an auto var) and later 96 (memset on this var).
16028 Hence the stack is badly corrumpted. The headers inclusion is to
16029 blame: if I move the awk.h inclusion before GLR's system header
16030 inclusion, the two struct stat have the same size.
16031
16032 * src/tables.c (pack_table): Always create conflict_table.
16033 (token_actions): Always create conflict_list.
16034 * data/glr.c (YYFLAG): Remove, unused.
16035
f377f69f
AD
160362002-10-13 Akim Demaille <akim@epita.fr>
16037
16038 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
16039 (O0FLAGS): New.
16040 (VALGRIND, GXX): New.
16041 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
16042 * tests/bison.in: Run $PREBISON a pre-command.
16043 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
16044 (maintainer-check-g++): New.
16045 * Makefile.am (maintainer-check): New.
16046
2a1fe6ed
AD
160472002-10-13 Akim Demaille <akim@epita.fr>
16048
16049 * data/glr.c: Formatting changes.
16050 Tweak some trace messages to match yacc.c's.
16051
f50adbbd
AD
160522002-10-13 Akim Demaille <akim@epita.fr>
16053
16054 GLR parsers sometimes raise parse errors instead of performing the
16055 default reduction.
16056 Reported by Charles-Henry de Boysson.
16057
16058 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
ba0fe3c7 16059 check the length of the traces when %glr.
f50adbbd
AD
16060 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
16061 GLR's traces.
16062 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
16063 Test GLR parsers.
16064 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
16065 (yyltype): Remove the yy prefix from the member names.
16066 (yytable): Complete its comment.
16067 (yygetLRActions): Map error action number from YYTABLE from
16068 YYTABLE_NINF to 0.
16069 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
16070 (which was a bug: it should have been YYTABEL_NINF, and yet it was
16071 not satisfying as we could compare an YYACTION computed from
16072 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
16073 only value for error actions.
16074 (yyreportParseError): In verbose parse error messages, don't issue
16075 `error' in the list of expected tokens.
16076 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
16077 next action to perform to match glr.c's decoding.
16078 (yytable): Complete its comment.
16079
bcbad5b9
PE
160802002-10-13 Paul Eggert <eggert@twinsun.com>
16081
16082 Fix problem reported by Henrik Grubbstroem in
161a71f3 16083 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
bcbad5b9
PE
16084 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
16085 because the Bison parser reads the second action before reducing
16086 the first one.
16087 * src/scan-gram.l (rule_length): New static var.
16088 Use it to keep track of the rule length in the scanner, since
16089 we can't expect the parser to be in lock-step sync with the scanner.
16090 (handle_action_dollar, handle_action_at): Use this var.
16091 * tests/actions.at (Exotic Dollars): Test for the problem.
05846dae 16092
14904b89
PE
160932002-10-12 Paul Eggert <eggert@twinsun.com>
16094
1fe611e5
PE
16095 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
16096 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
16097 Include <sys/time.h> when checking for clock_t and struct tms.
16098 Use same include order as source.
16099 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
161a71f3 16100 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
05846dae 16101
1fe611e5
PE
16102 * lib/timevar.c: Update copyright date and clarify comments.
16103 (get_time) [IN_GCC]: Keep the GCC version for reference.
05846dae 16104
1fe611e5
PE
16105 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
16106 GCC version as of today, then merge Bison's changes.
16107 Change "GCC" to "Bison" in copyright notice. timevar.def's
16108 author is Akim, so change that too.
16109
98194095
PE
16110 * src/reader.c (grammar_current_rule_check):
16111 Don't worry about the default action if $$ is untyped.
16112 Prevents bogus warnings reported by Jim Gifford in
161a71f3 16113 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
98194095 16114
14904b89
PE
16115 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
16116 * data/glr.c, data/lalr1.cc, data/yacc.c:
16117 Output token definitions before the first part of user declarations.
16118 Fixes compatibility problem reported by Jim Gifford for kbd in
161a71f3 16119 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
14904b89 16120
ff6dca18
PE
161212002-10-11 Paul Eggert <eggert@twinsun.com>
16122
16123 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
16124 (yyparse): here. This undoes some of the 2002-07-25 change.
16125 Compatibility problem reported by Ralf S. Engelschall with
16126 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
16127
eb714592
AD
161282002-10-11 Akim Demaille <akim@epita.fr>
16129
16130 * tests/regression.at Characters Escapes): New.
16131 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
16132 characters.
16133 Reported by Jan Nieuwenhuizen.
16134
b7195100
AD
161352002-10-11 Akim Demaille <akim@epita.fr>
16136
16137 * po/id.po: New.
16138
f28a0f2d
PE
161392002-10-10 Paul Eggert <eggert@twinsun.com>
16140
16141 Portability fixes for bitsets; this also avoids several GCC
16142 warnings.
16143
16144 * lib/abitset.c: Include <stddef.h>, for offsetof.
16145 * lib/lbitset.c: Likewise.
16146
16147 * lib/abitset.c (abitset_bytes): Return a size that is aligned
16148 properly for vectors of objects. Do not assume that adding a
16149 header size to a multiple of a word size yields a value that is
16150 properly aligned for the whole union.
16151 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16152
16153 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
16154 unique names for structures.
16155 * lib/ebitset.c (ebitset_bytes): Likewise.
16156 * lib/lbitset.c (lbitset_bytes): Likewise.
16157
16158 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
16159 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
16160 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
16161 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
16162 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
16163 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
16164 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
16165 to improve the type-checking that GCC can do.
16166 * lib/bitset.c (bitset_op4_cmp): Likewise.
16167 * lib/bitset_stats.c (bitset_stats_count,
16168 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
16169 bitset_stats_copy, bitset_stats_disjoint_p,
16170 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
16171 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
16172 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
16173 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
16174 bitset_stats_and_or_cmp, bitset_stats_andn_or,
16175 bitset_stats_andn_or_cmp, bitset_stats_or_and,
16176 bitset_stats_or_and_cmp): Likewise.
16177 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
16178 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
16179 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
16180 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
16181
16182 * lib/abitset.h: Include bitset.h, not bbitset.h.
16183 * lib/ebitset.h: Likewise.
16184 * lib/lbitset.h: Likewise.
16185
16186 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
16187 All instances of parameters of type enum bitset_opts are now of
16188 type enum_bitset_opts, to conform to the C Standard, and similarly
16189 for enum_bitset_type.
16190 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
16191 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
16192
16193 Do not use "struct bitset_struct" to mean different things in
16194 different modules. Not only is this confusing, it violates
16195 the C Standard, which requires that structure types in different
16196 modules must be compatible if one is to be passed to the other.
16197 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
16198 All instances of "struct bitset_struct *" replaced with "bitset".
16199 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
16200 (union bitset_union, struct abitset_struct, struct ebitset_struct,
16201 struct lbitset_struct, struct bitset_stats_struct): New types.
16202 All uses of struct bitset_struct changed to union bitset_union,
16203 etc.
ba0fe3c7 16204 * lib/abitset.c (struct abitset_struct, abitset,
f28a0f2d
PE
16205 struct bitset_struct): Remove.
16206 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
16207 struct bitset_struct): Remove.
16208 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
16209 bitset_struct): Remove.
16210 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
16211 Likewise.
16212
16213 Do not call a function of type T using a call that assumes the
16214 function is of a different type U. Standard C requires that a
16215 function must be called with a type that is compatible with its
16216 definition.
16217 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16218 New decls.
16219 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
16220 New functions.
16221 * lib/ebitset.c (PFV): Remove.
16222 * lib/lbitset.c (PFV): Likewise.
16223 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
16224 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
16225 decls.
16226 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
16227 (ebitset_vtable): Use them.
16228 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
16229 lbitset_xor): New functions.
16230 (lbitset_vtable): Use them.
16231
16232 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
16233 Declare.
16234
16235 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
16236 GCC warning.
16237 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
16238 Use offsetof, for simplicity.
16239
6fbe4984
PE
162402002-10-06 Paul Eggert <eggert@twinsun.com>
16241
16242 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
16243 the same width as int. This reapplies a hunk of the 2002-08-12 patch
161a71f3 16244 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
6fbe4984
PE
16245 which was inadvertently undone by the 2002-09-30 patch.
16246 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
16247 the same width as int.
16248
420f93c8
PE
162492002-10-04 Paul Eggert <eggert@twinsun.com>
16250
16251 Version 1.50.
16252
16253 * configure.ac (AC_INIT), NEWS: Increment version number.
16254
16255 * doc/bison.texinfo: Minor spelling, grammar, and white space
16256 fixes.
16257 (Symbols): Mention that any negative value returned from yylex
16258 signifies end-of-input. Warn about negative chars. Mention
16259 the portable Standard C character set.
16260
16261 The GNU coding standard says CFLAGS and YFLAGS are reserved
16262 for the installer to set.
16263 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
16264 * src/Makefile.am (AM_CFLAGS): Likewise.
16265 (AM_YFLAGS): Renamed from YFLAGS.
16266
16267 Fix some MAX and MIN problems.
16268 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
16269 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
16270 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
16271 * src/reader.c (reader): Use it.
16272
16273 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
16274 POSIX 1003.1-2001 has removed fgrep.
16275
162762002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
16277
16278 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
16279 interpreted as signed.
16280 * lib/ebitset.c (ebitset_list): Fix bug.
16281
ff68026d
PE
162822002-10-01 Paul Eggert <eggert@twinsun.com>
16283
16284 More fixes for 64-bit hosts and large bitsets.
16285
16286 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
16287 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
16288 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
16289 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
16290 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
16291 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
16292 bitset_count_): Likewise.
16293 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
16294 bitset_first, bitset_last): Likewise.
16295 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
16296 bitset_stats_list_reverse, bitset_stats_size,
16297 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
16298 Likewise.
16299 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16300 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
16301 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
16302 bitsetv_reflexive_transitive_closure): Likewise.
16303 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
16304 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
16305 Likewise.
16306 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
16307 Likewise.
420f93c8 16308
ff68026d
PE
16309 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
16310 Use size_t, not unsigned int, to count bytes.
16311 * lib/abitset.h (abitset_bytes): Likewise.
16312 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
16313 Likewise.
16314 * lib/bitset.h (bitset_bytes): Likewise.
16315 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
16316 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
16317 * lib/bitsetv.c (bitsetv_alloc): Likewise.
16318 * lib/ebitset.c (ebitset_bytes): Likewise.
16319 * lib/ebitset.h (ebitset_bytes): Likewise.
16320 * lib/lbitset.c (lbitset_bytes): Likewise.
16321 * lib/lbitset.h (lbitset_bytes): Likewise.
420f93c8 16322
ff68026d
PE
16323 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
16324 abitset_subset_p, abitset_disjoint_p, abitset_and,
16325 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
16326 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
16327 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
16328 abitset_or_and, abitset_or_and_cmp):
16329 Use bitset_windex instead of unsigned int.
16330 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16331 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
16332 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
16333 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
16334 Likewise.
16335 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
420f93c8 16336
ff68026d
PE
16337 * lib/bitset.c (bitset_print):
16338 Use proper printf formats for widths of integer types.
16339 * lib/bitset_stats.c (bitset_percent_histogram_print,
16340 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
16341 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
16342 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
16343 * lib/lbitset.c (lbitset_bytes): Likewise.
420f93c8 16344
ff68026d
PE
16345 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
16346 BITSET_SIZE_MAX): New macros.
16347 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
16348 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
16349 to BITSET_WINDEX_MAX.
16350
16351 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
16352 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
16353 since we now return the bitset_bindex type (not int).
16354
16355 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
16356 when computing sizes.
16357 * lib/ebitset.c (ebitset_elts_grow): Likewise.
16358
16359 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
16360 and avoid cast to unsigned.
16361
6aa452a6
AD
163622002-09-30 Akim Demaille <akim@epita.fr>
16363
16364 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
16365 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
16366 Updates from Michael Hayes.
16367
927f7817
AD
163682002-09-30 Art Haas <ahaas@neosoft.com>
16369
16370 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
16371 invocations.
16372 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
16373 defined.
16374
9738f41e
AD
163752002-09-27 Akim Demaille <akim@epita.fr>
16376
16377 Version 1.49c.
16378
a5c75d7f
AD
163792002-09-27 Akim Demaille <akim@epita.fr>
16380
16381 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
16382 (Because of AC_LIBSOURCE).
16383
8280e179
AD
163842002-09-27 Akim Demaille <akim@epita.fr>
16385
16386 Playing with Autoscan.
16387
16388 * configure.ac: Remove the old LIBOBJ tweaks.
16389 (AC_REPLACE_FUNCS): Add strrchr and strtol.
16390 * lib/strrchr.c: New.
16391 * lib/strtol.c: New, from the Coreutils 4.5.1.
16392
ae64af35
AD
163932002-09-27 Akim Demaille <akim@epita.fr>
16394
16395 Playing with Autoscan.
16396
16397 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
16398 * lib/Makefile.am (libbison_a_SOURCES): No longer include
16399 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
16400 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
16401 Coreutils 4.5.1.
16402
d1a1114f
AD
164032002-09-24 Akim Demaille <akim@epita.fr>
16404
16405 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
16406 (Frequently Asked Questions, Parser Stack Overflow): New.
16407
b906441c
AD
164082002-09-13 Akim Demaille <akim@epita.fr>
16409
16410 Playing with autoscan.
16411
16412 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
16413 * src/files.c (skeleton_find): Remove, unused.
16414 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
16415 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
16416
bd701811
AD
164172002-09-13 Akim Demaille <akim@epita.fr>
16418
16419 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
16420 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
16421
e0a13e7b
AD
164222002-09-13 Akim Demaille <akim@epita.fr>
16423
16424 * configure.ac: Require 2.54.
16425 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
16426 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
16427 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
16428 Remove, provided by Autoconf macros.
16429
c97011bf
AD
164302002-09-12 Akim Demaille <akim@epita.fr>
16431
16432 * m4/prereq.m4: Update, from Coreutils 4.5.1.
16433
d862b1be
AD
164342002-09-12 Akim Demaille <akim@epita.fr>
16435
16436 * m4/prereq.m4: Update, from Fileutils 4.1.5.
16437 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
16438 Reported by Martin Mokrejs.
16439
3d38c03a
AD
164402002-09-10 Akim Demaille <akim@epita.fr>
16441
16442 * src/parse-gram.y: Associate a human readable string to each
16443 token type.
16444 * tests/regression.at (Invalid inputs): Adjust.
16445
b6347355
AD
164462002-09-10 Gary V. Vaughan <gary@gnu.org>
16447
16448 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
16449 with an Autoconf-2.5x style configure.ac.
16450
09ba4ab2
PE
164512002-09-06 Paul Eggert <eggert@twinsun.com>
16452
16453 * doc/bison.texinfo (Conditions): Make explicit that the GPL
16454 exception applies only to yacc.c. This is a modification of a
16455 patch originally suggested by Akim Demaille.
16456
21846f69
AD
164572002-09-06 Akim Demaille <akim@epita.fr>
16458
09ba4ab2
PE
16459 * data/c.m4 (b4_copyright): Move the GPL exception comment from
16460 here to...
16461 * data/yacc.c: here.
16462
21846f69
AD
16463 * data/lalr1.cc (struct yyltype): Don't define it, since we use
16464 LocationType.
16465 (b4_ltype): Default to yy::Location from location.hh.
16466
c0ad8bf3
AD
164672002-09-04 Jim Meyering <jim@meyering.net>
16468
16469 * data/yacc.c: Guard the declaration of yytoknum also with
16470 `#ifdef YYPRINT', so it is declared only when used.
16471
3a93251e
AD
164722002-09-04 Akim Demaille <akim@epita.fr>
16473
16474 * configure.in: Rename as...
16475 * configure.ac: this.
16476 Bump to 1.49c.
16477
427c0dda
AD
164782002-09-04 Akim Demaille <akim@epita.fr>
16479
16480 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
16481 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
16482 translate maintainer only messages.
16483
6a254321
PE
164842002-08-12 Paul Eggert <eggert@twinsun.com>
16485
645e30d1
PE
16486 Version 1.49b.
16487
6a254321
PE
16488 * Makefile.am (SUBDIRS): Remove intl.
16489 (DISTCLEANFILES): Remove.
16490 * NEWS: Mention that GNU M4 is now required. Clarify what is
16491 meant by "larger grammars". Mention the pt_BR translation.
16492 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
16493 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
16494 Bump version from 0.11.2 to 0.11.5.
16495 (BISON_PREREQ_STAGE): Remove.
16496 (AM_GNU_GETTEXT): Use external gettext.
16497 (AC_OUTPUT): Remove intl/Makefile.
16498
16499 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
16500
16501 * data/glr.c: Include string.h, for strlen.
16502 (yyreportParseError): Use size_t for yysize.
16503 (yy_yypstack): No longer nested inside yypstates, as nested
16504 functions are not portable. Do not assume size_t is the
16505 same width as int.
16506 (yypstates): Do not assume that ptrdiff_t is the same width
16507 as int, and similarly for yyposn and YYINDEX.
16508
16509 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
16510
16511 * lib/Makefile.am (INCLUDES): Do not include from the intl
16512 directory, which has been removed.
16513 * src/Makefile.am (INCLUDES): Likewise.
16514
16515 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
16516 (bitsets_sources, additional_bitsets_sources, timevars_sources):
16517 New vars.
16518
16519 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
16520 * tests/Makefile.am (EXTRA_DIST): Likewise.
16521
16522 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
16523 Do not assume that bitset_windex is the same width as unsigned.
16524
16525 * lib/abitset.c (abitset_unused_clear): Do not assume that
16526 bitset_word is the same width as int.
16527 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
16528 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
16529 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
16530 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
16531 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
16532
16533 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
16534 portability to one's complement hosts!).
16535 * lib/ebitset.c (ebitset_op1): Likewise.
16536 * lib/lbitset.c (lbitset_op1): Likewise.
16537
16538 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
16539 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
16540 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
16541 Sync with fileutils.
16542 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
16543 lib/gettext.h: Sync with diffutils.
16544
16545 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
16546 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
16547
16548 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
16549 PROTOTYPES to check for prototypes, and "defined __STDC__" to
16550 check for void *.
16551
16552 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
16553 size_t; the old version tried to do this but casted improperly.
16554 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
16555 (bitset_test): Now returns int, not unsigned long.
16556
16557 * lib/bitset_stats.c: Include "gettext.h".
16558 (_): New macro.
16559 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
16560 name locals "index", as it generates unnecessary warnings on some
16561 hosts that have an "index" function.
16562
16563 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
16564 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
16565 they need translation.
16566 * src/LR0.c (state_list_append, new_itemsets, get_state,
16567 append_states, generate_states): Likewise.
16568 * src/assoc.c (assoc_to_string): Likewise.
16569 * src/closure.c (print_closure, set_firsts, closure): Likewise.
16570 * src/gram.c (grammar_dump): Likewise.
16571 * src/injections.c (injections_compute): Likewise.
16572 * src/lalr.c (lookaheads_print): Likewise.
16573 * src/relation.c (relation_transpose): Likewise.
16574 * src/scan-gram.l: Likewise.
16575 * src/tables.c (table_grow, pack_vector): Likewise.
16576
16577 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
16578 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
16579 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
16580 * m4/mbstate_t.m4: Sync with fileutils.
16581 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
16582
16583 * po/LINGUAS: Add pt_BR.
16584 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
16585 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
16586 lib/timevar.c.
16587 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
16588 manual recommends.
16589 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
16590
16591 * src/complain.c (strerror_r): Remove decl; not needed.
16592 (strerror): Use same pattern as ../lib/error.c.
16593
16594 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
16595
16596 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
16597
16598 * src/main.c (main): Cast result of bindtextdomain and textdomain
16599 to void, to avoid a GCC warning when --disable-nls is in effect.
16600
16601 * src/scan-gram.l: Use strings rather than escapes when possible,
16602 to minimize the number of warnings from xgettext.
16603 (handle_action_dollar, handle_action_at): Don't use isdigit,
16604 as it mishandles negative chars and it may not work as expected
16605 outside the C locale.
16606
16607 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
16608 this is a GCC extension and is not portable to other compilers.
16609
16610 * src/system.h (alloca): Use same pattern as ../lib/error.c.
16611 Do not include <ctype.h>; no longer needed.
16612 Do not include <malloc.h>; no longer needed (and generates
16613 warnings on OpenBSD 3.0).
16614
16615 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
16616 it's not portable.
16617
16618 * tests/regression.at: Do not use 'cc -c input.c -o input';
16619 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
16620
16621 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
16622 exit status as failure, not just exit status 1. Sun C exits
16623 with status 2 sometimes.
16624
16625 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
16626 Use it for the two large tests.
16627
c8f002c7
AD
166282002-08-02 Akim Demaille <akim@epita.fr>
16629
16630 * src/conflicts.c (conflicts_output): Don't output rules never
16631 reduced here, since anyway that computation doesn't work.
16632 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
16633 (rule_useless_p, rule_never_reduced_p): New.
16634 (grammar_rules_partial_print): Use a filter instead of a range.
16635 Display the title only if needed.
16636 (grammar_rules_print): Adjust.
16637 (grammar_rules_never_reduced_report): New.
16638 * src/tables.c (action_row): Move the computation of rules never
16639 reduced to...
16640 (token_actions): here.
16641 * src/main.c (main): Make the parser before making the report, so
16642 that rules never reduced are computed.
16643 Call grammar_rules_never_reduced_report.
16644 * src/print.c (print_results): Report rules never reduced.
16645 * tests/conflicts.at, tests/reduce.at: Adjust.
16646
cd08e51e
AD
166472002-08-01 Akim Demaille <akim@epita.fr>
16648
16649 Instead of attaching lookaheads and duplicating the rules being
16650 reduced by a state, attach the lookaheads to the reductions.
16651
16652 * src/state.h (state_t): Remove the `lookaheads',
16653 `lookaheads_rule' member.
16654 (reductions_t): Add a `lookaheads' member.
16655 Use a regular array for the `rules'.
16656 * src/state.c (reductions_new): Initialize the lookaheads member
16657 to 0.
16658 (state_rule_lookaheads_print): Adjust.
16659 * src/state.h, src/state.c (state_reductions_find): New.
16660 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
16661 (count_rr_conflicts): Adjust.
16662 * src/lalr.c (LArule): Remove.
16663 (add_lookback_edge): Adjust.
16664 (state_lookaheads_count): New.
16665 (states_lookaheads_initialize): Merge into...
16666 (initialize_LA): this.
16667 (lalr_free): Adjust.
16668 * src/main.c (main): Don't free nullable and derives too early: it
16669 is used by --verbose.
16670 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
16671
bb0027a9
AD
166722002-08-01 Akim Demaille <akim@epita.fr>
16673
16674 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
16675 `rule_number_t**'.
16676 (set_derives, free_derives): Rename as...
16677 (derives_compute, derives_free): this.
16678 Adjust all dependencies.
16679 * src/nullable.c (set_nullable, free_nullable): Rename as...
16680 (nullable_compute, nullable_free): these.
16681 (rule_list_t): Store rule_t *, not rule_number_t.
16682 * src/state.c (state_rule_lookaheads_print): Directly compare rule
16683 pointers, instead of their numbers.
16684 * src/main.c (main): Call nullable_free, and derives_free earlier,
16685 as they were lo longer used.
16686
3325ddc4
AD
166872002-08-01 Akim Demaille <akim@epita.fr>
16688
16689 * lib/timevar.c (get_time): Include children time.
16690 * src/lalr.h (LA, LArule): Don't export them: used with the
16691 state_t.
16692 * src/lalr.c (LA, LArule): Static.
16693 * src/lalr.h, src/lalr.c (lalr_free): New.
16694 * src/main.c (main): Call it.
16695 * src/tables.c (pack_vector): Check whether loc is >= to the
16696 table_size, not >.
16697 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
16698 (tables_generate): do it, since that's also it which allocates
16699 them.
16700 Don't free LA and LArule, main does.
16701
c6f1a33c
AD
167022002-07-31 Akim Demaille <akim@epita.fr>
16703
16704 Separate parser tables computation and output.
16705
16706 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
16707 (conflict_list, conflict_list_cnt, table, check, table_ninf)
16708 (yydefgoto, yydefact, high): Move to...
16709 * src/tables.h, src/tables.c: here.
16710 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16711 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16712 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
16713 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
16714 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
16715 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
16716 (action_row, save_row, token_actions, save_column, default_goto)
16717 (goto_actions, sort_actions, matching_state, pack_vector)
16718 (table_ninf_remap, pack_table, prepare_actions): Move to...
16719 * src/tables.c: here.
16720 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
16721 * src/output.c (token_actions, output_base, output_conflicts)
16722 (output_check): Merge into...
16723 (prepare_actions): this.
16724 (actions_output): Rename as...
16725 (user_actions_output): this.
16726 * src/main.c (main): Call tables_generate and tables_free.
16727
1509d42f
AD
167282002-07-31 Akim Demaille <akim@epita.fr>
16729
16730 Steal GCC's --time-report support.
16731
16732 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
16733 stolen/adjusted from GCC.
16734 * m4/stage.m4: Remove time related checks.
16735 * m4/timevar.m4: New.
16736 * configure.in: Adjust.
16737 * src/system.h: Adjust to using timevar.h.
16738 * src/getargs.h, src/getargs.c: Support trace_time for
16739 --trace=time.
16740 * src/main.c (stage): Remove.
16741 (main): Replace `stage' invocations with timevar calls.
16742 * src/output.c: Insert pertinent timevar calls.
16743
273a74fa
AD
167442002-07-31 Akim Demaille <akim@epita.fr>
16745
16746 Let --trace have arguments.
16747
16748 * src/getargs.h (enum trace_e): New.
16749 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
16750 (long_options, short_options): --trace/-T takes an optional
16751 argument.
16752 Change all the uses of trace_flag to reflect the new flags.
16753 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
16754
16755 Strengthen `stage' portability.
16756
16757 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
16758 * configure.in: Use it.
16759 Don't check for malloc.h and sys/times.h.
16760 * src/system.h: Include them when appropriate.
16761 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
16762 times and struct tms are available.
16763
217598da
AD
167642002-07-30 Akim Demaille <akim@epita.fr>
16765
16766 In verbose parse error message, don't report `error' as an
16767 expected token.
16768 * tests/actions.at (Printers and Destructors): Adjust.
16769 * tests/calc.at (Calculator $1): Adjust.
16770 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
16771 error message, do not report the parser accepts the error token in
16772 that state.
16773
52489d44
AD
167742002-07-30 Akim Demaille <akim@epita.fr>
16775
16776 Normalize conflict related messages.
16777
16778 * src/complain.h, src/complain.c (warn, complain): New.
16779 * src/conflicts.c (conflicts_print): Use them.
16780 (conflict_report_yacc): New, extracted from...
16781 (conflicts_print): here.
16782 * tests/conflicts.at, tests/existing.at: Adjust.
16783
e8832397
AD
167842002-07-30 Akim Demaille <akim@epita.fr>
16785
16786 Report rules which are never reduced by the parser: those hidden
16787 by conflicts.
16788
16789 * src/LR0.c (save_reductions): Don't make the final state too
16790 different: save its reduction (accept) instead of having a state
16791 without any action (no shift or goto, no reduce).
16792 Note: the final state is now a ``regular'' state, i.e., the
16793 parsers now contain `reduce 0' as default reduction.
16794 Nevertheless, since they decide to `accept' when yystate =
16795 final_state, they still will not reduce rule 0.
16796 * src/print.c (print_actions, print_reduction): Adjust.
16797 * src/output.c (action_row): Track reduced rules.
16798 (token_actions): Report rules never reduced.
16799 * tests/conflicts.at, tests/regression.at: Adjust.
16800
caf23d24
AD
168012002-07-30 Akim Demaille <akim@epita.fr>
16802
16803 `stage' was accidently included in a previous patch.
16804 Initiate its autoconfiscation.
16805
16806 * configure.in: Look for malloc.h and sys/times.h.
16807 * src/main.c (stage): Adjust.
16808 Report only when trace_flag.
16809
640748ee
AD
168102002-07-29 Akim Demaille <akim@epita.fr>
16811
16812 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
16813 state_number_t.
16814 (errs_t): symbol_t*, not symbol_number_t.
16815 (reductions_t): rule_t*, not rule_number_t.
16816 (FOR_EACH_SHIFT): New.
16817 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
16818 * src/print.c, src/print_graph.c: Adjust.
16819
88bce5a2
AD
168202002-07-29 Akim Demaille <akim@epita.fr>
16821
16822 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
16823
16824 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
16825 (endtoken, accept): these.
16826 * src/reader.c (reader): Set endtoken's default tag to "$end".
16827 Set undeftoken's tag to "$undefined" instead of "$undefined.".
16828 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
16829 Adjust.
16830
1bfb97db
AD
168312002-07-29 Akim Demaille <akim@epita.fr>
16832
16833 * src/reduce.c (reduce_grammar): When the language is empty,
16834 complain about the start symbol, not the axiom.
16835 Use its location.
16836 * tests/reduce.at (Empty Language): New.
16837
fc5734fe
AD
168382002-07-26 Akim Demaille <akim@epita.fr>
16839
16840 * src/reader.h, src/reader.c (gram_error): ... can't get
16841 yycontrol without making too strong assumptions on the parser
16842 itself.
16843 * src/output.c (prepare_tokens): Use the real 0th value of
16844 token_translations instead of `0'.
16845 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
16846 visible here.
16847 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
16848 for the time being: %locations ought to provide it to yyerror.
16849
3650b4b8
AD
168502002-07-25 Akim Demaille <akim@epita.fr>
16851
16852 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
16853 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
16854 * tests/regression.at (Web2c Actions): Adjust.
16855
4b3d3a8e
AD
168562002-07-25 Akim Demaille <akim@epita.fr>
16857
16858 Stop storing rules from 1 to nrules + 1.
16859
16860 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
16861 * src/nullable.c, src/output.c, src/print.c, src/reader.c
16862 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
16863 Iterate from 0 to nrules.
16864 Use rule_number_as_item_number and item_number_as_rule_number.
16865 Adjust to `derive' now containing possibly 0.
16866 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
16867 Handle the `- 1' part in rule numbers from/to item numbers.
16868 * src/conflicts.c (log_resolution): Fix the message which reversed
16869 shift and reduce.
16870 * src/output.c (action_row): Initialize default_rule to -1.
16871 (token_actions): Adjust.
16872 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
16873 expected output.
16874 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
16875
4a2a22f4
AD
168762002-07-25 Akim Demaille <akim@epita.fr>
16877
16878 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
16879 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
16880 (b4_c_knr_arg_decl): New.
16881 * data/yacc.c: Use it to define yysymprint, yydestruct, and
16882 yyreport_parse_error.
16883
b8df3223
AD
168842002-07-25 Akim Demaille <akim@epita.fr>
16885
16886 * data/yacc.c (yyreport_parse_error): New, extracted from...
16887 (yyparse): here.
16888 (yydestruct, yysymprint): Move above yyparse.
16889 Be K&R compliant.
16890
a762e609
AD
168912002-07-25 Akim Demaille <akim@epita.fr>
16892
16893 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
16894 replace...
16895 (b4_sint_type, b4_uint_type): these.
16896 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
16897 * tests/regression.at (Web2c Actions): Adjust.
16898
12b0043a
AD
168992002-07-25 Akim Demaille <akim@epita.fr>
16900
16901 * src/gram.h (TIEM_NUMBER_MAX): New.
16902 (item_number_of_rule_number, rule_number_of_item_number): Rename
16903 as...
16904 (rule_number_as_item_number, item_number_as_rule_number): these.
16905 Adjust dependencies.
16906 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
16907 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
16908 (symbol_number_to_vector_number): New.
16909 (order): Of vector_number_t* type.
16910 (base_t, BASE_MAX, BASE_MIN): New.
16911 (froms, tos, width, pos, check): Of base_t type.
16912 (action_number_t, ACTION_MIN, ACTION_MAX): New.
16913 (actrow): Of action_number_t type.
16914 (conflrow): Of unsigned int type.
16915 (table_ninf, base_ninf): New.
16916 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
16917 (muscle_insert_int_table, muscle_insert_base_table)
16918 (muscle_insert_rule_number_table): New.
16919 (prepare_tokens): Output `toknum' as int_table.
16920 (action_row): Returns a rule_number_t.
16921 Use ACTION_MIN, not SHRT_MIN.
16922 (token_actions): yydefact is rule_number_t*.
16923 (table_ninf_remap): New.
16924 (pack_table): Use it for `base' and `table'.
16925 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
16926 replaced with...
16927 (YYPACT_NINF, YYTABLE_NINF): these.
16928 (yypact, yytable): Compute their types instead of hard-coded
16929 `short'.
16930 * tests/regression.at (Web2c Actions): Adjust.
16931
5dde258a
AD
169322002-07-19 Akim Demaille <akim@epita.fr>
16933
16934 * src/scan-gram.l (id): Can start with an underscore.
16935
a945ec39
AD
169362002-07-16 Akim Demaille <akim@epita.fr>
16937
16938 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
16939 Adjust all former `associativity' dependencies.
16940 * src/symtab.c (symbol_new): Default associativity is `undef', not
16941 `right'.
16942 (symbol_check_alias_consistence): Adjust.
16943
fae437e8
AD
169442002-07-09 Akim Demaille <akim@epita.fr>
16945
16946 * doc/bison.texinfo: Properly set the ``header'' part.
16947 Use @dircategory ``GNU programming tools'' as per Texinfo's
16948 documentation.
16949 Use @copying.
16950
1a715ef2
AD
169512002-07-09 Akim Demaille <akim@epita.fr>
16952
16953 * lib/quotearg.h: Protect against multiple inclusions.
16954 * src/location.h (location_t): Add a `file' member.
16955 (LOCATION_RESET, LOCATION_PRINT): Adjust.
16956 * src/complain.c (warn_at, complain_at, fatal_at): Drop
16957 `error_one_per_line' support.
16958
a5d50994
AD
169592002-07-09 Akim Demaille <akim@epita.fr>
16960
16961 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
16962 * src/reader.c (lineno): Remove.
16963 Adjust all dependencies.
16964 (get_merge_function): Take a location and use complain_at.
16965 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
16966 * tests/regression.at (Invalid inputs, Mixing %token styles):
16967 Adjust.
16968
b275314e
AD
169692002-07-09 Akim Demaille <akim@epita.fr>
16970
16971 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
16972 recovery rule, and forbid extensions when --yacc.
16973 (gram_error): Use complain_at.
16974 * src/reader.c (reader): Exit if there were parse errors.
16975
865b9df1
AD
169762002-07-09 Akim Demaille <akim@epita.fr>
16977
16978 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
16979 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
16980 Reported by R Blake <blakers@mac.com>.
16981
c76e14da
AD
169822002-07-09 Akim Demaille <akim@epita.fr>
16983
16984 * data/yacc.c: Output the copyright notive in the header.
16985
7db2ed2d
AD
169862002-07-03 Akim Demaille <akim@epita.fr>
16987
16988 * src/output.c (froms, tos): Are state_number_t.
16989 (save_column): sp, sp1, and sp2 are state_number_t.
16990 (prepare): Rename `final' as `final_state_number', `nnts' as
16991 `nterms_number', `nrules' as `rules_number', `nstates' as
16992 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
16993 unused.
16994 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
16995 * data/lalr1.cc (nsym_): Remove, unused.
16996
e68e0410
AD
169972002-07-03 Akim Demaille <akim@epita.fr>
16998
16999 * src/lalr.h, src/lalr.c (goto_number_t): New.
17000 * src/lalr.c (goto_list_t): New.
17001 Propagate them.
17002 * src/nullable.c (rule_list_t): New.
17003 Propagate.
17004 * src/types.h: Remove.
17005
e1a4f3a4
AD
170062002-07-03 Akim Demaille <akim@epita.fr>
17007
17008 * src/closure.c (print_fderives): Use rule_rhs_print.
17009 * src/derives.c (print_derives): Use rule_rhs_print.
17010 (rule_list_t): New, replaces `shorts'.
17011 (set_derives): Add comments.
17012 * tests/sets.at (Nullable, Firsts): Adjust.
17013
536545f3
AD
170142002-07-03 Akim Demaille <akim@epita.fr>
17015
17016 * src/output.c (prepare_actions): Free `tally' and `width'.
17017 (prepare_actions): Allocate and free `order'.
17018 * src/symtab.c (symbols_free): Free `symbols'.
17019 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
17020 * src/output.c (m4_invoke): Move to...
17021 * src/scan-skel.l: here.
17022 (<<EOF>>): Close yyout, and free its name.
17023
8b752b00
AD
170242002-07-03 Akim Demaille <akim@epita.fr>
17025
17026 Fix some memory leaks, and fix a bug: state 0 was examined twice.
17027
17028 * src/LR0.c (new_state): Merge into...
17029 (state_list_append): this.
17030 (new_states): Merge into...
17031 (generate_states): here.
17032 (set_states): Don't ensure a proper `errs' state member here, do it...
17033 * src/conflicts.c (conflicts_solve): here.
17034 * src/state.h, src/state.c: Comment changes.
17035 (state_t): Rename member `shifts' as `transitions'.
17036 Adjust all dependencies.
17037 (errs_new): For consistency, also take the values as argument.
17038 (errs_dup): Remove.
17039 (state_errs_set): New.
17040 (state_reductions_set, state_transitions_set): Assert that no
17041 previous value was assigned.
17042 (state_free): New.
17043 (states_free): Use it.
17044 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
17045 temporary storage: use `errs' and `nerrs' as elsewhere.
17046 (set_conflicts): Allocate and free this `errs'.
17047
613f5e1a
AD
170482002-07-02 Akim Demaille <akim@epita.fr>
17049
17050 * lib/libiberty.h: New.
17051 * lib: Update the bitset implementation from upstream.
17052 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
17053 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
17054 * src/main.c: Adjust bitset stats calls.
17055
26e0cadc
PE
170562002-07-01 Paul Eggert <eggert@twinsun.com>
17057
17058 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
17059 char, so that negative chars don't collide with $.
17060
1154cced
AD
170612002-06-30 Akim Demaille <akim@epita.fr>
17062
17063 Have the GLR tests be `warning' checked, and fix the warnings.
17064
17065 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
17066 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
17067 (yyremoveDeletes): `yyi' and `yyj' are size_t.
17068 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
17069 (yyaddDeferredAction): static.
17070 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
17071 (yyreportParseError): yyprefix is const.
17072 yytokenp is used only when verbose.
17073 (yy__GNUC__): Replace with __GNUC__.
17074 (yypdumpstack): yyi is size_t.
17075 (yypreference): Un-yy local variables and arguments, to avoid
17076 clashes with `yyr1'. Anyway, we are not in the user name space.
17077 (yytname_size): be an int, as is compared with ints.
17078 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
17079 Use them.
17080 * tests/cxx-gram.at: Use quotation to protect $1.
17081 Use AT_COMPILE to enable warnings hunts.
17082 Prototype yylex and yyerror.
17083 `Use' argc.
17084 Include `string.h', not `strings.h'.
17085 Produce and prototype stmtMerge only when used.
17086 yylex takes a location.
17087
97650f4e
AD
170882002-06-30 Akim Demaille <akim@epita.fr>
17089
17090 We spend a lot of time in quotearg, in particular when --verbose.
17091
17092 * src/symtab.c (symbol_get): Store a quoted version of the key.
17093 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
17094 Adjust all callers.
17095
d2576365
AD
170962002-06-30 Akim Demaille <akim@epita.fr>
17097
17098 * src/state.h (reductions_t): Rename member `nreds' as num.
17099 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
17100 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
17101
ccaf65bc
AD
171022002-06-30 Akim Demaille <akim@epita.fr>
17103
17104 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
17105 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
17106 (shifts_to): Rename as...
17107 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
17108 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
17109 (TRANSITION_IS_DISABLED, transitions_to): these.
17110
87675353
AD
171112002-06-30 Akim Demaille <akim@epita.fr>
17112
17113 * src/print.c (print_shifts, print_gotos): Merge into...
17114 (print_transitions): this.
17115 (print_transitions, print_errs, print_reductions): Align the
17116 lookaheads columns.
17117 (print_core, print_transitions, print_errs, print_state,
17118 print_grammar): Output empty lines separator before, not after.
17119 (state_default_rule_compute): Rename as...
17120 (state_default_rule): this.
17121 * tests/conflicts.at (Defaulted Conflicted Reduction),
17122 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
17123 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
17124
ce4ccb4b
AD
171252002-06-30 Akim Demaille <akim@epita.fr>
17126
17127 Display items as we display rules.
17128
17129 * src/gram.h, src/gram.c (rule_lhs_print): New.
17130 * src/gram.c (grammar_rules_partial_print): Use it.
17131 * src/print.c (print_core): Likewise.
17132 * tests/conflicts.at (Defaulted Conflicted Reduction),
17133 (Unresolved SR Conflicts): Adjust.
17134 (Unresolved SR Conflicts): Adjust and rename as...
17135 (Resolved SR Conflicts): this, as was meant.
17136 * tests/regression.at (Web2c Report): Adjust.
17137
bc933ef1
AD
171382002-06-30 Akim Demaille <akim@epita.fr>
17139
17140 * src/print.c (state_default_rule_compute): New, extracted from...
17141 (print_reductions): here.
17142 Pessimize, but clarify the code.
17143 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
17144
53d4308d
AD
171452002-06-30 Akim Demaille <akim@epita.fr>
17146
17147 * src/output.c (action_row): Let default_rule be always a rule
17148 number.
17149
574fb2d5
AD
171502002-06-30 Akim Demaille <akim@epita.fr>
17151
17152 * src/closure.c (print_firsts, print_fderives, closure):
17153 Use BITSET_EXECUTE.
17154 * src/lalr.c (lookaheads_print): Likewise.
17155 * src/state.c (state_rule_lookaheads_print): Likewise.
17156 * src/print_graph.c (print_core): Likewise.
17157 * src/print.c (print_reductions): Likewise.
17158 * src/output.c (action_row): Likewise.
17159 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
17160
05811fd7
AD
171612002-06-30 Akim Demaille <akim@epita.fr>
17162
17163 * src/print_graph.c: Use report_flag.
17164
0e4d5753
AD
171652002-06-30 Akim Demaille <akim@epita.fr>
17166
17167 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
17168 to...
17169 * src/relation.h, src/relation.c (traverse, relation_digraph)
17170 (relation_print, relation_transpose): New.
17171
24c7d800
AD
171722002-06-30 Akim Demaille <akim@epita.fr>
17173
17174 * src/state.h, src/state.c (shifts_to): New.
17175 * src/lalr.c (build_relations): Use it.
17176
9222837b
AD
171772002-06-30 Akim Demaille <akim@epita.fr>
17178
17179 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
17180 (item_number_of_rule_number, rule_number_of_item_number): New.
17181 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
17182 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
17183 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
17184 Propagate their use.
17185 Much remains to be done, in particular wrt `shorts' from types.h.
17186
260008e5
AD
171872002-06-30 Akim Demaille <akim@epita.fr>
17188
17189 * src/symtab.c (symbol_new): Initialize the `printer' member.
17190
8a731ca8
AD
171912002-06-30 Akim Demaille <akim@epita.fr>
17192
17193 * src/LR0.c (save_reductions): Remove, replaced by...
17194 * src/state.h, src/state.c (state_reductions_set): New.
17195 (reductions, errs): Rename as...
17196 (reductions_t, errs_t): these.
17197 Adjust all dependencies.
17198
32e1e0a4
AD
171992002-06-30 Akim Demaille <akim@epita.fr>
17200
17201 * src/LR0.c (state_list_t, state_list_append): New.
17202 (first_state, last_state): Now symbol_list_t.
17203 (this_state): Remove.
17204 (new_itemsets, append_states, save_reductions): Take a state_t as
17205 argument.
17206 (set_states, generate_states): Adjust.
17207 (save_shifts): Remove, replaced by...
17208 * src/state.h, src/state.c (state_shifts_set): New.
17209 (shifts): Rename as...
17210 (shifts_t): this.
17211 Adjust all dependencies.
17212 * src/state.h (state_t): Remove the `next' member.
17213
e5fb6710
AD
172142002-06-30 Akim Demaille <akim@epita.fr>
17215
17216 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
17217 escaped in slot 0.
17218
c7ca99d4
AD
172192002-06-30 Akim Demaille <akim@epita.fr>
17220
17221 Use hash.h for the state hash table.
17222
17223 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
17224 (allocate_storage): Use state_hash_new.
17225 (free_storage): Use state_hash_free.
17226 (new_state, get_state): Adjust.
17227 * src/lalr.h, src/lalr.c (states): Move to...
17228 * src/states.h (state_t): Remove the `link' member, no longer
17229 used.
17230 * src/states.h, src/states.c: here.
17231 (state_hash_new, state_hash_free, state_hash_lookup)
17232 (state_hash_insert, states_free): New.
17233 * src/states.c (state_table, state_compare, state_hash): New.
17234 * src/output.c (output_actions): Do not free states now, since we
17235 still need to know the final_state number in `prepare', called
17236 afterwards. Do it...
17237 * src/main.c (main): here: call states_free after `output'.
17238
df0e7316
AD
172392002-06-30 Akim Demaille <akim@epita.fr>
17240
17241 * src/state.h, src/state.c (state_new): New, extracted from...
17242 * src/LR0.c (new_state): here.
17243 * src/state.h (STATE_ALLOC): Move to...
17244 * src/state.c: here.
17245 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
17246 * src/state.h, src/state.c: here.
17247
39f41916
AD
172482002-06-30 Akim Demaille <akim@epita.fr>
17249
17250 * src/reader.c (gensym): Rename as...
17251 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
17252 (getsym): Rename as...
17253 (symbol_get): this.
17254
d57650a5
AD
172552002-06-30 Akim Demaille <akim@epita.fr>
17256
17257 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
17258 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
17259 * src/output.c, src/print.c, src/print_graph.c: Propagate.
17260 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
17261
5a08f1ce
AD
172622002-06-30 Akim Demaille <akim@epita.fr>
17263
17264 Make the test suite pass with warnings checked.
17265
17266 * tests/actions.at (Printers and Destructors): Improve.
17267 Avoid unsigned vs. signed issues.
17268 * tests/calc.at: Don't exercise the scanner here, do it...
17269 * tests/input.at (Torturing the Scanner): here.
17270
720623af
PH
172712002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17272
88e7e941 17273 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
720623af
PH
17274 reorganize first lines parallel to yacc.c.
17275
fb8135fa
AD
172762002-06-28 Akim Demaille <akim@epita.fr>
17277
17278 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
17279 (b4_token_enum, b4_token_defines): New, factored from...
17280 * data/lalr1.cc, data/yacc.c, glr.c: here.
17281
41442480
AD
172822002-06-28 Akim Demaille <akim@epita.fr>
17283
17284 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
17285 unused variables.
17286 * src/output.c (merger_output): static.
17287
e0e5bf84
AD
172882002-06-28 Akim Demaille <akim@epita.fr>
17289
ba0fe3c7 17290 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
e0e5bf84
AD
17291 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
17292 pacify GCC.
17293 * src/output.c (save_row): Initialize all the variables to pacify GCC.
e0e5bf84 17294
676385e2
PH
172952002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17296
17297 Accumulated changelog for new GLR parsing features.
17298
6a254321 17299 * src/conflicts.c (count_total_conflicts): Change name to
676385e2
PH
17300 conflicts_total_count.
17301 * src/conflicts.h: Ditto.
17302 * src/output.c (token_actions): Use the new name.
17303 (output_conflicts): Change conflp => conflict_list_heads, and
17304 confl => conflict_list for better readability.
17305 * data/glr.c: Use the new names.
17306 * NEWS: Add self to GLR announcement.
e0e5bf84 17307
676385e2
PH
17308 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
17309
17310 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
17311 Akim Demaille.
17312
17313 * data/bison.glr: Change name to glr.c
17314 * data/glr.c: Renamed from bison.glr.
17315 * data/Makefile.am: Add glr.c
e0e5bf84
AD
17316
17317 * src/getargs.c:
17318
676385e2 17319 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
ba0fe3c7 17320 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
e0e5bf84 17321
676385e2
PH
17322 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17323
17324 * data/bison.glr: Be sure to restore the
17325 current #line when returning to the skeleton contents after having
17326 exposed the input file's #line.
17327
17328 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17329
17330 * data/bison.glr: Bring up to date with changes to bison.simple.
17331
17332 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17333
17334 * data/bison.glr: Correct definitions that use b4_prefix.
17335 Various reformatting.
17336 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
17337 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
17338 yytokenp argument; now part of stack.
17339 (yychar): Define to behave as documented.
17340 (yyclearin): Ditto.
e0e5bf84 17341
676385e2
PH
17342 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
17343
17344 * src/reader.h: Add declaration for free_merger_functions.
17345
17346 * src/reader.c (merge_functions): New variable.
17347 (get_merge_function): New function.
17348 (free_merger_functions): New function.
17349 (readgram): Check for %prec that is not followed by a symbol.
17350 Handle %dprec and %merge declarations.
17351 (packgram): Initialize dprec and merger fields in rules array.
17352
17353 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
17354 conflict_list_cnt, conflict_list_free): New variables.
17355 (table_grow): Also grow conflict_table.
e0e5bf84 17356 (prepare_rules): Output dprec and merger tables.
676385e2 17357 (conflict_row): New function.
e0e5bf84 17358 (action_row): Output conflict lists for GLR parser. Don't use
676385e2
PH
17359 default reduction in conflicted states for GLR parser so that there
17360 are spaces for the conflict lists.
17361 (save_row): Also save conflict information.
17362 (token_actions): Allocate conflict list.
17363 (merger_output): New function.
17364 (pack_vector): Pack conflict table, too.
17365 (output_conflicts): New function to output yyconflp and yyconfl.
17366 (output_check): Allocate conflict_tos.
17367 (output_actions): Output conflict tables, also.
17368 (output_skeleton): Output b4_mergers definition.
17369 (prepare): Output b4_max_rhs_length definition.
17370 Use 'bison.glr' as default skeleton for GLR parsers.
17371
17372 * src/gram.c (glr_parser): New flag.
17373 (grammar_free): Call free_merger_functions.
17374
17375 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
17376 all pairs of conflicting reductions, rather than just all tokens
17377 causing conflicts. Needed to size conflict tables.
e0e5bf84 17378 (conflicts_output): Modify call to count_rr_conflicts for new
676385e2
PH
17379 interface.
17380 (conflicts_print): Ditto.
17381 (count_total_conflicts): New function.
17382
17383 * src/reader.h (merger_list): New type.
17384 (merge_functions): New variable.
17385
17386 * src/lex.h (tok_dprec, tok_merge): New token types.
17387
17388 * src/gram.h (rule_s): Add dprec and merger fields.
17389 (glr_parser): New flag.
17390
17391 * src/conflicts.h (count_total_conflicts): New function.
17392
17393 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
17394
17395 * doc/bison.texinfo (Generalized LR Parsing): New section.
17396 (GLR Parsers): New section.
17397 (Language and Grammar): Mention GLR parsing.
17398 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
17399 Correct typo ("tge" -> "the").
17400
17401 * data/bison.glr: New skeleton for GLR parsing.
17402
17403 * tests/cxx-gram.at: New tests for GLR parsing.
17404
17405 * tests/testsuite.at: Include cxx-gram.at.
17406
17407 * tests/Makefile.am: Add cxx-gram.at.
e0e5bf84 17408
676385e2
PH
17409 * src/parse-gram.y:
17410
17411 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
17412
17413 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
e0e5bf84 17414
b5480d74 174152002-06-27 Akim Demaille <akim@epita.fr>
e2aaf4c4
AD
17416
17417 * src/options.h, src/options.c: Remove.
17418 * src/getargs.c (short_options, long_options): New.
17419
60491a94
AD
174202002-06-27 Akim Demaille <akim@epita.fr>
17421
17422 * data/bison.simple, data/bison.c++: Rename as...
17423 * data/yacc.c, data/lalr1.cc: these.
17424 * doc/bison.texinfo (Environment Variables): Remove.
17425
9be0c25b
AD
174262002-06-25 Raja R Harinath <harinath@cs.umn.edu>
17427
17428 * src/getargs.c (report_argmatch): Initialize strtok().
17429
1ae72863
AD
174302002-06-20 Akim Demaille <akim@epita.fr>
17431
17432 * data/bison.simple (b4_symbol_actions): New, replaces...
17433 (b4_symbol_destructor, b4_symbol_printer): these.
17434 (yysymprint): Be sure to call YYPRINT only for tokens, and using
17435 user token numbers.
17436
87542d29
AD
174372002-06-20 Akim Demaille <akim@epita.fr>
17438
17439 * data/bison.simple (yydestructor): Rename as...
17440 (yydestruct): this.
17441
1a31ed21
AD
174422002-06-20 Akim Demaille <akim@epita.fr>
17443
17444 * src/symtab.h, src/symtab.c (symbol_type_set)
17445 (symbol_destructor_set, symbol_precedence_set): The location is
17446 the last argument.
17447 Adjust all callers.
17448
e776192e
AD
174492002-06-20 Akim Demaille <akim@epita.fr>
17450
17451 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
17452 internals.
17453 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
17454 Takes a location.
17455 * src/symtab.h, src/symtab.c (symbol_class_set)
17456 (symbol_user_token_number_set): Likewise.
17457 Adjust all callers.
17458 Promote complain_at.
17459 * tests/input.at (Type Clashes): Adjust.
17460
5c1180b3
AD
174612002-06-20 Akim Demaille <akim@epita.fr>
17462
17463 * data/bison.simple (YYLEX): Fix the declaration when
17464 %pure-parser.
17465
e3170060
AD
174662002-06-20 Akim Demaille <akim@epita.fr>
17467
17468 * data/bison.simple (yysymprint): Don't print the token number,
17469 just its name.
17470 * tests/actions.at (Destructors): Rename as...
17471 (Printers and Destructors): this.
17472 Also exercise %printer.
17473
253862fd
AD
174742002-06-20 Akim Demaille <akim@epita.fr>
17475
17476 * data/bison.simple (YYDSYMPRINT): New.
17477 Use it to remove many of the #if YYDEBUG/if (yydebug).
17478
366eea36
AD
174792002-06-20 Akim Demaille <akim@epita.fr>
17480
17481 * src/symtab.h, src/symtab.c (symbol_t): printer and
17482 printer_location are new members.
17483 (symbol_printer_set): New.
17484 * src/parse-gram.y (PERCENT_PRINTER): New token.
17485 Handle its associated rule.
17486 * src/scan-gram.l: Adjust.
17487 (handle_destructor_at, handle_destructor_dollar): Rename as...
17488 (handle_symbol_code_at, handle_symbol_code_dollar): these.
17489 * src/output.c (symbol_printers_output): New.
17490 (output_skeleton): Call it.
17491 * data/bison.simple (yysymprint): New. Cannot be named yyprint
17492 since there are already many grammar files with a user `yyprint'.
17493 Replace the calls to YYPRINT to calls to yysymprint.
17494 * tests/calc.at: Adjust.
17495 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
17496 taking advantage of parser very internal details (stack size!).
17497
4f25ebb0
AD
174982002-06-20 Akim Demaille <akim@epita.fr>
17499
17500 * src/scan-gram.l: Complete the scanner with the missing patterns
17501 to pacify Flex.
17502 Use `quote' and `symbol_tag_get' where appropriate.
17503
93b68a0e
AD
175042002-06-19 Akim Demaille <akim@epita.fr>
17505
17506 * tests/actions.at (Destructors): Augment to test locations.
17507 * data/bison.simple (yydestructor): Pass it the current location
17508 if locations are enabled.
17509 Prototype only when __STDC__ or C++.
17510 Change the argument names to move into the yy name space: there is
17511 user code here.
17512
58612f1d
AD
175132002-06-19 Akim Demaille <akim@epita.fr>
17514
74310291
AD
17515 * data/bison.simple (b4_pure_if): New.
17516 Use it instead of #ifdef YYPURE.
17517
175182002-06-19 Akim Demaille <akim@epita.fr>
17519
17520 * data/bison.simple (b4_location_if): New.
58612f1d
AD
17521 Use it instead of #ifdef YYLSP_NEEDED.
17522
f25bfb75
AD
175232002-06-19 Akim Demaille <akim@epita.fr>
17524
17525 Prepare @$ in %destructor, but currently don't bind it in the
17526 skeleton, as %location use is not cleaned up yet.
17527
17528 * src/scan-gram.l (handle_dollar, handle_destructor_at)
17529 (handle_action_at): New.
17530 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
17531 a braced_code_t and a location as additional arguments.
17532 (handle_destructor_dollar): Instead of requiring `b4_eval', just
17533 unquote one when outputting `b4_dollar_dollar'.
17534 Adjust callers.
17535 * data/bison.simple (b4_eval): Remove.
17536 (b4_symbol_destructor): Adjust.
17537 * tests/input.at (Invalid @n): Adjust.
17538
c732d2c6
AD
175392002-06-19 Zack Weinberg <zack@codesourcery.com>
17540
17541 * doc/bison.texinfo: Document ability to have multiple
17542 prologue sections.
17543
8c165d89
AD
175442002-06-18 Akim Demaille <akim@epita.fr>
17545
17546 * src/files.c (compute_base_names): When computing the output file
17547 names from the input file name, strip the directory part.
17548
ca98bf57
AD
175492002-06-18 Akim Demaille <akim@epita.fr>
17550
17551 * data/bison.simple.new: Comment changes.
17552 Reported by Andreas Schwab.
17553
0bfb02ff
AD
175542002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
17555
17556 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
17557 there are no `label `yyoverflowlab' defined but not used' warnings
17558 when yyoverflow is defined.
17559
24c0aad7
AD
175602002-06-18 Akim Demaille <akim@epita.fr>
17561
17562 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
17563 new member.
17564 (symbol_destructor_set): Adjust.
17565 * src/output.c (symbol_destructors_output): Output the destructor
17566 locations.
17567 Output the symbol name.
17568 * data/bison.simple (b4_symbol_destructor): Adjust.
17569
5719c109
AD
175702002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
17571 and Akim Demaille <akim@epita.fr>
17572
17573 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
17574 what's left on the stack when the error recovery hits EOF.
17575 * tests/actions.at (Destructors): Complete to exercise this case.
17576
9280d3ef
AD
175772002-06-17 Akim Demaille <akim@epita.fr>
17578
17579 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
17580 arguments is really empty, not only equal to `[]'.
17581 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
17582 member.
17583 (symbol_destructor_set): New.
17584 * src/output.c (symbol_destructors_output): New.
17585 * src/reader.h (brace_code_t, current_braced_code): New.
17586 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
17587 (handle_dollar): Rename as...
17588 (handle_action_dollar): this.
17589 (handle_destructor_dollar): New.
17590 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
17591 (grammar_declaration): Use it.
17592 * data/bison.simple (yystos): Is always defined.
17593 (yydestructor): New.
17594 * tests/actions.at (Destructors): New.
17595 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
17596
dafdc66f
AD
175972002-06-17 Akim Demaille <akim@epita.fr>
17598
17599 * src/symlist.h, src/symlist.c (symbol_list_length): New.
17600 * src/scan-gram.l (handle_dollar, handle_at): Compute the
17601 rule_length only when needed.
17602 * src/output.c (actions_output, token_definitions_output): Output
17603 the full M4 block.
17604 * src/symtab.c: Don't access directly to the symbol tag, use
17605 symbol_tag_get.
17606 * src/parse-gram.y: Use symbol_list_free.
17607
56c47203
AD
176082002-06-17 Akim Demaille <akim@epita.fr>
17609
17610 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
17611 (symbol_list_prepend, get_type_name): Move to...
17612 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
17613 (symbol_list_prepend, symbol_list_n_type_name_get): here.
17614 Adjust all callers.
17615 (symbol_list_free): New.
17616 * src/scan-gram.l (handle_dollar): Takes a location.
17617 * tests/input.at (Invalid $n): Adjust.
17618
1e0bab92
AD
176192002-06-17 Akim Demaille <akim@epita.fr>
17620
17621 * src/reader.h, src/reader.c (symbol_list_new): Export it.
17622 (symbol_list_prepend): New.
17623 * src/parse-gram.y (%union): `list' is a new member.
17624 (symbols.1): New, replaces...
17625 (terms_to_prec.1, nterms_to_type.1): these.
17626 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
17627 Take a location as additional argument.
17628 Adjust all callers.
17629
04e60654
AD
176302002-06-15 Akim Demaille <akim@epita.fr>
17631
17632 * src/parse-gram.y: Move %token in the declaration section so that
17633 we don't depend upon CVS Bison.
17634
10e5b8bd
AD
176352002-06-15 Akim Demaille <akim@epita.fr>
17636
17637 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
17638 * src/print.c (print_core): Use it.
17639
9801d40c
AD
176402002-06-15 Akim Demaille <akim@epita.fr>
17641
17642 * src/conflicts.c (log_resolution): Accept the rule involved in
17643 the sr conflicts instead of the lookahead number that points to
17644 that rule.
17645 (flush_reduce): Accept the current lookahead vector as argument,
17646 instead of the index in LA.
17647 (resolve_sr_conflict): Accept the current number of lookahead
17648 bitset to consider for the STATE, instead of the index in LA.
17649 (set_conflicts): Adjust.
17650 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
17651
c0263492
AD
176522002-06-15 Akim Demaille <akim@epita.fr>
17653
17654 * src/state.h (state_t): Replace the `lookaheadsp' member, a
17655 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
17656 Adjust all dependencies.
17657 * src/lalr.c (initialize_lookaheads): Split into...
17658 (states_lookaheads_count, states_lookaheads_initialize): these.
17659 (lalr): Adjust.
17660
9757c359
AD
176612002-06-15 Akim Demaille <akim@epita.fr>
17662
17663 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
17664 out of...
17665 (grammar_rules_print): here.
17666 * src/reduce.c (reduce_output): Use it.
17667 * tests/reduce.at (Useless Rules, Reduced Automaton)
17668 (Underivable Rules): Adjust.
17669
6b98e4b5
AD
176702002-06-15 Akim Demaille <akim@epita.fr>
17671
17672 Copy BYacc's nice way to report the grammar.
17673
17674 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
17675 New.
17676 Don't print the rules' location, it is confusing and useless.
17677 (rule_print): Use grammar_rhs_print.
17678 * src/print.c (print_grammar): Use grammar_rules_print.
17679
6b98e4b5
AD
176802002-06-15 Akim Demaille <akim@epita.fr>
17681
17682 Complete and rationalize `useless thing' warnings.
17683
17684 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
17685 (symbol_tag_print): New.
17686 Use them everywhere in place of accessing directly the tag member.
17687 * src/gram.h, src/gram.c (rule_print): New.
17688 Use it where a rule used to be printed `by hand'.
17689 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
17690 (reduce_grammar_tables): Report the useless rules.
17691 (reduce_print): Useless things are a warning, not an error.
17692 Report it as such.
17693 * tests/reduce.at (Useless Nonterminals, Useless Rules):
17694 (Reduced Automaton, Underivable Rules): Adjust.
17695 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
17696 * tests/conflicts.at (Unresolved SR Conflicts)
17697 (Solved SR Conflicts): Adjust.
17698
ee000ba4
AD
176992002-06-15 Akim Demaille <akim@epita.fr>
17700
17701 Let symbols have a location.
17702
17703 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
17704 (getsym): Adjust.
17705 Adjust all callers.
17706 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
17707 Use location_t, not int.
17708 * src/symtab.c (symbol_check_defined): Take advantage of the
17709 location.
17710 * tests/regression.at (Invalid inputs): Adjust.
17711
8efe435c
AD
177122002-06-15 Akim Demaille <akim@epita.fr>
17713
17714 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
17715 (input): Don't try to initialize yylloc here, do it in the
17716 scanner.
17717 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
17718 * src/gram.h (rule_t): Change line and action_line into location
17719 and action_location, of location_t type.
17720 Adjust all dependencies.
17721 * src/location.h, src/location.c (empty_location): New.
17722 * src/reader.h, src/reader.c (grammar_start_symbol_set)
17723 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
17724 (grammar_current_rule_symbol_append)
17725 (grammar_current_rule_action_append): Expect a location as argument.
17726 * src/reader.c (grammar_midrule_action): Adjust to attach an
17727 action's location as dummy symbol location.
17728 * src/symtab.h, src/symtab.c (startsymbol_location): New.
17729 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
17730 the line numbers.
17731
1921f1d7
AD
177322002-06-14 Akim Demaille <akim@epita.fr>
17733
17734 Grammar declarations may be found in the grammar section.
17735
17736 * src/parse-gram.y (rules_or_grammar_declaration): New.
17737 (declarations): Each declaration may end with a semicolon, not
17738 just...
17739 (grammar_declaration): `"%union"'.
17740 (grammar): Branch to rules_or_grammar_declaration.
17741
4515534c
AD
177422002-06-14 Akim Demaille <akim@epita.fr>
17743
17744 * src/main.c (main): Invoke scanner_free.
17745
f958596b
AD
177462002-06-14 Akim Demaille <akim@epita.fr>
17747
17748 * src/output.c (m4_invoke): Extracted from...
17749 (output_skeleton): here.
17750 Free tempfile.
17751
2c569025
AD
177522002-06-14 Akim Demaille <akim@epita.fr>
17753
17754 * src/parse-gram.y (directives, directive, gram)
17755 (grammar_directives, precedence_directives, precedence_directive):
17756 Rename as...
17757 (declarations, declaration, grammar, grammar_declaration)
17758 (precedence_declaration, precedence_declarator): these.
17759 (symbol_declaration): New.
17760
592e8d4d
AD
177612002-06-14 Akim Demaille <akim@epita.fr>
17762
17763 * src/files.c (action_obstack): Remove, unused.
17764 (output_obstack): Remove it, and all its dependencies, as it is no
17765 longer needed.
17766 * src/reader.c (epilogue_set): Build the epilogue in the
17767 muscle_obstack.
17768 * src/output.h, src/output.c (muscle_obstack): Move to...
17769 * src/muscle_tab.h, src/muscle_tab.h: here.
17770 (muscle_init): Initialize muscle_obstack.
17771 (muscle_free): New.
17772 * src/main.c (main): Call it.
17773
0c15323d
AD
177742002-06-14 Akim Demaille <akim@epita.fr>
17775
17776 * src/location.h: New, extracted from...
17777 * src/reader.h: here.
17778 * src/Makefile.am (noinst_HEADERS): Merge into
17779 (bison_SOURCES): this.
17780 Add location.h.
17781 * src/parse-gram.y: Use location_t instead of Bison's.
17782 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
17783 Use location_t instead of ints.
17784
e96c9728
AD
177852002-06-14 Akim Demaille <akim@epita.fr>
17786
17787 * data/bison.simple, data/bison.c++: Be sure to restore the
17788 current #line when returning to the skeleton contents after having
17789 exposed the input file's #line.
17790
75d1fe16
AD
177912002-06-12 Akim Demaille <akim@epita.fr>
17792
17793 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
17794 eager.
17795 * tests/actions.at (Exotic Dollars): New.
17796
6c35d22c
AD
177972002-06-12 Akim Demaille <akim@epita.fr>
17798
17799 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
17800 ['"/] too eagerly.
17801 * tests/input.at (Torturing the Scanner): New.
17802
1d6412ad
AD
178032002-06-11 Akim Demaille <akim@epita.fr>
17804
17805 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
17806 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
17807 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
17808 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
17809 * src/reader.c (reader): Use it.
17810
4cdb01db
AD
178112002-06-11 Akim Demaille <akim@epita.fr>
17812
17813 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
17814 Adjust all callers.
17815 (scanner_last_string_free): New.
17816
44995b2e
AD
178172002-06-11 Akim Demaille <akim@epita.fr>
17818
17819 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
17820 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
17821 (last_string, YY_OBS_FREE): New.
17822 Use them when returning an ID.
17823
e9955c83
AD
178242002-06-11 Akim Demaille <akim@epita.fr>
17825
17826 Have Bison grammars parsed by a Bison grammar.
17827
17828 * src/reader.c, src/reader.h (prologue_augment): New.
17829 * src/reader.c (copy_definition): Remove.
17830
17831 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
17832 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
17833 (grammar_current_rule_prec_set, grammar_current_rule_check)
17834 (grammar_current_rule_symbol_append)
17835 (grammar_current_rule_action_append): Export.
17836 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
17837 (symbol_list_action_append): Remove.
17838 Hook the routines from reader.
17839 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
17840 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
17841
17842 * src/reader.c (read_declarations): Remove, unused.
17843
17844 * src/parse-gram.y: Handle the epilogue.
17845 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
17846 (grammar_start_symbol_set): this.
17847 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
17848 * src/reader.c (readgram): Remove, unused.
17849 (reader): Adjust to insert eoftoken and axiom where appropriate.
17850
17851 * src/reader.c (copy_dollar): Replace with...
17852 * src/scan-gram.h (handle_dollar): this.
17853 * src/parse-gram.y: Remove `%thong'.
17854
17855 * src/reader.c (copy_at): Replace with...
17856 * src/scan-gram.h (handle_at): this.
17857
17858 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
17859 New.
17860
17861 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
17862 time being.
17863
17864 * src/reader.h, src/reader.c (grammar_rule_end): New.
17865
17866 * src/parse.y (current_type, current_class): New.
17867 Implement `%nterm', `%token' support.
17868 Merge `%term' into `%token'.
17869 (string_as_id): New.
17870 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
17871 type name.
17872
17873 * src/parse-gram.y: Be sure to handle properly the beginning of
17874 rules.
17875
17876 * src/parse-gram.y: Handle %type.
17877 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
17878
17879 * src/parse-gram.y: More directives support.
17880 * src/options.c: No longer handle source directives.
17881
17882 * src/parse-gram.y: Fix %output.
17883
17884 * src/parse-gram.y: Handle %union.
17885 Use the prologue locations.
17886 * src/reader.c (parse_union_decl): Remove.
17887
17888 * src/reader.h, src/reader.c (epilogue_set): New.
17889 * src/parse-gram.y: Use it.
17890
17891 * data/bison.simple, data/bison.c++: b4_stype is now either not
17892 defined, then default to int, or to the contents of %union,
17893 without `union' itself.
17894 Adjust.
17895 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
17896
17897 * src/output.c (actions_output): Don't output braces, as they are
17898 already handled by the scanner.
17899
17900 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
17901 characters to themselves.
17902
17903 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
17904 that the epilogue has a proper #line.
17905
17906 * src/parse-gram.y: Handle precedence/associativity.
17907
17908 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
17909 a terminal.
17910 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
17911 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
17912 at all to define terminals that cannot be emitted.
17913
17914 * src/scan-gram.l: Escape M4 characters.
17915
17916 * src/scan-gram.l: Working properly with escapes in user
17917 strings/characters.
17918
17919 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
17920 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
17921 grammar.
17922 Use more modest sizes, as for the time being the parser does not
17923 release memory, and therefore the process swallows a huge amount
17924 of memory.
17925
17926 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
17927 stricter %token grammar.
17928
17929 * src/symtab.h (associativity): Add `undef_assoc'.
17930 (symbol_precedence_set): Do nothing when passed an undef_assoc.
17931 * src/symtab.c (symbol_check_alias_consistence): Adjust.
17932
17933 * tests/regression.at (Invalid %directive): Remove, as it is now
17934 meaningless.
17935 (Invalid inputs): Adjust to the new error messages.
17936 (Token definitions): The new grammar doesn't allow too many
17937 eccentricities.
17938
17939 * src/lex.h, src/lex.c: Remove.
17940 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
17941 (copy_character, copy_string2, copy_string, copy_identifier)
17942 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
17943 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
17944 (parse_action): Remove.
17945 * po/POTFILES.in: Adjust.
17946
2e047461
AD
179472002-06-11 Akim Demaille <akim@epita.fr>
17948
cd05d13c 17949 * src/reader.c (parse_action): Don't store directly into the
2e047461
AD
17950 rule's action member: return the action as a string.
17951 Don't require `rule_length' as an argument: compute it.
17952 (grammar_current_rule_symbol_append)
17953 (grammar_current_rule_action_append): New, eved out from
17954 (readgram): here.
17955 Remove `action_flag', `rulelength', unused now.
17956
9af3fbce
AD
179572002-06-11 Akim Demaille <akim@epita.fr>
17958
17959 * src/reader.c (grammar_current_rule_prec_set).
17960 (grammar_current_rule_check): New, eved out from...
17961 (readgram): here.
17962 Remove `xaction', `first_rhs': useless.
17963 * tests/input.at (Type clashes): New.
17964 * tests/existing.at (GNU Cim Grammar): Adjust.
17965
1485e106
AD
179662002-06-11 Akim Demaille <akim@epita.fr>
17967
17968 * src/reader.c (grammar_midrule_action): New, Eved out from
17969 (readgram): here.
17970
da4160c3
AD
179712002-06-11 Akim Demaille <akim@epita.fr>
17972
17973 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
17974 New.
17975 (readgram): Use them as replacement of inlined code, crule and
17976 crule1.
17977
f6d0f937
AD
179782002-06-11 Akim Demaille <akim@epita.fr>
17979
17980 * src/reader.c (grammar_end, grammar_symbol_append): New.
17981 (readgram): Use them.
17982 Make the use of `p' as local as possible.
17983
69078d4b
AD
179842002-06-10 Akim Demaille <akim@epita.fr>
17985
17986 GCJ's parser requires the tokens to be defined before the prologue.
17987
17988 * data/bison.simple: Output the token definition before the user's
17989 prologue.
17990 * tests/regression.at (Braces parsing, Duplicate string)
17991 (Mixing %token styles): Check the output from bison.
17992 (Early token definitions): New.
17993
5e424082
AD
179942002-06-10 Akim Demaille <akim@epita.fr>
17995
17996 * src/symtab.c (symbol_user_token_number_set): Don't complain when
17997 assigning twice the same user number to a token, so that we can
17998 use it in...
17999 * src/lex.c (lex): here.
18000 Also use `symbol_class_set' instead of hand written code.
18001 * src/reader.c (parse_assoc_decl): Likewise.
18002
44536b35
AD
180032002-06-10 Akim Demaille <akim@epita.fr>
18004
18005 * src/symtab.c, src/symtab.c (symbol_class_set)
18006 (symbol_user_token_number_set): New.
18007 * src/reader.c (parse_token_decl): Use them.
18008 Use a switch instead of ifs.
18009 Use a single argument.
18010
8b9f2372
AD
180112002-06-10 Akim Demaille <akim@epita.fr>
18012
18013 Remove `%thong' support as it is undocumented, unused, duplicates
18014 `%token's job, and creates useless e-mail traffic with people who
18015 want to know what it is, why it is undocumented, unused, and
18016 duplicates `%token's job.
18017
18018 * src/reader.c (parse_thong_decl): Remove.
18019 * src/options.c (option_table): Remove "thong".
18020 * src/lex.h (tok_thong): Remove.
18021
3ae2b51f
AD
180222002-06-10 Akim Demaille <akim@epita.fr>
18023
18024 * src/symtab.c, src/symtab.c (symbol_type_set)
18025 (symbol_precedence_set): New.
18026 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
18027 (value_components_used): Remove, unused.
18028
2f1afb73
AD
180292002-06-09 Akim Demaille <akim@epita.fr>
18030
18031 Move symbols handling code out of the reader.
18032
18033 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
18034 (axiom): Move to...
18035 * src/symtab.h, src/symtab.c: here.
18036
18037 * src/gram.c (start_symbol): Remove: use startsymbol->number.
18038 * src/reader.c (startval): Rename as...
18039 * src/symtab.h, src/symtab.c (startsymbol): this.
18040 * src/reader.c: Adjust.
18041
18042 * src/reader.c (symbol_check_defined, symbol_make_alias)
18043 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18044 (token_translations_init)
18045 Move to...
18046 * src/symtab.c: here.
18047 * src/reader.c (packsymbols): Move to...
18048 * src/symtab.h, src/symtab.c (symbols_pack): here.
18049 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
18050 argument.
18051
e9bca3ad
AD
180522002-06-03 Akim Demaille <akim@epita.fr>
18053
18054 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
18055 then statements.
18056
86eff183
AD
180572002-06-03 Akim Demaille <akim@epita.fr>
18058
18059 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
18060 structs with non literals.
18061 * src/scan-skel.l: never-interactive.
18062 * src/conflicts.c (enum conflict_resolution_e): No trailing
18063 comma.
18064 * src/getargs.c (usage): Split long literal strings.
18065 Reported by Hans Aberg.
18066
717be197
AD
180672002-05-28 Akim Demaille <akim@epita.fr>
18068
18069 * data/bison.c++: Use C++ ostreams.
18070 (cdebug_): New member.
18071
670ddffd
AD
180722002-05-28 Akim Demaille <akim@epita.fr>
18073
18074 * src/output.c (output_skeleton): Be sure to allocate enough room
18075 for `/' _and_ for `\0' in full_skeleton.
18076
769b430f
AD
180772002-05-28 Akim Demaille <akim@epita.fr>
18078
18079 * data/bison.c++: Catch up with bison.simple:
18080 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18081 and Paul Eggert <eggert@twinsun.com>: `error' handing.
18082 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
18083 and popping traces.
18084
7067cb36
PH
180852002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18086
18087 * src/output.c (output_skeleton): Put an explicit path in front of
18088 the skeleton file name, rather than relying on the -I directory,
18089 to partially alleviate effects of having a skeleton file lying around
18090 in the current directory.
769b430f 18091
4a713ec2
PH
180922002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18093
769b430f 18094 * src/conflicts.c (log_resolution): Correct typo:
4a713ec2
PH
18095 obstack_printf should be obstack_fgrow1.
18096
b408954b
AD
180972002-05-26 Akim Demaille <akim@epita.fr>
18098
18099 * src/state.h (state_t): `solved_conflicts' is a new member.
18100 * src/LR0.c (new_state): Set it to 0.
18101 * src/conflicts.h, src/conflicts.c (print_conflicts)
18102 (free_conflicts, solve_conflicts): Rename as...
18103 (conflicts_print, conflicts_free, conflicts_solve): these.
18104 Adjust callers.
18105 * src/conflicts.c (enum conflict_resolution_e)
18106 (solved_conflicts_obstack): New, used by...
18107 (log_resolution): this.
18108 Adjust to attach the conflict resolution to each state.
18109 Complete the description with the precedence/associativity
18110 information.
18111 (resolve_sr_conflict): Adjust.
18112 * src/print.c (print_state): Output its solved_conflicts.
18113 * tests/conflicts.at (Unresolved SR Conflicts)
18114 (Solved SR Conflicts): Exercise --report=all.
18115
a49aecd5
AD
181162002-05-26 Akim Demaille <akim@epita.fr>
18117
18118 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18119 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18120 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
18121 (token_number_t, item_number_as_token_number)
18122 (token_number_as_item_number, muscle_insert_token_number_table):
18123 Rename as...
18124 (symbol_number_t, item_number_as_symbol_number)
18125 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
18126 these, since it is more appropriate.
18127
5504898e
AD
181282002-05-26 Akim Demaille <akim@epita.fr>
18129
18130 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
18131 `Error:' lines.
18132 * data/bison.simple (yystos) [YYDEBUG]: New.
18133 (yyparse) [YYDEBUG]: Display the symbols which are popped during
18134 error recovery.
18135 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
18136
ec3bc396
AD
181372002-05-25 Akim Demaille <akim@epita.fr>
18138
18139 * doc/bison.texinfo (Debugging): Split into...
18140 (Tracing): this new section, its former contents, and...
18141 (Understanding): this new section.
18142 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
18143 by...
18144 (report_flag): this.
18145 Adjust all dependencies.
18146 (report_args, report_types, report_argmatch): New.
18147 (usage, getargs): Report/support -r, --report.
18148 * src/options.h
18149 (struct option_table_struct): Rename as..,
18150 (struct option_table_s): this.
18151 Rename the `set_flag' member to `flag' to match with getopt_long's
18152 struct.
18153 * src/options.c (option_table): Split verbose into an entry for
18154 %verbose, and another for --verbose.
18155 Support --report/-r, so remove -r from the obsolete --raw.
18156 * src/print.c: Attach full item sets and lookaheads reports to
18157 report_flag instead of trace_flag.
18158 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
18159
78df8250
PE
181602002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18161 and Paul Eggert <eggert@twinsun.com>
769b430f 18162
78df8250
PE
18163 * data/bison.simple (yyparse): Correct error handling to conform to
18164 POSIX and yacc. Specifically, after syntax error is discovered,
18165 do not reduce further before shifting the error token.
18166 Clean up the code a bit by removing the labels yyerrdefault,
18167 yyerrhandle, yyerrpop.
18168 * NEWS: Document the above.
18169
c0c9ea05
PH
181702002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18171
18172 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
18173 type; it isn't always big enough, since it doesn't necessarily
18174 include non-terminals.
769b430f 18175 (yytranslate): Expand definition of yy_token_number_type, so that
c0c9ea05
PH
18176 the latter can be removed.
18177 (yy_token_number_type): Remove, only one use.
18178 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
18179 don't use TokenNumberType as element type.
769b430f 18180
c0c9ea05
PH
18181 * tests/regression.at: Modify expected output to agree with change
18182 to yyr1 and yytranslate.
769b430f 18183
6390a83f
FK
181842002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
18185
18186 * src/reader.c (parse_action): Use copy_character instead of
18187 obstack_1grow.
18188
db7c8e9a
AD
181892002-05-13 Akim Demaille <akim@epita.fr>
18190
18191 * tests/regression.at (Token definitions): Prototype yylex and
18192 yyerror.
18193
fcc61800
PH
181942002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
18195
158c687b 18196 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
fcc61800
PH
18197 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
18198 32-bit arithmetic.
18199 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
18200
5683e9b2
AD
182012002-05-07 Akim Demaille <akim@epita.fr>
18202
18203 * tests/synclines.at: Be sure to prototype yylex and yyerror to
18204 avoid GCC warnings.
18205
0c2d3f4c
AD
182062002-05-07 Akim Demaille <akim@epita.fr>
18207
18208 Kill GCC warnings.
18209
18210 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
18211 over the RHS of each rule.
18212 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
18213 * src/state.h (state_t): Member `nitems' is unsigned short.
18214 * src/LR0.c (get_state): Adjust.
18215 * src/reader.c (packgram): Likewise.
18216 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
18217 `Type'.
18218 (muscle_insert_int_table): Remove, unused.
18219 (prepare_rules): Remove `max'.
18220
1565b720
AD
182212002-05-06 Akim Demaille <akim@epita.fr>
18222
18223 * src/closure.c (print_firsts): Display of the symbol tags.
18224 (bitmatrix_print): Move to...
18225 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
18226 here.
18227 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
18228
cfaee611
AD
182292002-05-06 Akim Demaille <akim@epita.fr>
18230
18231 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
18232 hash_do_for_each.
18233
458be8e0
AD
182342002-05-06 Akim Demaille <akim@epita.fr>
18235
18236 * src/LR0.c (new_state, get_state): Instead of using the global
18237 `kernel_size' and `kernel_base', have two new arguments:
18238 `core_size' and `core'.
18239 Adjust callers.
18240
a900a624
AD
182412002-05-06 Akim Demaille <akim@epita.fr>
18242
18243 * src/reader.c (packgram): No longer end `ritem' with a 0
18244 sentinel: it is not used.
18245
d4e7d3a1
AD
182462002-05-05 Akim Demaille <akim@epita.fr>
18247
18248 New experimental feature: display the lookaheads in the report and
18249 graph.
18250
18251 * src/print (print_core): When --trace-flag, display the rules
18252 lookaheads.
18253 * src/print_graph.c (print_core): Likewise.
18254 Swap the arguments.
18255 Adjust caller.
18256
39ceb25b
AD
182572002-05-05 Akim Demaille <akim@epita.fr>
18258
18259 * tests/torture.at (Many lookaheads): New test.
18260
5372019f
AD
182612002-05-05 Akim Demaille <akim@epita.fr>
18262
18263 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
18264 (GENERATE_MUSCLE_INSERT_TABLE): this.
18265 (output_int_table, output_unsigned_int_table, output_short_table)
18266 (output_token_number_table, output_item_number_table): Replace with...
18267 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
18268 (muscle_insert_short_table, muscle_insert_token_number_table)
18269 (muscle_insert_item_number_table): these.
18270 Adjust all callers.
18271 (prepare_tokens): Don't free `translations', since...
18272 * src/reader.h, src/reader.c (grammar_free): do it.
18273 Move to...
18274 * src/gram.h, src/gram.c (grammar_free): here.
18275 * data/bison.simple, data/bison.c++: b4_token_number_max is now
18276 b4_translate_max.
18277
5df5f6d5
AD
182782002-05-05 Akim Demaille <akim@epita.fr>
18279
18280 * src/output.c (output_unsigned_int_table): New.
18281 (prepare_rules): `i' is unsigned.
18282 `prhs', `rline', `r2' are unsigned int.
18283 Rename muscle `rhs_number_max' as `rhs_max'.
18284 Output muscles `prhs_max', `rline_max', and `r2_max'.
18285 Free rline and r1.
18286 * data/bison.simple, data/bison.c++: Adjust to use these muscles
18287 to compute types instead of constant types.
18288 * tests/regression.at (Web2c Actions): Adjust.
18289
b87f8b21
AD
182902002-05-04 Akim Demaille <akim@epita.fr>
18291
18292 * src/symtab.h (SALIAS, SUNDEF): Rename as...
18293 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
18294 Adjust dependencies.
18295 * src/output.c (token_definitions_output): Be sure not to output a
18296 `#define 'a'' when fed with `%token 'a' "a"'.
18297 * tests/regression.at (Token definitions): New.
18298
8bb936e4
PE
182992002-05-03 Paul Eggert <eggert@twinsun.com>
18300
18301 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
18302 for K&R C.
18303
183042002-05-03 gettextize <bug-gnu-gettext@gnu.org>
18305
18306 * Makefile.am (SUBDIRS): Remove intl.
18307 (EXTRA_DIST): Add config/config.rpath.
18308
53c71a12
AD
183092002-05-03 Akim Demaille <akim@epita.fr>
18310
18311 * data/bison.simple (m4_if): Don't output empty enums.
18312 And actually, output valid enum definitions :(.
18313
289dd0cf
AD
183142002-05-03 Akim Demaille <akim@epita.fr>
18315
18316 * configure.bat: Remove, completely obsolete.
18317 * Makefile.am (EXTRA_DIST): Adjust.
18318 Don't distribute config.rpath...
18319 * config/Makefile.am (EXTRA_DIST): Do it.
18320
db85e524
AD
183212002-05-03 Akim Demaille <akim@epita.fr>
18322
18323 * configure.in (GETTEXT_VERSION): New.
18324 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
18325
83ccf991
AD
183262002-05-03 Akim Demaille <akim@epita.fr>
18327
18328 * data/bison.simple (b4_token_enum): New.
18329 (b4_token_defines): Use it to output tokens both as #define and
18330 enums.
18331 Suggested by Paul Eggert.
18332 * src/output.c (token_definitions_output): Don't output spurious
18333 white spaces.
18334
1f418995
AD
183352002-05-03 Akim Demaille <akim@epita.fr>
18336
18337 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18338
45119f04
RA
183392002-05-02 Robert Anisko <robert@lrde.epita.fr>
18340
18341 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
18342 Update the stack class, give a try to deque as the default container.
18343
b2d52318
AD
183442002-05-02 Akim Demaille <akim@epita.fr>
18345
18346 * data/bison.simple (yyparse): Do not implement @$ = @1.
18347 (YYLLOC_DEFAULT): Adjust to do it.
18348 * doc/bison.texinfo (Location Default Action): Fix.
18349
3a8b4109
AD
183502002-05-02 Akim Demaille <akim@epita.fr>
18351
18352 * src/reader.c (parse_braces): Merge into...
18353 (parse_action): this.
18354
84614e13
AD
183552002-05-02 Akim Demaille <akim@epita.fr>
18356
18357 * configure.in (ALL_LINGUAS): Remove.
18358 * po/LINGUAS, hr.po: New.
18359
fdbcd8e2
AD
183602002-05-02 Akim Demaille <akim@epita.fr>
18361
18362 Remove the so called hairy (semantic) parsers.
18363
18364 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
18365 * src/gram.h, src/gram.c (semantic_parser): Remove.
18366 (rule_t): Remove the guard and guard_line members.
18367 * src/lex.h (token_t): remove tok_guard.
18368 * src/options.c (option_table): Remove %guard and %semantic_parser
18369 support.
18370 * src/output.c, src/output.h (guards_output): Remove.
18371 (prepare): Adjust.
18372 (token_definitions_output): Don't output the `T'
18373 tokens (???).
18374 (output_skeleton): Don't output the guards.
18375 * src/files.c, src/files.c (attrsfile): Remove.
18376 * src/reader.c (symbol_list): Remove the guard and guard_line
18377 members.
18378 Adjust dependencies.
18379 (parse_guard): Remove.
18380 * data/bison.hairy: Remove.
18381 * doc/bison.texinfo (Environment Variables): Remove occurrences of
18382 BISON_HAIRY.
18383
82b6cb3f
AD
183842002-05-02 Akim Demaille <akim@epita.fr>
18385
18386 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
18387 (parse_guard): Rename the formal argument `stack_offset' as
18388 `rule_length', which is more readable.
18389 Adjust callers.
18390 (copy_at, copy_dollar): Instead of outputting the hard coded
18391 values of $$, $n and so forth, output invocation to b4_lhs_value,
18392 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
900c877b
AD
18393 Note: this patch partially drops `semantic-parser' support: it
18394 always does `rule_length - n', where semantic parsers ought to
18395 always use `-n'.
82b6cb3f
AD
18396 * data/bison.simple, data/bison.c++ (b4_lhs_value)
18397 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
18398
6cbfbcc5
AD
183992002-05-02 Akim Demaille <akim@epita.fr>
18400
18401 * configure.in (AC_INIT): Bump to 1.49b.
18402 (AM_INIT_AUTOMAKE): Short invocation.
18403
b8548114
AD
184042002-05-02 Akim Demaille <akim@epita.fr>
18405
18406 Version 1.49a.
18407
c20cd1fa
AD
184082002-05-01 Akim Demaille <akim@epita.fr>
18409
18410 * src/skeleton.h: Remove.
18411
8a9566d4
AD
184122002-05-01 Akim Demaille <akim@epita.fr>
18413
18414 * src/skeleton.h: Fix the #endif.
18415 Reported by Magnus Fromreide.
18416
8c6d399a
PE
184172002-04-26 Paul Eggert <eggert@twinsun.com>
18418
18419 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
18420 Define if we define YYSTYPE and YYLTYPE, respectively.
b756bb75 18421 (YYCOPY): Fix [] quoting problem in the non-GCC case.
8a9566d4 18422
2b7ed18a
RA
184232002-04-25 Robert Anisko <robert@lrde.epita.fr>
18424
18425 * src/scan-skel.l: Postprocess quadrigraphs.
18426
18427 * src/reader.c (copy_character): New function, used to output
18428 single characters while replacing `[' and `]' with quadrigraphs, to
18429 avoid troubles with M4 quotes.
18430 (copy_comment): Output characters with copy_character.
18431 (read_additionnal_code): Likewise.
18432 (copy_string2): Likewise.
18433 (copy_definition): Likewise.
18434
18435 * tests/calc.at: Exercise M4 quoting.
18436
34a89c50
AD
184372002-04-25 Akim Demaille <akim@epita.fr>
18438
18439 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
18440 between `!' and the command.
18441 Reported by Paul Eggert.
18442
0dd1580a
RA
184432002-04-24 Robert Anisko <robert@lrde.epita.fr>
18444
18445 * tests/calc.at: Exercise prologue splitting.
18446
18447 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
18448 `b4_post_prologue' instead of `b4_prologue'.
18449
18450 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
18451 muscles.
18452 (output): Free pre_prologue_obstack and post_prologue_obstack.
18453 * src/files.h, src/files.c (attrs_obstack): Remove.
18454 (pre_prologue_obstack, post_prologue_obstack): New.
18455 * src/reader.c (copy_definition): Add a parameter to specify the
18456 obstack to fill, instead of using attrs_obstack unconditionally.
18457 (read_declarations): Pass pre_prologue_obstack to copy_definition if
18458 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
18459
83c1796f
PE
184602002-04-23 Paul Eggert <eggert@twinsun.com>
18461
18462 * data/bison.simple: Remove unnecessary commentary and white
18463 space differences from 1_29-branch.
18464 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
18465
18466 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
18467 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
18468 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
18469 constructors or destructors.
18470
18471 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
18472
1207eeac
AD
184732002-04-23 Akim Demaille <akim@epita.fr>
18474
18475 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
18476 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
18477 location with columns.
18478 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
18479 All reported by Paul Eggert.
18480
78ab8f67
AD
184812002-04-22 Akim Demaille <akim@epita.fr>
18482
18483 * src/reduce.c (dump_grammar): Move to...
18484 * src/gram.h, src/gram.c (grammar_dump): here.
18485 Be sure to separate long item numbers.
18486 Don't read the members of a rule's prec if its nil.
18487
133c20e2
AD
184882002-04-22 Akim Demaille <akim@epita.fr>
18489
18490 * src/output.c (table_size, table_grow): New.
18491 (MAXTABLE): Remove, replace uses with table_size.
18492 (pack_vector): Instead of dying when the table is too big, grow it.
18493
9515e8a7
AD
184942002-04-22 Akim Demaille <akim@epita.fr>
18495
18496 * data/bison.simple (yyr1): Its type is that of a token number.
18497 * data/bison.c++ (r1_): Likewise.
18498 * tests/regression.at (Web2c Actions): Adjust.
18499
23c5a174
AD
185002002-04-22 Akim Demaille <akim@epita.fr>
18501
18502 * src/reader.c (token_translations_init): 256 is now the default
18503 value for the error token, i.e., it will be assigned another
18504 number if the user assigned 256 to one of her tokens.
18505 (reader): Don't force 256 to error.
18506 * doc/bison.texinfo (Symbols): Adjust.
18507 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
18508 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
18509 etc. instead of 10, 20, 30 (which was used to `jump' over error
18510 (256) and undefined (2)).
18511
5fbb0954
AD
185122002-04-22 Akim Demaille <akim@epita.fr>
18513
18514 Propagate more token_number_t.
18515
18516 * src/gram.h (token_number_as_item_number)
18517 (item_number_as_token_number): New.
18518 * src/output.c (GENERATE_OUTPUT_TABLE): New.
18519 Use it to create output_item_number_table and
18520 output_token_number_table.
18521 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
18522 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
18523 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
18524 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
18525
4f940944
AD
185262002-04-22 Akim Demaille <akim@epita.fr>
18527
18528 * src/output.h, src/output.c (get_lines_number): Remove.
18529
3ded9a63
AD
185302002-04-19 Akim Demaille <akim@epita.fr>
18531
18532 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
18533 as Lex/Flex'.
18534 (Debugging): More details about enabling the debugging features.
18535 (Table of Symbols): Describe $$, $n, @$, and @n.
18536 Suggested by Tim Josling.
18537
e0c471a9
AD
185382002-04-19 Akim Demaille <akim@epita.fr>
18539
18540 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
18541
fecc10cd
AD
185422002-04-10 Akim Demaille <akim@epita.fr>
18543
18544 * src/system.h: Rely on HAVE_LIMITS_H.
18545 Suggested by Paul Eggert.
18546
51dec47b
AD
185472002-04-09 Akim Demaille <akim@epita.fr>
18548
18549 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
18550 full stderr, and strip it according to the bison options, instead
18551 of composing the error message from different bits.
18552 This makes it easier to check for several error messages.
18553 Adjust all the invocations.
18554 Add an invocation exercising the error token.
18555 Add an invocation demonstrating a stupid error message.
18556 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
18557 Adjust the tests.
18558 Error message are for stderr, not stdout.
18559
007a50a4
AD
185602002-04-09 Akim Demaille <akim@epita.fr>
18561
18562 * src/gram.h, src/gram.c (error_token_number): Remove, use
18563 errtoken->number.
18564 * src/reader.c (reader): Don't specify the user token number (2)
18565 for $undefined, as it uselessly prevents using it.
18566 * src/gram.h (token_number_t): Move to...
18567 * src/symtab.h: here.
18568 (state_t.number): Is a token_number_t.
18569 * src/print.c, src/reader.c: Use undeftoken->number instead of
18570 hard coded 2.
18571 (Even though this 2 is not the same as above: the number of the
18572 undeftoken remains being 2, it is its user token number which
18573 might not be 2).
18574 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
18575 `user_token_number_max'.
18576 Output `undef_token_number'.
18577 * data/bison.simple, data/bison.c++: Use them.
18578 Be sure to map invalid yylex return values to
18579 `undef_token_number'. This saves us from gratuitous SEGV.
18580
18581 * tests/conflicts.at (Solved SR Conflicts)
18582 (Unresolved SR Conflicts): Adjust.
18583 * tests/regression.at (Web2c Actions): Adjust.
18584
06446ccf
AD
185852002-04-08 Akim Demaille <akim@epita.fr>
18586
18587 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
18588 Adding #line.
18589 Remove the duplicate `typedefs'.
18590 (RhsNumberType): Fix the declaration and various other typos.
18591 Use __ofile__.
18592 * data/bison.simple: Use __ofile__.
18593 * src/scan-skel.l: Handle __ofile__.
18594
62a3e4f0
AD
185952002-04-08 Akim Demaille <akim@epita.fr>
18596
18597 * src/gram.h (item_number_t): New, the type of item numbers in
18598 RITEM. Note that it must be able to code symbol numbers as
18599 positive number, and the negation of rule numbers as negative
18600 numbers.
18601 Adjust all dependencies (pretty many).
18602 * src/reduce.c (rule): Remove this `short *' pointer: use
18603 item_number_t.
18604 * src/system.h (MINSHORT, MAXSHORT): Remove.
18605 Include `limits.h'.
18606 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
18607 (shortcpy): Remove.
18608 (MAXTABLE): Move to...
18609 * src/output.c (MAXTABLE): here.
18610 (prepare_rules): Use output_int_table to output rhs.
18611 * data/bison.simple, data/bison.c++: Adjust.
18612 * tests/torture.at (Big triangle): Move the limit from 254 to
18613 500.
18614 * tests/regression.at (Web2c Actions): Ajust.
18615
18616 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
18617 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
18618 passes, but produces negative #line number, once fixed, GCC is
18619 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
18620 C), it passes.
18621 * src/state.h (state_h): Code input lines on ints, not shorts.
18622
bb88b0fc
AD
186232002-04-08 Akim Demaille <akim@epita.fr>
18624
18625 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
18626 and then the grammar.
18627
9a636f47
AD
186282002-04-08 Akim Demaille <akim@epita.fr>
18629
18630 * src/system.h: No longer using strndup.
18631
680e8701
AD
186322002-04-07 Akim Demaille <akim@epita.fr>
18633
18634 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
18635 * src/output.c (output_table_data): Return the longest number.
18636 (prepare_tokens): Output `token_number_max').
18637 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
18638 New.
18639 Use them to define yy_token_number_type/TokenNumberType.
18640 Use this type for yytranslate.
18641 * tests/torture.at (Big triangle): Push the limit from 124 to
18642 253.
18643 * tests/regression.at (Web2c Actions): Adjust.
18644
817e9f41
AD
186452002-04-07 Akim Demaille <akim@epita.fr>
18646
18647 * tests/torture.at (Big triangle): New.
18648 (GNU AWK Grammar, GNU Cim Grammar): Move to...
18649 * tests/existing.at: here.
18650
5123689b
AD
186512002-04-07 Akim Demaille <akim@epita.fr>
18652
18653 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
18654 nritems.
18655 Adjust dependencies.
18656
f3849179
AD
186572002-04-07 Akim Demaille <akim@epita.fr>
18658
18659 * src/reader.c: Normalize increments to prefix form.
18660
bd02036a
AD
186612002-04-07 Akim Demaille <akim@epita.fr>
18662
18663 * src/reader.c, symtab.c: Remove debugging code.
18664
db8837cb
AD
186652002-04-07 Akim Demaille <akim@epita.fr>
18666
18667 Rename all the `bucket's as `symbol_t'.
18668
18669 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
18670 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
18671 * src/symtab.c, src/symtab.h (bucket): Rename as...
18672 (symbol_t): this.
18673 (symbol_list_new, bucket_check_defined, bucket_make_alias)
18674 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
18675 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18676 (buckets_new, buckets_free, buckets_do): Rename as...
18677 (symbol_list_new, symbol_check_defined, symbol_make_alias)
18678 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
18679 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
18680 (symbols_new, symbols_free, symbols_do): these.
18681
72a23c97
AD
186822002-04-07 Akim Demaille <akim@epita.fr>
18683
18684 Use lib/hash for the symbol table.
18685
18686 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
18687 EOF.
18688 * src/lex.c (lex): Set the `number' member of new terminals.
18689 * src/reader.c (bucket_check_defined, bucket_make_alias)
18690 (bucket_check_alias_consistence, bucket_translation): New.
18691 (reader, grammar_free, readgram, token_translations_init)
18692 (packsymbols): Adjust.
18693 (reader): Number the predefined tokens.
18694 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
18695 for predefined tokens.
18696 * src/symtab.h (bucket): Remove all the hash table related
18697 members.
18698 * src/symtab.c (symtab): Replace by...
18699 (bucket_table): this.
18700 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
18701 (buckets_new, buckets_do): New.
18702
280a38c3
AD
187032002-04-07 Akim Demaille <akim@epita.fr>
18704
18705 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
18706 (start_symbol, max_user_token_number, semantic_parser)
18707 (error_token_number): Initialize.
18708 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
18709 Initialize.
18710 (reader): Don't.
18711 (errtoken, eoftoken, undeftoken, axiom): Extern.
18712
03b31c0c
AD
187132002-04-07 Akim Demaille <akim@epita.fr>
18714
18715 * src/gram.h (rule_s): prec and precsym are now pointers
18716 to the bucket giving the priority/associativity.
18717 Member `associativity' removed: useless.
18718 * src/reduce.c, src/conflicts.c: Adjust.
18719
8b3df748
AD
187202002-04-07 Akim Demaille <akim@epita.fr>
18721
18722 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
18723 Properly escape the symbols' TAG when outputting them.
18724
e601aa1d
AD
187252002-04-07 Akim Demaille <akim@epita.fr>
18726
18727 * src/lalr.h (LA): Is a bitsetv, not bitset*.
18728
b0299a2e
AD
187292002-04-07 Akim Demaille <akim@epita.fr>
18730
18731 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
18732 (LArule): this, which is an array to rule_t*.
18733 * src/print.c, src/conflicts.c: Adjust.
18734
d7e1f00c
AD
187352002-04-07 Akim Demaille <akim@epita.fr>
18736
18737 * src/gram.h (rule_t): Rename `number' as `user_number'.
18738 `number' is a new member.
18739 Adjust dependencies.
18740 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
18741
cc9305dd
AD
187422002-04-07 Akim Demaille <akim@epita.fr>
18743
18744 As a result of the previous patch, it is no longer needed
18745 to reorder ritem itself.
18746
18747 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
18748
b0940840
AD
187492002-04-07 Akim Demaille <akim@epita.fr>
18750
18751 Be sure never to walk through RITEMS, but use only data related to
18752 the rules themselves. RITEMS should be banished.
18753
18754 * src/output.c (output_token_translations): Rename as...
18755 (prepare_tokens): this.
18756 In addition to `translate', prepare the muscles `tname' and
18757 `toknum', which were handled by...
18758 (output_rule_data): this.
18759 Remove, and move the remainder of its outputs into...
18760 (prepare_rules): this new routines, which also merges content from
18761 (output_gram): this.
18762 (prepare_rules): Be sure never to walk through RITEMS.
18763 (output_stos): Rename as...
18764 (prepare_stos): this.
18765 (output): Always invoke prepare_states, after all, just don't use it
18766 in the output if you don't need it.
18767
643a5994
AD
187682002-04-07 Akim Demaille <akim@epita.fr>
18769
18770 * src/LR0.c (new_state): Display `nstates' as the name of the
18771 newly created state.
18772 Adjust to initialize first_state and last_state if needed.
18773 Be sure to distinguish the initial from the final state.
18774 (new_states): Create the itemset of the initial state, and use
18775 new_state.
18776 * src/closure.c (closure): Now that the initial state has its
18777 items properly set, there is no need for a special case when
18778 creating `ruleset'.
18779
18780 As a result, now the rule 0, reducing to $axiom, is visible in the
18781 outputs. Adjust the test suite.
18782
18783 * tests/conflicts.at (Solved SR Conflicts)
18784 (Unresolved SR Conflicts): Adjust.
18785 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
18786 * tests/conflicts.at (S/R in initial): New.
18787
b4c4ccc2
AD
187882002-04-07 Akim Demaille <akim@epita.fr>
18789
18790 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
18791 the RHS of the rules.
18792 * src/output.c (output_gram): Likewise.
18793
bba97eb2
AD
187942002-04-07 Akim Demaille <akim@epita.fr>
18795
18796 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
18797 bucket.
18798 Adjust all dependencies.
18799 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
18800 `number' of the buckets too.
18801 * src/gram.h: Include `symtab.h'.
18802 (associativity): Move to...
18803 * src/symtab.h: here.
18804 No longer include `gram.h'.
18805
c3b407f4
AD
188062002-04-07 Akim Demaille <akim@epita.fr>
18807
18808 * src/gram.h, src/gram.c (rules_rhs_length): New.
18809 (ritem_longest_rhs): Use it.
18810 * src/gram.h (rule_t): `number' is a new member.
18811 * src/reader.c (packgram): Set it.
18812 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
18813 the end of `rules', and count them out of `nrules'.
18814 (reduce_output, dump_grammar): Adjust.
18815 * src/print.c (print_grammar): It is no longer needed to check for
18816 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
18817 * tests/reduce.at (Reduced Automaton): New test.
18818
11652ab3
AD
188192002-04-07 Akim Demaille <akim@epita.fr>
18820
18821 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
18822 lacking `+ 1' to nrules, Bison reported as useless a token if it
18823 was used solely to set the precedence of the last rule...
18824
26b23c1a
AD
188252002-04-07 Akim Demaille <akim@epita.fr>
18826
18827 * data/bison.c++, data/bison.simple: Don't output the current file
18828 name in #line, to avoid useless diffs between two identical
18829 outputs under different names.
18830
18bcecb0
AD
188312002-04-07 Akim Demaille <akim@epita.fr>
18832
18833 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
18834 Normalize loops to using `< nrules + 1', not `<= nrules'.
18835
fa770c86
AD
188362002-04-07 Akim Demaille <akim@epita.fr>
18837
18838 * TODO: Update.
18839
d9b739c3
AD
188402002-04-07 Akim Demaille <akim@epita.fr>
18841
18842 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
18843 bucket.value as bucket.number.
18844
99013900
AD
188452002-04-07 Akim Demaille <akim@epita.fr>
18846
18847 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
18848 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
18849 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
18850 RHS, instead of being an index in RITEMS.
18851
e966383b
PE
188522002-04-04 Paul Eggert <eggert@twinsun.com>
18853
18854 * doc/bison.texinfo: Update copyright date.
18855 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
18856 (Symbols): Warn about running Bison in one character set,
18857 but compiling and/or running in an incompatible one.
18858 Warn about character code 256, too.
18859
188602002-04-03 Paul Eggert <eggert@twinsun.com>
18861
18862 * src/bison.data (YYSTACK_ALLOC): Depend on whether
18863 YYERROR_VERBOSE is nonzero, not whether it is defined.
18864
18865 Merge changes from bison-1_29-branch.
c307773e 18866
8d6c48b9
PE
188672002-03-20 Paul Eggert <eggert@twinsun.com>
18868
18869 Merge fixes from Debian bison_1.34-1.diff.
18870
18871 * configure.in (AC_PREREQ): 2.53.
18872
e53c6322
AD
188732002-03-20 Akim Demaille <akim@epita.fr>
18874
18875 * src/conflicts.c (log_resolution): Argument `resolution' is const.
18876
9ffbeca7
PE
188772002-03-19 Paul Eggert <eggert@twinsun.com>
18878
21db0b2a
PE
18879 * src/bison.simple (YYCOPY): New macro.
18880 (YYSTACK_RELOCATE): Use it.
18881 Remove Type arg; no longer needed. All callers changed.
18882 (yymemcpy): Remove; no longer needed.
18883
9ffbeca7
PE
18884 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
18885 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
18886
642cb8f8
AD
188872002-03-19 Akim Demaille <akim@epita.fr>
18888
18889 Test and fix the #line outputs.
18890
18891 * tests/atlocal.at (GCC): New.
18892 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
0ffd4fd1 18893 (Prologue synch line, %union synch line, Postprologue synch line)
642cb8f8
AD
18894 (Action synch line, Epilogue synch line): New tests.
18895 * src/reader.c (parse_union_decl): Define the muscle stype_line.
18896 * data/bison.simple, data/bison.c++: Use it.
18897
3c31a486
AD
188982002-03-19 Akim Demaille <akim@epita.fr>
18899
18900 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
18901 (Solved SR Conflicts, %expect not enough, %expect right)
18902 (%expect too much): Move to...
18903 * tests/conflicts.at: this new file.
18904
0d8bed56
AD
189052002-03-19 Akim Demaille <akim@epita.fr>
18906
18907 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
18908 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
18909 that we can move to enums for instance.
18910 * src/output.c (token_definitions_output): Output a list of
18911 `token-name, token-number' instead of the #define.
18912 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
18913
9208d17f
AD
189142002-03-14 Akim Demaille <akim@epita.fr>
18915
18916 Use Gettext 0.11.1.
18917
af27eacb
RA
189182002-03-09 Robert Anisko <robert@lrde.epita.fr>
18919
18920 * data/bison.c++: Make the user able to add members to the generated
18921 parser by subclassing.
18922
9101a310
RA
189232002-03-05 Robert Anisko <robert@lrde.epita.fr>
18924
18925 * src/reader.c (read_additionnal_code): `c' should be an integer, not
18926 a character.
18927 Reported by Nicolas Tisserand and Nicolas Burrus.
18928
fff9bf0b
RA
189292002-03-04 Robert Anisko <robert@lrde.epita.fr>
18930
18931 * src/reader.c: Warn about lacking semi-colons, do not complain.
18932
64dba31e
RA
189332002-03-04 Robert Anisko <robert@lrde.epita.fr>
18934
18935 * data/bison.c++: Remove a debug line.
18936
374f5a14
RA
189372002-03-04 Robert Anisko <robert@lrde.epita.fr>
18938
18939 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
18940 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
18941 provide a default implementation.
18942
bfcf1f3a
AD
189432002-03-04 Akim Demaille <akim@epita.fr>
18944
18945 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
18946 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
18947 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
18948 * tests/semantic.at (Parsing Guards): Similarly.
18949 * src/reader.at (readgram): Complain if the last rule is not ended
18950 with a semi-colon.
18951
65ccf9fc
AD
189522002-03-04 Akim Demaille <akim@epita.fr>
18953
18954 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
18955 * src/closure.c: here.
18956 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
18957 RTC.
18958 * src/warshall.h, src/warshall.c: Remove.
18959 * tests/sets.at (Broken Closure): Adjust.
18960
d0039cbc
AD
189612002-03-04 Akim Demaille <akim@epita.fr>
18962
18963 * src/output.c (output_skeleton): tempdir is const.
18964 bytes_read is unused.
18965
345cea78
AD
189662002-03-04 Akim Demaille <akim@epita.fr>
18967
18968 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
18969 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
18970 Update.
18971 From Michael Hayes.
18972
564801f7
AD
189732002-03-04 Akim Demaille <akim@epita.fr>
18974
18975 * src/closure.c (closure): `r' is unused.
18976
e5352bc7
AD
189772002-03-04 Akim Demaille <akim@epita.fr>
18978
18979 * tests/sets.at (Broken Closure): Add the ending `;'.
18980 * src/reader.at (readgram): Complain if a rule is not ended with a
18981 semi-colon.
18982
914feea9
AD
189832002-03-04 Akim Demaille <akim@epita.fr>
18984
18985 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
18986 (count_sr_conflicts): Use bitset_count.
18987 * src/reduce.c (inaccessable_symbols): Ditto.
18988 (bits_size): Remove.
18989 * src/warshall.h, src/warshall.c: Convert to bitsetv.
18990
f0250de6
AD
189912002-03-04 Akim Demaille <akim@epita.fr>
18992
18993 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
18994 * src/reduce.c: Remove the `bitset_zero's following the
18995 `bitset_create's, as now it is performed by the latter.
18996
ef017502
AD
189972002-03-04 Akim Demaille <akim@epita.fr>
18998
18999 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
19000 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
19001 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
19002 latest sources from Michael.
19003
76514394
AD
190042002-03-04 Akim Demaille <akim@epita.fr>
19005
19006 * src/output.c (output): Don't free the grammar.
19007 * src/reader.c (grammar_free): New.
19008 * src/main.c (main): Call it and don't free symtab here.
19009
55024580
AD
190102002-03-04 Akim Demaille <akim@epita.fr>
19011
19012 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
19013 before returning.
19014 Reported by Benoit Perrot.
19015
f9abaa2c
AD
190162002-03-04 Akim Demaille <akim@epita.fr>
19017
19018 Use bitset operations when possible, not loops over bits.
19019
19020 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
19021 bitset_or.
19022 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
19023 * src/reduce.c (useless_nonterminals): Formatting changes.
19024 * src/warshall.c (TC): Use bitset_or.
19025
0e721e75
AD
190262002-03-04 Akim Demaille <akim@epita.fr>
19027
19028 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
19029 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
19030 Ditto.
19031
0fb1ffb1
AD
190322002-03-04 Akim Demaille <akim@epita.fr>
19033
19034 * src/lalr.c (F): Now a bitset*.
19035 Adjust all dependencies.
19036
b86796bf
AD
190372002-03-04 Akim Demaille <akim@epita.fr>
19038
19039 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
19040 Adjust all dependencies.
19041
602bbf31
AD
190422002-03-04 Akim Demaille <akim@epita.fr>
19043
19044 * src/L0.c, src/LR0.h (nstates): Be size_t.
19045 Adjust comparisons (signed vs unsigned).
19046 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
19047 bitset*.
19048 Adjust all dependencies.
19049
d8a0245c
AD
190502002-03-04 Akim Demaille <akim@epita.fr>
19051
19052 * src/closure.c (firsts): Now, also a bitset.
19053 Adjust all dependencies.
19054 (varsetsize): Remove, now unused.
19055 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
19056
34ba9743
AD
190572002-03-04 Akim Demaille <akim@epita.fr>
19058
19059 * src/print.c: Convert to use bitset.h, not hand coded iterations
19060 over ints.
19061
ed86e78c
AD
190622002-03-04 Akim Demaille <akim@epita.fr>
19063
19064 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
19065
dfdb1797
AD
190662002-03-04 Akim Demaille <akim@epita.fr>
19067
19068 * src/closure.c (ruleset): Be a bitset.
19069 (rulesetsize): Remove.
19070
7086e707
AD
190712002-03-04 Akim Demaille <akim@epita.fr>
19072
19073 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
19074 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
19075 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
19076 * src/closure.c (fderives): Be an array of bitsets.
19077
98254360
RA
190782002-02-28 Robert Anisko <robert@lrde.epita.fr>
19079
19080 * data/bison.c++: Merge the two generated headers. Insert a copyright
19081 notice in each output file.
19082
a75c057f
AD
190832002-02-28 Akim Demaille <akim@epita.fr>
19084
19085 * data/bison.c++: Copy the prologue of bison.simple to fetch
19086 useful M4 definitions, such as b4_header_guard.
19087
06b00abc
AD
190882002-02-25 Akim Demaille <akim@epita.fr>
19089
19090 * src/getargs.c (version): Give the name of the authors, and use a
a75c057f
AD
19091 translator friendly scheme for the bgr
19092 copyright notice.
06b00abc 19093
70e7d534
AD
190942002-02-25 Akim Demaille <akim@epita.fr>
19095
19096 * src/output.c (header_output): Remove, now handled completely via
19097 M4.
19098
abe017f6
AD
190992002-02-25 Akim Demaille <akim@epita.fr>
19100
19101 * m4/m4.m4: New, from CVS Autoconf.
19102 * configure.in: Invoke it.
19103 * src/output.c (output_skeleton): Use its result instead of the
19104 hard coded name.
19105
381fb12e
AD
191062002-02-25 Akim Demaille <akim@epita.fr>
19107
19108 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
19109 Fileutils 4.1.5.
19110 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
19111 * src/output.c (output_skeleton): Use mkstemp to create a real
19112 temporary file.
19113 Move the filling of `skeleton' and its muscle to...
19114 (prepare): here.
19115 (output): Move the definition of the prologue muscle to...
19116 (prepare): here.
19117 * src/system.h (DEFAULT_TMPDIR): New.
19118
6f38107f
PE
191192002-02-14 Paul Eggert <eggert@twinsun.com>
19120
19121 Remove the support for C++ namespace cleanliness; it was
19122 causing more problems than it was curing, since it didn't work
19123 properly on some nonstandard C++ compilers. This can wait
19124 for a proper C++ parser.
19125
19126 * NEWS: Document this.
19127 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
19128 of C++, as it's treated like C now.
19129 * src/bison.simple (YYSTD): Remove.
19130 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
19131 Treat C++ just like Standard C instead of trying to support
19132 namespace cleanliness.
19133
80cce3da
AD
191342002-02-14 Akim Demaille <akim@epita.fr>
19135
19136 * tests/regression.at (else): Adjust to Andreas' change.
19137
842e8679
AD
191382002-02-14 Akim Demaille <akim@epita.fr>
19139
19140 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
19141
4bda3f10
AD
191422002-02-13 Andreas Schwab <schwab@suse.de>
19143
19144 * src/output.c (output_rule_data): Don't output NULL, it might
19145 not be defined yet.
19146
4162fa07 191472002-02-11 Robert Anisko <robert@lrde.epita.fr>
b418ecd8 19148
4162fa07
RA
19149 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
19150 (Copyright notice): Update.
b418ecd8 19151
bd16a5dc
AD
191522002-02-11 Akim Demaille <akim@epita.fr>
19153
19154 * tests/regression.at (%nonassoc and eof): Don't include
19155 nonportable headers.
19156
8d69a1a3
RA
191572002-02-08 Robert Anisko <robert@lrde.epita.fr>
19158
19159 * data/bison.c++: Correct error recovery. Make the user able to
19160 initialize the starting location.
19161
9b2d0677
AD
191622002-02-07 Akim Demaille <akim@epita.fr>
19163
19164 * tests/input.at: New.
19165
69e2658b
RA
191662002-02-07 Robert Anisko <robert@lrde.epita.fr>
19167
19168 * data/bison.c++: Replace some direct m4 expansions by constants. Be
9b2d0677 19169 more consistent when naming methods and variables. Put preprocessor
69e2658b
RA
19170 directives around tables only needed for debugging.
19171
4aacc3a7
RA
191722002-02-07 Robert Anisko <robert@lrde.epita.fr>
19173
19174 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
19175 C++ parsers.
19176 (yy::b4_name::parse): Use print_.
19177
762a801e
RA
191782002-02-07 Robert Anisko <robert@lrde.epita.fr>
19179
19180 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
19181
4bb2bc3f
RA
191822002-02-07 Robert Anisko <robert@lrde.epita.fr>
19183
19184 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
19185 C++ parsers.
19186 (yy::b4_name::parse): Build verbose error messages, and use error_.
19187
6b45a3ca
RA
191882002-02-06 Robert Anisko <robert@lrde.epita.fr>
19189
19190 * data/bison.c++: Fix m4 quoting in comments.
19191
50997c6e
RA
191922002-02-06 Robert Anisko <robert@lrde.epita.fr>
19193
19194 * data/bison.c++: Adjust the parser code. Fix some muscles that were
19195 not expanded by m4.
19196
3f3eed27
AD
191972002-02-05 Akim Demaille <akim@epita.fr>
19198
19199 * data/bison.c++: Adjust to the M4 back end.
19200 More is certainly needed.
19201
be2a1a68
AD
192022002-02-05 Akim Demaille <akim@epita.fr>
19203
19204 Give a try to M4 as a back end.
19205
19206 * lib/readpipe.c: New, from wdiff.
19207 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
19208 BISON_HAIRY.
19209 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
19210 specific values. Now it is m4 that performs the lookup.
19211 * src/parse-skel.y: Remove.
19212 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
19213 * src/output.c (actions_output, guards_output)
19214 (token_definitions_output): No longer keeps track of the output
19215 line number, hence remove the second argument.
19216 (guards_output): Check against the guard member of a rule, not the
19217 action member.
19218 Adjust callers.
19219 (output_skeleton): Don't look for the skeleton location, let m4 do
19220 that.
19221 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
19222 file will be used.
19223 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
19224 (prepare): Given that for the time being changesyntax is not
19225 usable in M4, rename the muscles using `-' to `_'.
19226 Define `defines_flag', `output_parser_name' and `output_header_name'.
19227 * src/output.h (actions_output, guards_output)
19228 (token_definitions_output): Adjust prototypes.
19229 * src/scan-skel.l: Instead of scanning the skeletons, it now
19230 processes the output of m4: `__oline__' and `#output'.
19231 * data/bison.simple: Adjust to be used by M4(sugar).
19232 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
19233 to date.
19234 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
19235 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
19236 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
19237 shamelessly stolen from CVS Autoconf.
19238
beda758b
AD
192392002-02-05 Akim Demaille <akim@epita.fr>
19240
19241 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
19242 * configure.in: Check for the declarations of free and malloc.
19243 * src/muscle_tab.c: Adjust.
19244
5ece6d43
AD
192452002-02-05 Akim Demaille <akim@epita.fr>
19246
19247 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
19248 which have no values.
19249
5bb18f9a
AD
192502002-02-05 Akim Demaille <akim@epita.fr>
19251
19252 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
19253 * data/: here.
19254
894dd62e
PE
192552002-01-29 Paul Eggert <eggert@twinsun.com>
19256
19257 * src/bison.simple (YYSIZE_T): Do not define merely because
19258 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
19259 On some platforms, <alloca.h> does not declare YYSTD (size_t).
19260
82841af7
AD
192612002-01-27 Akim Demaille <akim@epita.fr>
19262
19263 Fix `%nonassoc and eof'.
19264
19265 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
19266 which were not properly copied! Replace
19267 memcpy (res->errs, src->errs, src->nerrs);
19268 with
19269 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
19270 !!!
19271 * tests/regression.at (%nonassoc and eof): Adjust to newest
19272 Autotest: `.' is not in the PATH.
19273
318b76e9
AD
192742002-01-27 Akim Demaille <akim@epita.fr>
19275
19276 * tests/sets.at (AT_EXTRACT_SETS): New.
19277 (Nullable): Use it.
19278 (Firsts): New.
19279
30d2f3d5
AD
192802002-01-26 Akim Demaille <akim@epita.fr>
19281
19282 * tests/actions.at, tests/calc.at, tests/headers.at,
19283 * tests/torture.at: Adjust to the newest Autotest which no longer
19284 forces `.' in the PATH.
19285
30f8c395
AD
192862002-01-25 Akim Demaille <akim@epita.fr>
19287
19288 * tests/regression.at (%nonassoc and eof): New.
19289 Suggested by Robert Anisko.
19290
29ae55f1
AD
192912002-01-24 Akim Demaille <akim@epita.fr>
19292
19293 Bison dumps core when trying to complain about broken input files.
19294 Reported by Cris van Pelt.
19295
19296 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
19297 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
19298 into...
19299 (Invalid inputs): Strengthen: exercise parse_percent_token.
19300
2b548aa6
RA
193012002-01-24 Robert Anisko <robert.anisko@epita.fr>
19302
19303 * src/Makefile.am: Add bison.c++.
19304 * src/bison.c++: New skeleton.
19305
bb0146c2
AD
193062002-01-21 Paolo Bonzini <bonzini@gnu.org>
19307
19308 * po/it.po: New.
19309
bec30531
AD
193102002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
19311
19312 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
19313
fc6edc45
MA
193142002-01-20 Marc Autret <marc@gnu.org>
19315
19316 * src/files.c (compute_output_file_names): Fix
19317
5e5d5415
MA
193182002-01-20 Marc Autret <marc@gnu.org>
19319
19320 * tests/output.at: New test.
19321 * src/files.c (compute_base_names): Don't map extensions when
19322 the YACC flag is set, use defaults.
19323 Reported by Evgeny Stambulchik.
19324
44ea3fbd
MA
193252002-01-20 Marc Autret <marc@gnu.org>
19326
ba0fe3c7
PE
19327 * src/system.h: Need to define __attribute__ away for non-GCC
19328 compilers as well (i.e., the vendor C compiler).
44ea3fbd
MA
19329 Suggested by Albert Chin-A-Young.
19330
338963d1
TVH
193312002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
19332
19333 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
19334 canonical definition.
19335 * src/system.h: Use the canonical definition for PARAMS (avoids
19336 a conflict with the macro from lib/hash.h).
19337
c57b2479
AD
193382002-01-11 Akim Demaille <akim@epita.fr>
19339
19340 * configure.in: Use AC_FUNC_STRNLEN.
d9e9746c 19341 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
c57b2479 19342
b85810ae
AD
193432002-01-09 Akim Demaille <akim@epita.fr>
19344
19345 * src/files.c, src/files.h (output_infix): New.
19346 (tab_extension): Remove.
19347 (compute_base_names): Compute the former, drop the latter.
19348 * src/output.c (prepare): Insert the muscles `output-infix', and
19349 `output-suffix'.
19350 * src/parse-skel.y (string, string.1): New.
19351 (section.header): Use it.
19352 (section.yacc): Remove.
19353 (prefix): Remove too.
19354 * src/scan-skel.l: Adjust.
19355 * src/bison.simple, src/bison.hairy: Adjust.
19356
cae60122
AD
193572002-01-09 Akim Demaille <akim@epita.fr>
19358
19359 * configure.in (WERROR_CFLAGS): Compute it.
19360 * src/Makefile.am (CFLAGS): Pass it.
19361 * tests/atlocal.in (CFLAGS): Idem.
19362 * src/files.c: Fix a few warnings.
19363 (get_extension_index): Remove, unused.
19364
ae404801
AD
193652002-01-08 Akim Demaille <akim@epita.fr>
19366
19367 * src/getargs.c (AS_FILE_NAME): New.
19368 (getargs): Use it to convert DOSish file names.
19369 * src/files.c (base_name): Rename as full_base_name to avoid
19370 clashes with `base_name ()'.
19371 (filename_split): New.
19372 (compute_base_names): N-th rewrite, using filename_split.
19373
22312b71
AD
193742002-01-08 Akim Demaille <akim@epita.fr>
19375
19376 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
19377 New, stolen from the Fileutils 4.1.
19378 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
19379 * configure.in: Check for the presence of memrchr, and of its
19380 prototype.
19381
a67cef01
TVH
193822002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
19383
19384 * lib/hash.h (__P): Added definition for this macro.
19385 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
19386 BUILT_SOURCES, to ensure they are generated first.
19387 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
19388 %error-verbose to allow bootstrapping with bison 1.30x.
19389
2b25d624
AD
193902002-01-06 Akim Demaille <akim@epita.fr>
19391
19392 * src/reader.c (parse_braces): Don't fetch the next char, the
19393 convention is to fetch on entry.
19394 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
19395 'switch' without a following semicolon.
19396 * tests/regression.at (braces parsing): New.
19397
3460813b
AD
193982002-01-06 Akim Demaille <akim@epita.fr>
19399
19400 Bison is dead wrong in its RR conflict reports.
19401
19402 * tests/torture.at (GNU Cim Grammar): New.
19403 * src/conflicts.c (count_rr_conflicts): Fix.
19404
73784c64
AD
194052002-01-06 Akim Demaille <akim@epita.fr>
19406
19407 Creating package.m4 from configure.ac causes too many problems.
19408
19409 * tests/Makefile.am (package.m4): Create it by hand,
19410 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
19411
25d81090
AD
194122002-01-06 Akim Demaille <akim@epita.fr>
19413
19414 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
19415 skeleton.h.
19416
a9b8959e
PE
194172002-01-04 Paul Eggert <eggert@twinsun.com>
19418
19419 * doc/bison.texinfo (Debugging):
19420 Remove YYSTDERR; it's no longer defined or used.
19421 Also, s/cstdio.h/cstdio/.
19422
25d81090
AD
194232002-01-03 Akim Demaille <akim@epita.fr>
19424
19425 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
19426
1109455c
AD
194272002-01-03 Akim Demaille <akim@epita.fr>
19428
19429 * src/parse-skel.y (process_skeleton): Don't bind the parser's
19430 tracing code to --trace, wait for a better --trace option, with
19431 args.
19432
7ea5e977
AD
194332002-01-03 Akim Demaille <akim@epita.fr>
19434
19435 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
19436 The ISO C++ standard is extremely clear about it: stderr is
19437 considered a macro, not a regular symbol (see table 94 `Header
19438 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
19439 Therefore std:: does not apply to it. It still does with fprintf.
19440 Also, s/cstdio.h/cstdio/.
19441
fab5b110
AD
194422002-01-03 Akim Demaille <akim@epita.fr>
19443
19444 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
19445 for non system headers.
19446
aed7fd9b
AD
194472002-01-02 Akim Demaille <akim@epita.fr>
19448
19449 Equip the skeleton chain with location tracking, runtime trace,
19450 pure parser and scanner.
19451
19452 * src/parse-skel.y: Request a pure parser, locations, and prefix
19453 renaming.
19454 (%union): Having several members with the same type does not help
19455 type mismatches, simplify.
19456 (YYPRINT, yyprint): New.
19457 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
19458 (skel_error): this.
19459 Handle locations.
19460 * src/scan-skel.l: Adjust to these changes.
19461 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
19462 (LOCATION_PRINT, skel_control_t): New.
19463
24fad99e
AD
194642001-12-30 Akim Demaille <akim@epita.fr>
19465
19466 * src/parse-skel.y: Get rid of the shift/reduce conflict:
19467 replace `gb' with BLANKS.
19468 * src/scan-skel.l: Adjust.
19469
a4b36db4
AD
194702001-12-30 Akim Demaille <akim@epita.fr>
19471
19472 * src/system.h: We don't need nor want bcopy.
19473 Throw away MS-DOS crap: we don't need getpid.
19474 * configure.in: We don't need strndup. It was even causing
19475 problems: because Flex includes the headers *before* us,
19476 _GNU_SOURCE is not defined by config.h, and therefore strndup was
19477 not visible.
19478 * lib/xstrndup.c: New.
19479 * src/scan-skel.l: Use it.
19480 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
19481 * src/parse-skel.y: Use %directives instead of #defines.
19482
1239777d
AD
194832001-12-30 Akim Demaille <akim@epita.fr>
19484
19485 * src/skeleton.h: New.
19486 * src/output.c (output_parser, output_master_parser): Remove, dead
19487 code.
19488 * src/output.h (get_lines_number, actions_output, guards_output)
19489 (token_definitions_output): Prototype them.
19490 * src/parse-skel.y: Add the license notice.
19491 Include output.h and skeleton.h.
19492 (process_skeleton): Returns void, and takes a single parameter.
19493 * src/scan-skel.l: Add the license notice.
19494 Include skeleton.h.
19495 Don't use %option yylineno: it seems that then Flex imagines
19496 REJECT has been used, and therefore it won't reallocate its
19497 buffers (which makes no other sense to me than a bug). It results
19498 in warnings for `unused: yy_flex_realloc'.
19499
9b3add5b
RA
195002001-12-30 Robert Anisko <robert.anisko@epita.fr>
19501
19502 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19503 (MUSCLE_INSERT_PREFIX): ...to there.
19504 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
19505 (MUSCLE_INSERT_PREFIX): Move from here...
19506
19507 * src/bison.hairy: Add a section directive. Put braces around muscle
19508 names. This parser skeleton is still broken, but Bison should not
19509 choke on a bad muscle 'syntax'.
19510 * src/bison.simple: Add a section directive. Put braces around muscle
19511 names.
19512
19513 * src/files.h (strsuffix, stringappend): Add declarations.
19514 (tab_extension): Add declaration.
19515 (short_base_name): Add declaration.
19516
19517 * src/files.c (strsuffix, stringappend): No longer static. These
19518 functions are used in the skeleton parser.
19519 (tab_extension): New.
19520 (compute_base_names): Use the computations done in this function
fab5b110 19521 to guess if the generated parsers should have '.tab' in their
9b3add5b
RA
19522 names.
19523 (short_base_name): No longer static.
19524
19525 * src/output.c (output_skeleton): New.
19526 (output): Disable call to output_master_parser, and give a try to
19527 a new skeleton handling system.
19528 (guards_output, actions_output): No longer static.
19529 (token_definitions_output, get_lines_number): No longer static.
19530
19531 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
19532
fab5b110 19533 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
9b3add5b
RA
19534 parse-skel.y.
19535
19536 * src/parse-skel.y: New file.
19537 * src/scan-skel.l: New file.
19538
b5b61c61
AD
195392001-12-29 Akim Demaille <akim@epita.fr>
19540
19541 %name-prefix is broken.
19542
19543 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
19544 Adjust all dependencies.
19545 * tests/headers.at (export YYLTYPE): Strengthen this test: use
19546 %name-prefix.
19547
19548 Renaming yylval but not yylloc is not consistent. Now we do.
19549
19550 * src/bison.simple: Prefix yylloc if used.
19551 * doc/bison.texinfo (Decl Summary): Document that.
19552
8c9a50be
AD
195532001-12-29 Akim Demaille <akim@epita.fr>
19554
19555 * doc/bison.texinfo: Promote `%long-directive' over
19556 `%long_directive'.
19557 Remove all references to fixed-output-files, yacc is enough.
19558
d99361e6
AD
195592001-12-29 Akim Demaille <akim@epita.fr>
19560
19561 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
19562 user prologue. These are defaults.
19563 * tests/actions.at (Mid-rule actions): Make sure the user can
19564 define YYDEBUG and YYERROR_VERBOSE.
19565
b9cecb91
AD
195662001-12-29 Akim Demaille <akim@epita.fr>
19567
19568 * src/output.c (header_output): Don't forget to export YYLTYPE and
19569 yylloc.
19570 * tests/headers.at (export YYLTYPE): New, make sure it does.
19571 * tests/regression.at (%union and --defines, Invalid CPP headers):
19572 Move to...
19573 * tests/headers.at: here.
19574
aea13e97
AD
195752001-12-29 Akim Demaille <akim@epita.fr>
19576
19577 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
19578
931394cb
AD
195792001-12-29 Akim Demaille <akim@epita.fr>
19580
19581 * tests/actions.at (Mid-rule actions): Output on a single line
19582 instead of several.
19583
704a47c4
AD
195842001-12-29 Akim Demaille <akim@epita.fr>
19585
19586 * doc/bison.texinfo: Formatting changes.
19587
091e20bb
AD
195882001-12-29 Akim Demaille <akim@epita.fr>
19589
19590 Don't store the token defs in a muscle, just be ready to output it
19591 on command. Now possible via `symbols'. Fixes a memory leak.
19592
19593 * src/output.c (token_definitions_output): New.
19594 (output_parser, header_output): Use it.
19595 * src/reader.c (symbols_save): Remove.
19596
cce71710
AD
195972001-12-29 Akim Demaille <akim@epita.fr>
19598
19599 * src/bison.simple: Do not provide a default for YYSTYPE and
19600 YYLTYPE before the user's prologue. Otherwise it's hardly... a
19601 default.
19602
82c035a8
AD
196032001-12-29 Akim Demaille <akim@epita.fr>
19604
19605 Mid-rule actions are simply... ignored!
19606
19607 * src/reader.c (readgram): Be sure to attach mid-rule actions to
19608 the empty-rule associated to the dummy symbol, not to the host
19609 rule.
19610 * tests/actions.at (Mid-rule actions): New.
19611
8419d367
AD
196122001-12-29 Akim Demaille <akim@epita.fr>
19613
19614 Memory leak.
19615
19616 * src/reader.c (reader): Free grammar.
19617
375d5806
AD
196182001-12-29 Akim Demaille <akim@epita.fr>
19619
19620 Memory leak.
19621
19622 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
19623 since it allocates it for each state, although only one is needed.
19624 (allocate_storage): Do it here.
19625
f51cb8ff
AD
196262001-12-29 Akim Demaille <akim@epita.fr>
19627
19628 * src/options.h, src/options.c (create_long_option_table): Rename
19629 as...
19630 (long_option_table_new): this, with a clearer prototype.
19631 (percent_table): Remove, unused,
19632 * src/getargs.c (getargs): Adjust.
19633
29e88316
AD
196342001-12-29 Akim Demaille <akim@epita.fr>
19635
19636 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
19637 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
19638 as states.
19639
b9f71f19
AD
196402001-12-29 Akim Demaille <akim@epita.fr>
19641
19642 * src/lalr.c (build_relations): Rename `states' as `states1'.
19643 Sorry, I don't understand exactly what it is, no better name...
19644
1a2b5d37
AD
196452001-12-29 Akim Demaille <akim@epita.fr>
19646
19647 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
19648 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
19649 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
19650 as rules.
19651
1cca533e
AD
196522001-12-29 Akim Demaille <akim@epita.fr>
19653
19654 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
19655 ago.
19656
c03ae966
AD
196572001-12-29 Akim Demaille <akim@epita.fr>
19658
19659 * src/reader.c, src/reader.h (user_toknums): Remove.
19660 Adjust all users to use symbols[i]->user_token_number.
19661
5a670b1e
AD
196622001-12-29 Akim Demaille <akim@epita.fr>
19663
19664 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
19665 Adjust all users to use symbols[i]->prec or ->assoc.
19666
ad949da9
AD
196672001-12-29 Akim Demaille <akim@epita.fr>
19668
19669 * src/reader.c, src/reader.h (tags): Remove.
19670 Adjust all users to use symbols[i]->tag.
19671
0e78e603
AD
196722001-12-29 Akim Demaille <akim@epita.fr>
19673
19674 * src/gram.h, src/gram.c (symbols): New, similar to state_table
19675 and rule_table.
19676 * src/reader.c (packsymbols): Fill this table.
19677 Drop sprec.
19678 * src/conflicts.c (resolve_sr_conflict): Adjust.
19679 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
19680 single table.
19681 Use symbols[i]->tag instead of tags[i].
19682
213e640e
AD
196832001-12-29 Akim Demaille <akim@epita.fr>
19684
19685 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
19686 In addition, put a comment in there, to replace...
19687 * tests/regression.at (%union and C comments): Remove.
19688
e7b8bef1
AD
196892001-12-29 Akim Demaille <akim@epita.fr>
19690
19691 * tests/regression.at (Web2c Actions): Blindly move the actual
19692 output as expected output. The contents *seem* right to me, but I
19693 can't pretend reading perfectly parser tables... Nonetheless, all
19694 the other tests pass correctly, the table look OK, even though the
19695 presence of `$axiom' is to be noted: AFAICS it is useless (but
19696 harmless).
19697
b68e7744
AD
196982001-12-29 Akim Demaille <akim@epita.fr>
19699
19700 * src/reader.c (readgram): Don't add the rule 0 if there were no
19701 rules read. In other words, add it _after_ having performed
19702 grammar sanity checks.
19703 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
19704
78d5bae9
AD
197052001-12-29 Akim Demaille <akim@epita.fr>
19706
19707 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
19708 visible, and some states have now a different number.
19709
ff442794
AD
197102001-12-29 Akim Demaille <akim@epita.fr>
19711
19712 * src/reader.c (readgram): Bind the initial rule's lineno to that
19713 of the first rule.
19714 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
19715 (Solved SR Conflicts): Adjust rule 0's line number.
19716
610ab194
AD
197172001-12-29 Akim Demaille <akim@epita.fr>
19718
19719 Fix the `GAWK Grammar' failure.
19720
19721 * src/LR0.c (final_state): Initialize to -1 so that we do compute
19722 the reductions of the first state which was mistakenly confused
19723 with the final state because precisely final_state was initialized
19724 to 0.
19725 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
19726 now noticed by Bison.
19727 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
19728 have a reduction on $default.
19729
29d29c8f
AD
197302001-12-29 Akim Demaille <akim@epita.fr>
19731
19732 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
19733 rule line numbers.
19734 * src/closure.c (print_closure): Likewise.
19735 * src/derives.c (print_derives): Likewise.
19736 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
19737 now.
19738
7c6b64d0
AD
197392001-12-29 Akim Demaille <akim@epita.fr>
19740
19741 * src/lalr.c (lookaheads_print): New.
19742 (lalr): Call it when --trace-flag.
19743 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
19744 are dumped.
19745
3d4daee3
AD
197462001-12-29 Akim Demaille <akim@epita.fr>
19747
19748 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
19749 when walking through ritem, even via rule->rhs.
19750 * src/reduce.c (dump_grammar, useful_production, reduce_output)
19751 (useful_production, useless_nonterminals): Likewise.
19752 (reduce_grammar_tables): Likewise, plus update nritems.
19753 * src/nullable.c (set_nullable): Likewise.
19754 * src/lalr.c (build_relations): Likewise.
19755 * tests/sets.at (Nullable): Adjust.
19756 Fortunately, now, the $axiom is no longer nullable.
19757
9e7f6bbd
AD
197582001-12-29 Akim Demaille <akim@epita.fr>
19759
19760 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
19761 the 0-sentinel.
19762 * src/gram.c (ritem_longest_rhs): Likewise.
19763 * src/reduce.c (nonterminals_reduce): Likewise.
19764 * src/print_graph.c (print_graph): Likewise.
19765 * src/output.c (output_rule_data): Likewise.
19766 * src/nullable.c (set_nullable): Likewise.
19767
255ef638
AD
197682001-12-29 Akim Demaille <akim@epita.fr>
19769
19770 * src/output.c: Comment changes.
19771
0d8a7363
AD
197722001-12-27 Paul Eggert <eggert@twinsun.com>
19773
19774 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
19775 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
19776 Sparc, as they were causing more porting problems than the
19777 (minor) performance improvement was worth.
19778
19779 Also, catch up with 1.31's YYSTD.
19780
3db472b9
AD
197812001-12-27 Akim Demaille <akim@epita.fr>
19782
19783 * src/output.c (output_gram): Rely on nritems, not the
19784 0-sentinel. See below.
19785 Use -1 as separator, not 0.
19786 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
19787 Rely on -1 as separator in yyrhs, instead of 0.
19788 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
19789 twice `Now at end of input', therefore there are two lines less to
19790 expect.
19791
b365aa05
AD
197922001-12-27 Akim Demaille <akim@epita.fr>
19793
19794 * tests/regression.at (Unresolved SR Conflicts):
19795 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
19796 below.
19797
30171f79
AD
197982001-12-27 Akim Demaille <akim@epita.fr>
19799
19800 * src/LR0.c (new_state): Recognize the final state by the fact it
19801 is reached by eoftoken.
19802 (insert_start_shifting_state, insert_eof_shifting_state)
19803 (insert_accepting_state, augment_automaton): Remove, since now
19804 these states are automatically computed from the initial state.
19805 (generate_states): Adjust.
19806 * src/print.c: When reporting a rule number to the user, substract
19807 1, so that the axiom rule is rule 0, and the first user rule is 1.
19808 * src/reduce.c: Likewise.
19809 * src/print_graph.c (print_core): For the time being, just as for
19810 the report, depend upon --trace-flags to dump the full set of
19811 items.
19812 * src/reader.c (readgram): Once the grammar read, insert the rule
19813 0: `$axiom: START-SYMBOL $'.
19814 * tests/set.at: Adjust: rule 0 is now displayed, and since the
19815 number of the states has changed (the final state is no longer
19816 necessarily the last), catch up.
19817
75142d45
AD
198182001-12-27 Akim Demaille <akim@epita.fr>
19819
19820 Try to make the use of the eoftoken valid. Given that its value
19821 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
19822 is used instead of > 0 where appropriate, (ii), depend upon nritems
19823 instead of the 0-sentinel.
19824
19825 * src/gram.h, src/gram.c (nritems): New.
19826 Expected to be duplication of nitems, but for the time being...
19827 * src/reader.c (packgram): Assert nritems and nitems are equal.
19828 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
19829 * src/closure.c (print_closure, print_fderives): Likewise.
19830 * src/gram.c (ritem_print): Likewise.
19831 * src/print.c (print_core, print_grammar): Likewise.
19832 * src/print_graph.c: Likewise.
19833
b7c49edf
AD
198342001-12-27 Akim Demaille <akim@epita.fr>
19835
19836 * src/main.c (main): If there are complains after grammar
19837 reductions, then output the report anyway if requested, then die.
19838 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
19839 * src/reader.c (eoftoken): New.
19840 (parse_token_decl): If the token being defined has value `0', it
19841 is the eoftoken.
19842 (packsymbols): No longer hack `tags' to insert `$' by hand.
19843 Be sure to preserve the value of the eoftoken.
19844 (reader): Make sure eoftoken is defined.
19845 Initialize nsyms to 0: now eoftoken is created just like the others.
19846 * src/print.c (print_grammar): Don't special case the eof token.
19847 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
19848 lie anyway, albeit pleasant.
19849 * tests/calc.at: Exercise error messages with eoftoken.
19850 Change the grammar so that empty input is invalid.
19851 Adjust expectations.
19852 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
19853
ec2da99f
AD
198542001-12-27 Akim Demaille <akim@epita.fr>
19855
19856 * configure.in: Check the protos of strchr ans strspn.
19857 Replace strchr if needed.
19858 * src/system.h: Provide the protos of strchr, strspn and memchr if
19859 missing.
19860 * lib/strchr.c: New.
19861 * src/reader.c (symbols_save): Use strchr.
19862
8adfa272
AD
198632001-12-27 Akim Demaille <akim@epita.fr>
19864
19865 * src/print.c, src/print_graph.c (escape): New.
19866 Use it to quote the TAGS outputs.
19867 * src/print_graph.c (print_state): Now errors are in red, and
19868 reductions in green.
19869 Prefer high to wide: output the state number on a line of its own.
19870
80dac38c
AD
198712001-12-27 Akim Demaille <akim@epita.fr>
19872
19873 * src/state.h, src/state.c (reductions_new): New.
19874 * src/LR0.c (set_state_table): Let all the states have a
19875 `reductions', even if reduced to 0.
19876 (save_reductions): Adjust.
19877 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
19878 * src/print.c (print_reductions, print_actions): Adjust.
19879 * src/output.c (action_row): Adjust.
19880
2cec70b9
AD
198812001-12-27 Akim Demaille <akim@epita.fr>
19882
19883 * src/state.h, src/state.c (errs_new, errs_dup): New.
19884 * src/LR0.c (set_state_table): Let all the states have an errs,
19885 even if reduced to 0.
19886 * src/print.c (print_errs, print_reductions): Adjust.
19887 * src/output.c (output_actions, action_row): Adjust.
19888 * src/conflicts.c (resolve_sr_conflict): Adjust.
19889
13ca549a
AD
198902001-12-27 Akim Demaille <akim@epita.fr>
19891
19892 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
19893
5092aba5
AD
198942001-12-27 Akim Demaille <akim@epita.fr>
19895
19896 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
19897 * src/print.c: here.
19898 (lookaheadset, shiftset): New, used as additional storage by
19899 print_reductions.
19900 (print_results): Adjust.
19901 (print_shifts, print_gotos, print_errs): New, extracted from...
19902 (print_actions): here.
19903 * src/print_graph.c (print_actions): Remove dead code.
19904
11e2beca
AD
199052001-12-27 Akim Demaille <akim@epita.fr>
19906
19907 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
19908 `$n' and `@n'.
19909
dac3c910
AD
199102001-12-27 Akim Demaille <akim@epita.fr>
19911
19912 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
19913 (build_relations): Adjust.
19914
d0b0fefa
AD
199152001-12-27 Akim Demaille <akim@epita.fr>
19916
19917 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
19918 duplication.
19919
adc8c848
AD
199202001-12-27 Akim Demaille <akim@epita.fr>
19921
19922 * src/reader.c (packgram): Catch nitems overflows.
19923
14d293ac
AD
199242001-12-27 Akim Demaille <akim@epita.fr>
19925
19926 * src/files.c, src/files.h (guard_obstack): Remove.
19927 * src/output.c (output): Adjust.
19928 * src/reader.c (parse_braces): New, factoring...
19929 (copy_action, copy_guard): these two which are renamed as...
19930 (parse_action, parse_guard): these.
19931 As a voluntary consequence, using braces around guards is now
19932 mandatory.
19933
f499b062
AD
199342001-12-27 Akim Demaille <akim@epita.fr>
19935
19936 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
19937 * src/reader.c (symbol_list): `guard' and `guard_line' are new
19938 members.
19939 (symbol_list_new): Adjust.
19940 (copy_action): action_line is the first line, not the last.
19941 (copy_guard): Just as for actions, store the `action' only, not
19942 the switch/case/break flesh.
19943 Don't parse the user action that might follow the guard, let...
19944 (readgram): do it, i.e., now, there can be an action after a
19945 guard.
19946 In other words the guard is just explicitly optional.
19947 (packgram): Adjust.
19948 * src/output.c (guards_output): New.
19949 (output_parser): Call it when needed.
19950 (output): Also free the guard and attrs obstacks.
19951 * src/files.c, src/files.h (obstack_save): Remove.
19952 (output_files): Remove.
19953 As a result, if one needs the former `.act' file, using an
19954 appropriate skeleton which requires actions and guards is now
19955 required.
19956 * src/main.c (main): Adjust.
19957 * tests/semantic.at: New.
19958 * tests/regression.at: Use `input.y' as input file name.
19959 Avoid 8+3 problems by requiring input.c when the test needs the
19960 parser.
19961
d945f5cd
AD
199622001-12-27 Akim Demaille <akim@epita.fr>
19963
19964 * src/reader.c (symbol_list_new): Be sure to initialize all the
19965 fields.
19966
d200e455
AD
199672001-12-27 Akim Demaille <akim@epita.fr>
19968
19969 All the hacks using a final pseudo state are now useless.
19970
19971 * src/LR0.c (set_state_table): state_table holds exactly nstates.
19972 * src/lalr.c (nLA): New.
19973 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
19974 instead of lookaheadsp from the pseudo state (nstate + 1).
19975
f9507c28
AD
199762001-12-27 Akim Demaille <akim@epita.fr>
19977
19978 * src/output.c (action_row, token_actions): Use a state_t instead
19979 of a integer, and nlookaheads instead of the following state's
19980 lookaheadsp.
19981
065fbd27
AD
199822001-12-27 Akim Demaille <akim@epita.fr>
19983
19984 * src/conflicts.c (log_resolution, flush_shift)
19985 (resolve_sr_conflict, set_conflicts, solve_conflicts)
19986 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
19987 (conflicts_print, print_reductions): Use a state_t instead of an
19988 integer when referring to a state.
19989 As much as possible, depend upon nlookaheads, instead of the
19990 `lookaheadsp' member of the following state (since lookaheads of
19991 successive states are successive, the difference between state n + 1
19992 and n served as the number of lookaheads for state n).
19993 * src/lalr.c (add_lookback_edge): Likewise.
19994 * src/print.c (print_core, print_actions, print_state)
19995 (print_results): Likewise.
19996 * src/print_graph.c (print_core, print_actions, print_state)
19997 (print_graph): Likewise.
19998 * src/conflicts.h: Adjust.
19999
1b177bd7
AD
200002001-12-27 Akim Demaille <akim@epita.fr>
20001
20002 * src/bison.hairy: Formatting/comment changes.
20003 ANSIfy.
20004 Remove `register' indications.
20005 Add plenty of `static'.
20006
7742ddeb
AD
200072001-12-27 Akim Demaille <akim@epita.fr>
20008
20009 * src/output.c (prepare): Drop the muscle `ntbase' which
20010 duplicates ntokens.
20011 * src/bison.simple: Formatting/comment changes.
20012 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
20013 is an undocumented synonym.
20014
1fa14068
AD
200152001-12-22 Akim Demaille <akim@epita.fr>
20016
20017 * src/output.c (output_table_data): Change the prototype to use
20018 `int' for array ranges: some invocations do pass an int, not a
20019 short.
20020 Reported by Wayne Green.
20021
b9752825
AD
200222001-12-22 Akim Demaille <akim@epita.fr>
20023
20024 Some actions of web2c.y are improperly triggered.
20025 Reported by Mike Castle.
20026
20027 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
20028 * tests/regression.at (Web2c): Rename as...
20029 (Web2c Report): this.
20030 (Web2c Actions): New.
20031
776209d6
AD
200322001-12-22 Akim Demaille <akim@epita.fr>
20033
20034 Reductions in web2c.y are improperly reported.
20035 Reported by Mike Castle.
20036
20037 * src/conflicts.c (print_reductions): Fix.
20038 * tests/regression.at (Web2c): New.
20039
275fc3ad
AD
200402001-12-18 Akim Demaille <akim@epita.fr>
20041
20042 Some host fail on `assert (!"foo")', which expands to
20043 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
20044 Reported by Nelson Beebee.
20045
20046 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
20047 `#define it_succeeded 0' and `assert (it_succeeded)'.
20048
897668ee
MA
200492001-12-17 Marc Autret <autret_m@epita.fr>
20050
20051 * src/bison.simple: Don't hard code the skeleton line and filename.
20052 * src/output.c (output_parser): Rename 'line' as 'output_line'.
20053 New line counter 'skeleton_line' (skeleton-line muscle).
20054
ab3399e0
PE
200552001-12-17 Paul Eggert <eggert@twinsun.com>
20056
20057 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
20058 YYDEBUG must be defined to a nonzero value.
20059
20060 * src/bison.simple (yytname): Do not assume that the user defines
20061 YYDEBUG to a properly parenthesized expression.
20062
3877f72b
AD
200632001-12-17 Akim Demaille <akim@epita.fr>
20064
20065 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
20066 nlookaheads is a new member.
20067 Adjust all users.
20068 * src/lalr.h (nlookaheads): Remove this orphan declaration.
20069 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
20070 state.
776209d6 20071
331dbc1b
AD
200722001-12-17 Akim Demaille <akim@epita.fr>
20073
20074 * src/files.h, src/files.c (open_files, close_files): Remove.
20075 * src/main.c (main): Don't open/close files, nor invoke lex_free,
20076 let...
20077 * src/reader.c (reader): Do it.
776209d6 20078
be750e4c
AD
200792001-12-17 Akim Demaille <akim@epita.fr>
20080
20081 * src/conflicts.c (print_reductions): Formatting changes.
776209d6 20082
709ae8c6
AD
200832001-12-17 Akim Demaille <akim@epita.fr>
20084
20085 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
20086 (flush_reduce): New.
20087 (resolve_sr_conflict): Adjust.
776209d6 20088
f87685c3
AD
200892001-12-17 Akim Demaille <akim@epita.fr>
20090
20091 * src/output.c (output_obstack): Be static and rename as...
20092 (format_obstack): this, to avoid any confusion with files.c's
20093 output_obstack.
20094 * src/reader.h (muscle_obstack): Move to...
20095 * src/output.h: here, since it's defined in output.c.
20096
837491d8
AD
200972001-12-17 Akim Demaille <akim@epita.fr>
20098
20099 * src/output.c (action_row, save_column, default_goto)
20100 (sort_actions, matching_state, pack_vector): Better variable
20101 locality.
20102
796d61fb
AD
201032001-12-17 Akim Demaille <akim@epita.fr>
20104
20105 * src/output.c: Various formatting changes.
776209d6 20106
64d15509
AD
201072001-12-17 Akim Demaille <akim@epita.fr>
20108
20109 * src/files.c (output_files): Free the output_obstack.
20110 * src/main.c (main): Call print and print_graph conditionally.
20111 * src/print.c (print): Work unconditionally.
20112 * src/print_graph.c (print_graph): Work unconditionally.
20113 * src/conflicts.c (log_resolution): Output only if verbose_flag.
20114
fbc8ecb7
MA
201152001-12-16 Marc Autret <autret_m@epita.fr>
20116
20117 * src/output.c (actions_output): Fix. When we use %no-lines,
20118 there is one less line per action.
20119
f0440388
MA
201202001-12-16 Marc Autret <autret_m@epita.fr>
20121
20122 * src/bison.simple: Remove a useless #line directive.
20123 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
20124 * src/output.c (get_lines_number): New.
776209d6 20125 (output_parser): Adjust, now takes care about the lines of a
f0440388
MA
20126 output muscles.
20127 Fix line numbering.
20128 (actions_output): Computes the number of lines taken by actions.
20129 (output_master_parser): Insert new skeleton which is the name of
20130 the output parser file name.
20131
a79986b8
MA
201322001-12-15 Marc Autret <autret_m@epita.fr>
20133
20134 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
20135
4ec8e00f
MA
201362001-12-15 Marc Autret <autret_m@epita.fr>
20137
20138 * src/output.c (output_gram): Keep track of the hairy one.
20139
1a4648ff
AD
201402001-12-15 Akim Demaille <akim@epita.fr>
20141
20142 Make `make distcheck' work.
20143
20144 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
20145 system.h which uses libgettext.h.
20146
9c2c67e6
AD
201472001-12-15 Akim Demaille <akim@epita.fr>
20148
20149 * src/nullable.c (set_nullable): Useless rules must be skipped,
20150 otherwise, since we range over their symbols, we might look at a
20151 nonterminal which no longer ``exists'', i.e., it is not counted in
20152 `nvars', hence we overflow our arrays.
20153
93ede233
AD
201542001-12-15 Akim Demaille <akim@epita.fr>
20155
20156 The header can also be produced directly, without any obstack!
20157 Yahoo!
20158
20159 * src/files.c, src/files.h (defines_obstack): Remove.
20160 (compute_header_macro): Global.
20161 (defines_obstack_save): Remove.
20162 * src/reader.c (parse_union_decl): No longer output to
20163 defines_obstack: its content can be found in the `stype' muscle
20164 anyway.
20165 (output_token_translations): Merge into...
20166 (symbols_output): this.
20167 Rename as...
20168 (symbols_save): this.
20169 (reader): Adjust.
20170 * src/output.c (header_output): New.
20171 (output): Call it.
20172
2666f928
AD
201732001-12-15 Akim Demaille <akim@epita.fr>
20174
20175 * src/reader.c (parse_union_decl): Instead of handling two obstack
20176 simultaneously, use one to define the `stype' muscle, and use the
20177 value of the latter to fill defines_obstack.
20178 (copy_comment): Remove.
20179 (copy_comment2): Work for a single obstack.
20180 Rename as...
20181 (copy_comment): this.
20182
428046f8
AD
201832001-12-15 Akim Demaille <akim@epita.fr>
20184
20185 * src/lex.c, src/lex.h (xgetc): No longer static.
20186 * src/reader.c (parse_union_decl): Revamp.
20187
ea52d706
AD
201882001-12-15 Akim Demaille <akim@epita.fr>
20189
20190 Still making progress in separating Bison into (i) input, (ii)
20191 process, (iii) output: now we can directly output the parser file
20192 without using table_obstack at all.
20193
20194 * src/files.c, src/files.h (table_obstack): Bye bye.
20195 (parser_file_name): New.
20196 * src/files.c (compute_output_file_names): Compute it.
20197 * src/output.c (actions_output, output_parser)
20198 (output_master_parser): To a file instead of an obstack.
20199
3f96f4dc
AD
202002001-12-15 Akim Demaille <akim@epita.fr>
20201
20202 Attach actions to rules, instead of pre-outputting them to
20203 actions_obstack.
20204
20205 * src/gram.h (rule_t): action and action_line are new members.
20206 * src/reader.c (symbol_list): Likewise.
20207 (copy_action): Save the actions within the rule.
20208 (packgram): Save them in rule_table.
20209 * src/output.c (actions_output): New.
20210 (output_parser): Use it on `%%actions'.
20211 (output_rule_data): Don't free rule_table.
20212 (output): Do it.
20213 (prepare): Don't save the `action' muscle.
20214 * src/bison.simple: s/%%action/%%actions/.
20215
51576fb3
AD
202162001-12-15 Akim Demaille <akim@epita.fr>
20217
20218 * src/reader.c (copy_action): When --yacc, don't append a `;'
20219 to the user action: let it fail if lacking.
dee049eb 20220 Suggested by Arnold Robbins and Tom Tromey.
51576fb3 20221
2648a72d
AD
202222001-12-14 Akim Demaille <akim@epita.fr>
20223
20224 * src/lex.c (literalchar): Simply return the char you decoded, non
20225 longer mess around with obstacks and int pointers.
20226 Adjust all callers.
20227
92790e5b
AD
202282001-12-14 Akim Demaille <akim@epita.fr>
20229
20230 * src/lex.c (literalchar): Don't escape the special characters,
20231 just decode them, and keep them as char (before, eol was output as
20232 the 2 char string `\n' etc.).
20233 * src/output.c (output_rule_data): Use quotearg to output the
20234 token strings.
20235
927c1557
PE
202362001-12-13 Paul Eggert <eggert@twinsun.com>
20237
20238 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
20239 Do not infringe on the global user namespace when using C++.
20240 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
20241 All uses of `fprintf' and `stderr' changed.
20242
20243 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
20244
ed8e1f68
AD
202452001-12-13 Akim Demaille <akim@epita.fr>
20246
20247 The computation of nullable is broken: it doesn't handle empty
20248 RHS's properly.
20249
20250 * tests/torture.at (GNU AWK Grammar): New.
20251 * tests/sets.at (Nullable): New.
20252 * src/nullable.c (set_nullable): Instead of blindly looping over
20253 `ritems', loop over the rules, and then over their rhs's.
20254
20255 Work around Autotest bugs.
20256
20257 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
20258 frame, because Autotest understand lines starting with a `+' as
20259 traces from the shell. Then, they are not processed properly.
20260 Admittedly an Autotest bug, but we don't have time to wait for
20261 Autotest to catch up.
20262 * tests/regression.at (Broken Closure): Adjust to the new table
20263 frames.
20264 Move to...
20265 * tests/sets.at: here.
20266
cb581495
AD
202672001-12-13 Akim Demaille <akim@epita.fr>
20268
20269 * src/closure.c (closure): Use nrules instead of playing tricks
20270 with BITS_PER_WORD.
20271
2e729273
AD
202722001-12-13 Akim Demaille <akim@epita.fr>
20273
20274 * src/print.c (print_actions): Output the handling of `$' as the
20275 traces do: shifting the token EOF. Before EOF was treated as a
20276 nonterminal.
20277 * tests/regression.at: Adjust some tests.
20278 * src/print_graph.c (print_core): Complete the set of items via
20279 closure. The next-to-final and final states are still unsatisfying,
20280 but that's to be addressed elsewhere.
20281 No longer output the rule numbers, but do output the state number.
20282 A single loop for the shifts + gotos is enough, but picked a
20283 distinct color for each.
20284 (print_graph): Initialize and finalize closure.
20285
107f7dfb
AD
202862001-12-13 Akim Demaille <akim@epita.fr>
20287
20288 * src/reader.c (readgram): Remove dead code, an strip useless
20289 braces.
20290 (get_type): Remove, unused.
20291
9b53a24f
AD
202922001-12-12 Akim Demaille <akim@epita.fr>
20293
20294 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
20295 on that of lib/error.c.
20296
dbfb6dcd
AD
202972001-12-12 Akim Demaille <akim@epita.fr>
20298
20299 Some hosts don't like `/' in includes.
20300
20301 * src/system.h: Include libgettext.h without qualifying the path.
20302 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
20303 $(top_srcdir).
20304
c25fb648
MA
203052001-12-11 Marc Autret <autret_m@epita.fr>
20306
20307 * src/output.c (output_parser): Remove useless muscle.
20308
710ddc4f
MA
203092001-12-11 Marc Autret <autret_m@epita.fr>
20310
20311 * src/bison.simple: Remove #line just before %%epilogue. It
20312 is now handled in ...
20313 * src/reader.c (read_additionnal_code): Add the output of a
20314 #line for the epilogue.
20315
e83d80b8
MA
203162001-12-10 Marc Autret <autret_m@epita.fr>
20317
927c1557 20318 * src/reader.c (copy_definition): Re-use CPP-outed code which
e83d80b8
MA
20319 replace precedent remove.
20320 * src/bison.simple: Remove #line before %%prologue because
20321 %%input-line is wrong at this time.
20322
971d5158
MA
203232001-12-10 Marc Autret <autret_m@epita.fr>
20324
20325 * src/reader.c (symbols_output): Clean up.
927c1557 20326 * src/output.c (output_gram, output): Clean up.
971d5158 20327
5edafffd
AD
203282001-12-10 Akim Demaille <akim@epita.fr>
20329
20330 * src/lalr.c (initialize_lookaheads): New. Extracted from...
20331 * src/LR0.c (set_state_table): here.
20332 * src/lalr.c (lalr): Call it.
20333
0279f8e9
AD
203342001-12-10 Akim Demaille <akim@epita.fr>
20335
20336 * src/state.h (shifts): Remove the `number' member: shifts are
20337 attached to state, hence no longer need to be labelled with a
20338 state number.
20339
190c4f5f
AD
203402001-12-10 Akim Demaille <akim@epita.fr>
20341
20342 Now that states have a complete set of members, the linked list of
20343 shifts is useless: just fill directly the state's shifts member.
20344
20345 * src/state.h (shifts): Remove the `next' member.
20346 * src/LR0.c (first_state, last_state): Remove.
20347 Adjust the callers.
20348 (augment_automaton): Don't look for the shifts that must be added
20349 a shift on EOF: it is those of the state we looked for! But now,
20350 since shifts are attached, it is no longer needed to looking
20351 merely by its id: its number.
20352
2a73b93d
AD
203532001-12-10 Akim Demaille <akim@epita.fr>
20354
20355 * src/LR0.c (augment_automaton): Better variable locality.
20356 Remove an impossible branch: if there is a state corresponding to
20357 the start symbol being shifted, then there is shift for the start
20358 symbol from the initial state.
20359
74392f6a
AD
203602001-12-10 Akim Demaille <akim@epita.fr>
20361
20362 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
20363 only when appropriate: when insert_start_shifting_state' is not
20364 invoked.
20365 * tests/regression.at (Rule Line Numbers): Adjust.
20366
37c82725
AD
203672001-12-10 Akim Demaille <akim@epita.fr>
20368
20369 * src/LR0.c (augment_automaton): Now that all states have shifts,
20370 merge the two cases addition shifts to the initial state.
20371
6a164e0c
AD
203722001-12-10 Akim Demaille <akim@epita.fr>
20373
20374 * src/lalr.c (set_state_table): Move to...
20375 * src/LR0.c: here.
20376 * src/lalr.c (lalr): Don't call it...
20377 * src/LR0.c (generate_states): do it.
20378 * src/LR0.h (first_state): Remove, only the table is used.
20379
7215de24
AD
203802001-12-10 Akim Demaille <akim@epita.fr>
20381
20382 * src/LR0.h (first_shift, first_reduction): Remove.
20383 * src/lalr.c: Don't use first_shift: find shifts through the
20384 states.
20385
80e25d4d
AD
203862001-12-10 Akim Demaille <akim@epita.fr>
20387
20388 * src/LR0.c: Attach shifts to states as soon as they are
20389 computed.
20390 * src/lalr.c (set_state_table): Instead of assigning shifts to
20391 state, just assert that the mapping was properly done.
20392
0ab3728b
AD
203932001-12-10 Akim Demaille <akim@epita.fr>
20394
20395 * src/LR0.c (insert_start_shift): Rename as...
20396 (insert_start_shifting_state): this.
20397 (insert_eof_shifting_state, insert_accepting_state): New.
20398 (augment_automaton): Adjust.
20399 Better locality of the variables.
20400 When looking if the start_symbol is shifted from the initial
20401 state, using `while (... symbol != start_symbol ...)' sounds
20402 better than `while (... symbol < start_symbol ...)': If fail
20403 to see how the order between symbols could be relevant!
20404
78af9bbc
AD
204052001-12-10 Akim Demaille <akim@epita.fr>
20406
20407 * src/getargs.h: Don't declare `spec_name_prefix' and
20408 `spec_file_prefix', declared by src/files.h.
20409 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
20410 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
20411 * src/output.c (prepare): Adjust.
20412 * src/reader.c (symbols_output): Likewise.
20413 * src/vmsgetargs.c: Vaguely adjust, but who cares?
20414
bdef2a41
AD
204152001-12-10 Akim Demaille <akim@epita.fr>
20416
20417 * src/muscle_tab.c (muscle_init): NULL is a better default than
20418 `"0"'.
20419
3735969c
AD
204202001-12-10 Akim Demaille <akim@epita.fr>
20421
20422 * src/reader.c (reader): Calling symbols_output once is enough.
20423
49701457
AD
204242001-12-10 Akim Demaille <akim@epita.fr>
20425
20426 Now that states have a complete set of members, the linked list of
20427 reductions is useless: just fill directly the state's reductions
20428 member.
20429
20430 * src/state.h (struct reductions): Remove member `number' and
20431 `next'.
20432 * src/LR0.c (first_reduction, last_reduction): Remove.
20433 (save_reductions): Don't link the new reductions, store them in
20434 this_state.
20435 * src/lalr.c (set_state_table): No need to attach reductions to
20436 states, it's already done.
20437 * src/output.c (output_actions): No longer free the shifts, then
20438 the reductions, then the states: free all the states and their
20439 members.
20440
0edad749
AD
204412001-12-10 Akim Demaille <akim@epita.fr>
20442
20443 * src/options.c (OPTN, DRTV, BOTH): New.
20444 (option_table): Use them.
20445
0edad749
AD
20446 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
20447 the job of system.h.
20448 * src/options.c: Don't include stdio.h and xalloc.h for the same
20449 reasons.
20450
5449dd0f
AD
204512001-12-10 Akim Demaille <akim@epita.fr>
20452
20453 * src/output.c (output, prepare): Make sure the values of the
20454 muscles `action' and `prologue' are 0-terminated.
20455
a870c567
AD
204562001-12-10 Akim Demaille <akim@epita.fr>
20457
20458 Clean up GCC warnings.
20459
20460 * src/reader.c (copy_action): `buf' is not used.
20461 (parse_skel_decl): Be static.
20462 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
20463 * src/options.h (create_long_option_table): Have a real prototype.
20464 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
20465 (hash_delete_at): Return const void *.
20466 Adjust casts to preserve the const.
20467
80df8768
AD
204682001-12-10 Akim Demaille <akim@epita.fr>
20469
20470 * configure.in: Require 2.52g.
20471 M4 is not needed, but AUTOM4TE is.
20472 * m4/m4.m4: Remove.
20473 * tests/Makefile.am: Adjust.
20474
f693ad14
AD
204752001-12-10 Akim Demaille <akim@epita.fr>
20476
20477 One structure for states is enough, even though theoretically
20478 there are LR(0) states and LALR(1) states.
20479
20480 * src/lalr.h (state_t): Remove.
20481 (state_table): Be state_t **, not state_t *.
20482 * src/state.h (core, CORE_ALLOC): Rename as...
20483 (state_t, STATE_ALLOC): this.
20484 Add the LALR(1) members: shifts, reductions, errs.
20485 * src/LR0.c (state_table): Rename as...
20486 (state_hash): this, to avoid name clashes with the global
20487 `state_table'.
20488 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
20489 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
20490
74ffbcb6
AD
204912001-12-10 Akim Demaille <akim@epita.fr>
20492
20493 Bison dumps core on bash.y.
20494 Reported by Pascal Bart.
20495
20496 * src/warshall.c (bitmatrix_print): New.
20497 (TC): Use it.
ba0fe3c7 20498 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
74ffbcb6
AD
20499 j must be the outer loop.
20500 * tests/regression.at (Broken Closure): New.
20501
07708e19
AD
205022001-12-05 Akim Demaille <akim@epita.fr>
20503
20504 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
20505 its argument.
ba1ecc07 20506 Reported by Peter Hamorsky.
07708e19 20507
92b16366
AD
205082001-12-05 Akim Demaille <akim@epita.fr>
20509
20510 * src/conflicts.c (err_table): Remove.
20511 (resolve_sr_conflict): Adjust.
20512 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
20513 Rename as...
20514 (state_t.reductions, state_t.shifts): this.
20515
076ab033
AD
205162001-12-05 Akim Demaille <akim@epita.fr>
20517
20518 * src/reduce.c (reduce_grammar_tables): No longer disable the
20519 removal of useless rules via CPP but via `if (0)', so that the
20520 compiler still check the code is valid.
20521 For instance, it should have noticed `rline' no longer exists: use
20522 the `line' member of rule_t.
20523 * src/gram.c (dummy, rline): Remove, unused.
20524
3843c413
AD
205252001-12-05 Akim Demaille <akim@epita.fr>
20526
20527 * src/output.c (pack_vector): Use assert, not berror.
20528 * src/main.c (berror): Remove, unused.
20529
43168960
AD
205302001-12-05 Akim Demaille <akim@epita.fr>
20531
20532 New experimental feature: if --verbose --trace output all the
20533 items of a state, not only its kernel.
20534
20535 * src/print.c (print_core): If `trace_flag', then invoke closure
20536 before outputting the items of the state (print_core is no longer
20537 a correct name them).
20538 (print_results): Invoke new_closure/free_closure if needed.
20539
b2872512
AD
205402001-12-05 Akim Demaille <akim@epita.fr>
20541
20542 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
20543 * src/closure.c, src/closure.h (itemsetsize): Rename as...
20544 (nitemset): for consistency with the rest of the project.
20545
23cbcc6c
AD
205462001-12-05 Akim Demaille <akim@epita.fr>
20547
20548 * src/closure.c (print_closure): Improve.
20549 (closure): Use it for printing input and output.
20550
03ec521c
AD
205512001-12-05 Akim Demaille <akim@epita.fr>
20552
20553 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
20554 indexed by nonterminals.
20555
3a7456dd
AD
205562001-12-05 Akim Demaille <akim@epita.fr>
20557
20558 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
20559 what it was!).
20560 * src/warshall.h: Remove accidental duplication of the content.
20561
1cbcf2e7
AD
205622001-12-05 Akim Demaille <akim@epita.fr>
20563
20564 * src/closure.c (set_fderives): De-obfuscate.
20565
84182270
AD
205662001-12-05 Akim Demaille <akim@epita.fr>
20567
20568 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
20569
3f6f053c
AD
205702001-12-05 Akim Demaille <akim@epita.fr>
20571
20572 * src/closure.c (set_firsts): De-obfuscate.
20573
7a5350ba
AD
205742001-12-05 Akim Demaille <akim@epita.fr>
20575
20576 * src/output.c (action_row): De-obfuscate
20577 using the good o' techniques: arrays not pointers, variable
20578 locality, BITISSET, RESETBIT etc.
20579
d954473d
AD
205802001-12-05 Akim Demaille <akim@epita.fr>
20581
20582 Pessimize the code to simplify it: from now on, all the states
20583 have a valid SHIFTS, which NSHIFTS is possibly 0.
20584
20585 * src/LR0.c (shifts_new): Be global and move to..
20586 * src/state.c, src/state.h: here.
20587 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
20588 * src/print_graph: Adjust.
20589
9839bbe5
AD
205902001-12-05 Akim Demaille <akim@epita.fr>
20591
20592 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
20593 * src/conflicts.c: Use it.
20594 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
20595 incorrectly ``simplified''.
20596
9f136c07
AD
205972001-12-05 Akim Demaille <akim@epita.fr>
20598
20599 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
20600 using the good o' techniques: arrays not pointers, variable
20601 locality, BITISSET, RESETBIT etc.
20602
b608206e
AD
206032001-12-05 Akim Demaille <akim@epita.fr>
20604
20605 * src/state.h (SHIFT_SYMBOL): New.
20606 * src/conflicts.c: Use it to deobfuscate.
20607
52afa962
AD
206082001-12-05 Akim Demaille <akim@epita.fr>
20609
20610 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
20611 (print_reductions): De-obfuscate using the good o' techniques:
20612 arrays not pointers, variable locality, BITISSET.
20613
e74dc321
AD
206142001-12-05 Akim Demaille <akim@epita.fr>
20615
20616 * src/conflicts.c (print_reductions): Arrays, not pointers.
20617 Use BITISSET.
20618
768fca83
AD
206192001-12-05 Akim Demaille <akim@epita.fr>
20620
20621 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20622
a17e599f
AD
206232001-12-05 Akim Demaille <akim@epita.fr>
20624
20625 * src/conflicts.c (print_reductions): Improve variable locality.
20626
a04bc341
AD
206272001-12-05 Akim Demaille <akim@epita.fr>
20628
20629 * src/conflicts.c (print_reductions): Pessimize, but clarify.
20630
c8ea038e
AD
206312001-12-05 Akim Demaille <akim@epita.fr>
20632
20633 * src/conflicts.c (print_reductions): Improve variable locality.
20634
aa2aab3c
AD
206352001-12-05 Akim Demaille <akim@epita.fr>
20636
20637 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
20638 * src/lalr.c: Use them.
20639
b178c8cc
AD
206402001-12-05 Akim Demaille <akim@epita.fr>
20641
20642 * src/LR0.c (augment_automaton): Formatting changes.
20643 Better variable locality.
20644
f67d13aa
AD
206452001-12-05 Akim Demaille <akim@epita.fr>
20646
20647 * src/lalr.c (matrix_print): New.
20648 (transpose): Use it.
20649 Use arrays instead of pointers.
20650
c2713865
AD
206512001-12-05 Akim Demaille <akim@epita.fr>
20652
20653 * src/lalr.c (maxrhs): Move to...
20654 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
20655 * src/lalr.c (build_relations): Adjust.
20656
9887c18a
AD
206572001-12-05 Akim Demaille <akim@epita.fr>
20658
20659 * src/lalr.c (transpose): Free the memory allocated to the
20660 argument, as it is replaced by the results by the unique caller.
20661 (build_relations): Merely invoke transpose: it handles the memory
20662 deallocation.
20663 Improve variable locality.
20664 Avoid variables used as mere abbreviations.
20665 (compute_lookaheads): Use arrays instead of pointers.
20666
4d4f699c
AD
206672001-12-05 Akim Demaille <akim@epita.fr>
20668
20669 * src/lalr.c (initialize_F): Improve variable locality.
20670 Avoid variables used as mere abbreviations.
20671
80a69750
AD
206722001-12-05 Akim Demaille <akim@epita.fr>
20673
20674 * src/derives.c (print_derives): Display the ruleno.
20675 * src/lalr.c (initialize_F, transpose): Better variable locality
20676 to improve readability.
20677 Avoid variables used as mere abbreviations.
20678
fe961097
AD
206792001-12-05 Akim Demaille <akim@epita.fr>
20680
20681 * src/lalr.c (traverse): Use arrays instead of pointers.
20682
e3e4e814
AD
206832001-12-05 Akim Demaille <akim@epita.fr>
20684
20685 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
20686 the handling of squeue.
20687 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20688
630e182b
AD
206892001-12-05 Akim Demaille <akim@epita.fr>
20690
20691 Because useless nonterminals are now kept alive (instead of being
20692 `destroyed'), we now sometimes examine them, and store information
20693 related to them. Hence we need to know their number, and adjust
20694 memory allocations.
20695
20696 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
20697 static.
20698 * src/LR0.c (allocate_itemsets): The memory allocated to
20699 `symbol_count' was used for two different purpose: once to count
20700 the number of occurrences of each symbol, and later reassigned to
20701 `shift_symbol', containing the symbol that can be shifted from a
20702 given state.
20703 Deobfuscate, i.e., allocate, use and free `symbol_count' here
20704 only, and...
20705 (new_itemsets): Allocate `shift_symbol' here.
20706 (allocate_itemsets): symbol_count includes useless nonterminals.
20707 Make room for them.
20708 (free_storage): Use `free', not `XFREE', for pointers that cannot
20709 be null.
20710
81b51460
AD
207112001-12-05 Akim Demaille <akim@epita.fr>
20712
20713 * src/nullable.c (set_nullable): Deobfuscate the handling of
20714 ritem.
20715 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
20716
3067fbef
AD
207172001-12-05 Akim Demaille <akim@epita.fr>
20718
20719 * src/gram.c, src/gram.h (ritem_print): New.
20720 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
20721 (This useless function was defined only to work around VMS linkers
20722 that can't handle compilation units with variables only).
20723 * src/reduce.c (dump_grammar): Use it to trace the construction of
20724 ritem.
20725
c2bea5f9
PE
207262001-12-04 Paul Eggert <eggert@twinsun.com>
20727
7d27c823
PE
20728 * src/bison.simple (union yyalloc): Change member names
20729 to be the same as the stack names.
20730 (yyparse): yyptr is now union yyalloc *, not char *.
20731 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
20732 and may generate better code on some machines.
c2bea5f9
PE
20733 (yystpcpy): Use prototype if __STDC__ is defined, not just
20734 if __cplusplus is defined.
35687a9d 20735
2c8a9dfa
AD
207362001-11-30 Akim Demaille <akim@epita.fr>
20737
20738 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
20739 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
20740 Gettext doesn't compile cleanly, and dies with -Werror.
20741 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
20742 Include WARNING_CFLAGS here.
20743 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
20744 before being defined.
20745
f4e421e6
AD
207462001-11-27 Paul Eggert <eggert@twinsun.com>
20747
20748 * lib/quotearg.h (quotearg_n, quotearg_n_style):
20749 First arg is int, not unsigned.
20750 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20751 (SIZE_MAX, UINT_MAX): New macros.
20752 (quotearg_n_options): Abort if N is negative.
20753 Avoid overflow check on hosts where size_t is 64 bits and int
20754 is 32 bits, as overflow is impossible there.
20755 Fix off-by-one typo that caused unnecessary reallocation.
20756
7093d0f5
AD
207572001-11-29 Paul Eggert <eggert@twinsun.com>
20758
20759 Name space cleanup in generated parser.
20760
20761 * doc/bison.texinfo (Bison Parser): Discuss system headers
20762 and their effect on the user name space.
20763
20764 * src/bison.simple:
20765 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
20766 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
20767 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
20768
20769 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
20770 on user names when possible.
20771
20772 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
20773 Simplify test for whather <alloca.h> exists.
20774
20775 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
20776
20777 (<stdio.h>): Include if YYDEBUG.
20778
20779 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
20780 ! defined (yyoverflow) && ! defined (yymemcpy).
20781
20782 (yymemcpy, yyparse): Rename local variables as needed so that
20783 they all begin with 'yy'.
20784
20785 (yystrlen, yystpcpy): New functions.
20786
20787 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
20788 All uses changed.
20789
20790 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
20791 instead of relying on string.h functions. Use YYSTACK_ALLOC
20792 and YYSTACK_FREE instead of malloc and free.
20793
fd51e5ff
AD
207942001-11-30 Akim Demaille <akim@epita.fr>
20795
20796 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
20797 before their first uses.
20798 (YYBISON, YYPURE): Move to the top of the output.
20799
7d13ff5f
AD
208002001-11-30 Akim Demaille <akim@epita.fr>
20801
20802 * tests/reduce.at (Useless Nonterminals): Fix.
20803
892a3995
AD
208042001-11-30 Akim Demaille <akim@epita.fr>
20805
20806 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
20807 if body instead of `;' to pacify GCC's warnings.
20808
68f1e3ed
AD
208092001-11-30 Akim Demaille <akim@epita.fr>
20810
20811 Instead of mapping the LHS of unused rules to -1, keep the LHS
20812 valid, but flag the rules as invalid.
20813
20814 * src/gram.h (rule_t): `useful' is a new member.
20815 * src/print.c (print_grammar): Adjust.
20816 * src/derives.c (set_derives): Likewise.
20817 * src/reader.c (packgram, reduce_output): Likewise.
20818 * src/reduce.c (reduce_grammar_tables): Likewise.
20819 * tests/reduce.at (Underivable Rules, Useless Rules): New.
20820
d2d1b42b
AD
208212001-11-30 Akim Demaille <akim@epita.fr>
20822
20823 * src/reduce.c (reduce_output): Formatting changes.
20824 * src/print.c (print_results, print_grammar): Likewise.
20825 * tests/regression.at (Rule Line Numbers)
20826 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
20827
760b53a8
AD
208282001-11-30 Akim Demaille <akim@epita.fr>
20829
20830 * src/reduce.c (nonterminals_reduce): Instead of throwing away
20831 useless nonterminals, move them at the end of the symbol arrays.
20832 (reduce_output): Adjust.
20833 * tests/reduce.at (Useless Nonterminals): Adjust.
20834
00238958
AD
208352001-11-30 Akim Demaille <akim@epita.fr>
20836
20837 * src/reduce.c: Various comment/formatting changes.
20838 (nonterminals_reduce): New, extracted from...
20839 (reduce_grammar_tables): here.
20840 (reduce_grammar): Call nonterminals_reduce.
20841
396452de
PE
208422001-11-29 Paul Eggert <eggert@twinsun.com>
20843
20844 * src/bison.simple (YYSTACK_REALLOC): Remove.
20845 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
20846 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
20847 New macros.
20848 (union yyalloc): New type.
20849 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
20850 an arbitrary restriction on hosts where size_t is wider than int.
20851
20852 (yyparse): Don't dump core if alloca or malloc fails; instead, report
20853 a parser stack overflow. Allocate just one block of memory for all
20854 three stacks, instead of allocating three blocks; this typically is
20855 faster and reduces fragmentation.
20856
20857 Do not limit the number of items in the stack to a value that fits
20858 in 'int', as this is an arbitrary limit on hosts with 64-bit
20859 size_t and 32-bit int.
20860
147e184c
MA
208612001-11-29 Marc Autret <autret_m@epita.fr>
20862
20863 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
20864 of defining YYERROR_VERBOSE.
20865 [AT_DATA]: $4 is now out of C declarations in the prologue.
20866
426cf563
MA
208672001-11-28 Marc Autret <autret_m@epita.fr>
20868
20869 * src/reader.c (parse_dquoted_param): New.
20870 (parse_skel_decl): Use it.
20871 * src/lex.h: Add its prototype.
20872 * src/lex.c (literalchar): Become not static.
20873
c7925b99
MA
208742001-11-28 Marc Autret <autret_m@epita.fr>
20875
20876 * src/output.h: And put its extern declaration here.
20877 * src/output.c (error_verbose): Define here.
20878 (prepare): Echo name modification.
20879 * src/getargs.h: Clean its extern declaration.
20880 * src/getargs.c (error_verbose_flag): Remove.
20881 (getargs): Remove case 'e'.
20882 * src/options.c (option_table): 'error-verbose' is now seen as simple
20883 percent option.
20884 Include output.h.
20885
20886 * src/reader.c (read_declarations): Remove case tok_include.
20887 (parse_include_decl): Remove.
20888 * src/lex.h (token_t): Remove tok_include.
20889 * src/options.c (option_table): 'include' is now a simple command line
20890 option.
20891
5b5d1929
MA
208922001-11-28 Marc Autret <autret_m@epita.fr>
20893
20894 * src/bison.simple: Adjust muscle names.
20895 * src/muscle_tab.c (muscle_init): Also rename the muscles.
20896 * src/output.c (prepare): s/_/-/ for the muscles names.
20897 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
20898
8850be4b
MA
208992001-11-28 Marc Autret <autret_m@epita.fr>
20900
20901 * src/bison.simple: Fix debug.
20902 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
20903
4a38e613
AD
209042001-11-28 Akim Demaille <akim@epita.fr>
20905
20906 * src/LR0.c (shifts_new): New.
20907 (save_shifts, insert_start_shift, augment_automaton): Use it.
20908
4b35e1c1
AD
209092001-11-28 Akim Demaille <akim@epita.fr>
20910
20911 * src/closure.c (closure): `b' and `ruleno' denote the same value:
20912 keep ruleno only.
20913
d2b04478
AD
209142001-11-28 Akim Demaille <akim@epita.fr>
20915
20916 * src/closure.c (closure): Instead of looping over word in array
20917 then bits in words, loop over bits in array.
20918
2c4c30aa
AD
209192001-11-28 Akim Demaille <akim@epita.fr>
20920
20921 * src/closure.c (closure): No longer optimize the special case
20922 where all the bits of `ruleset[r]' are set to 0, to make the code
20923 clearer.
20924
576890b7
AD
209252001-11-28 Akim Demaille <akim@epita.fr>
20926
20927 * src/closure.c (closure): `r' and `c' are new variables, used to
20928 de-obfuscate accesses to RULESET and CORE.
20929
cb487d7d
AD
209302001-11-28 Akim Demaille <akim@epita.fr>
20931
20932 * src/reduce.c (reduce_print): Use ngettext.
20933 (dump_grammar): Improve the trace accuracy.
20934
6013d43f
AD
209352001-11-28 Akim Demaille <akim@epita.fr>
20936
20937 * src/reduce.c (dump_grammar): Don't translate trace messages.
20938
cb4956ee
AD
209392001-11-28 Akim Demaille <akim@epita.fr>
20940
20941 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
20942 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
20943 as all tags are free'ed afterwards.
20944 From Enrico Scholz.
20945
648185ab
PE
209462001-11-27 Paul Eggert <eggert@twinsun.com>
20947
20948 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
20949 use alloca when we didn't want to, and vice versa.
20950
68254a03
MA
209512001-11-27 Marc Autret <autret_m@epita.fr>
20952
9113b58f
AD
20953 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
20954 initialization.
68254a03
MA
20955 * src/output.c (prepare): Remove its update.
20956
04d843a2
MA
209572001-11-27 Marc Autret <autret_m@epita.fr>
20958
20959 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
20960 Use %error-verbose.
20961
d2079671 209622001-11-27 Marc Autret <autret_m@epita.fr>
eeeb962b
MA
20963
20964 * src/bison.simple: Remove YYERROR_VERBOSE using.
20965 Use %%error_verbose.
20966 (yyparse): Likewise.
20967 * src/output.c (prepare): Give its final value.
20968 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
20969 * src/getargs.h: Add its extern declaration.
20970 * src/getargs.c (error_verbose_flag): New int.
20971 (getargs): Update to catch new case.
20972 * src/options.c (option_table): 'error-verbose' is a new option.
20973 (shortopts): Update.
20974
e0327bc8
AD
209752001-11-27 Akim Demaille <akim@epita.fr>
20976
20977 * src/system.h: Use intl/libgettext.h.
20978 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
20979
000f1a3c
AD
209802001-11-27 Akim Demaille <akim@epita.fr>
20981
20982 * tests/torture.at (Exploding the Stack Size with Malloc):
20983 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
20984
26cfe0be
AD
209852001-11-27 Akim Demaille <akim@epita.fr>
20986
20987 * src/files.c: Include error.h.
20988 Reported by Hans Aberg.
20989
f6bd5427
MA
209902001-11-26 Marc Autret <autret_m@epita.fr>
20991
d2079671 20992 * src/reader.c (parse_include_decl): New, not yet implemented.
f6bd5427
MA
20993 (read_declarations): Add case tok_include.
20994 * src/getargs.h (include): Add its extern definition.
20995 * src/getargs.c (include): New const char *.
20996 (getargs): Add case '-I'.
20997 * src/options.c (option_table): Add include as command line and
20998 percent option.
20999 * src/lex.h (token_t): Add tok_include.
21000
2ca209c1
AD
210012001-11-26 Akim Demaille <akim@epita.fr>
21002
21003 * src/reader.c (readgram): Make sure rules for mid-rule actions
21004 have a lineno equal to that of their host rule.
21005 Reported by Hans Aberg.
21006 * tests/regression.at (Rule Line Numbers): New.
21007
0e41b407
AD
210082001-11-26 Akim Demaille <akim@epita.fr>
21009
21010 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
21011 size_ts.
21012
210132001-11-26 Akim Demaille <akim@epita.fr>
21014
21015 * src/complain.c, src/complain.h (error): Remove, provided by
21016 lib/error.[ch].
21017
e0c40012
AD
210182001-11-26 Akim Demaille <akim@epita.fr>
21019
21020 * src/reader.c (read_declarations): Don't abort on tok_illegal,
21021 issue an error message.
21022 * tests/regression.at (Invalid %directive): New.
21023 Reported by Hans Aberg.
21024
5e147124
AD
210252001-11-26 Akim Demaille <akim@epita.fr>
21026
21027 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
21028 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
21029
a034c8b8
AD
210302001-11-26 Akim Demaille <akim@epita.fr>
21031
21032 * src/conflicts.c (conflicts_print): Don't complain at all when
21033 there are no reduce/reduce conflicts, and as many shift/reduce
21034 conflicts as expected.
21035 * tests/regression.at (%expect right): Adjust.
21036
c64a20f3
AD
210372001-11-23 Akim Demaille <akim@epita.fr>
21038
21039 * lib/alloca.c: Update, from fileutils.
21040
5b0d29bb
AD
210412001-11-23 Akim Demaille <akim@epita.fr>
21042
21043 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
21044
722c4bfe
AD
210452001-11-23 Akim Demaille <akim@epita.fr>
21046
21047 * src/system.h: Include alloca.h.
21048 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
21049
6255b435
AD
210502001-11-23 Akim Demaille <akim@epita.fr>
21051
21052 * src/print_graph.c (print_actions): Remove `rule', unused.
21053 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
21054 pacify GCC's signed < unsigned warnings.
21055 * src/closure.c (itemsetsize): Likewise.
21056 * src/reader.c (symbol_list_new): Static.
21057
b29b2ed5
AD
210582001-11-23 Akim Demaille <akim@epita.fr>
21059
21060 Attaching lineno to buckets is stupid, since only one copy of each
21061 symbol is kept, only the line of the first occurrence is kept too.
21062
21063 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
21064 * src/reader.c (rline_allocated): Remove, unused.
21065 (symbol_list): Have a `line' member.
21066 (symbol_list_new): New.
21067 (readgram): Use it.
21068 * src/print.c (print_grammar): Output the rule line numbers.
21069 * tests/regression.at (Solved SR Conflicts)
21070 (Unresolved SR Conflicts): Adjust.
21071 Reported by Hans Aberg.
21072
a81b1d4a
MA
210732001-11-22 Marc Autret <autret_m@epita.fr>
21074
21075 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
21076
c1ecb3c1
MA
210772001-11-22 Marc Autret <autret_m@epita.fr>
21078
21079 * src/muscle_tab.c (muscle_init): Remove initialization of
21080 skeleton muscle.
21081 * src/output.c (output_master_parser): Do it here.
21082
fbe01355
AD
210832001-11-20 Akim Demaille <akim@epita.fr>
21084
21085 * po/sv.po: New.
21086 * configure.in (ALL_LINGUAS): Adjust.
21087 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
21088 longer contains strings to translate.
21089
81e895c0
AD
210902001-11-19 Akim Demaille <akim@epita.fr>
21091
21092 * src/conflicts.c (conflicts_print): Add a missing \n.
21093
6bb1878b
AD
210942001-11-19 Akim Demaille <akim@epita.fr>
21095
21096 * src/nullable.c (nullable_print): New.
21097 (set_nullable): Call it when tracing.
21098 Better locality of variables.
21099
d9ec2d07
AD
211002001-11-19 Akim Demaille <akim@epita.fr>
21101
21102 * src/print.c (print_actions): Better locality of variables.
21103
720e5c1b
AD
211042001-11-19 Akim Demaille <akim@epita.fr>
21105
21106 * src/derives.c (print_derives): Fix and enrich.
21107 * src/closure.c (print_fderives): Likewise.
21108
fb908786
AD
211092001-11-19 Akim Demaille <akim@epita.fr>
21110
21111 * src/closure.c (itemsetend): Remove, replaced with...
21112 (itemsetsize): new.
21113
125ecb56
AD
211142001-11-19 Akim Demaille <akim@epita.fr>
21115
21116 * src/LR0.c (kernel_end): Remove, replaced with...
21117 (kernel_size): new.
21118
d8cf039f
AD
211192001-11-19 Akim Demaille <akim@epita.fr>
21120
21121 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
21122 to clarify.
21123
7bec0760
AD
211242001-11-19 Akim Demaille <akim@epita.fr>
21125
21126 * src/closure.c (closure): Use arrays instead of pointers to clarify.
21127
c87d4863
AD
211282001-11-19 Akim Demaille <akim@epita.fr>
21129
21130 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
21131 trace messages.
21132 * src/LR0.c: Likewise.
21133 (allocate_itemsets): Use arrays instead of pointers to clarify.
21134
9bfe901c
AD
211352001-11-19 Akim Demaille <akim@epita.fr>
21136
21137 * src/getargs.c (statistics_flag): Replace with...
21138 (trace_flag): New.
21139 (longopts): Accept --trace instead of --statistics.
21140 * src/getargs.h, src/options.c: Adjust.
21141 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
21142 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
21143
97db7bd4
AD
211442001-11-19 Akim Demaille <akim@epita.fr>
21145
cc72668c 21146 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
97db7bd4
AD
21147 pointers to clarify the code.
21148 (save_reductions, save_shifts): Factor common parts of alternatives.
21149
2c5f66ed
AD
211502001-11-19 Akim Demaille <akim@epita.fr>
21151
21152 * src/LR0.c (new_state, get_state): Complete TRACE code.
21153 * src/closure.c: Include `reader.h' to get `tags', needed by the
21154 trace code.
21155 Rename the conditional DEBUG as TRACE.
21156 Output consistently TRACEs to stderr, not stdout.
21157 * src/derives.c: Likewise.
21158 * src/reduce.c: (inaccessable_symbols): Using if is better style
21159 than goto.
21160 Use `#if TRACE' instead of `#if 0' for tracing code.
21161
300f275f
AD
211622001-11-19 Akim Demaille <akim@epita.fr>
21163
21164 * src/system.h (LIST_FREE, shortcpy): New.
21165 * src/LR0.c: Use them.
21166 * src/output.c (free_itemsets, free_reductions, free_shifts):
21167 Remove, replaced by LIST_FREE.
21168
f59c437a
AD
211692001-11-19 Akim Demaille <akim@epita.fr>
21170
21171 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
21172 (REDUCTIONS_ALLOC): New.
21173 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
21174 allocation.
21175
6986fd9e
AD
211762001-11-19 Akim Demaille <akim@epita.fr>
21177
21178 * src/LR0.c (new_state): Complete trace code.
21179 * src/nullable.c (set_nullable): Don't translate traces.
21180
4bc30f78
AD
211812001-11-19 Akim Demaille <akim@epita.fr>
21182
21183 * src/print_graph.c (print_core): Better locality of variables.
21184 * src/print.c (print_core): Likewise.
21185
08a946e0
AD
211862001-11-19 Akim Demaille <akim@epita.fr>
21187
21188 * src/vcg.c: You do the output, so you are responsible of the
21189 handling of VCG syntax, in particular: use quotearg.
21190 * src/print_graph.c: Don't.
21191 (print_actions): Don't output the actions as part of the nodes,
21192 since that's the job of the edges.
21193 (print_state): Don't output by hand: fill the node description,
9bfe901c 21194 and ask for its output.
08a946e0 21195
f0473484
AD
211962001-11-19 Akim Demaille <akim@epita.fr>
21197
cc72668c
AD
21198 * src/bison.simple (yyparse): When verbosely reporting an error,
21199 no longer put additional quotes around token names.
f0473484
AD
21200 * tests/calc.at: Adjust.
21201
e41dc700
AD
212022001-11-19 Akim Demaille <akim@epita.fr>
21203
21204 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
21205 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
21206 * src/output.c: Adjust.
21207
652a871c
AD
212082001-11-19 Akim Demaille <akim@epita.fr>
21209
21210 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
21211 (rule_t): this.
21212 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
21213
b2ed6e58
AD
212142001-11-19 Akim Demaille <akim@epita.fr>
21215
21216 * src/gram.h (rule_t): New.
21217 (rule_table): New.
21218 (rrhs, rlhs): Remove, part of state_t.
21219 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
21220 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
21221 * src/reader.c, src/reduce.c: Adjust.
21222
edad7067
AD
212232001-11-19 Akim Demaille <akim@epita.fr>
21224
21225 * src/reader.c (symbols_output): New, extracted from...
21226 (packsymbols): Here.
21227 (reader): Call it.
21228
3feec034
AD
212292001-11-19 Akim Demaille <akim@epita.fr>
21230
21231 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
21232 (maxrhs): this new function.
21233
ddcd5fdf
AD
212342001-11-19 Akim Demaille <akim@epita.fr>
21235
cc72668c 21236 * src/lalr.c (F): New macro to access the variable F.
ddcd5fdf
AD
21237 Adjust.
21238
bb527fc2
AD
212392001-11-19 Akim Demaille <akim@epita.fr>
21240
cc72668c 21241 * src/lalr.h (LA): New macro to access the variable LA.
bb527fc2
AD
21242 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21243 * src/lalr.c: Adjust.
21244
a845a697
AD
212452001-11-19 Akim Demaille <akim@epita.fr>
21246
21247 * src/lalr.c (initialize_LA): Only initialize LA. Let...
21248 (set_state_table): handle the `lookaheads' members.
21249
f004bf6a
AD
212502001-11-19 Akim Demaille <akim@epita.fr>
21251
cc72668c
AD
21252 * src/lalr.h (lookaheads): Removed array, whose contents is now
21253 a member of...
f004bf6a
AD
21254 (state_t): this structure.
21255 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21256 Adjust.
21257
de326cc0
AD
212582001-11-19 Akim Demaille <akim@epita.fr>
21259
cc72668c
AD
21260 * src/lalr.h (consistent): Removed array, whose contents is now
21261 a member of...
de326cc0
AD
21262 (state_t): this structure.
21263 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21264 Adjust.
21265
90b4416b
AD
212662001-11-19 Akim Demaille <akim@epita.fr>
21267
cc72668c
AD
21268 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
21269 contents are now members of...
90b4416b
AD
21270 (state_t): this structure.
21271 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
21272 Adjust.
21273
9703cc49
AD
212742001-11-19 Akim Demaille <akim@epita.fr>
21275
21276 * src/lalr.h (state_t): New.
21277 (state_table): Be a state_t * instead of a core **.
21278 (accessing_symbol): Remove, part of state_t.
21279 * src/lalr.c: Adjust.
21280 (set_accessing_symbol): Merge into...
21281 (set_state_table): this.
21282 * src/print_graph.c, src/conflicts.c: Adjust.
21283
d803322e
AD
212842001-11-14 Akim Demaille <akim@epita.fr>
21285
21286 * tests/calc.at, tests/output.at, tests/regression.at,
21287 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
21288 now the tests are run in private dirs, therefore AC_CLEANUP and
21289 family can be simplified to 0-ary.
21290 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
21291 use abs. path to find config.h.
21292 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
21293 stderr, there can be way too much random noise.
21294 Instead pass -Werror to GCC and rely on the exit status.
21295 Reported by Wolfram Wagner.
21296
3d76b07d
AD
212972001-11-14 Akim Demaille <akim@epita.fr>
21298
21299 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
21300 defined only if yyoverflow is defined, to avoid `warning: unused
21301 variable `yyvs1''.
21302 Reported by The Test Suite.
21303
09b503c8
AD
213042001-11-14 Akim Demaille <akim@epita.fr>
21305
21306 * src/print.c: Include reduce.h.
21307 Reported by Hans Aberg.
21308
213092001-11-14 Akim Demaille <akim@epita.fr>
21310
21311 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
21312 Revert a previous patch: these are really const.
21313 * src/conflicts.c (conflict_report): Additional useless pair of
21314 braces to pacify GCC's warnings for `if () if () {} else {}'.
21315 * src/lex.c (parse_percent_token): Replace equal_offset with
21316 arg_offset.
21317 arg is const.
21318 Be sure to strdup `arg' when used, since there is no reason for
21319 token_buffer not to change.
21320
0f37a994
AD
213212001-11-14 Akim Demaille <akim@epita.fr>
21322
21323 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
21324 definition.
21325 * src/main.c (main): Use them.
21326 Suggested by Hans Aberg.
21327
d39d93b8
AD
213282001-11-12 Akim Demaille <akim@epita.fr>
21329
21330 * src/system.h (ngettext): Now that we use ngettext, be sure to
21331 provide a default definition when NLS are not used.
21332
9edcd895
AD
213332001-11-12 Akim Demaille <akim@epita.fr>
21334
21335 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
21336 Use @kbd to denote user input.
21337 (Language and Grammar): ANSIfy the example.
21338 Adjust its layout for info/notinfo.
21339 (Location Tracking Calc): Output error messages to stderr.
21340 Output locations in a more GNUtically correct way.
21341 Fix a couple of Englishos.
21342 Adjust @group/@end group pairs.
21343
7da99ede
AD
213442001-11-12 Akim Demaille <akim@epita.fr>
21345
e3aa65c5 21346 %expect was not functioning at all.
7da99ede
AD
21347
21348 * src/conflicts.c (expected_conflicts): Set to -1.
21349 (conflict_report): Use ngettext.
21350 (conflicts_print): Check %expect and make its violation an error.
21351 * doc/bison.texinfo (Expect Decl): Adjust.
21352 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
21353 * tests/regression.at (%expect not enough, %expect right)
21354 (%expect too much): New.
21355
ba9dda1a
AD
213562001-11-12 Akim Demaille <akim@epita.fr>
21357
21358 * tests/regression.at (Conflicts): Rename as...
21359 (Unresolved SR Conflicts): this.
21360 (Solved SR Conflicts): New.
21361
337c5bd1
AD
213622001-11-12 Akim Demaille <akim@epita.fr>
21363
21364 * src/reduce.c (print_results): Rename as...
21365 (reduce_output): This.
21366 Output to OUT, passed as argument, instead of output_obstack.
21367 (dump_grammar): Likewise.
21368 (reduce_free): New.
21369 Also free V1.
21370 (reduce_grammar): No longer call reduce_output, since...
21371 * src/print.c (print_results): do it.
21372 * src/main.c (main): Call reduce_free;
21373
c73a41af
AD
213742001-11-12 Akim Demaille <akim@epita.fr>
21375
21376 * src/conflicts.c (print_reductions): Accept OUT as argument.
21377 Output to it, not to output_obstack.
21378 * src/print.c (print_actions): Adjust.
21379
0df87bb6
AD
213802001-11-12 Akim Demaille <akim@epita.fr>
21381
21382 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
21383 the result instead of using...
21384 (src_total, rrc_total, src_count, rrc_count): Remove.
21385 (any_conflicts): Remove.
21386 (print_conflicts): Split into...
21387 (conflicts_print, conflicts_output): New.
21388 * src/conflicts.h: Adjust.
21389 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
0f37a994 21390 * src/print.c (print_grammar): Issue `\n' between two rules.
0df87bb6
AD
21391 * tests/regression.at (Conflicts): New.
21392 Reported by Tom Lane.
21393
e4d3d4de
AD
213942001-11-12 Akim Demaille <akim@epita.fr>
21395
21396 * tests/regression.at (Invalid input): Remove, duplicate with
21397 ``Invalid input: 1''.
21398
6d7d248e
AD
213992001-11-12 Akim Demaille <akim@epita.fr>
21400
21401 * tests/torture.at (AT_DATA_STACK_TORTURE)
21402 (Exploding the Stack Size with Alloca)
21403 (Exploding the Stack Size with Malloc): New.
21404
e9e4c321
AD
214052001-11-12 Akim Demaille <akim@epita.fr>
21406
21407 * src/bison.simple (YYSTACK_REALLOC): New.
21408 (yyparse) [!yyoverflow]: Use it and free the old stack.
0f37a994 21409 Reported by Per Allansson.
e9e4c321 21410
5f7e0832
AD
214112001-11-12 Pascal Bart <pascal.bart@epita.fr>
21412
21413 * src/bison.simple: Define type yystype instead of YYSTYPE, and
21414 define CPP macro, which substitute YYSTYPE by yystype.
21415 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
21416 with yyltype/YYLTYPE. This allows inclusion of the generated
21417 header within the parser if the compiler, such as GGC, accepts
21418 multiple equivalent #defines.
21419 From Akim.
21420
e3f1699f
AD
214212001-11-05 Akim Demaille <akim@epita.fr>
21422
21423 * src/reader.c (symbols_output): New, extracted from...
21424 (packsymbols): here.
21425 (reader): Adjust.
21426
65be0866
AD
214272001-11-05 Akim Demaille <akim@epita.fr>
21428
21429 * src/lex.c (parse_percent_token): s/quotearg/quote/.
21430
e4d910bf
AD
214312001-11-05 Akim Demaille <akim@epita.fr>
21432
21433 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
21434 pattern.
21435
951366c1
AD
214362001-11-05 Akim Demaille <akim@epita.fr>
21437
21438 * src/options.h (struct option_table_struct): set_flags is void*.
21439 * src/options.c (longopts): Support `--output' and `%output'.
21440 (usage): Adjust.
21441 * src/lex.h (tok_setopt): Remove, replaced with...
21442 (tok_intopt, tok_stropt): these new guys.
21443 * src/lex.c (getopt.h): Not needed.
21444 (token_buffer, unlexed_token_buffer): Not const.
21445 (percent_table): Promote `-' over `_' in directive names.
21446 Active `%name-prefix', `file-prefix', and `output'.
21447 (parse_percent_token): Accept possible arguments to directives.
21448 Promote `-' over `_' in directive names.
21449
d8988b2f
AD
214502001-11-04 Akim Demaille <akim@epita.fr>
21451
21452 * doc/bison.texinfo (Decl Summary): Split the list into
21453 `directives for grammars' and `directives for bison'.
21454 Sort'em.
21455 Add description of `%name-prefix', `file-prefix', and `output'.
21456 Promote `-' over `_' in directive names.
21457 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
21458 Simplify the description of `--name-prefix'.
21459 Promote `-' over `_' in directive names.
21460 Promote `--output' over `--output-file'.
21461 Fix the description of `--defines'.
21462 * tests/output.at: Exercise %file-prefix and %output.
21463
6468d18e
AD
214642001-11-02 Akim Demaille <akim@epita.fr>
21465
21466 * doc/refcard.tex: Update.
21467
6b7e85b9
AD
214682001-11-02 Akim Demaille <akim@epita.fr>
21469
21470 * src/symtab.h (SUNDEF): New.
21471 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
21472 stand for `uninitialized', instead of 0.
21473 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
21474 * src/lex.c (lex): Adjust.
21475
21476 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
21477 Number it 0.
21478 Let yylex return it instead of a plain 0.
21479 Reported by Dick Streefland.
21480
cd5aafcf
AD
214812001-11-02 Akim Demaille <akim@epita.fr>
21482
21483 * tests/regression.at (Mixing %token styles): New test.
21484
037ca2f1
AD
214852001-11-02 Akim Demaille <akim@epita.fr>
21486
21487 * src/reader.c (parse_thong_decl): Formatting changes.
21488 (token_translations_init): New, extracted from...
21489 (packsymbols): Here.
21490 Adjust.
21491
270a173c
AD
214922001-11-01 Akim Demaille <akim@epita.fr>
21493
21494 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
21495 Check that `9foo.y' produces correct cpp guards.
21496 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
21497 guards.
21498 Reported by Wwp.
21499
561f9a30
AD
215002001-11-01 Akim Demaille <akim@epita.fr>
21501
21502 * tests/regression.at (Invalid input: 2): New.
21503 * src/lex.c (unlexed_token_buffer): New.
21504 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
21505 too.
21506 Reported by Wwp.
21507
f987e9d2
AD
215082001-11-01 Akim Demaille <akim@epita.fr>
21509
21510 * tests/calc.at: Catch up with 1.30.
21511 * configure.in: Bump to 1.49a.
21512 Adjust to newer Autotest.
21513
0846f581
PB
215142001-10-19 Pascal Bart <pascal.bart@epita.fr>
21515
21516 * src/conflicts.c: Move global variables rrc_total and src_total ...
21517 (print_conflicts): here.
21518 * src/output.c (output): Free global variable user_toknums.
21519 * src/lex.c (token_obstack): Become static.
21520
3c1a79b3
AD
215212001-10-18 Akim Demaille <akim@epita.fr>
21522
21523 * tests/atlocal.in (GCC): Add.
21524 * tests/calc.at: s/m4_match/m4_bmatch/.
21525 s/m4_patsubst/m4_bpatsubst/.
21526 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
21527 * configure.in: AC_SUBST(GCC).
21528
5d52e7d0
MA
215292001-10-14 Marc Autret <autret_m@epita.fr>
21530
21531 * src/options.c (create_long_option_table): Fix.
21532
631aa1d3
AD
215332001-10-10 Akim Demaille <akim@epita.fr>
21534
21535 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
21536
f6ec6d13
AD
215372001-10-04 Akim Demaille <akim@epita.fr>
21538
21539 * src/reader.c (parse_union_decl): Push the caracters in
21540 union_obstack, not attrs_obstack.
21541
342b8b6e
AD
215422001-10-04 Akim Demaille <akim@epita.fr>
21543
21544 Merge in the branch 1.29.
21545
21546 * src/reader.c (packsymbols): Use a temporary obstack for
21547 `%%tokendef', since output_stack is already used elsewhere.
21548
21549 2001-10-02 Akim Demaille <akim@epita.fr>
21550
21551 Bump 1.29d.
21552
21553 2001-10-02 Akim Demaille <akim@epita.fr>
21554
21555 Version 1.29c.
21556
21557 2001-10-02 Akim Demaille <akim@epita.fr>
21558
21559 * tests/regression.at (Invalid CPP headers): New.
21560 From Alexander Belopolsky.
21561 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
21562
21563 2001-10-02 Akim Demaille <akim@epita.fr>
21564
21565 * tests/regression.at (Invalid input): New.
21566 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
21567 Reported by Shura.
21568
21569 2001-10-02 Akim Demaille <akim@epita.fr>
21570
21571 * tests/calc.at: Now that --debug works, the tests must be adjusted.
21572
21573 2001-10-02 Akim Demaille <akim@epita.fr>
21574
21575 * src/output.c (output_parser): Assert `skeleton'.
21576 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
21577 systems.
21578 From Shura.
21579
21580 2001-10-01 Marc Autret <autret_m@epita.fr>
21581
21582 * src/lex.h: Echo modifications.
21583 * src/lex.c (unlex): Parameter is now token_t.
21584 From Hans Aberg.
21585
21586 2001-10-01 Marc Autret <autret_m@epita.fr>
21587
21588 * src/main.c: Include lex.h.
21589 From Hans Aberg.
21590
21591 2001-09-29 Akim Demaille <akim@epita.fr>
21592
21593 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
21594
21595 2001-09-28 Akim Demaille <akim@epita.fr>
21596
21597 * tests/testsuite.at: Update to newer Autotest.
21598 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
21599
21600 2001-09-27 Akim Demaille <akim@epita.fr>
21601
21602 Position independent wrapper.
21603
21604 * tests/bison: Remove.
21605 * tests/bison.in: New.
21606 * configure.in: Adjust.
21607
21608 2001-09-27 Paul Eggert <eggert@twinsun.com>
21609
21610 Port quotearg fixes from tar 1.13.24.
21611
21612 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21613 tm to be declared.
21614 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21615 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21616
21617 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
21618 * m4/mbrtowc.m4: New file.
21619 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
21620 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
21621
21622 2001-09-27 Akim Demaille <akim@epita.fr>
21623
21624 Bump to 1.29c.
21625
21626 2001-09-27 Akim Demaille <akim@epita.fr>
21627
21628 Version 1.29b.
21629
21630 2001-09-25 Akim Demaille <akim@epita.fr>
21631
21632 * src/system.h: Include `xalloc.h'.
21633 Remove it from the C files.
21634 * src/files.c (output_files): Free the obstacks.
21635 * src/lex.c (init_lex): Rename as...
21636 (lex_init): this.
21637 (lex_free): New.
21638 * src/main.c (main): Use it.
21639
21640 2001-09-24 Marc Autret <autret_m@epita.fr>
21641
21642 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
21643 to output informations in fout (FILE*).
21644 (open_graph, close_graph): Likewise.
21645 (output_graph, output_edge, output_node): Likewise.
21646 * src/vcg.h: Update function prototypes.
21647 * src/print_graph.c (print_graph): Open output graph file.
21648 (print_actions): Adjust.
21649 * src/files.h: Remove extern declaration.
21650 * src/files.c: Remove graph_obstack declaration.
21651 (open_files): Remove graph_obstack initialization.
21652 (output_files): Remove graph_obstack saving.
21653
21654 2001-09-24 Marc Autret <autret_m@epita.fr>
21655
21656 * src/files.c (compute_output_file_names): Fix.
21657
21658 2001-09-24 Marc Autret <autret_m@epita.fr>,
21659 Akim Demaille <akim@epita.fr>
21660
21661 * src/reader.c (reader): Remove call to free_symtab ().
21662 * src/main.c (main): Call it here.
21663 Include symtab.h.
21664 * src/conflicts.c (initialize_conflicts): Rename as...
21665 (solve_conflicts): this.
21666 * src/print.c (print_core, print_actions, print_state)
21667 (print_grammar): Dump to a file instead a `output_obstack'.
21668 (print_results): Dump `output_obstack', and then proceed with the
21669 FILE *.
21670 * src/files.c (compute_output_file_names, close_files): New.
21671 (output_files): Adjust.
21672 * src/main.c (main): Adjust.
21673
21674 2001-09-23 Marc Autret <autret_m@epita.fr>
21675
21676 * src/files.c (compute_header_macro): Computes header macro name
21677 from spec_defines_file when given.
21678
21679 2001-09-23 Marc Autret <autret_m@epita.fr>
21680
21681 * src/files.c (output_files): Add default extensions.
21682
21683 2001-09-22 Akim Demaille <akim@epita.fr>
21684
21685 * src/conflicts.c (finalize_conflicts): Rename as...
21686 (free_conflicts): this.
21687
21688 2001-09-22 Akim Demaille <akim@epita.fr>
21689
21690 * src/gram.c (gram_free): Rename back as...
21691 (dummy): this.
21692 (output_token_translations): Free `token_translations'.
21693 * src/symtab.c (free_symtab): Free the tag field.
21694
21695 2001-09-22 Akim Demaille <akim@epita.fr>
21696
21697 Remove `translations' as it is always set to true.
21698
21699 * src/gram.h: Adjust.
21700 * src/reader.c (packsymbols, parse_token_decl): Adjust
21701 * src/print.c (print_grammar): Adjust.
21702 * src/output.c (output_token_translations): Adjust.
21703 * src/lex.c (lex): Adjust.
21704 * src/gram.c: Be sure the set pointers to NULL.
21705 (dummy): Rename as...
21706 (gram_free): this.
21707
21708 2001-09-22 Akim Demaille <akim@epita.fr>
21709
21710 * configure.in: Invoke AM_LIB_DMALLOC.
21711 * src/system.h: Use dmalloc.
21712 * src/LR0.c: Be sure to have pointers initialized to NULL.
21713 (allocate_itemsets): Allocate kernel_items only if needed.
21714
21715 2001-09-22 Akim Demaille <akim@epita.fr>
21716
21717 * configure.in: Bump to 1.29b.
21718 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
21719 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
21720 need xmalloc.c in calc.y.
21721 From Pascal Bart.
21722
21723 2001-09-21 Akim Demaille <akim@epita.fr>
21724
21725 Version 1.29a.
21726 * Makefile.maint, config/config.guess, config/config.sub,
21727 * config/missing: Update from masters.
21728 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
21729 upon package.m4.
21730 * configure.in (ALL_LINGUAS): Add `tr'.
21731
21732 2001-09-21 Akim Demaille <akim@epita.fr>
21733
21734 * tests/Makefile.am (package.m4): Move to...
21735 ($(srcdir)/$(TESTSUITE)): here.
21736
21737 2001-09-20 Akim Demaille <akim@epita.fr>
21738
21739 * src/complain.c: No longer try to be standalone: use system.h.
21740 Don't assume __STDC__ is defined to 1. Just test if it is defined.
21741 * src/complain.h: Likewise.
21742 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
21743 Remove the unused variable `n'.
21744 From Albert Chin-A-Young.
21745
21746 2001-09-18 Marc Autret <autret_m@epita.fr>
21747
21748 * doc/bison.1: Update.
21749 * doc/bison.texinfo (Bison Options): Update --defines and --graph
21750 descriptions.
21751 (Option Cross Key): Update.
21752 Add --graph.
21753
21754 2001-09-18 Marc Autret <autret_m@epita.fr>
21755
21756 * tests/regression.at: New test (comment in %union).
21757
21758 2001-09-18 Marc Autret <autret_m@epita.fr>
21759
21760 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
21761 do that.
21762 Reported by Keith Browne.
21763
21764 2001-09-18 Marc Autret <autret_m@epita.fr>
21765
21766 * tests/output.at: Add tests for --defines and --graph.
21767
21768 2001-09-18 Marc Autret <autret_m@epita.fr>
21769
21770 * tests/output.at: Removes tests of %{header,src}_extension features.
21771
21772 2001-09-18 Akim Demaille <akim@epita.fr>
21773
21774 * tests/Makefile.am (package.m4): New.
21775 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
21776 (_AT_CHECK_CALC_ERROR): Likewise.
21777 Factor the `, ' part of verbose error messages.
21778
21779 2001-09-18 Marc Autret <autret_m@epita.fr>
21780
21781 * src/getargs.c (longopts): Declare --defines and --graph as options
21782 with optional arguments.
21783 * src/files.h: Add extern declarations.
21784 * src/files.c (spec_graph_file, spec_defines_file): New.
21785 (output_files): Update.
21786 Remove CPP-outed code.
21787
21788 2001-09-18 Marc Autret <autret_m@epita.fr>
21789
21790 Turn off %{source,header}_extension feature.
21791
21792 * src/files.c (compute_exts_from_gf): Update.
21793 (compute_exts_from_src): Update.
21794 (output_files): CPP-out useless code.
21795 * src/files.h: Remove {header,source}_extension extern declarations.
21796 * src/reader.c (parse_dquoted_param): CPP-out.
21797 (parse_header_extension_decl): Remove.
21798 (parse_source_extension_decl): Remove.
21799 (read_declarations): Remove cases tok_{hdrext,srcext}.
21800 * src/lex.c (percent_table): Remove {header,source}_extension entries.
21801 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
21802
21803 2001-09-10 Akim Demaille <akim@epita.fr>
21804
21805 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
21806 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
21807 (AT_CHECK_OUTPUT): this.
21808 Merely check ls' exit status, its output is useless.
21809
21810 2001-09-10 Akim Demaille <akim@epita.fr>
21811
21812 * tests/calc.at: Use m4_match.
21813 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
21814
21815 2001-09-10 Marc Autret <autret_m@epita.fr>,
21816 Akim Demaille <akim@epita.fr>
21817
21818 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
21819 enum color_e.
21820 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
21821 to `normal'.
21822 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
21823 * src/lex.h: Adjust prototype.
21824 (token_t): Add `tok_undef'.
21825 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
21826 (parse_percent_token): Now returns token_t.
21827 Add default statement in switch.
21828 (lex): Separate `c' as an input variable, from the token_t result
21829 part.
21830 (unlexed): Is a token_t.
21831
21832 2001-09-10 Akim Demaille <akim@epita.fr>
21833
21834 * configure.in: Bump to 1.29a.
21835
21836 2001-09-07 Akim Demaille <akim@epita.fr>
21837
21838 Version 1.29.
21839
21840 2001-08-30 Akim Demaille <akim@epita.fr>
21841
21842 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
21843 * m4/atconfig.m4: Remove.
21844 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
21845 * tests/bison: New.
21846 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
21847 m4_if, m4_patsubst, and m4_regexp.
21848 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
21849 `input' file instead of echo.
21850
21851 2001-08-29 Akim Demaille <akim@epita.fr>
21852
21853 Bump to 1.28e.
21854
21855 2001-08-29 Akim Demaille <akim@epita.fr>
21856
21857 Version 1.28d.
21858
21859 2001-08-29 Paul Eggert <eggert@twinsun.com>
21860
21861 * src/bison.simple (yyparse): Don't take the address of an
21862 item before the start of an array, as that doesn't conform to
21863 the C Standard.
21864
21865 2001-08-29 Robert Anisko <anisko_r@epita.fr>
21866
21867 * doc/bison.texinfo (Location Tracking Calc): New node.
21868
21869 2001-08-29 Paul Eggert <eggert@twinsun.com>
21870
21871 * src/output.c (output): Do not define const, as this now
21872 causes more problems than it cures.
21873
21874 2001-08-29 Akim Demaille <akim@epita.fr>
21875
21876 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
21877 the nodes.
21878 Be sure to tag the `detailmenu'.
21879
21880 2001-08-29 Akim Demaille <akim@epita.fr>
21881
21882 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
21883 download in a tmp dir.
21884
21885 2001-08-28 Marc Autret <autret_m@epita.fr>
21886
21887 * config/depcomp: New file.
21888
21889 2001-08-28 Marc Autret <autret_m@epita.fr>
21890
21891 * doc/bison.1 (mandoc): Adjust.
21892 From Juan Manuel Guerrero.
21893
21894 2001-08-28 Marc Autret <autret_m@epita.fr>
21895
21896 * src/print_graph.c (print_state): Fix.
21897
21898 2001-08-27 Marc Autret <autret_m@epita.fr>
21899
21900 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
21901 char * members.
21902 Echo modifications to the functions prototypes.
21903 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
21904
21905 2001-08-27 Marc Autret <autret_m@epita.fr>
21906
21907 * src/vcg.c: Include `xalloc.h'.
21908 (add_colorentry): New.
21909 (add_classname): New.
21910 (add_infoname): New.
21911 * src/vcg.h: Add new prototypes.
21912
21913 2001-08-27 Akim Demaille <akim@epita.fr>
21914
21915 * Makefile.maint: Sync. again with CVS Autoconf.
21916
21917 2001-08-27 Akim Demaille <akim@epita.fr>
21918
21919 * Makefile.maint: Formatting changes.
21920 (po-update, cvs-update, update): New targets.
21921 (AMTAR): Remove.
21922
21923 2001-08-27 Akim Demaille <akim@epita.fr>
21924
21925 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
21926 * Makefile.maint: Sync. with CVS Autoconf.
21927
21928 2001-08-27 Marc Autret <autret_m@epita.fr>
21929
21930 * src/vcg.h (struct infoname_s): New.
21931 (struct colorentry_s): New.
21932 (graph_s): New fields {vertical,horizontal}_order in structure.
21933 Add `infoname' field.
21934 Add `colorentry' field;
21935 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
21936 (G_HORIZONTAL_ORDER): New.
21937 (G_INFONAME): New.
21938 (G_COLORENTRY): New.
21939 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
21940 Add output of `infoname'.
21941 Add output of `colorentry'.
21942
21943 2001-08-27 Marc Autret <autret_m@epita.fr>
21944
21945 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
21946 This one shadowed a global parameter.
21947
21948 2001-08-24 Marc Autret <autret_m@epita.fr>
21949
21950 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
21951 instead of `unsigned'.
21952 (print_state): Do not call obstack_object_size () in obstack_grow ()
21953 to avoid macro variables shadowing.
21954
21955 2001-08-23 Marc Autret <autret_m@epita.fr>
21956
21957 * src/lex.c (percent_table): Typo: s/naem/name/.
21958 Add graph option.
21959 Normalize new options declarations.
21960
21961 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
21962
21963 * tests/suite.at: Exercise %header_extension and %source_extension.
21964
21965 2001-08-16 Marc Autret <autret_m@epita.fr>
21966
21967 * src/reader.c (parse_dquoted_param): New.
21968 (parse_header_extension_decl): Use it.
21969 (parse_source_extension_decl): Likewise.
21970
21971 2001-08-16 Marc Autret <autret_m@epita.fr>
21972
21973 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
21974 (get_xxxx_str): Use assert () instead of complain ().
21975 Remove return invokations in default cases.
21976 (get_decision_str): Modify default behaviour. Remove second argument.
21977 Echo modifications on calls.
21978 (output_graph): Fix.
21979
21980 2001-08-16 Marc Autret <autret_m@epita.fr>
21981
21982 * src/getargs.c (usage): Update with ``-g, --graph''.
21983
21984 2001-08-16 Marc Autret <autret_m@epita.fr>
21985
21986 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
21987 (Option Cross Key): Likewise.
21988 * doc/bison.1: Update.
21989
1c8c2190
PB
219902001-09-25 Pascal Bart <pascal.bart@epita.fr>
21991
21992 * src/output.c (output_master_parser): Don't finish action_obstack.
21993 (output_parser): Don't care about the muscle action, here.
21994 (prepare): Copy the action_obstack in the action muscle.
21995 (output): Free action_obstack.
21996
180d45ba
PB
219972001-09-23 Pascal Bart <pascal.bart@epita.fr>
21998
21999 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
22000 will contain `%union' declaration.
22001 (parse_union_decl): Delete #line directive output.
22002 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
22003 informations about %union.
22004 (parse_union_decl): Copy the union_obstack in the muscle stype.
22005 * src/bison.simple: Add new #line directive.
22006 Add typdef %%stype YYSTYPE.
22007
c51d1a19
PB
220082001-09-23 Pascal Bart <pascal.bart@epita.fr>
22009
22010 * src/bison.simple: Add new `#line' directive.
22011
6f9344da
PB
220122001-09-22 Pascal Bart <pascal.bart@epita.fr>
22013
22014 * src/bison.simple: New `#line' directive.
22015 * src/output.c (output_parser): Support new dynamic muscle input_line.
22016
652def80
MA
220172001-09-22 Marc Autret <autret_m@epita.fr>
22018
22019 * src/output.c (output_master_parser): New.
22020 (output_parser): Be more re-entrant.
22021
25b222fa
MA
220222001-09-21 Marc Autret <autret_m@epita.fr>
22023
22024 * src/reader.c (copy_definition, parse_union_decl): Update and use
22025 `linef' muscle.
22026 (copy_action): Likewise.
22027 Use obstack_1grow ().
22028 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
22029
6bc35ae5
MA
220302001-09-21 Marc Autret <autret_m@epita.fr>
22031
22032 * src/options.c (option_table): Adjust.
22033 * src/lex.c (parse_percent_token): Fix.
22034
c0629aa1
PB
220352001-09-20 Pascal Bart <pascal.bart@epita.fr>
22036
22037 * src/options.c (symtab.h): Include it, need by lex.h.
342b8b6e 22038
82b6d266
PB
220392001-09-20 Pascal Bart <pascal.bart@epita.fr>
22040
22041 * src/lex.c (parse_percent_token): Change type of variable `tx', which
22042 is now an option_table_struct*.
22043 (option_strcmp): New function option_strcmp.
22044 (parse_percent_token): Call option_strcmp.
22045 * src/getargs.c (xalloc.h, options.h): Include it.
22046 (getargs): Call create_long_option_table.
22047 (getargs): Free longopts at the end of the function.
22048 (shortopts): Move in options.c.
22049 * src/options.c (create_long_option_table): New function. Convert
22050 information from option_table to option structure.
22051 * src/reader.c (options.h): Include it.
22052
22053 * src/Makefile.am: Adjust.
22054 * src/options.c (option_table): Create from longopts and percent_table.
22055 * src/getargs.c (longopts): Delete.
22056 * src/lex.c (struct percent_table_struct): Delete.
22057 (percent_table): Delete.
22058 (options.h): Include it.
22059 * src/options.c: Create.
22060 * src/options.h: Create.
22061 Declare enum opt_access_e.
22062 Define struct option_table_struct.
22063
75f5aaea
MA
220642001-09-20 Marc Autret <autret_m@epita.fr>
22065
22066 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
22067 sections of Bison.
22068
f508cb0a
PB
220692001-09-19 Pascal Bart <pascal.bart@epita.fr>
22070
22071 * src/bison.simple: s/%%filename/%%skeleton.
22072 * src/muscle_tab.c (getargs.h): Include it.
22073 (muscle_init): Insert new muscle skeleton.
22074
13105fc1
PB
220752001-09-18 Pascal Bart <pascal.bart@epita.fr>
22076
22077 * src/output.c (output_parser): Delete unused variable actions_dumped.
22078
b0c4483e
PB
220792001-09-07 Pascal Bart <pascal.bart@epita.fr>
22080
22081 * src/output.c (output): Delete call to reader_output_yylsp.
22082 * src/reader.c (reader): Likewise.
ba0fe3c7 22083 * src/reader.h: Delete declaration of reader_output_yylsp.
342b8b6e 22084
11d82f03
MA
220852001-09-02 Marc Autret <autret_m@epita.fr>
22086
22087 * src/reader.c: Include muscle_tab.h.
22088 (parse_union_decl): Update.
22089 (parse_macro_decl): Rename parse_muscle_decl.
22090 Update to use renamed functions and variable.
22091 (read_declarations, copy_action, read_additionnal_code, : Updated
22092 with correct variables and functions names.
22093 (packsymbols, reader): Likewise.
342b8b6e 22094
11d82f03 22095 * src/reader.h (muscle_obstack): Extern declaration update.
342b8b6e 22096
11d82f03
MA
22097 * src/output.c: Include muscle_tab.h
22098 In all functions using macro_insert, change by using muscle_insert ().
22099 (macro_obstack): Rename muscle_obstack.
22100 Echo modifications in the whole file.
22101 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
22102 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
22103 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
22104
22105 * src/muscle_tab.h: Update double inclusion macros.
22106 (macro_entry_s): Rename muscle_entry_s.
22107 Update prototypes.
342b8b6e 22108
11d82f03
MA
22109 * src/muscle_tab.c: Include muscle_tab.h.
22110 Rename macro_tabble to muscle_table.
22111 (mhash1, mhash2, mcmp): Use muscle_entry.
22112 (macro_init): Rename muscle_init. Update.
22113 (macro_insert): Rename muscle_insert. Update.
22114 (macro_find): Rename muscle_find. Update.
22115
22116 * src/main.c: Include muscle_tab.h.
22117 (main): Call muscle_init ().
22118 * src/Makefile.am (bison_SOURCES): Echo modifications.
22119
93a37297
MA
221202001-09-02 Marc Autret <autret_m@epita.fr>
22121
f753cd62 22122 Now the files macro_tab.[ch] are named muscle_tab.[ch].
342b8b6e 22123
f753cd62
MA
22124 * src/muscle_tab.c, src/muscle_tab.h: Add files.
22125
221262001-09-02 Marc Autret <autret_m@epita.fr>
22127
22128 * src/macrotab.c, src/macrotab.h: Remove.
93a37297 22129
682d48cd
PB
221302001-09-01 Pascal Bart <pascal.bart@epita.fr>
22131
342b8b6e 22132 * src/reader.c (copy_guard): Use muscle to specify the `#line'
682d48cd
PB
22133 filename.
22134
087c8fda
MA
221352001-09-01 Marc Autret <autret_m@epita.fr>
22136
22137 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
22138 to an explicit value to activate the feature. We do it here.
22139
dda680cb
PB
221402001-08-31 Pascal Bart <pascal.bart@epita.fr>
22141
22142 * src/output.c (prepare): Delete the `filename' muscule insertion.
22143 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
22144 (parse_union_decl): Likewise.
22145 * src/macrotab.c (macro_init): Initialize filename by infile.
22146
9e644e64
MA
221472001-08-31 Marc Autret <autret_m@epita.fr>
22148
22149 * src/bison.simple (YYLSP_NEEDED): New definition.
22150 * src/output.c (prepare): Add macro insertion of `locations_flag'
22151
17da6427
PB
221522001-08-31 Pascal Bart <pascal.bart@epita.fr>
22153
22154 * src/output.c (prepare): Delete insertion of previous muscles,
22155 and insert the `prefix' muscles.
22156 * src/macrotab.c (macro_init): Likewise.
22157 (macro_init): Initialization prefix directive by `yy'.
342b8b6e 22158 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
17da6427
PB
22159 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
22160 yylval, yydebug, yyerror, yynerrs and yyparse.
342b8b6e 22161 New directive `#define' to substitute yydebug, ... with option
17da6427
PB
22162 name_prefix.
22163
e8cb70b9
PB
221642001-08-31 Pascal Bart <pascal.bart@epita.fr>
22165
22166 * src/main.c (main): Standardize.
22167 * src/output.c (output_table_data, output_parser): Likewise.
22168 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
22169
63c2d5de
MA
221702001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
22171
342b8b6e 22172 * src/reader.c (read_additionnal_code): Rename %%user_code to
63c2d5de
MA
22173 %%epilogue.
22174 * src/output.c (output): Rename %%declarations to %%prologue.
22175 * src/bison.simple: Echo modifications.
342b8b6e 22176
d8cb5183
MA
221772001-08-31 Marc Autret <autret_m@epita.fr>
22178
22179 * src/reader.c (readgram): CleanUp.
22180 (output_token_defines): Likewise.
22181 (packsymbols): Likewise.
22182 (reader): Likewise.
22183 * src/output.c (output): CPP-out useless code.
22184
6c686258
PB
221852001-08-31 Pascal Bart <pascal.bart@epita.fr>
22186
342b8b6e 22187 * src/reader.c (reader): Delete obsolete call to function
6c686258
PB
22188 output_trailers and output_headers.
22189 * src/output.h: Remove obsolete functions prototypes of output_headers
22190 and output_trailers.
22191
8f451ef7
PB
221922001-08-30 Pascal Bart <pascal.bart@epita.fr>
22193
22194 * src/main.c: Include macrotab.h.
342b8b6e 22195 * src/macrotab.h (macro_entry_s): Constify fields.
8f451ef7
PB
22196 Adjust functions prototypes.
22197 * src/macrotab.c (macro_insert): Constify key and value.
22198 (macro_find): Constify key.
22199 (macro_insert): Include 'xalloc.h'
22200 (macro_insert): Use XMALLOC.
22201 (macro_find): Constify return value.
22202 * src/output.c (output_table_data): Rename table to table_data.
22203 (output_parser): Constify macro_key, macro_value.
22204
997b6fd0 222052001-08-30 Marc Autret <autret_m@epita.fr>
2ba3b73c
MA
22206
22207 * src/reader.c (parse_skel_decl): New.
342b8b6e 22208 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
2ba3b73c
MA
22209 * src/lex.h (token_t): New token `tok_skel'.
22210 * src/lex.c (percent_table): Add skeleton option entry.
22211 Standardize.
22212
ff48177d
MA
222132001-08-29 Marc Autret <autret_m@epita.fr>
22214
22215 * src/bison.simple: Add %%user_code directive at the end.
22216 * src/reader.c (read_additionnal_code): New.
22217 (reader): Use it.
22218 * src/output.c (output_program): Remove.
22219 (output): Update.
22220
b33160bf
MA
222212001-08-28 Marc Autret <autret_m@epita.fr>
22222
22223 * src/output.c (output_actions): Clean up.
4e5caae2 22224 (output_gram): CPP-out useless code.
b33160bf
MA
22225 * src/reader.c (reader): Clean up, CPP-out useless code.
22226
d1a2daf7
PB
222272001-08-28 Pascal Bart <pascal.bart@epita.fr>
22228
342b8b6e 22229 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
535c0e75 22230 directive.
d1a2daf7
PB
22231 * src/bison.simple: Add `%%definitions'.
22232
2b763dfe
MA
222332001-08-28 Marc Autret <autret_m@epita.fr>
22234
22235 * config/depcomp: New file.
22236
f1a87ef6
PE
222372001-08-27 Paul Eggert <eggert@twinsun.com>
22238
22239 * src/bison.simple (yyparse): Don't take the address of an
22240 item before the start of an array, as that doesn't conform to
22241 the C Standard.
22242
82e236e2
RA
222432001-08-27 Robert Anisko <robert.anisko@epita.fr>
22244
f1a87ef6 22245 * src/output.c (output): Remove the initialization of the macro
82e236e2
RA
22246 obstack. It was done too late here.
22247
22248 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
22249 completely wrong.
22250 (reader): Initialize the macro obstack here, since we need it to grow
22251 '%define' directives.
22252
22253 * src/reader.h: Declare the macro obstack as extern.
22254
b0cfa28a
RA
222552001-08-27 Robert Anisko <robert.anisko@epita.fr>
22256
22257 * src/output.c (output_parser): Fix. Store single '%' characters in
22258 the output obstack instead of throwing them away.
22259
6fc74234
AD
222602001-08-27 Akim Demaille <akim@epita.fr>
22261
22262 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
22263
9c76d118
RA
222642001-08-25 Robert Anisko <robert.anisko@epita.fr>
22265
22266 * lib/Makefile.am: Adjust.
22267
a8289c62
RA
222682001-08-25 Robert Anisko <robert.anisko@epita.fr>
22269
22270 * src/bison.simple: Update and add '%%' directives.
22271
b6610515
RA
222722001-08-25 Robert Anisko <robert.anisko@epita.fr>
22273
22274 * src/reader.c (reader): Remove calls to 'output_headers' and
22275 'output_trailers'. Remove some C output.
22276 (readgram): Disable a piece of code that was writing a default
22277 definition for 'YYSTYPE'.
22278 (reader_output_yylsp): Remove.
22279 (packsymbols): Output token defintions to a macro.
22280 (copy_definition): Disable C output.
6fc74234 22281
b6610515
RA
22282 * src/reader.c (parse_macro_decl): New function used to parse macro
22283 declarations.
22284 (copy_string2): Put the body of copy_string into this new function.
22285 Add a parameter to let the caller choose whether he wants to copy the
22286 string delimiters or not.
22287 (copy_string): Be a simple call to copy_string2 with the last argument
22288 bound to true.
22289 (read_declarations): Add case for macro definition.
22290 (copy_identifier): New.
6fc74234 22291 (parse_macro_decl): Read macro identifiers using copy_identifier
b6610515
RA
22292 rather than lex.
22293
26f609ff
RA
222942001-08-25 Robert Anisko <robert.anisko@epita.fr>
22295
22296 * src/output.c (prepare): Add prefixed names.
22297 (output_parser): Output semantic actions.
22298 (output_parser): Fix bug on '%%line' directives.
6fc74234 22299
26f609ff
RA
22300 * src/output.c (output_headers): Remove. The C code printed by this
22301 function should now be in the skeletons.
22302 (output_trailers): Remove.
22303 (output): Disable call to 'reader_output_yylsp'.
22304 (output_rule_data): Do not output tables to the table obstack.
22305
22306 * src/output.c: Remove some C dedicated output.
22307 Improve the use of macro and output obstacks.
22308 (output_defines): Remove.
6fc74234 22309
26f609ff
RA
22310 * src/output.c (output_token_translations): Associate 'translate'
22311 table with a macro. No output to the table obstack.
22312 (output_gram): Same for 'rhs' and 'prhs'.
22313 (output_stos): Same for 'stos'.
22314 (output_rule_data): Same for 'r1' and 'r2'.
22315 (token_actions): Same for 'defact'.
22316 (goto_actions): Same for 'defgoto'.
22317 (output_base): Same for 'pact' and 'pgoto'.
22318 (output_table): Same for 'table'.
22319 (output_check): Same for 'check'.
6fc74234 22320
26f609ff
RA
22321 * src/output.c (output_table_data): New function.
22322 (output_short_table): Remove.
22323 (output_short_or_char_table): Remove.
6fc74234 22324
26f609ff
RA
22325 * src/output.c (output_parser): Replace most of the skeleton copy code
22326 with something new. Skeletons are now processed character by character
22327 rather than line by line, and Bison looks for '%%' macros. This is the
22328 first step in making Bison's output process (a lot) more flexible.
22329 (output_parser): Use the macro table.
22330
6f43b113
RA
223312001-08-25 Robert Anisko <robert.anisko@epita.fr>
22332
22333 * src/main.c (main): Initialize the macro table.
22334
dd3127cf
RA
223352001-08-25 Robert Anisko <robert.anisko@epita.fr>
22336
22337 * src/lex.c (percent_table): Add tok_define.
22338 * src/lex.h: Add tok_define.
22339
aa321494
RA
223402001-08-25 Robert Anisko <robert.anisko@epita.fr>
22341
22342 * src/macrotab.c: New file.
22343 * src/macrotab.h: New file.
22344 * src/Makefile.am: Update.
22345
68bd3b6b
RA
223462001-08-25 Robert Anisko <robert.anisko@epita.fr>
22347
22348 * lib/hash.c: New file.
22349 * lib/hash.h: New file.
22350 * lib/Makefile.am: Update.
22351
45f8dd1e
AD
223522001-08-15 Akim Demaille <akim@epita.fr>
22353
22354 Version 1.28c.
22355
40a64a7a 223562001-08-15 Marc Autret <autret_m@epita.fr>
0b8afb77
AD
22357
22358 * src/reader.c (readgram): Indent output macro YYSTYPE.
22359 (packsymbols): Likewise.
22360 (output_token_defines): Likewise.
22361 * src/files.c: Standardize.
22362 (compute_header_macro): New.
22363 (defines_obstack_save): New. Use compute_header_macro.
22364 (output_files): Update. Use defines_obstack_save.
22365
f9a8293a
AD
223662001-08-15 Akim Demaille <akim@epita.fr>
22367
22368 * doc/bison.texinfo (Table of Symbols): Document
22369 YYSTACK_USE_ALLOCA.
22370
150ca7a7
AD
223712001-08-15 Akim Demaille <akim@epita.fr>
22372
22373 * missing: Update from CVS Automake.
22374 * config/config.guess, config/config.sub, config/texinfo.tex:
22375 Update from gnu.org.
22376
69b5cec4
AD
223772001-08-15 Akim Demaille <akim@epita.fr>
22378
22379 * Makefile.maint: Sync with CVS Autoconf.
22380
f2b5126e
PB
223812001-08-14 Pascal Bart <pascal.bart@epita.fr>
22382
69b5cec4 22383 * doc/bison.texinfo: Include GNU Free Documentation License from
f2b5126e
PB
22384 `fdl.texi'.
22385 * doc/fdl.texi: Add to package.
22386
4ecbf796
MA
223872001-08-14 Marc Autret <autret_m@epita.fr>
22388
22389 Turn on %{source,header}_extension features.
22390
69b5cec4 22391 * src/lex.c (percent_table): Un-CPP out header_extension and
4ecbf796
MA
22392 source_extension.
22393 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
69b5cec4 22394 (compute_exts_from_src): Remove conditions. It restores priorities
4ecbf796
MA
22395 between options.
22396
95fb5662
MA
223972001-08-14 Marc Autret <autret_m@epita.fr>
22398
22399 * src/files.c (compute_base_names): Add extensions computing when
22400 `--file-prefix' used.
22401 Standardize function calls.
22402
78d09da9
MA
224032001-08-13 Marc Autret <autret_m@epita.fr>
22404
69b5cec4 22405 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
78d09da9
MA
22406 defining it (defined but null disables alloca).
22407
5a009f2c
MA
224082001-08-13 Marc Autret <autret_m@epita.fr>
22409
22410 * src/bison.simple (_yy_memcpy): CPP reformat.
22411
1e41465a
PB
224122001-08-13 Pascal Bart <pascal.bart@epita.fr>
22413
22414 * tests/atconfig.in (CPPFLAGS): Fix.
22415
c67a198d
PB
224162001-08-10 Pascal Bart <pascal.bart@epita.fr>
22417
79282c6c 22418 * doc/bison.texinfo: Include GNU General Public License from
c67a198d
PB
22419 `gpl.texi'.
22420 * doc/gpl.texi: Add to package.
22421
09a6de7e
MA
224222001-08-10 Marc Autret <autret_m@epita.fr>
22423
22424 * src/print_graph.h: Fix.
22425 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
22426
b77b9ee0
AD
224272001-08-10 Akim Demaille <akim@epita.fr>
22428
22429 * src/system.h: Provide default declarations for stpcpy, strndup,
22430 and strnlen.
22431
3e259915
MA
224322001-08-10 Robert Anisko <anisko_r@epita.fr>
22433
22434 * doc/bison.texinfo (Locations): Update @$ stuff.
22435
ca96bc2d
MA
224362001-08-09 Robert Anisko <anisko_r@epita.fr>
22437
22438 * src/bison.simple (YYLLOC_DEFAULT): Update.
22439 (yyparse): Adjust.
22440
fdc6758b
MA
224412001-08-08 Marc Autret <autret_m@epita.fr>
22442
b77b9ee0 22443 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
fdc6758b
MA
22444 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
22445 Reported by Fabrice Bauzac.
957d4dbf 22446
600cad3b
MA
224472001-08-08 Marc Autret <autret_m@epita.fr>
22448
22449 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
22450 * src/vcg.c (output_node): Fix.
22451 * src/vcg.h: Cleanup.
22452 * src/print_graph.c: Add comments.
b77b9ee0 22453 (node_output_size): New global variable. Simplify the formatting of
600cad3b 22454 the VCG graph output.
b77b9ee0 22455 (print_actions): Unused code is now used. It notifies the final state
600cad3b 22456 and no action states in the VCG graph. It also give the reduce actions.
b77b9ee0 22457 The `shift and goto' edges are red and the `go to state' edges are
600cad3b
MA
22458 blue.
22459 Get the current node name and node_obstack by argument.
22460 (node_obstack): New variable.
22461 (print_state): Manage node_obstack.
22462 (print_core): Use node_obstack given by argument.
22463 A node is not only computed here but in print_actions also.
22464 (print_graph): CPP out useless code instead of commenting it.
22465
976e528f
AD
224662001-08-07 Pascal Bart <pascal.bart@epita.fr>
22467
22468 * tests/atconfig.in (CPPFLAGS): Fix.
22469
20e8e5ca
AD
224702001-08-07 Akim Demaille <akim@epita.fr>
22471
22472 * src/print_graph.c (quote): New.
22473 (print_core): Use it.
22474
957d4dbf 224752001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
3e3da797 22476
3e3da797
AD
22477 * src/vcg.c (complain.h): Include it.
22478 Unepitaize `return' invocations.
c4b66126 22479 [NDEBUG] (main): Remove.
79282c6c 22480 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
c4b66126
AD
22481 * src/files.c (open_files): Initialize graph_obstack.
22482 * src/print_graph.c (print_actions): CPP out useless code.
22483 (print_core): Don't output the last `\n' in labels.
22484 Use `quote'.
22485 * src/files.c (output_files): Output the VCG file.
22486 * src/main.c (main): Invoke print_graph ();
3e3da797 22487
957d4dbf 224882001-08-06 Marc Autret <autret_m@epita.fr>
22c2cbc0
AD
22489
22490 Automaton VCG graph output.
22491 Using option ``-g'' or long option ``--graph'', you can generate
22492 a gram_filename.vcg file containing a VCG description of the LALR (1)
22493 automaton of your grammar.
22494
22495 * src/main.c: Call to print_graph() function.
22496 * src/getargs.h: Update.
22497 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
22498 (graph_flag): New flag.
22499 (longopts): Update.
22500 (getargs): Add case `g'.
22501 * src/files.c (graph_obstack): New obstack struct.
22502 (open_files): Initialize new obstack.
22503 (output_files): Saves graph_obstack if required.
22504 * src/files.h (graph_obstack): New extern declaration.
22505 * src/Makefile.am: Add new source files.
22506
927c1557 225072001-08-06 Marc Autret <autret_m@epita.fr>
ce4d5ce0
AD
22508
22509 * src/print_graph.c, src/print_graph.h (graph): New.
22510 * src/vcg.h: New file.
22511 * src/vcg.c: New file, VCG graph handling.
22512
7333d403
AD
225132001-08-06 Marc Autret <autret_m@epita.fr>
22514
22515 Add of %source_extension and %header_extension which specify
22516 the source or/and the header output file extension.
22517
22518 * src/files.c (compute_base_names): Remove initialisation of
22519 src_extension and header_extension.
22520 (compute_exts_from_gf): Update.
22521 (compute_exts_from_src): Update.
22522 (output_files): Update.
22523 * src/reader.c (parse_header_extension_decl): New.
22524 (parse_source_extension_decl): New.
22525 (read_declarations): New case statements for the new tokens.
22526 * src/lex.c (percent_table): Add entries for %source_extension
22527 and %header_extension.
22528 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
22529
84163231
AD
225302001-08-06 Marc Autret <autret_m@epita.fr>
22531
22532 * configure.in: Bump to 1.28c.
22533 * doc/bison.texinfo: Texinfo thingies.
22534
8303fc42
AD
225352001-08-04 Pascal Bart <pascal.bart@epita.fr>
22536
22537 * tests/atconfig.in (CPPFLAGS): Add.
22538 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
22539
70a84437
AD
225402001-08-03 Akim Demaille <akim@epita.fr>
22541
22542 Version 1.28b.
22543
2ce10144
AD
225442001-08-03 Akim Demaille <akim@epita.fr>
22545
22546 * tests/Makefile.am (check-local): Ship testsuite.
22547 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
22548 Include `string.h'.
22549
1e3e4bc1
AD
225502001-08-03 Akim Demaille <akim@epita.fr>
22551
22552 * configure.in: Try using -Wformat when compiling.
22553
42b45b7f
AD
225542001-08-03 Akim Demaille <akim@epita.fr>
22555
22556 * configure.in: Bump to 1.28b.
22557
8f13fe33
AD
225582001-08-03 Akim Demaille <akim@epita.fr>
22559
22560 * src/complain.c: Adjust strerror_r portability issues.
22561
b37ba92c
AD
225622001-08-03 Akim Demaille <akim@epita.fr>
22563
22564 Version 1.28a.
22565
b0ce6046
AD
225662001-08-03 Akim Demaille <akim@epita.fr>
22567
22568 * src/getargs.c, src/getarg.h (skeleton)): Constify.
22569 * src/lex.c (literalchar): Avoid name clashes on `buf'.
22570 * src/getargs.c: Include complain.h.
22571 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
22572 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
22573
d01c415b
AD
225742001-08-03 Akim Demaille <akim@epita.fr>
22575
22576 * src/reader.c (readgram): Display hidden chars in error messages.
22577
459dd1a6
AD
225782001-08-03 Akim Demaille <akim@epita.fr>
22579
22580 Update to gettext 0.10.39.
22581
53b74c0c
AD
225822001-08-03 Akim Demaille <akim@epita.fr>
22583
22584 * lib/strspn.c: New.
22585
234a3be3
AD
225862001-08-01 Marc Autret <autret_m@epita.fr>
22587
22588 * doc/bison.texinfo: Update.
22589 * doc/bison.1 (mandoc): Update.
22590 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
22591 * src/files.c: Support output files extensions computing.
22592 (src_extension): New static variable.
22593 (header_extension): New static variable.
22594 (tr): New function.
22595 (get_extension_index): New function, gets the index of an extension
22596 filename in a string.
22597 (compute_exts_from_gf): New function, computes extensions from the
22598 grammar file extension.
22599 (compute_exts_from_src): New functions, computes extensions from the
22600 C source file extension, file given by ``-o'' option.
22601 (compute_base_names): Update.
22602 (output_files): Update.
22603
847bf1f5
AD
226042001-08-01 Robert Anisko <anisko_r@epita.fr>
22605
d995fee7 22606 * doc/bison.texi: Document @$.
847bf1f5
AD
22607 (Locations): New section.
22608
d074a105
AD
226092001-07-18 Akim Demaille <akim@epita.fr>
22610
22611 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
22612 * config/prev-version.txt, config/move-if-change: New.
22613 * Makefile.am: Adjust.
22614
3419715d
AD
226152001-07-08 Pascal Bart <pascal.bart@epita.fr>
22616
22617 * src/bison.simple (yyparse): Suppress warning `comparaison
22618 between signed and unsigned'.
22619
62ab6972
AD
226202001-07-05 Pascal Bart <pascal.bart@epita.fr>
22621
22622 * src/getargs.h (raw_flag): Remove.
22623 * src/getargs.c: Die on `-r'/`--raw'.
22624 * src/lex.c (parse_percent_token): Die on `%raw'.
22625 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
22626 * tests/calc.at: Suppress test with option `--raw'.
22627
1e24cc5b
AD
226282001-07-14 Akim Demaille <akim@epita.fr>
22629
22630 * config/: New.
22631 * configure.in: Require Autoconf 2.50.
22632 Update to gettext 0.10.38.
22633
32dfccf8
AD
226342001-03-16 Akim Demaille <akim@epita.fr>
22635
22636 * doc/bison.texinfo: ANSIfy the examples.
22637
cd5bd6ac
AD
226382001-03-16 Akim Demaille <akim@epita.fr>
22639
22640 * getargs.c (skeleton): New variable.
22641 (longopts): --skeleton is a new option.
22642 (shortopts, getargs): -S is a new option.
22643 * getargs.h: Declare skeleton.
22644 * output.c (output_parser): Use it.
22645
5141b016
AD
226462001-03-16 Akim Demaille <akim@epita.fr>
22647
22648 * m4/strerror_r.m4: New.
22649 * m4/error.m4: Run AC_FUNC_STRERROR_R.
22650 * lib/error.h, lib/error.c: Update.
22651
447992b9
AD
226522001-03-16 Akim Demaille <akim@epita.fr>
22653
22654 * src/getargs.c (longopts): Clean up.
22655
274d42ce
AD
226562001-02-21 Akim Demaille <akim@epita.fr>
22657
22658 * src/reader.c (gensym): `gensym_count' is your own.
22659 Use a static buf to create the symbol name, as token_buffer is no
22660 longer a buffer.
22661
22c821f3
AD
226622001-02-08 Akim Demaille <akim@epita.fr>
22663
22664 * src/conflicts.c (conflict_report): Be sure not to append to res
22665 between two calls, which could happen if both first sprintf were
22666 skipped, but not the first cp += strlen.
22667
18569462
AD
226682001-02-08 Akim Demaille <akim@epita.fr>
22669
22670 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
22671 New, from fileutils 4.0.37.
22672 * configure.in: Require Autoconf 2.49c. I took some time before
22673 making this decision. This is the only way out for portability
22674 issues in Bison, it would mean way too much duplicate effort to
22675 import in Bison features implemented in 2.49c since 2.13.
22676 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
22677
0d8f3c8a
AD
226782001-02-02 Akim Demaille <akim@epita.fr>
22679
22680 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
66075dcf 22681 * lib/xalloc.h, lib/xmalloc.c: Update.
0d8f3c8a 22682
f17bcd1f
AD
226832001-01-19 Akim Demaille <akim@epita.fr>
22684
22685 Get rid of the ad hoc handling of token_buffer in the scanner: use
22686 the obstacks.
22687
22688 * src/lex.c (token_obstack): New.
22689 (init_lex): Initialize it. No longer call...
22690 (grow_token_buffer): this. Remove it.
22691 Adjust all the places which used it to use the obstack.
22692
511e79b3
AD
226932001-01-19 Akim Demaille <akim@epita.fr>
22694
22695 * src/lex.h: Rename all the tokens:
22696 s/\bENDFILE\b/tok_eof/g;
22697 s/\bIDENTIFIER\b/tok_identifier/g;
22698 etc.
22699 Let them be enums, not #define, to ease debugging.
22700 Adjust all the code.
22701
0d6508ef
AD
227022001-01-18 Akim Demaille <akim@epita.fr>
22703
22704 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
22705 * src/lex.c (maxtoken, grow_token_buffer): Static.
22706
6deb4447
AD
227072001-01-18 Akim Demaille <akim@epita.fr>
22708
22709 Since we now use obstacks, more % directives can be enabled.
22710
22711 * src/lex.c (percent_table): Also accept `%yacc',
22712 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
22713 `%debug'.
22714 Handle the actions for `%semantic_parser' and `%pure_parser' here,
22715 instead of returning a token.
22716 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
22717 * src/reader.c (read_declarations): Adjust.
22718 * src/files.c (open_files): Don't call `compute_base_names', don't
22719 compute `attrsfile' since they depend upon data which might be
22720 *in* the input file now.
22721 (output_files): Do it here.
22722 * src/output.c (output_headers): Document the fact that this patch
22723 introduces a guaranteed SEGV for semantic parsers.
22724 * doc/bison.texinfo: Document them.
22725 * tests/suite.at: Exercise these %options.
22726
ff4423cc
AD
227272000-12-20 Akim Demaille <akim@epita.fr>
22728
22729 Also handle the output file (--verbose) with obstacks.
22730
22731 * files.c (foutput): Remove.
22732 (output_obstack): New.
22733 Adjust all dependencies.
22734 * src/conflicts.c: Return a string.
22735 * src/system.h (obstack_grow_string): Rename as...
22736 (obstack_sgrow): this. Be ready to work with non literals.
22737 (obstack_fgrow4): New.
22738
956dba3a
AD
227392000-12-20 Akim Demaille <akim@epita.fr>
22740
22741 * src/files.c (open_files): Fix the computation of short_base_name
22742 in the case of `-o foo.tab.c'.
22743
337bab46
AD
227442000-12-20 Akim Demaille <akim@epita.fr>
22745
22746 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
22747 (copy_dollar): Now that everything uses obstacks, get rid of the
22748 FILE * parameters.
22749
5d3214b8
AD
227502000-12-20 Akim Demaille <akim@epita.fr>
22751
22752 * src/files.c (open_files): Actually the `.output' file is based
22753 on the short_base_name, not base_name.
22754 * tests/suite.at (Checking output file names): Adjust.
22755
29092a57
AD
227562000-12-20 Akim Demaille <akim@epita.fr>
22757
22758 * src/bison.s1: Remove, we now use directly...
22759 * src/bison.simple: this.
22760 * src/Makefile.am: Use pkgdata instead of data.
22761
ea5607fd
AD
227622000-12-20 Akim Demaille <akim@epita.fr>
22763
22764 * src/files.c (guard_obstack): New.
22765 (open_files): Initialize it.
22766 (output_files): Dump it...
22767 * src/files.h: Export it.
22768 * src/reader.c (copy_guard): Use it.
22769
27110317
AD
227702000-12-19 Akim Demaille <akim@epita.fr>
22771
22772 * src/files.c (outfile, defsfile, actfile): Removed as global
22773 vars.
22774 (open_files): Don't compute them.
22775 (output_files): Adjust.
22776 (base_name, short_base_name): Be global.
22777 Adjust dependencies.
22778
19c50364
AD
227792000-12-19 Akim Demaille <akim@epita.fr>
22780
22781 * src/files.c (strsuffix): New.
22782 (stringappend): Be just like strcat but allocate.
22783 (base_names): Eve out from open_files.
22784 Try to simplify the rather hairy computation of base_name and
22785 short_base_name.
22786 (open_files): Use it.
22787 * tests/suite.at (Checking output file names): New test.
22788
573c1d9f
AD
227892000-12-19 Akim Demaille <akim@epita.fr>
22790
22791 * src/system.h (obstack_grow_literal_string): Rename as...
22792 (obstack_grow_string): this.
22793 * src/output.c (output_parser): Recognize `%% actions' instead of
22794 `$'.
22795 * src/bison.s1: s/$/%% actions/.
22796 * src/bison.hairy: Likewise.
22797
ef7ddedd
AD
227982000-12-19 Akim Demaille <akim@epita.fr>
22799
22800 * src/output.c (output_parser): Compute the `#line' lines when
22801 there are.
22802 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
22803 Suggested by Hans Aberg.
22804
ff61dabd
AD
228052000-12-19 Akim Demaille <akim@epita.fr>
22806
22807 Let the handling of the skeleton files be local to the procedures
22808 that use it.
22809
22810 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
22811 longer static.
22812 (fparser, open_extra_files): Remove.
22813 (open_files, output_files): Don't take care of fparser.
22814 * src/files.h: Adjust.
22815 * src/output.c (output_parser): Open and close the file to the
22816 skeleton.
22817 * src/reader.c (read_declarations): When %semantic_parser, open
22818 fguard.
22819
55b96341
AD
228202000-12-19 Akim Demaille <akim@epita.fr>
22821
22822 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
22823 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
22824
358c15b7
AD
228252000-12-19 Akim Demaille <akim@epita.fr>
22826
22827 * src/files.c (open_files): Yipee! We no longer need all the code
22828 looking for `/tmp' since we have no tmp file.
22829
7de3329e
AD
228302000-12-19 Akim Demaille <akim@epita.fr>
22831
22832 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
22833 New macros.
22834 * src/files.c (open_files): Less dependency on MSDOS etc.
22835
3abcd459
AD
228362000-12-14 Akim Demaille <akim@epita.fr>
22837
22838 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
22839 Provide a default definition.
22840 Use it when executing the default @ action.
22841 * src/reader.c (reader_output_yylsp): No longer include
22842 `timestamp' and `text' in the default YYLTYPE.
22843
2a91a95e
AD
228442000-12-12 Akim Demaille <akim@epita.fr>
22845
22846 * src/reader.c (copy_definition, parse_union_decl, copy_action)
22847 (copy_guard): Quote the file names.
22848 Reported by Laurent Mascherpa.
22849
14d3eb9b
AD
228502000-12-12 Akim Demaille <akim@epita.fr>
22851
22852 * src/output.c (output_headers, output_program, output): Be sure
22853 to escape special characters when outputting filenames.
22854 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
22855 (output_headers): Don't depend on them, Use ACTSTR.
22856
d7045ec6
AD
228572000-11-17 Akim Demaille <akim@epita.fr>
22858
22859 * lib/obstack.h: Formatting changes.
22860 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
22861 prevents type checking.
22862 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22863 cast the value to (void *): assigning a `foo *' to a `void *'
22864 variable is valid.
22865 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22866 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
22867 append characters.
22868
6fd54b73
AD
228692000-11-17 Akim Demaille <akim@epita.fr>
22870
22871 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
22872 as...
22873 (suite.m4, regression.m4, calc.m4): these.
22874 * tests/atgeneral.m4: Update from CVS Autoconf.
22875
4c50eae6
AD
228762000-11-17 Akim Demaille <akim@epita.fr>
22877
22878 * tests/regression.m4 (%union and --defines): New test,
22879 demonstrating a current bug in the obstack implementation.
22880
a35f64ea
AD
228812000-11-17 Akim Demaille <akim@epita.fr>
22882
22883 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
22884 macros.
22885 Use them to declare the variables which are global or local to
22886 `yyparse'.
22887
7de23534
AD
228882000-11-17 Akim Demaille <akim@epita.fr>
22889
22890 * acconfig.h: Remove, no longer used.
22891
aa7815f5
AD
228922000-11-07 Akim Demaille <akim@epita.fr>
22893
22894 * src: s/Copyright (C)/Copyright/g.
22895
5af1f549
AD
228962000-11-07 Akim Demaille <akim@epita.fr>
22897
22898 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
22899 defining.
22900 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
22901
553e2b22
AD
229022000-11-07 Akim Demaille <akim@epita.fr>
22903
22904 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
22905 Merge in a single CPP if/else.
22906
8a4f41d6
AD
229072000-11-07 Akim Demaille <akim@epita.fr>
22908
22909 * src/output.c (output): Remove useless variables.
22910 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
22911 argument `data' for consistency with the prototypes.
22912 Qualify it `const'.
22913 (obstack_copy, obstack_copy0): Rename the second argument as
22914 `address' for consistency. Qualify it `const'.
22915 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
22916 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
22917 `const' their input argument (`data' or `address').
22918 Adjust the corresponding macros to include `const' in casts.
22919
095a3fb5
AD
229202000-11-03 Akim Demaille <akim@epita.fr>
22921
22922 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
22923 s/PFILE1/BISON_HAIRY/.
22924 Adjust dependencies.
22925
d1cdce7c
AD
229262000-11-03 Akim Demaille <akim@epita.fr>
22927
090c5ebf 22928 For some reason, this was not applied.
d1cdce7c
AD
22929
22930 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22931 `unlink': it's no longer used.
22932
9311529b
AD
229332000-11-03 Akim Demaille <akim@epita.fr>
22934
22935 * src/files.c (skeleton_find): New function, eved out of...
22936 (open_files, open_extra_files): here.
22937
d8880f69
AD
229382000-11-03 Akim Demaille <akim@epita.fr>
22939
22940 Don't use `atexit'.
22941
22942 * src/files.c (obstack_save): New function.
22943 (done): Rename as...
22944 (output_files): this.
22945 Use `obstack_save'.
22946 * src/main.c (main): Don't use `atexit' to register `done', since
22947 it no longer has to remove tmp files, just call `output_files'
22948 when there are no errors.
22949
0dbb648e
AD
229502000-11-02 Akim Demaille <akim@epita.fr>
22951
22952 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
22953 `unlink': it's no longer used.
22954 * src/files.h: Formatting changes.
22955
896fe5c1
AD
229562000-11-02 Akim Demaille <akim@epita.fr>
22957
22958 Remove the last uses of mktemp and unlink/delete.
22959
22960 * src/files.c (fdefines, ftable): Removed.
22961 (defines_ostack, table_obstack): New.
22962 Adjust dependencies of the former into uses of the latter.
22963 * src/output.c (output_short_or_char_table, output_short_table):
22964 Convert to using obstacks.
22965 * src/reader.c (copy_comment2): Accept one FILE * and two
22966 obstacks.
22967 (output_token_defines, reader_output_yylsp): Use obstacks.
22968 * src/system.h (obstack_fgrow3): New.
1f65350a 22969 * po/POTFILES.in: Adjust.
896fe5c1 22970
dd60faec
AD
229712000-11-01 Akim Demaille <akim@epita.fr>
22972
22973 Change each use of `fattrs' into a use of `attrs_obstack'.
22974
22975 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
22976 * src/files.c (fattrs): Remove.
22977 (attrs_obstack): New.
22978 Adjust all dependencies.
22979 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
22980
8c7ebe49
AD
229812000-11-01 Akim Demaille <akim@epita.fr>
22982
22983 Introduce obstacks.
22984 Change each use of `faction' into a use of `action_obstack'.
22985
22986 * lib/obstack.h, lib/obstack.c: New files.
22987 * src/files.c (faction): Remove.
22988 (action_obstack): New.
22989 Adjust all dependencies.
22990
77aee789
AD
229912000-10-20 Akim Demaille <akim@epita.fr>
22992
22993 * lib/quote.h (PARAMS): New macro. Use it.
22994
43591cec
AD
229952000-10-16 Akim Demaille <akim@epita.fr>
22996
22997 * src/output.c (output_short_or_char_table): New function.
22998 (output_short_table, output_token_translations): Use it.
22999 (goto_actions): Use output_short_table.
23000
1e9798d5
AD
230012000-10-16 Akim Demaille <akim@epita.fr>
23002
23003 * src/symtab.c (bucket_new): New function.
23004 (getsym): Use it.
23005
23006 * src/output.c (output_short_table): New argument to display the
23007 comment associated with the table.
23008 Adjust dependencies.
23009 (output_gram): Use it.
23010 (output_rule_data): Nicer output layout for YYTNAME.
23011
f282676b
AD
230122000-10-16 Akim Demaille <akim@epita.fr>
23013
23014 * src/lex.c (read_typename): New function.
23015 (lex): Use it.
23016 * src/reader.c (copy_dollar): Likewise.
23017
550a72a3
AD
230182000-10-16 Akim Demaille <akim@epita.fr>
23019
23020 * src/reader.c (copy_comment2): Expect the input stream to be on
23021 the `/' which is suspected to open a comment, instead of being
23022 called after `//' or `/*' was read.
23023 (copy_comment, copy_definition, parse_union_decl, copy_action)
23024 (copy_guard): Adjust.
23025
131e2fef
AD
230262000-10-16 Akim Demaille <akim@epita.fr>
23027
23028 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
23029 `read_signed_integer'.
23030
79282c5a
AD
230312000-10-16 Akim Demaille <akim@epita.fr>
23032
23033 * src/reader.c (copy_dollar): New function.
23034 (copy_guard, copy_action): Use it.
23035
ff4a34be
AD
230362000-10-16 Akim Demaille <akim@epita.fr>
23037
23038 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
23039 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
23040 New files, from Fileutils 4.0.27.
23041 * src/main.c (printable_version): Remove.
23042 * src/lex.c, src/reader.c: Use `quote'.
23043
230442000-10-04 Akim Demaille <akim@epita.fr>
23045
23046 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
23047
14ded682
AD
230482000-10-04 Akim Demaille <akim@epita.fr>
23049
23050 * doc/bison.texinfo: Various typos spotted by Neil Booth.
23051
8e03724b
AD
230522000-10-04 Akim Demaille <akim@epita.fr>
23053
23054 When a literal string is used to define two different tokens,
23055 `bison -v' segfaults.
23056 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
23057
23058 * tests/regression.m4: New file.
23059 Include the core of the sample provided by Piotr Gackiewicz.
23060 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
23061 properly.
23062
a9e64249
AD
230632000-10-04 Akim Demaille <akim@epita.fr>
23064
23065 * src/reader.c (parse_expect_decl): Keep `count' within the size
23066 of `buffer'.
23067 From Neil Booth.
23068
da9abf43
AD
230692000-10-02 Paul Eggert <eggert@twinsun.com>
23070
23071 * bison.s1 (yyparse): Assign the default value
23072 unconditionally, to avoid a GCC warning and make the parser a
23073 tad smaller.
23074
c33638bb
AD
230752000-10-02 Akim Demaille <akim@epita.fr>
23076
23077 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
23078 options.
23079
444c570a
AD
230802000-10-02 Akim Demaille <akim@epita.fr>
23081
23082 * src/derives.c, src/print.c, src/reduce.c: To ease the
23083 translation, move some `\n' out of the translated strings.
23084
89cab50d
AD
230852000-10-02 Akim Demaille <akim@epita.fr>
23086
23087 The location tracking mechanism is precious for parse error
23088 messages. Nevertheless, it is enabled only when `@n' is used in
23089 the grammar, which is a different issue (you can use it in error
23090 message, but not in the grammar per se). Therefore, there should
23091 be another means to enable it.
23092
23093 * src/getargs.c (getargs): Support `--locations'.
23094 (usage): Report it.
23095 * src/getargs.h (locationsflag): Export it.
23096 * src/lex.c (percent_table): Support `%locations'.
23097 * src/reader.c (yylsp_needed): Remove this variable, now replaced
23098 with `locationsflag'.
23099 * doc/bison.texinfo: Document `--locations' and `%locations'.
23100 Sort the options.
23101 * tests/calc.m4: Test it.
23102
23103 For regularity of the names, replace each
23104 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
23105 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
23106 In addition replace each `flag' with `_flag'.
23107
d6c2cba0
AD
231082000-10-02 Akim Demaille <akim@epita.fr>
23109
23110 Also test parse error messages, including with YYERROR_VERBOSE.
23111
23112 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
23113 associative).
23114 Use it to check the computations.
23115 Use it to check `nonassoc' is honored.
23116 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
23117 `--yyerror-verbose'.
23118 (_AT_CHECK_CALC): Adjust to this option.
23119 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
23120
5a35a6cb
AD
231212000-10-02 Akim Demaille <akim@epita.fr>
23122
23123 Test also `--verbose', `--defines' and `--name-prefix'. Testing
23124 the latter demonstrates a flaw in the handling of non debugging
23125 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
23126 was used in order to simplify:
23127
23128 #if YYDEBUG
23129 if (yydebug)
23130 {
23131 ...
23132 }
23133 #endif
23134
23135 into
23136
23137 if (yydebug)
23138 {
23139 ...
23140 }
23141
23142 unfortunately this leads to a CPP conflict when
23143 `--name-prefix=foo' is used since it produces `#define yydebug
23144 foodebug'.
23145
23146 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
23147 (YYDPRINTF): New macro.
23148 Spread its use.
23149 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
23150 the bison options.
23151 Also test `--verbose', `--defines' and `--name-prefix'.
23152
71da9eea
AD
231532000-10-02 Akim Demaille <akim@epita.fr>
23154
23155 Improve the readability of the produced parsers.
23156
23157 * src/bison.s1: Formatting changes.
23158 Improve the comment related to the `$' mark.
23159 (yydefault): Don't fall through to `yyresume': `goto' there.
23160 * src/output.c (output_parser): When the `$' is met, skip the end
23161 of its line.
23162 New variable, `number_of_dollar_signs', to check there's exactly
23163 one `$' in the parser skeleton.
23164
95e36146
AD
231652000-10-02 Akim Demaille <akim@epita.fr>
23166
23167 * lib/xstrdup.c: New file, from the fileutils.
23168 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
23169 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
23170 instead of strlen + xmalloc + strcpy.
23171 * src/symtab.c (copys): Remove, use xstrdup instead.
23172
d7020c20
AD
231732000-10-02 Akim Demaille <akim@epita.fr>
23174
23175 * src/gram.h (associativity): New enum type which replaces the
23176 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
23177 `right_assoc', `left_assoc' and `non_assoc'.
23178 Adjust all dependencies.
23179 * src/reader.c: Formatting changes.
23180 (LTYPESTR): Don't define it, use it as a literal in
23181 `reader_output_yylsp'.
23182 * src/symtab.h (symbol_class): New enum type which replaces the
23183 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
23184 `sunknown', `stoken and `snterm'.
23185
1916f98e
AD
231862000-10-02 Akim Demaille <akim@epita.fr>
23187
23188 * src/getargs.c (fixed_outfiles): Rename as...
23189 (yaccflag): for consistency and accuracy.
23190 Adjust dependencies.
23191
d7913476
AD
231922000-10-02 Akim Demaille <akim@epita.fr>
23193
23194 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
23195 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
23196 difficult and introduced a lot of core dump. It turns out that
23197 Bison used an implementation of `xmalloc' based on `calloc', and
23198 at various places it does depend upon the initialization to 0. I
23199 have not tried to isolate the pertinent places, and all the former
23200 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
23201 someone should address this issue.
23202
23203 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
23204 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
23205 files.
23206 Adjust dependencies.
23207 * src/warshall.h: New file.
23208 Propagate.
23209
340ef489
AD
232102000-10-02 Akim Demaille <akim@epita.fr>
23211
23212 Various anti-`extern in *.c' changes.
23213
23214 * src/system.h: Include `assert.h'.
23215
b2ca4022
AD
232162000-10-02 Akim Demaille <akim@epita.fr>
23217
23218 * src/state.h (nstates, final_state, first_state, first_shift)
23219 (first_reduction): Move their exportation from here...
23220 * src/LR0.h: to here.
23221 Adjust dependencies.
23222 * src/getargs.c (statisticsflag): New variable.
23223 Add support for `--statistics'.
23224 Adjust dependencies.
23225
23226 Remove a lot of now useless `extern' statements in most files.
23227
403b315b
AD
232282000-10-02 Akim Demaille <akim@epita.fr>
23229
23230 * src/LR0.h: New file.
23231 Propagate its use.
23232
07a58c13
AD
232332000-10-02 Akim Demaille <akim@epita.fr>
23234
23235 * src/print.h: New file.
23236 Propagate its use.
23237 * src/print.c: Formatting and ordering changes.
23238 (verbose, terse): Replace with...
23239 (print_results): this new function.
23240 Adjust dependencies.
23241
0619caf0
AD
232422000-10-02 Akim Demaille <akim@epita.fr>
23243
23244 * src/conflicts.c (conflict_report): New function.
23245 (conflict_log, verbose_conflict_log): Replace with...
23246 (print_conflicts): this function.
23247 Adjust dependencies.
23248 * src/conflicts.h: New file.
23249 Propagate its inclusion.
23250
3519ec76
AD
232512000-10-02 Akim Demaille <akim@epita.fr>
23252
23253 * src/nullable.h: New file.
23254 Propagate its inclusion.
23255 * src/nullable.c: Formatting changes.
23256
015acc48
AD
232572000-10-02 Akim Demaille <akim@epita.fr>
23258
23259 * src/reduce.h: New file.
23260 Propagate its inclusion.
23261 * src/reduce.c: Topological sort and other formatting changes.
23262 (bool, TRUE, FALSE): Move their definition to...
23263 * src/system.h: here.
23264
8963a27b
AD
232652000-10-02 Akim Demaille <akim@epita.fr>
23266
23267 * src/files.c: Formatting changes.
23268 (tryopen, tryclose, openfiles): Rename as...
23269 (xfopen, xfclose, open_files): this.
23270 (stringappend): static.
23271 * src/files.h: Complete the list of exported symbols.
23272 Propagate its use.
23273
a70083a3
AD
232742000-10-02 Akim Demaille <akim@epita.fr>
23275
23276 * src/reader.h: New file.
23277 Propagate its use instead of tedious list of `extern' and
23278 prototypes.
23279 * src/reader.c: Formatting changes, topological sort,
23280 s/register//.
23281
abadc117
AD
232822000-10-02 Akim Demaille <akim@epita.fr>
23283
23284 * src/lex.h: Prototype `lex.c' exported functions.
23285 * src/reader.c: Adjust.
23286 * src/lex.c: Formatting changes.
23287 (safegetc): Rename as...
23288 (xgetc): this.
23289
720d742f
AD
232902000-10-02 Akim Demaille <akim@epita.fr>
23291
23292 * src/lalr.h: New file.
23293 Propagate its inclusion instead of prototypes and `extern'.
23294 * src/lalr.c: Formatting changes, topological sorting etc.
23295
f2acea59
AD
232962000-10-02 Akim Demaille <akim@epita.fr>
23297
23298 * src/output.c (token_actions): Introduce a temporary array,
23299 YYDEFACT, that makes it possible for this function to use
23300 output_short_table.
23301
d019d655
AD
233022000-10-02 Akim Demaille <akim@epita.fr>
23303
23304 `user_toknums' is output as a `short[]' in `output.c', while it is
23305 defined as a `int[]' in `reader.c'. For consistency with the
23306 other output tables, `user_toknums' is now defined as a table of
23307 shorts.
23308
23309 * src/reader.c (user_toknums): Be a short table instead of an int
23310 table.
23311 Adjust dependencies.
23312
23313 Factor the short table outputs.
23314
23315 * src/output.c (output_short_table): New function.
23316 * src/output.c (output_gram, output_stos, output_rule_data)
23317 (output_base, output_table, output_check): Use it.
23318
6c89f1c1
AD
233192000-10-02 Akim Demaille <akim@epita.fr>
23320
23321 * src/output.c (output): Topological sort of the functions, in
23322 order to get rid of the `static' prototypes.
23323 No longer use `register'.
23324 * src/output.h: New file.
23325 Propagate its inclusion in files explicitly prototyping functions
23326 from output.c.
23327
d9efd181
AD
233282000-09-21 Akim Demaille <akim@epita.fr>
23329
23330 * src/atgeneral.m4: Update from Autoconf.
23331
c29240e7 233322000-09-21 Akim Demaille <akim@epita.fr>
2fa6973e
AD
23333
23334 * src/closure.h: New file.
23335 * src/closure.c: Formatting changes, topological sort over the
23336 functions, use of closure.h.
23337 (initialize_closure, finalize_closure): Rename as...
23338 (new_closure, free_closure): these. Adjust dependencies.
23339 * src/LR0.c: Formatting changes, topological sort, use of
23340 cloture.h.
23341 (initialize_states): Rename as...
23342 (new_states): this.
23343 * src/Makefile.am (noinst_HEADERS): Adjust.
23344
499daa50
AD
233452000-09-20 Akim Demaille <akim@epita.fr>
23346
23347 * src/acconfig.h: Don't protect config.h against multiple
23348 inclusion.
23349 Don't define PARAMS.
23350 * src/system.h: Define PARAMS.
23351 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
23352 purpose of config.h. system.h must not try to fix wrong
23353 definitions in config.h.
23354
cc84fd5d
AD
233552000-09-20 Akim Demaille <akim@epita.fr>
23356
23357 * src/derives.h: New file.
23358 * src/main.c, src/derives.h: Use it.
23359 Formatting changes.
23360 * src/Makefile.am (noinst_HEADERS): Adjust.
23361
db5b3a89
AD
233622000-09-20 Akim Demaille <akim@epita.fr>
23363
23364 * tests/atgeneral.m4: Update from Autoconf.
23365 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
23366 (AT_CHECK_CALC): New macros.
23367 Use these macros to test bison with options `', `--raw',
23368 `--debug', `--yacc', `--yacc --debug'.
23369
ceed8467
AD
233702000-09-19 Akim Demaille <akim@epita.fr>
23371
23372 * src/output.c: Formatting changes.
23373 * src/machine.h: Remove, leaving its contents in...
23374 * src/system.h: here.
23375 Include stdio.h.
23376 Adjust all dependencies on stdio.h and machine.h.
23377 * src/getargs.h: New file.
23378 Let all `extern' declarations about getargs.c be replaced with
23379 inclusion of `getargs.h'.
23380 * src/Makefile.am (noinst_HEADERS): Adjust.
23381
23382 * tests/calc.m4 (yyin): Be initialized in main, not on the global
23383 scope.
23384 (yyerror): Returns void, not int.
23385 * doc/bison.texinfo: Formatting changes.
23386
05a1d24b
AD
233872000-09-19 Akim Demaille <akim@epita.fr>
23388
23389 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
23390 portable.
23391
cbd25751
AD
233922000-09-18 Akim Demaille <akim@epita.fr>
23393
23394 * configure.in: Append WARNING_CFLAGS to CFLAGS.
23395 * src/Makefile.am (INCLUDES): Don't.
23396 Be ready to fetch headers in lib/.
23397
13863333
AD
233982000-09-18 Akim Demaille <akim@epita.fr>
23399
23400 * doc/bison.texinfo: Update the copyright.
23401 ANSIfy and GNUify the examples.
23402 Remove the old menu.
23403
0d533154
AD
234042000-09-18 Akim Demaille <akim@epita.fr>
23405
23406 First set of tests: use the `calc' example from the documentation.
23407
23408 * src/bison.s1 (yyparse): Condition the code using `yytname' which
23409 is defined only when YYDEBUG is.
23410 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
23411 * src/files.c (tryopen, tryclose): Formatting changes.
23412 Move to the top and be static.
23413 * src/reader.c (read_signed_integer): Likewise.
23414 * tests/calc.m4: New file.
23415 * Makefile.am, suite.m4: Adjust.
23416 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
23417
e79137ac
AD
234182000-09-18 Akim Demaille <akim@epita.fr>
23419
23420 Add support for an Autotest test suite for Bison.
23421
23422 * m4/m4.m4, m4/atconfig.m4: New files.
23423 * m4/Makefile.am (EXTRA_DIST): Adjust.
23424 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
23425 files.
23426 * src/getargs.c: Display a more standard --version message.
23427 * src/reader.c (reader): Formatting changes.
23428 No longer depend upon VERSION_STRING.
23429 * configure.in: No longer use `dnl'.
23430 Set up the test suite and the new directory `tests/.
23431 (VERSION_STRING): Remove.
23432
27821bff
AD
234332000-04-14 Akim Demaille <akim@epita.fr>
23434
23435 * src/reader.c (copy_comment2): New function, same as former
23436 `copy_comment', but outputs into two FILE *.
23437 (copy_comment): Use it.
23438 (parse_union_decl): Use it.
23439 (get_type, parse_start_decl): Use the same `invalid' message.
23440 (parse_start_decl, parse_union_decl): Use the same `multiple'
23441 message.
23442 (parse_union_decl, copy_guard, copy_action): Use the same
23443 `unmatched' message.
23444 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
23445
cfe5fbc0
AD
234462000-03-31 Akim Demaille <akim@epita.fr>
23447
23448 * src/files.c (tryopen, tryclose): Move to the top.
23449 Be static.
23450
cb7db13e
AD
234512000-03-31 Akim Demaille <akim@epita.fr>
23452
23453 * src/main.c (main): Don't call `done', exit does it.
23454
a0f6b076
AD
234552000-03-31 Akim Demaille <akim@epita.fr>
23456
36281465
AD
23457 * allocate.c: s/return (foo)/return foo/.
23458 * lalr.c: Likewise.
23459 * LR0.c: Likewise.
23460 * output.c: Likewise.
23461 * reader.c: Likewise.
23462 * symtab.c: Likewise.
23463 * vmsgetargs.c: Likewise.
23464
234652000-03-31 Akim Demaille <akim@epita.fr>
23466
23467 Clean up the error reporting functions.
a0f6b076
AD
23468
23469 * src/report.c: New file.
23470 * src/report.h: Likewise.
23471 * src/Makefile.am: Adjust.
23472 * m4/error.m4: New file.
23473 * m4/Makefile.am: Adjust.
23474 * configure.in (jm_PREREQ_ERROR): Call it.
23475 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
23476 Remove.
23477 (fatal, fatals): Remove. All callers use complain.c::fatal.
23478 (warn, warni, warns, warnss, warnss): Remove. All callers use
23479 complain.c::complain.
23480 (toomany): Remove, use fatal instead.
23481 * src/files.c (done): No argument, use complain_message_count.
23482 * src/main.c (main): Register `done' to `atexit'.
23483
23484 * src/getargs.c (usage): More `fputs', less `fprintf'.
23485
18539825
AD
234862000-03-28 Akim Demaille <akim@epita.fr>
23487
23488 * lib/: New directory.
23489 * Makefile.am (SUBDIRS): Adjust.
23490 * configure.in: Adjust.
23491 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
23492 useless.
23493 * src/alloca.c: Moved to lib/.
23494 * src/getopt.c: Likewise.
23495 * src/getopt1.c: Likewise.
23496 * src/getopt.h: Likewise.
23497 * src/ansi2knr.c: Likewise.
23498 * src/ansi2knr.1: Likewise.
23499 * src/Makefile.am: Adjust.
23500 * lib/Makefile.am: New file.
23501
9f306f2a
AD
235022000-03-28 Akim Demaille <akim@epita.fr>
23503
23504 * src/getargs.c (usage): Refresh the help message.
23505
0ba347b6
AD
235062000-03-17 Akim Demaille <akim@epita.fr>
23507
23508 * src/getopt1.c: Updated from textutils 2.0e
23509 * src/getopt.c: Likewise.
23510 * src/getopt.h: Likewise.
23511
dbe7f271
AD
235122000-03-17 Akim Demaille <akim@epita.fr>
23513
23514 * src/Makefile.am (bison.simple): Fix the awk program: quote only
23515 the file name, not the whole `#line LINE FILE'.
23516
75bbe78d
AD
235172000-03-17 Akim Demaille <akim@epita.fr>
23518
23519 On syntax errors, report the token on which we choked.
23520
aa5fd0ee
AD
23521 * src/bison.s1 (yyparse): In the label yyerrlab, when
23522 YYERROR_VERBOSE, add yychar in msg.
75bbe78d 23523
7b306f52
AD
235242000-03-17 Akim Demaille <akim@epita.fr>
23525
aa5fd0ee 23526 * src/reader.c (copy_at): New function.
7b306f52
AD
23527 (copy_guard): Use it.
23528 (copy_action): Use it.
23529
e87b5700
AD
235302000-03-17 Akim Demaille <akim@epita.fr>
23531
23532 Be kind to translators, save some useless translations.
23533
aa5fd0ee 23534 * src/main.c (banner): New function.
e87b5700
AD
23535 (fatal_banner): Use it.
23536 (warn_banner): Use it.
23537
ae3c3164
AD
235382000-03-17 Akim Demaille <akim@epita.fr>
23539
aa5fd0ee
AD
23540 * src/reader.c (copy_definition): Use copy_string and
23541 copy_comment. Removed now unused `match', `ended',
23542 `cplus_comment'.
ae3c3164
AD
23543 (copy_comment, copy_string): Moved, to be visible from
23544 copy_definition.
23545
4dc58e7c
AD
235462000-03-17 Akim Demaille <akim@epita.fr>
23547
aa5fd0ee
AD
23548 * src/reader.c (copy_string): Declare `static inline'. No
23549 problems with inline, since it is checked by configure.
4dc58e7c
AD
23550 (copy_comment): Likewise.
23551
0a6384c4
AD
235522000-03-17 Akim Demaille <akim@epita.fr>
23553
aa5fd0ee 23554 * src/reader.c (packsymbols): Formatting changes.
0a6384c4 23555
3cef001a
AD
235562000-03-17 Akim Demaille <akim@epita.fr>
23557
aa5fd0ee 23558 * src/reader.c (copy_comment): New function, factored out from:
3cef001a
AD
23559 (copy_action): Use it. Removed now unused `match', `ended',
23560 `cplus_comment'.
23561 (copy_guard): Likewise.
23562
ca36d2ef
AD
235632000-03-17 Akim Demaille <akim@epita.fr>
23564
aa5fd0ee 23565 * src/reader.c (copy_string): New function, factored out from:
ca36d2ef
AD
23566 (copy_action): Use it.
23567 (copy_guard): Likewise.
23568
6666f98f
AD
235692000-03-17 Akim Demaille <akim@epita.fr>
23570
23571 Change the handling of @s so that they behave exactly like $s.
23572 There is now a pseudo variable @$ (readble and writable), location
23573 of the lhs of the rule (by default ranging from the location of
23574 the first symbol of the rhs, to the location of the last symbol,
23575 or, if the rhs is empty, YYLLOC).
23576
23577 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
23578 yyval.
23579 (yyparse): When providing a default semantic action, provide a
23580 default location action.
23581 (after the $): No longer change `*YYLSP', just stack YYLOC the
23582 same way you stack YYVAL.
23583 * src/reader.c (read_declarations): Use warns.
23584 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
23585 (copy_action, case '@'): Likewise.
23586 Use a standard error message, to save useless work from
23587 translators.
23588
41aca2e0
AD
235892000-03-17 Akim Demaille <akim@epita.fr>
23590
aa5fd0ee
AD
23591 * src/bison.s1: Formatting and cosmetics changes.
23592 * src/reader.c: Likewise.
41aca2e0
AD
23593 Update the Copyright notice.
23594
dc08c1d5
AD
235952000-03-17 Akim Demaille <akim@epita.fr>
23596
aa5fd0ee
AD
23597 * src/bison.s1 (#line): All set to `#line' only, since the
23598 Makefile now handles them.
dc08c1d5 23599
9ee3c97b
AD
236002000-03-16 Akim Demaille <akim@epita.fr>
23601
23602 * src/output.c (output_rule_data): Output the documentation of
23603 some of the tables.
23604 (Copyright notice): Update.
23605 Formatting changes.
23606
0de741ca
AD
236072000-03-16 Akim Demaille <akim@epita.fr>
23608
23609 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
23610 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
23611 One `#if YYDEBUG' remains, since it uses variables which are
23612 defined only if `YYDEBUG != 0'.
23613
bb10be54
AD
236142000-03-16 Akim Demaille <akim@epita.fr>
23615
23616 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
23617 and related variables so that the similarities are highlighted.
23618
b07b484a
AD
236192000-03-16 Akim Demaille <akim@epita.fr>
23620
23621 * src/bison.s1: Properly indent CPP directives.
23622
361f60b3
AD
236232000-03-16 Akim Demaille <akim@epita.fr>
23624
23625 * src/bison.s1: Properly indent the `alloca' CPP section.
23626
8c44d3ec
AD
236272000-03-16 Akim Demaille <akim@epita.fr>
23628
23629 Do not hard code values of directories in `configure.in'.
23630 Update the `configure' tool chain.
23631
23632 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
23633 src/makefile.am.
23634 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
23635 (AC_OUTPUT): Add m4/Makefile.
23636 Bump to bison 1.28a, 1.29 has never been released.
23637 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
23638 handled via src/Makefile.am.
23639 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
23640 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
23641 autoheader.
23642 * Makefile.am (SUBDIRS): Add m4.
23643 (ACLOCAL_AM_FLAGS): New variable.
23644 (AUTOMAKE_OPTIONS): Add check-news.
23645 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
23646 the proper line number and file name.
23647 (DEFS): Propagate the location of bison library files and of the
23648 locale files.
23649 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
23650 builddir.
23651 * acinclude.m4: Remove, replaced by the directory m4.
23652 * m4/Makefile.am (EXTRA_DIST): New variable.
23653 * m4/gettext.m4: New file, from the fileutils.
23654 * m4/lcmessage.m4: Likewise
23655 * m4/progtest.m4: Likewise.
23656 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
23657
f95997e7
AD
236582000-03-10 Akim Demaille <akim@epita.fr>
23659
23660 * src/closure.c:
23661 Formatting changes of various comments.
23662 Respect the GNU coding standards at various places.
23663 Don't use `_()' when no translation is needed.
23664
236651999-12-13 Jesse Thilo <jthilo@gnu.org>
23666
23667 * src/files.c:
23668 OS/2 honors TMPDIR environment variable.
23669
236701999-12-13 Jesse Thilo <jthilo@gnu.org>
23671
23672 * doc/bison.texinfo: Tweaked spelling and grammar.
23673 Updated ISBN.
23674 Removed reference to price of printed copy.
23675 Mention BISON_SIMPLE and BISON_HAIRY.
23676
236771999-12-13 Jesse Thilo <jthilo@gnu.org>
23678
23679 * configure.in, NEWS:
23680 Bison 1.29 released.
23681
236821999-10-27 Jesse Thilo <jthilo@gnu.org>
23683
23684 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
23685 Added reference card.
23686
236871999-07-26 Jesse Thilo <jthilo@gnu.org>
23688
23689 * po/ru.po: Added Russian translation.
23690
236911999-07-26 Jesse Thilo <jthilo@gnu.org>
23692
23693 * configure.in: Added Russian translation.
23694
236951999-07-06 Jesse Thilo <jthilo@gnu.org>
23696
23697 * configure.in, NEWS, README:
23698 Released version 1.28.
23699
237001999-06-14 Jesse Thilo <jthilo@gnu.org>
23701
23702 * src/system.h:
23703 Squashed redefinition warning on some systems.
23704
23705 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
23706 Have configure build version string instead of relying on ANSI string
23707 concatentation.
23708
237091999-06-14 Jesse Thilo <jthilo@gnu.org>
23710
23711 * po/POTFILES.in: Got rid of version.c.
23712
237131999-06-14 Jesse Thilo <jthilo@gnu.org>
23714
23715 * acconfig.h, configure.in:
23716 Have configure build version string instead of relying on ANSI string
23717 concatentation.
23718
237191999-06-08 Jesse Thilo <jthilo@gnu.org>
23720
23721 * doc/bison.1:
23722 Dropped mention of `+' for long-named options.
23723
237241999-05-30 Jesse Thilo <jthilo@gnu.org>
23725
23726 * src/files.c: Added <unistd.h> for unlink().
23727
23728 * src/Makefile.am, src/system.h:
23729 I18n fixes.
23730
237311999-05-30 Jesse Thilo <jthilo@gnu.org>
23732
23733 * README: Added a FAQ list.
23734
23735 * configure.in, acconfig.h:
23736 I18n fixes.
23737
237381999-05-30 Jesse Thilo <jthilo@gnu.org>
23739
23740 * doc/FAQ, doc/Makefile.am:
23741 Added a FAQ list.
23742
237431999-05-19 Jesse Thilo <jthilo@gnu.org>
23744
23745 * src/alloc.h, src/symtab.h, src/version.c:
23746 Protected inclusion of "config.h" with HAVE_CONFIG_H.
23747
237481999-04-18 Jesse Thilo <jthilo@gnu.org>
23749
23750 * src/.cvsignore, src/Makefile.am:
23751 Reorganized: sources in `src', documentation in `doc'.
23752
23753 * src/lex.c (literalchar):
23754 fixed the code for escaping double quotes (thanks
23755 Jonathan Czisny.)
23756
237571999-04-18 Jesse Thilo <jthilo@gnu.org>
23758
23759 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
23760 Adjusted paths to reflect directory reorganization.
23761
237621999-04-18 Jesse Thilo <jthilo@gnu.org>
23763
23764 * doc/.cvsignore, doc/Makefile.am:
23765 Reorganized: sources in `src', documentation in `doc'.
23766
237671999-04-18 Jesse Thilo <jthilo@gnu.org>
23768
23769 * configure.in:
23770 Updated AC_INIT file to reflect directory reorganization.
23771
23772 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
23773 Reorganized: sources in `src', documentation in `doc'.
23774
237751999-04-13 Jesse Thilo <jthilo@gnu.org>
23776
23777 * src/allocate.c:
23778 Don't declare calloc() and realloc() if not necessary.
23779
237801999-04-13 Jesse Thilo <jthilo@gnu.org>
23781
23782 * configure.in, acconfig.h, acinclude.m4:
23783 Don't declare calloc() and realloc() if not necessary.
23784
237851999-03-23 Jesse Thilo <jthilo@gnu.org>
23786
23787 * po/.cvsignore: Added i18n support.
23788
237891999-03-23 Jesse Thilo <jthilo@gnu.org>
23790
23791 * acconfig.h, configure.in, Makefile.am:
23792 Added i18n support.
23793
237941999-03-22 Jesse Thilo <jthilo@gnu.org>
23795
23796 * src/bison.s1: Fixed #line numbers.
23797
237981999-03-15 Jesse Thilo <jthilo@gnu.org>
23799
23800 * po/es.po, po/fr.po, po/nl.po, po/de.po:
23801 Added PO files from Translation Project.
23802
238031999-03-03 Jesse Thilo <jthilo@gnu.org>
23804
23805 * Makefile.am:
23806 Added support for non-ANSI compilers (ansi2knr).
23807
238081999-02-16 Jesse Thilo <jthilo@gnu.org>
23809
23810 * configure.in: Bumped version number to 1.27.
23811
23812 * Makefile.am:
23813 Added `bison.simple' to list of files removed by `make distclean'.
23814
238151999-02-12 Jesse Thilo <jthilo@gnu.org>
23816
23817 * src/files.c, src/files.h:
23818 Defined locations of parser files in config.h instead of Makefile.
23819
238201999-02-12 Jesse Thilo <jthilo@gnu.org>
23821
23822 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
23823 Defined locations of parser files in config.h instead of Makefile.
23824
238251999-02-09 Jesse Thilo <jthilo@gnu.org>
23826
23827 * Makefile.am:
23828 Removed inappropriate use of $< macro.
23829
238301999-02-05 Jesse Thilo <jthilo@gnu.org>
23831
23832 * po/Makefile.in.in, po/POTFILES.in:
23833 Add `po' directory skeleton.
23834
238351999-01-27 Jesse Thilo <jthilo@gnu.org>
23836
23837 * README: Document help-bison list.
23838
23839 * configure.in: Add check for mkstemp().
23840
238411999-01-20 Jesse Thilo <jthilo@gnu.org>
23842
23843 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
23844 Hush a few compiler warnings.
23845
23846 * src/files.c:
23847 Add tryclose(), which verifies that fclose was successful.
23848 Hush a couple of compiler warnings.
23849
238501999-01-20 Jesse Thilo <jthilo@gnu.org>
23851
23852 * Makefile.am, OChangeLog:
23853 ChangeLog is now automatically generated. Include the old version as
23854 OChangeLog.
23855
238561999-01-14 Jesse Thilo <jthilo@gnu.org>
23857
23858 * 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:
23859 Update FSF address.
23860
238611999-01-14 Jesse Thilo <jthilo@gnu.org>
23862
23863 * doc/bison.texinfo: Fix formatting glitch.
23864
23865 * doc/bison.texinfo: Update FSF address.
23866
238671999-01-14 Jesse Thilo <jthilo@gnu.org>
23868
23869 * acconfig.h: Update FSF address.
23870
238711999-01-08 Jesse Thilo <jthilo@gnu.org>
23872
23873 * src/system.h:
23874 Don't define PACKAGE here, since config.h defines it.
23875
238761998-12-30 Jesse Thilo <jthilo@gnu.org>
23877
23878 * src/reader.c: Update copyright date.
23879
23880 * src/main.c:
23881 Ditch sprintf to statically-sized buffers in fatal/warn functions in
23882 favor of output directly to stderr (avoids buffer overruns).
23883
23884 * src/reader.c: Some checks for premature EOF.
23885
23886 * 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:
23887 Use prototypes if the compiler understands them.
23888
23889 * src/files.c: Honor TMPDIR on Unix hosts.
23890 Use prototypes if the compiler understands them.
23891
23892 * src/reader.c:
23893 Fix a couple of buffer overrun bugs.
23894 Use prototypes if the compiler understands them.
23895
23896 * src/system.h: Include unistd.h and ctype.h.
23897 Use #ifdef instead of #if for NLS symbols.
23898
238991998-12-30 Jesse Thilo <jthilo@gnu.org>
23900
23901 * doc/bison.texinfo:
23902 Delete comment "consider using @set for edition number, etc..." since
23903 we now are doing so.
23904
239051998-12-30 Jesse Thilo <jthilo@gnu.org>
23906
23907 * configure.in:
23908 Use prototypes if the compiler understands them.
23909
23910 * NEWS: Document 1.26 highlights.
23911
23912 * Makefile.am: Require Automake 1.3 or later.
23913
23914 * acconfig.h:
23915 Use prototypes if the compiler understands them.
23916
239171998-12-29 Jesse Thilo <jthilo@gnu.org>
23918
23919 * src/version.c:
23920 Use VERSION symbol from automake for version number.
23921
239221998-12-29 Jesse Thilo <jthilo@gnu.org>
23923
23924 * acconfig.h, configure.in, version.cin:
23925 Use VERSION symbol from automake for version number.
23926
239271998-11-28 Jesse Thilo <jthilo@gnu.org>
23928
23929 * Makefile.am:
23930 Distribute original version of simple parser (bison.s1), not built
23931 version (bison.simple).
23932
239331998-11-28 Jesse Thilo <jthilo@gnu.org>
23934
23935 * doc/bison.texinfo: Add info dir entry.
23936
23937 * doc/bison.texinfo:
23938 Let automake put version number into documentation.
23939
239401998-11-26 Jesse Thilo <jthilo@gnu.org>
23941
23942 * src/bison.cld, src/build.com, src/vmshlp.mar:
23943 Add non-RCS files from /gd/gnu/bison.
23944
239451998-11-26 Jesse Thilo <jthilo@gnu.org>
23946
23947 * doc/bison.1:
23948 Document the BISON_HAIRY and BISON_SIMPLE variables.
23949
239501998-11-25 Jesse Thilo <jthilo@gnu.org>
23951
23952 * src/version.c: Build version.c automatically.
23953
23954 * src/reader.c:
23955 Fix token numbering (used to start at 258, not 257).
23956
23957 * src/system.h: Include config.h.
23958
23959 * src/getargs.c: Update bug report address.
23960
23961 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
23962 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
23963
239641998-11-25 Jesse Thilo <jthilo@gnu.org>
23965
23966 * Makefile.am:
23967 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23968
23969 * configure.in, version.cin:
23970 Build version.c automatically.
23971
23972 * AUTHORS: Add AUTHORS file.
23973
23974 * README: Update bug report address.
23975
23976 * bison.simple:
23977 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
23978
23979 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
23980 Add automake stuff.
23981
239821998-11-25 Jesse Thilo <jthilo@gnu.org>
23983
23984 * doc/bison.texinfo: Clean up some formatting.
23985
239861998-05-05 Richard Stallman <rms@gnu.org>
23987
23988 * doc/bison.texinfo:
23989 Explain better why to make a pure parser.
23990
239911998-01-05 Richard Stallman <rms@gnu.org>
23992
23993 * src/files.c (openfiles):
23994 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
23995 find a temporary directory, if possible. Do not unlink files while
23996 they are open.
23997
239981997-08-25 Richard Stallman <rms@gnu.org>
23999
24000 * src/reader.c (stack_offset;):
24001 Change some warni to warns.
24002
24003 * src/lex.c (literalchar): Use warns, not warni.
24004
240051997-06-28 Richard Stallman <rms@gnu.org>
24006
24007 * src/bison.s1: Add a Bison version comment.
24008
24009 * src/main.c (fatal, warn, berror):
24010 Use program_name.
24011
240121997-06-28 Richard Stallman <rms@gnu.org>
24013
24014 * Makefile.in (bison_version): New variable.
24015 (dist): Use that variable.
24016 (bison.s1): Substitute the Bison version into bison.simple.
24017
24018 * bison.simple: Add a Bison version comment.
24019
240201997-06-18 Richard Stallman <rms@gnu.org>
24021
24022 * src/main.c (fatal, warn, berror):
24023 Make error messages standard.
24024 (toomany): Improve error message text.
24025
24026 * 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:
24027 new.h renamed to alloc.h.
24028
240291997-06-18 Richard Stallman <rms@gnu.org>
24030
24031 * Makefile.in: new.h renamed to alloc.h.
24032
240331997-05-24 Richard Stallman <rms@gnu.org>
24034
24035 * src/lex.c (literalchar):
24036 Fix the code for escaping \, " and '.
24037
24038 (lex): Avoid trouble when there are many chars
24039 to discard in a char literal with just several chars in it.
24040
240411997-05-17 Richard Stallman <rms@gnu.org>
24042
24043 * src/bison.s1:
24044 Use malloc, if using alloca is troublesome.
24045 (YYSTACK_USE_ALLOCA): New flag macro.
24046 Define it for some systems and compilers.
24047 (YYSTACK_ALLOC): New macro.
24048 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24049 If it was malloc'd, free it.
24050
240511997-05-17 Richard Stallman <rms@gnu.org>
24052
24053 * bison.simple:
24054 Use malloc, if using alloca is troublesome.
24055 (YYSTACK_USE_ALLOCA): New flag macro.
24056 Define it for some systems and compilers.
24057 (YYSTACK_ALLOC): New macro.
24058 (yyparse): Use YYSTACK_ALLOC to allocate stack.
24059 If it was malloc'd, free it.
24060
240611997-04-23 Richard Stallman <rms@gnu.org>
24062
24063 * src/bison.s1:
24064 (alloca) [__hpux]: Always define as __builtin_alloca.
24065
240661997-04-23 Richard Stallman <rms@gnu.org>
24067
24068 * bison.simple:
24069 (alloca) [__hpux]: Always define as __builtin_alloca.
24070
240711997-04-22 Richard Stallman <rms@gnu.org>
24072
24073 * src/bison.s1:
24074 [__hpux]: Include alloca.h (right for HPUX 10)
24075 instead of declaring alloca (right for HPUX 9).
24076
24077 * src/bison.s1 (__yy_memcpy):
24078 Declare arg `count' as unsigned int.
24079 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24080
240811997-04-22 Richard Stallman <rms@gnu.org>
24082
24083 * bison.simple:
24084 [__hpux]: Include alloca.h (right for HPUX 10)
24085 instead of declaring alloca (right for HPUX 9).
24086
24087 * bison.simple (__yy_memcpy):
24088 Declare arg `count' as unsigned int.
24089 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
24090
240911997-01-03 Richard Stallman <rms@gnu.org>
24092
24093 * src/allocate.c: [__STDC__ or _MSC_VER]:
24094 Declare calloc and realloc to return void *.
24095
240961997-01-02 Richard Stallman <rms@gnu.org>
24097
24098 * src/system.h:
24099 [_MSC_VER]: Include stdlib.h and process.h.
24100 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
24101
24102 * src/main.c (main): Return FAILURE as a value.
24103 (printable_version): Declare arg as int, not char.
24104
241051997-01-02 Richard Stallman <rms@gnu.org>
24106
24107 * Makefile.in (dist):
24108 Explicitly check for symlinks, and copy them.
24109
241101996-12-19 Richard Stallman <rms@gnu.org>
24111
24112 * src/files.c:
24113 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
24114
241151996-12-18 Paul Eggert <eggert@gnu.org>
24116
24117 * src/bison.s1 (yyparse):
24118 If __GNUC__ and YYPARSE_PARAM are both defined,
24119 declare yyparse to have a void * argument.
24120
241211996-12-18 Paul Eggert <eggert@gnu.org>
24122
24123 * bison.simple (yyparse):
24124 If __GNUC__ and YYPARSE_PARAM are both defined,
24125 declare yyparse to have a void * argument.
24126
241271996-12-17 Richard Stallman <rms@gnu.org>
24128
24129 * src/reduce.c (nbits): Add some casts.
24130
241311996-08-12 Richard Stallman <rms@gnu.org>
24132
24133 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
24134
241351996-08-12 Richard Stallman <rms@gnu.org>
24136
24137 * bison.simple: Test _MSDOS as well as _MSDOS_.
24138
241391996-07-31 Richard Stallman <rms@gnu.org>
24140
24141 * src/bison.s1:
24142 [__sun && __i386]: Include alloca.h.
24143
241441996-07-31 Richard Stallman <rms@gnu.org>
24145
24146 * bison.simple:
24147 [__sun && __i386]: Include alloca.h.
24148
241491996-07-30 Richard Stallman <rms@gnu.org>
24150
24151 * src/bison.s1: Comment change.
24152
24153 * src/bison.s1: Test _MSDOS_, not MSDOS.
24154
241551996-07-30 Richard Stallman <rms@gnu.org>
24156
24157 * bison.simple: Comment change.
24158
24159 * bison.simple: Test _MSDOS_, not MSDOS.
24160
241611996-06-01 Richard Stallman <rms@gnu.org>
24162
24163 * 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:
24164 Insert `_' macro around many string constants.
24165
24166 * src/main.c:
24167 Insert `_' macro around many string constants.
24168
24169 (main): Call setlocale, bindtextdomain and textdomain.
24170
24171 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
24172 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
24173 [ENABLE_NLS]: Include libintl.h.
24174 [ENABLE_NLS] (gettext): Define.
24175 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
24176 (N_, PACKAGE, LOCALEDIR): New macros.
24177
241781996-06-01 Richard Stallman <rms@gnu.org>
24179
24180 * POTFILES.in: New file.
24181
24182 * Makefile.in (allocate.o):
24183 Define target explicitly.
24184
24185 * Makefile.in (CFLAGS): Set to @CFLAGS@.
24186 (LDFLAGS): Set to @LDFLAGS@.
24187 (configure): Run autoconf only if preceding `cd' succeeds.
24188 (bison.s1): Redirect output to temporary file then move the
24189 temporary to the target, rather than redirecting directly to bison.s1.
24190 (clean): Remove config.status and config.log.
24191 (distclean): Don't remove config.status here.
24192
241931996-05-12 Richard Stallman <rms@gnu.org>
24194
24195 * src/bison.s1:
24196 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24197
241981996-05-12 Richard Stallman <rms@gnu.org>
24199
24200 * bison.simple:
24201 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
24202
242031996-05-11 Richard Stallman <rms@gnu.org>
24204
24205 * src/bison.s1 (__yy_memcpy):
24206 Really reorder the args, as was supposedly done on Feb 14 1995.
24207 (yyparse): Calls changed accordingly.
24208
242091996-05-11 Richard Stallman <rms@gnu.org>
24210
24211 * Makefile.in (dist): Don't use $(srcdir).
24212
24213 * bison.simple (__yy_memcpy):
24214 Really reorder the args, as was supposedly done on Feb 14 1995.
24215 (yyparse): Calls changed accordingly.
24216
242171996-01-27 Richard Stallman <rms@gnu.org>
24218
24219 * src/output.c (output_rule_data):
24220 Test YYERROR_VERBOSE in the conditional
24221 around the definition of ttyname.
24222
242231995-12-29 Richard Stallman <rms@gnu.org>
24224
24225 * src/bison.s1:
24226 Fix line numbers in #line commands.
24227
242281995-12-29 Richard Stallman <rms@gnu.org>
24229
24230 * bison.simple:
24231 Fix line numbers in #line commands.
24232
242331995-12-27 Richard Stallman <rms@gnu.org>
24234
24235 * src/bison.s1 (YYPARSE_PARAM_DECL):
24236 In C++, make it always null.
24237 (YYPARSE_PARAM_ARG): New macro.
24238 (yyparse): Use YYPARSE_PARAM_ARG.
24239
242401995-12-27 Richard Stallman <rms@gnu.org>
24241
24242 * bison.simple (YYPARSE_PARAM_DECL):
24243 In C++, make it always null.
24244 (YYPARSE_PARAM_ARG): New macro.
24245 (yyparse): Use YYPARSE_PARAM_ARG.
24246
242471995-11-29 Richard Stallman <rms@gnu.org>
24248
24249 * doc/bison.texinfo:
24250 Describe literal string tokens, %raw, %no_lines, %token_table.
24251
242521995-11-29 Daniel Hagerty <hag@gnu.org>
24253
24254 * doc/bison.texinfo: Fixed update date
24255
242561995-10-16 Richard Stallman <rms@gnu.org>
24257
24258 * src/version.c: Version 1.25.
24259
242601995-10-16 Richard Stallman <rms@gnu.org>
24261
24262 * NEWS: *** empty log message ***
24263
242641995-10-16 Richard Stallman <rms@gnu.org>
24265
24266 * doc/bison.1, doc/bison.rnh:
24267 Add new options.
24268
242691995-10-15 Richard Stallman <rms@gnu.org>
24270
24271 * src/vmsgetargs.c, src/getargs.c:
24272 Added -n, -k, and -raw switches.
24273 (noparserflag, toknumflag, rawtoknumflag): New variables.
24274
24275 * src/symtab.h (SALIAS):
24276 New #define for adding aliases to %token.
24277 (struct bucket): Added `alias' field.
24278
24279 * src/reduce.c (reduce_grammar):
24280 Revise error message.
24281 (print_notices): Remove final `.' from error message.
24282
24283 * src/reader.c (reader_output_yylsp):
24284 New function.
24285 (readgram): Use `#if 0' around code that accepted %command
24286 inside grammar rules: The documentation doesn't allow it,
24287 and it will fail since the %command processors scan for the next %.
24288 (parse_token_decl): Extended the %token
24289 declaration to allow a multi-character symbol as an alias.
24290 (parse_thong_decl): New function.
24291 (read_declarations): Added %thong declarations.
24292 (read_declarations): Handle NOOP to deal with allowing
24293 % declarations as another means to specify the flags.
24294 (readgram): Allow %prec prior to semantics embedded in a rule.
24295 (skip_to_char, read_declarations, copy_definition)
24296 (parse_token_decl, parse_start_decl, parse_type_decl)
24297 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
24298 (get_type_name, copy_guard, copy_action, readgram)
24299 (get_type, packsymbols): Revised most error messages.
24300 Changed `fatal' to `warnxxx' to avoid aborting for error.
24301 Revised and use multiple warnxxx functions to avoid using VARARGS1.
24302 (read_declarations): Improve the error message for
24303 an invalid character. Do not abort.
24304 (read_declarations, copy_guard, copy_action): Use
24305 printable_version to avoid unprintable characters in printed output.
24306 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
24307 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
24308 Allow the type of a non-terminal can be given
24309 more than once, as long as all specifications give the same type.
24310
24311 * src/output.c:
24312 (output_headers, output_trailers, output, output_gram)
24313 (output_rule_data): Implement noparserflag variable.
24314 Implement toknumflag variable.
24315 (output): Call reader_output_yylsp to output LTYPESTR.
24316
24317 * src/main.c (main):
24318 If reader sees an error, don't process the grammar.
24319 (fatals): Updated to not use VARARGS1.
24320 (printable_version, int_to_string, warn, warni, warns, warnss)
24321 (warnsss): New error reporting functions. Avoid abort for error.
24322
24323 * src/lex.h:
24324 Added THONG and NOOP for alias processing.
24325 Added SETOPT for the new code that allows setting options with %flags.
24326
24327 * src/lex.c:
24328 Include getopt.h. Add some extern decls.
24329 (safegetc): New function to deal with EOF gracefully.
24330 (literalchar); new function to deal with reading \ escapes.
24331 (lex): Use literalchar.
24332 (lex): Implemented "..." tokens.
24333 (literalchar, lex, parse_percent_token): Made tokenbuffer
24334 always contain the token. This includes growing the token
24335 buffer while reading an integer.
24336 (parse_percent_token): Replaced if-else statement with percent_table.
24337 (parse_percent_token): Added % declarations as another
24338 way to specify the flags -n, -l, and -r. Also added hooks for
24339 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
24340 major changes to files.c.
24341 (lex) Retain in the incoming stream a character following
24342 an incorrect '/'.
24343 (skip_white_space, lex): Revised most error messages
24344 and changed fatal to warn to avoid aborting.
24345 (percent_table): Added %thong declarations.
24346
24347 * src/gram.h: Comment changes.
24348
24349 * src/files.c (openfiles, open_extra_files, done):
24350 Add faction flag
24351 and actfile file. Handle noparserflag. Both for -n switch.
24352
24353 * src/conflicts.c (resolve_sr_conflict):
24354 Remove use of alloca.
24355
243561995-06-01 Jim Meyering <meyering@gnu.org>
24357
24358 * doc/bison.texinfo: *** empty log message ***
24359
243601995-05-06 Richard Stallman <rms@gnu.org>
24361
24362 * src/bison.s1: Comment change.
24363
243641995-05-06 Richard Stallman <rms@gnu.org>
24365
24366 * bison.simple: Comment change.
24367
243681995-05-03 Richard Stallman <rms@gnu.org>
24369
24370 * src/version.c: Version now 1.24.
24371
24372 * src/bison.s1: Change distribution terms.
24373
24374 * src/version.c: Version now 1.23.
24375
243761995-05-03 Richard Stallman <rms@gnu.org>
24377
24378 * doc/bison.texinfo:
24379 Rewrite "Conditions for Using Bison".
24380 Update version to 1.24.
24381
243821995-05-03 Richard Stallman <rms@gnu.org>
24383
24384 * bison.simple: Change distribution terms.
24385
243861995-02-23 Richard Stallman <rms@gnu.org>
24387
24388 * src/files.c: Test __VMS_POSIX as well as VMS.
24389
243901995-02-14 Jim Meyering <meyering@gnu.org>
24391
24392 * src/bison.s1 (__yy_memcpy):
24393 Renamed from __yy_bcopy to avoid
24394 confusion. Reverse FROM and TO arguments to be consistent with
24395 those of memcpy.
24396
243971995-02-14 Jim Meyering <meyering@gnu.org>
24398
24399 * bison.simple (__yy_memcpy):
24400 Renamed from __yy_bcopy to avoid
24401 confusion. Reverse FROM and TO arguments to be consistent with
24402 those of memcpy.
24403
244041994-11-10 David J. MacKenzie <djm@gnu.org>
24405
24406 * NEWS: reformat
24407
24408 * NEWS: New file.
24409
24410 * Makefile.in (DISTFILES): Include NEWS.
24411
24412 * Makefile.in (DISTFILES):
24413 Include install-sh, not install.sh.
24414
24415 * configure.in: Update to Autoconf v2 macro names.
24416
244171994-10-05 David J. MacKenzie <djm@gnu.org>
24418
24419 * Makefile.in: fix typo
24420
24421 * Makefile.in (prefix, exec_prefix):
24422 Let configure set them.
24423
244241994-09-28 David J. MacKenzie <djm@gnu.org>
24425
24426 * Makefile.in: Set datadir to $(prefix)/share.
24427
244281994-09-15 Richard Stallman <rms@gnu.org>
24429
24430 * src/bison.s1:
24431 Update copyright notice and GPL version.
24432
244331994-09-15 Richard Stallman <rms@gnu.org>
24434
24435 * bison.simple:
24436 Update copyright notice and GPL version.
24437
244381994-07-12 Richard Stallman <rms@gnu.org>
24439
24440 * src/reduce.c, src/reader.c:
24441 entered into RCS
24442
244431994-05-05 David J. MacKenzie <djm@gnu.org>
24444
24445 * Makefile.in: entered into RCS
24446
244471994-03-26 Richard Stallman <rms@gnu.org>
24448
24449 * src/bison.s1: entered into RCS
24450
244511994-03-26 Richard Stallman <rms@gnu.org>
24452
24453 * bison.simple: entered into RCS
24454
244551994-03-25 Richard Stallman <rms@gnu.org>
24456
24457 * src/main.c: entered into RCS
24458
244591994-03-24 Richard Stallman <rms@gnu.org>
24460
24461 * src/conflicts.c: entered into RCS
24462
244631994-01-02 Richard Stallman <rms@gnu.org>
24464
24465 * Makefile.in: *** empty log message ***
24466
244671993-11-21 Richard Stallman <rms@gnu.org>
24468
24469 * src/bison.s1: *** empty log message ***
24470
244711993-11-21 Richard Stallman <rms@gnu.org>
24472
24473 * doc/bison.texinfo: entered into RCS
24474
24475 * doc/bison.texinfo: *** empty log message ***
24476
244771993-11-21 Richard Stallman <rms@gnu.org>
24478
24479 * bison.simple: *** empty log message ***
24480
244811993-10-25 David J. MacKenzie <djm@gnu.org>
24482
24483 * doc/bison.texinfo: *** empty log message ***
24484
244851993-10-19 Richard Stallman <rms@gnu.org>
24486
24487 * src/bison.s1: *** empty log message ***
24488
244891993-10-19 Richard Stallman <rms@gnu.org>
24490
24491 * bison.simple: *** empty log message ***
24492
244931993-10-14 Richard Stallman <rms@gnu.org>
24494
24495 * src/bison.s1: *** empty log message ***
24496
244971993-10-14 Richard Stallman <rms@gnu.org>
24498
24499 * bison.simple: *** empty log message ***
24500
245011993-09-14 David J. MacKenzie <djm@gnu.org>
24502
24503 * doc/bison.texinfo: *** empty log message ***
24504
245051993-09-13 Noah Friedman <friedman@gnu.org>
24506
24507 * Makefile.in: *** empty log message ***
24508
245091993-09-10 Richard Stallman <rms@gnu.org>
24510
24511 * src/conflicts.c: *** empty log message ***
24512
24513 * src/system.h: entered into RCS
24514
245151993-09-10 Richard Stallman <rms@gnu.org>
24516
24517 * doc/bison.1: entered into RCS
24518
245191993-09-06 Noah Friedman <friedman@gnu.org>
24520
24521 * src/version.c: entered into RCS
24522
245231993-09-06 Noah Friedman <friedman@gnu.org>
24524
24525 * Makefile.in: *** empty log message ***
24526
245271993-07-30 David J. MacKenzie <djm@gnu.org>
24528
24529 * Makefile.in: *** empty log message ***
24530
245311993-07-24 Richard Stallman <rms@gnu.org>
24532
24533 * src/bison.s1: *** empty log message ***
24534
245351993-07-24 Richard Stallman <rms@gnu.org>
24536
24537 * bison.simple: *** empty log message ***
24538
245391993-07-08 David J. MacKenzie <djm@gnu.org>
24540
24541 * Makefile.in: *** empty log message ***
24542
245431993-07-04 Richard Stallman <rms@gnu.org>
24544
24545 * src/bison.s1: *** empty log message ***
24546
245471993-07-04 Richard Stallman <rms@gnu.org>
24548
24549 * bison.simple: *** empty log message ***
24550
245511993-06-26 David J. MacKenzie <djm@gnu.org>
24552
24553 * src/getargs.c: entered into RCS
24554
245551993-06-26 David J. MacKenzie <djm@gnu.org>
24556
24557 * doc/bison.texinfo: *** empty log message ***
24558
24559 * doc/bison.1: New file.
24560
245611993-06-25 Richard Stallman <rms@gnu.org>
24562
24563 * src/getargs.c: New file.
24564
245651993-06-16 Richard Stallman <rms@gnu.org>
24566
24567 * src/bison.s1: *** empty log message ***
24568
245691993-06-16 Richard Stallman <rms@gnu.org>
24570
24571 * bison.simple: *** empty log message ***
24572
245731993-06-03 Richard Stallman <rms@gnu.org>
24574
24575 * src/bison.s1: New file.
24576
245771993-06-03 Richard Stallman <rms@gnu.org>
24578
24579 * doc/bison.texinfo: *** empty log message ***
24580
245811993-06-03 Richard Stallman <rms@gnu.org>
24582
24583 * bison.simple: New file.
24584
245851993-05-19 Richard Stallman <rms@gnu.org>
24586
24587 * doc/bison.texinfo: New file.
24588
245891993-05-07 Noah Friedman <friedman@gnu.org>
24590
24591 * Makefile.in: *** empty log message ***
24592
245931993-04-28 Noah Friedman <friedman@gnu.org>
24594
24595 * src/reader.c: *** empty log message ***
24596
245971993-04-23 Noah Friedman <friedman@gnu.org>
24598
24599 * src/alloc.h: entered into RCS
24600
246011993-04-20 David J. MacKenzie <djm@gnu.org>
24602
24603 * src/version.c: *** empty log message ***
24604
24605 * src/files.c, src/allocate.c:
24606 entered into RCS
24607
24608 * src/reader.c: *** empty log message ***
24609
24610 * src/lex.c: entered into RCS
24611
24612 * src/conflicts.c: New file.
24613
24614 * src/symtab.c: entered into RCS
24615
24616 * src/alloc.h: New file.
24617
24618 * src/LR0.c: entered into RCS
24619
246201993-04-18 Noah Friedman <friedman@gnu.org>
24621
24622 * src/reader.c: New file.
24623
24624 * src/version.c: *** empty log message ***
24625
246261993-04-18 Noah Friedman <friedman@gnu.org>
24627
24628 * Makefile.in: *** empty log message ***
24629
246301993-04-17 Noah Friedman <friedman@gnu.org>
24631
24632 * Makefile.in: *** empty log message ***
24633
246341993-04-15 Richard Stallman <rms@gnu.org>
24635
24636 * src/main.c, src/files.c:
24637 New file.
24638
246391993-04-15 Noah Friedman <friedman@gnu.org>
24640
24641 * configure.in: entered into RCS
24642
24643 * configure.in: *** empty log message ***
24644
24645 * configure.in: New file.
24646
246471993-04-14 Richard Stallman <rms@gnu.org>
24648
24649 * Makefile.in: New file.
24650
246511993-04-13 Richard Stallman <rms@gnu.org>
24652
24653 * src/version.c: New file.
24654
246551993-03-25 Richard Stallman <rms@gnu.org>
24656
24657 * src/output.c: entered into RCS
24658
246591992-09-25 Richard Stallman <rms@gnu.org>
24660
24661 * configure.bat: entered into RCS
24662
246631992-06-22 Richard Stallman <rms@gnu.org>
24664
24665 * src/vmsgetargs.c: entered into RCS
24666
246671992-06-22 Richard Stallman <rms@gnu.org>
24668
24669 * doc/bison.rnh: entered into RCS
24670
246711992-04-20 David J. MacKenzie <djm@gnu.org>
24672
24673 * README: entered into RCS
24674
246751992-01-22 Richard Stallman <rms@gnu.org>
24676
24677 * src/machine.h: entered into RCS
24678
246791991-12-21 Richard Stallman <rms@gnu.org>
24680
24681 * src/lalr.c, src/closure.c:
24682 entered into RCS
24683
246841991-12-20 Richard Stallman <rms@gnu.org>
24685
24686 * src/state.h: entered into RCS
24687
246881991-12-18 Richard Stallman <rms@gnu.org>
24689
24690 * src/print.c, src/nullable.c, src/derives.c:
24691 entered into RCS
24692
246931991-11-03 David J. MacKenzie <djm@gnu.org>
24694
24695 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
24696 entered into RCS
24697
246981988-09-09 Richard Stallman <rms@gnu.org>
24699
24700 * src/bison.hairy: entered into RCS
24701
247021987-12-16 Richard Stallman <rms@gnu.org>
24703
24704 * REFERENCES: entered into RCS
dc546b0f 24705
f294a2c2 24706
04098407 24707 -----
f294a2c2 24708
04098407 24709 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
e021191b
JD
24710 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
24711 2008, 2009 Free Software Foundation, Inc.
f294a2c2 24712
04098407
PE
24713 Copying and distribution of this file, with or without
24714 modification, are permitted provided the copyright notice and this
24715 notice are preserved.