]> git.saurik.com Git - bison.git/blob - ChangeLog
Use YYFPRINTF instead of fprintf where appropriate. Reported by
[bison.git] / ChangeLog
1 2007-02-24 Joel E. Denny <jdenny@ces.clemson.edu>
2
3 Use YYFPRINTF instead of fprintf where appropriate. Reported by
4 Sébastien Fricker at
5 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00035.html>.
6 * THANKS: Add Sébastien Fricker.
7 * data/glr.c, data/push.c, data/yacc.c (yy_reduce_print): Implement.
8 * doc/bison.texinfo (Tracing): Make it clearer that YYFPRINTF must
9 accept a variable number of arguments.
10
11 2007-02-19 Joel E. Denny <jdenny@ces.clemson.edu>
12
13 * bootstrap: Remove occurrences of .#bootmp from lib/Makefile.
14
15 2007-02-13 Juan Manuel Guerrero <juan.guerrero@gmx.de>
16
17 * djgpp/config.bat: Adjustments concerning the use of autoconf 2.61.
18 * djgpp/config.sed: Adjustments concerning the use of autoconf 2.61.
19 * djgpp/config.site: Adjustments concerning the use of autoconf 2.61.
20
21 2007-02-11 Paul Eggert <eggert@cs.ucla.edu>
22
23 Undo my 2007-02-07 change, switching back to the c-strcase module
24 introduced in the 2007-02-03 change. Bruno Haible reported that
25 the 2007-02-07 change would be dangerous in Turkish if we add a
26 language whose name contains "i", since "i" is not lowercase "I"
27 in Turkish.
28 * bootstrap.conf (gnulib_modules): Add c-strcase. Remove strcase.
29 * lib/.cvsignore: Add c-ctype.c, c-ctype.h, c-strcase.h,
30 c-strcasecomp.c, c-strncasecmp.c. Remove strcasecmp.c, strncasecmp.c.
31 * m4/.cvsignore: Remove strcase.m4.
32 * src/getargs.c: Revert 2007-02-07 change, as follows.
33 Include c-strcase.h.
34 (language_argmatch): Use c_strcasecmp rather than strcasecmp.
35
36 2007-02-11 Bruno Haible <bruno@clisp.org>
37
38 Enable the Java related testsuite tests when the only Java compiler
39 found is a gcj < 4.3. Discussed at
40 <http://lists.gnu.org/archive/html/bug-bison/2007-02/msg00016.html>.
41 * configure.ac (gt_JAVACOMP): Don't specify a target_version.
42
43 2007-02-11 Joel E. Denny <jdenny@ces.clemson.edu>
44
45 * data/Makefile.am: Update copyright date.
46 * data/push.c (yypull_parse): Report memory exhaustion and return 2 if
47 yypstate_new returns NULL.
48 (yypstate_new): Return NULL if malloc does.
49 * src/reader.c (packgram): Move translation of rule actions from the
50 beginning of packgram to...
51 (check_and_convert_grammar): ... here right before packgram is invoked
52 so it's easier to write more complete comments, and remove redundant
53 code.
54
55 2007-02-10 Joel E. Denny <jdenny@ces.clemson.edu>
56
57 As in semantic actions, make @$ in %initial-action, %destructor, and
58 %printer imply %locations.
59 * src/scan-code.l (SC_SYMBOL_ACTION): Set locations_flag = true when
60 scanning @$.
61 * tests/actions.at (AT_CHECK_ACTION_LOCATIONS): New macro supporting...
62 (@$ in %initial-action implies %locations,
63 @$ in %destructor implies %locations,
64 @$ in %printer implies %locations): ... these new test cases.
65
66 2007-02-07 Paul Eggert <eggert@cs.ucla.edu>
67
68 Undo most of the 2007-02-03 change, switching to the strcase module
69 now that gnulib strcase has been fixed.
70 * bootstrap.conf (gnulib_modules): Remove c-strcase. Add strcase.
71 * lib/.cvsignore: Remove c-ctype.c, c-ctype.h, c-strcase.h,
72 c-strcasecomp.c, c-strncasecmp.c. Add strcasecmp.c, strncasecmp.c
73 * m4/.cvsignore: Add strcase.m4.
74 * src/getargs.c: Revert 2007-02-03 change, as follows.
75 Don't include c-strcase.h.
76 (language_argmatch): Use strcasecmp rather than c_strcasecmp.
77 strcasecmp has "unspecified behavior" outside the POSIX locale,
78 but it works fine in practice if at least one argument is ASCII,
79 as is the case in Bison.
80
81 2007-02-07 Paolo Bonzini <bonzini@gnu.org>
82
83 * tests/java.at: Skip tests if only one of javac/java is present.
84 Reported by Joel E. Denny.
85 * tests/atlocal.in: Adjust copyright years.
86
87 2007-02-05 Paolo Bonzini <bonzini@gnu.org>
88
89 * data/lalr1.java (Stack): Work around old verifiers that disallow
90 access to the private fields of an inner class, from the outer class.
91 We can make Stack's fields public because user code doesn't have access
92 to the instance of Stack used by parse(). Reported by Paul Eggert.
93
94 2007-02-03 Paul Eggert <eggert@cs.ucla.edu>
95
96 * .cvsignore: Add javacomp.sh, javaexec.sh. Is this really
97 the right spot for these files?
98 * bootstrap.conf (gnulib_modules): Add c-strcase.
99 * lib/.cvsignore: Add c-ctype.c c-ctype.h, c-strcasecomp.c,
100 c-strncasecmp.c.
101 * src/getargs.c: Include c-strcase.h.
102 (language_argmatch): Use c_strcasecmp rather than strcasecmp,
103 to avoid unspecified behavior.
104
105 2007-02-01 Joel E. Denny <jdenny@ces.clemson.edu>
106
107 * doc/bison.texinfo (Decl Summary): Correct typo.
108
109 2007-01-30 Paolo Bonzini <bonzini@gnu.org>
110
111 * data/bison.m4 (b4_percent_define_flag_if): Don't treat 0 as false.
112 Complain if the value does not match empty, "true" or "false".
113 * data/c++.m4: Adjust default definitions of %define variables.
114 * data/java.m4: Adjust default definitions of %define variables.
115 * doc/bison.texinfo (Decl Summary): Adjust the %define entry according
116 to above behavior.
117 * tests/input.at (Boolean %define variables): Test new behavior.
118
119 2007-01-29 Paolo Bonzini <bonzini@gnu.org>
120
121 * NEWS: Mention java.
122 * TODO: Remove things that are done.
123 * bootstrap.conf: Add javacomp-script and javaexec-script.
124 * configure.ac: Invoke gt_JAVACOMP and gt_JAVAEXEC.
125
126 * data/Makefile.am: Add new files.
127 * data/java-skel.m4: New.
128 * data/java.m4: New.
129 * data/lalr1.java: New.
130
131 * doc/bison.texinfo: Put "A Complete C++ Example" under
132 C++ Parsers. Add Java Parsers. Put C++ Parsers and Java Parsers
133 under Other Languages.
134
135 * src/getargs.c (valid_languages): Add Java.
136 * src/getargs.h (struct bison_language): Update size of string fields.
137
138 * tests/Makefile.am: Add java.at.
139 * tests/atlocal.in: Add CONF_JAVA and CONF_JAVAC.
140 * tests/java.at: New.
141 * tests/testsuite.at: Include it.
142
143 2007-01-28 Joel E. Denny <jdenny@ces.clemson.edu>
144
145 Clean up.
146 * src/scan-skel.l (at_directive_perform): Add at_directive_argc and
147 at_directive_argv arguments so these no longer have to be global
148 variables. Also, update the implementation for the following changes.
149 (fail_for_at_directive_too_many_args,
150 fail_for_at_directive_too_few_args): Add at_directive_name argument.
151 (at_directive_name): Remove as at_directive_argv[0] will be used for
152 this now.
153 (AT_DIRECTIVE_ARGC_MAX): Increment to make space in at_directive_argv
154 for the directive name.
155 (at_directive_argc, at_directive_argv): Make these local within
156 skel_lex instead of global.
157 (INITIAL): Update directive start action for above changes.
158 (SC_AT_DIRECTIVE_ARG): Rename to...
159 (SC_AT_DIRECTIVE_ARGS): ... this, and update for above changes.
160 (SC_AT_DIRECTIVE_SKIP_WS): Update.
161 (scan_skel): Move yylex_destroy to...
162 (skel_scanner_free): ... here.
163 * tests/skeletons.at (installed skeleton file name): Rename to...
164 (installed skeleton file names): ... this.
165
166 2007-01-27 Joel E. Denny <jdenny@ces.clemson.edu>
167
168 * ChangeLog: For changes in doc/bison.texinfo, consistently reference
169 node names: say "Table of Symbols" not "Bison Symbols", and say "Decl
170 Summary" not "Directives".
171 * doc/bison.texinfo (Decl Summary, Calc++ Parser): Cross-reference the
172 %code entry in "Decl Summary" rather than the one in "Table of Symbols"
173 since the former is now the more complete one.
174 (Prologue Alternatives): Likewise and do the same for %defines.
175 (Table of Symbols): Add summary of %code, add summary of %define, and
176 move full %code documentation to...
177 (Decl Summary): ... here for consistency with other entries in these
178 sections.
179 Move %define entry in order to keep this list alphabetized.
180 Reword %define entry a little to put less emphasis on the skeleton
181 concept, which most users shouldn't have to think about.
182
183 2007-01-26 Paul Eggert <eggert@cs.ucla.edu>
184
185 Adjust to recent gnulib changes.
186 * lib/.cvsignore: Remove stpcpy.h, strndup.h, strnlen.h.
187 Add string.h, string_.h, unistd_.h, wchar_.h.
188 * m4/.cvsignore: Add gnulib-common.m4, string_h.m4, wchar.m4.
189 * src/system.h: Don't include <stpcpy.h>; this is now done by
190 <string.h>.
191
192 2007-01-23 Paolo Bonzini <bonzini@gnu.org>
193
194 Simplify implementation of unqualified %code, implement macros for
195 uniform treatment of boolean %define flags. Document %define.
196 * data/bison.m4 (b4_percent_define_ifdef, b4_percent_define_flag_if,
197 b4_percent_code_ifdef): New.
198 (b4_percent_code_get): Map unqualified %code to b4_percent_code().
199 * data/c++.m4: Define default value for global_tokens_and_yystype.
200 * data/glr.cc: Likewise.
201 * data/location.cc: Use b4_percent_define_flag_if.
202
203 * doc/bison.texinfo (Decl Summary): Document %define.
204
205 * src/parse-gram.y (Unqualified %code): Change muscle name to
206 b4_percent_code().
207 (content.opt): Default to empty.
208
209 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
210
211 Implement support for relative and absolute skeleton file names.
212 Discussed starting at
213 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00071.html>.
214 * doc/bison.texinfo (Decl Summary): Document in %skeleton entry.
215 (Bison Options): Document in --skeleton entry.
216 * src/output.c (output_skeleton): Use strncpy rather than strcpy since
217 full_skeleton can't necessarily hold all of pkgdatadir.
218 If the specified skeleton file name contains a `/', don't prepend
219 pkgdatadir.
220 * src/parse-gram.y (prologue_declaration): If the specified skeleton
221 file name contains a `/', prepend the grammar file directory.
222 * tests/Makefile.am (TESTSUITE_AT): Add skeletons.at.
223 * skeletons.at: New file.
224 (relative skeleton file names): New test case.
225 (installed skeleton file names): New test case.
226 * tests/testsuite.at: Include skeletons.at.
227
228 * bootstrap: Update copyright to 2007.
229
230 2007-01-17 Paolo Bonzini <bonzini@gnu.org>
231
232 * bootstrap: Remove occurrences of .#bootmp from the files.
233
234 2007-01-17 Akim Demaille <akim@epita.fr>
235
236 * doc/bison.texinfo (Calc++ Parser): Don't try to alias
237 nonterminals.
238 Use per-type %printer.
239
240 2007-01-17 Joel E. Denny <jdenny@ces.clemson.edu>
241
242 * NEWS, data/c++-skel.m4, data/c++.m4, data/c-skel.m4, data/c.m4,
243 data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
244 djgpp/config.site, src/files.c, src/files.h, src/main.c,
245 src/muscle_tab.c, src/muscle_tab.h, src/parse-gram.y, src/reader.h,
246 src/scan-skel.h, src/scan-skel.l, tests/actions.at, tests/calc.at,
247 tests/glr-regression.at, tests/input.at, tests/local.at,
248 tests/output.at, tests/torture.at: Update copyright to 2007.
249
250 2007-01-16 Akim Demaille <akim@epita.fr>
251
252 * doc/bison.texinfo (Calc++ Parsing Driver): Let "parse" return an
253 error code.
254 (Calc++ Scanner): Exit with failure if we can't open the input
255 file.
256 Accept "-" standing for stdin.
257 (Calc++ Top Level): Print the result only if the parsing was
258 successful.
259
260 2007-01-16 Akim Demaille <akim@epita.fr>
261
262 * data/lalr1.cc (yy_reduce_print_): Add a missing end-of-line.
263
264 2007-01-15 Paolo Bonzini <bonzini@gnu.org>
265 and Joel E. Denny <jdenny@ces.clemson.edu>
266
267 Clean up %define and %code implementation in M4 some. Most
268 importantly, rename all related macros to be in the b4_percent_define
269 and b4_percent_code namespaces. Also, complete support for `.' in
270 %define variable names and %code qualifiers.
271 * data/bison.m4 (b4_check_user_names): Check for special
272 "SKELETON-NAMESPACE(name)" macros instead of using two nested
273 m4_foreach loops.
274 (b4_get_percent_define, b4_get_percent_code): Rename to...
275 (b4_percent_define_get, b4_percent_code_get): ... these.
276 Extend documentation with examples.
277 For SKELETON-NAMESPACE (as documented for b4_check_user_names), use
278 b4_percent_define_skeleton_variables and
279 b4_percent_code_skeleton_qualifiers.
280 Expect any value for the %define variable `foo' to be stored in the
281 macro named `b4_percent_define(foo)'; expect any %code blocks for the
282 qualifier `foo' to be stored in a macro named `b4_percent_code(foo)';
283 expect any unqualified %code blocks to be stored in a macro named
284 `b4_percent_code_unqualified'.
285 Use m4_indir so that %define variable names and %code qualifiers can
286 contain `.', which is allowed by the grammar parser.
287 (b4_percent_define_default): New macro to set a default value for a
288 %define variable.
289 (m4_wrap): Update wrapped code, and fix some underquoting.
290 (b4_check_user_names_wrap): Update and define outside the m4_wrap.
291 Expect grammar uses of %define variables and %code qualifiers to be
292 defined in b4_percent_define_user_variables and
293 b4_percent_code_user_qualifiers.
294 * data/c++.m4: Use b4_percent_define_default rather than
295 m4_define_default. Fix some underquoting. Skeleton usage of %define
296 variable define_location_comparison now implies skeleton usage of
297 %define variable filename_type.
298 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
299 data/push.c, data/yacc.c: Update macro names.
300 * src/parse-gram.y (prologue_declaration, grammar_declaration): Update
301 muscle names.
302
303 2007-01-14 Juan Manuel Guerrero <juan.guerrero@gmx.de>
304
305 DJGPP specific issues.
306
307 * djgpp/config.site: Set ac_cv_path_mkdir to a sane DJGPP specific
308 default. Set gl_cv_absolute_wctype_h to a sane DJGPP specific default.
309
310 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
311
312 * tests/glr-regression.at: Use AT_PARSER_CHECK rather than AT_CHECK to
313 run parsers in all tests so that Valgrind is invoked during
314 maintainer-check-valgrind.
315 (Duplicate representation of merged trees): Free all semantic values.
316 (Duplicated user destructor for lookahead): Likewise.
317
318 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
319
320 * tests/local.at (AT_PARSER_CHECK): Add a PRE argument to specify a
321 command-line prefix.
322 * tests/torture.at (Exploding the Stack Size with Alloca): Stderr is
323 ignored, so use that PRE to set --log-fd=1 in VALGRIND_OPTS so we don't
324 miss Valgrind messages.
325 (Exploding the Stack Size with Malloc): Likewise.
326
327 2007-01-09 Joel E. Denny <jdenny@ces.clemson.edu>
328
329 Ignore YYSTACK_USE_ALLOCA for push parsers since the stacks can't be
330 locals. Reported by Juan Manuel Guerrero at
331 <http://lists.gnu.org/archive/html/bug-bison/2007-01/msg00000.html>.
332 * data/push.c: Enclose the #ifdef YYSTACK_USE_ALLOCA in b4_push_if.
333 Fix some indentation also.
334 * tests/torture.at (Exploding the Stack Size with Alloca): Add comment
335 explaining this issue.
336
337 2007-01-09 Paolo Bonzini <bonzini@gnu.org>
338 and Joel E. Denny <jdenny@ces.clemson.edu>
339
340 Simplify union and prologue handling, and escape union and lex/parse
341 params with digraphs.
342 * data/bison.m4 (b4_pre_prologue, b4_post_prologue): Set their default
343 values to the empty string since these are no longer guaranteed
344 initialized by the front-end.
345 * data/glr.c, data/glr.cc, data/lalr1.cc, data/push.c, data/yacc.c: Add
346 braces around b4_user_stype since this is no longer done by the
347 front-end.
348 * src/files.c, src/files.h (pre_prologue_obstack,
349 post_prologue_obstack): Remove.
350 * src/muscle_tab.c (muscle_pair_list_grow): Don't duplicate header
351 comments here. Use MUSCLE_OBSTACK_SGROW so that values are escaped
352 with digraphs. This fixes lex params and parse params.
353 * src/muscle_tab.h (muscle_pair_list_grow): Update comments.
354 * src/output.c (prepare): Remove muscle insertion of the prologues.
355 (output): Remove freeing of pre_prologue_obstack and
356 post_prologue_obstack.
357 * src/parse-gram.y (prologue_declaration): Use muscle_code_grow rather
358 than prologue_augment for prologue parsing so you don't need prologue
359 obstacks.
360 (grammar_declaration): For %union RHS, use `braceless' instead of
361 "{...}" so that braces are already stripped and code is escaped with
362 digraphs.
363 * src/reader.c (prologue_augment): Remove.
364 (reader): Remove initialization of pre_prologue_obstack and
365 post_prologue_obstack.
366 * src/reader.h (prologue_augment): Remove.
367
368 * data/c.m4: Remove stray parenthesis.
369
370 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
371
372 Remove quotes from variables names in %define directives and from
373 qualifiers in %code directives, and restrict the characters that are
374 allowed in them to M4-friendly ones. For %define, continue to support
375 the quoted form as a deprecated feature. Discussed starting at
376 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00023.html>.
377 * NEWS (2.3a+): Add entry for the change to %define. Update entry for
378 %code.
379 * doc/bison.texinfo (Prologue Alternatives): Update.
380 (Bison Declaration Summary): In %defines entry, update mention of
381 `%code requires' and `%code provides'.
382 (C++ Location Values): Update %define uses.
383 (Calc++ Parser Interface): Likewise.
384 (Calc++ Parser): Likewise, and update `%code requires' uses.
385 (Table of Symbols): Update %code documentation.
386 * src/parse-gram.y (prologue_declaration): For %define variables, use
387 `variable' instead of `STRING'.
388 (grammar_declaration): For %code qualifiers, use `ID' instead of
389 `STRING'.
390 (variable): New nonterminal that takes an `ID' or a `STRING'.
391 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update %code
392 and %define uses.
393 * tests/calc.at (_AT_DATA_CALC_Y): Update %define use.
394 * tests/input.at (Reject unused %code qualifiers): Update %code uses.
395 (%define errors): Update %define uses.
396
397 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
398
399 * src/parse-gram.y (prologue_declaration): Use MUSCLE_INSERT_STRING
400 instead of muscle_insert for %define values so that M4-special
401 characters are replaced with digraphs.
402 * tests/input.at (%define errors): Extend to check weird values.
403
404 2007-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
405
406 Instead of having skeletons declare all valid %define variables and
407 %code qualifiers, provide macros that retrieve the associated values
408 and build these lists automatically. Thus Bison will now warn when a
409 variable or qualifier is not used by the skeleton in the current
410 invocation regardless of whether it might sometimes be used by that
411 skeleton in other invocations. Also, move all %define value macros to
412 the b4_percent_define_ namespace, and remove the %define "NAME" {CODE}
413 form, which is replaced by %code.
414 * data/bison.m4 (b4_check_for_unrecognized_names): Rename to...
415 (b4_check_user_names): ... this, and change the series of valid name
416 arguments to a single list argument for names used in the skeleton
417 similar to the existing list argument for names used in the grammar.
418 Warn instead of complaining.
419 (b4_get_percent_define, b4_get_percent_code): New to retrieve %define
420 values and %code code, to format %code code properly, and to build
421 lists of all %define variables and %code qualifiers used in the
422 skeleton: b4_skeleton_percent_define_variables and
423 b4_skeleton_percent_code_qualifiers.
424 (b4_check_percent_define_variables, b4_check_percent_code_qualifiers):
425 Remove, and...
426 (m4_wrap): ... m4_wrap b4_check_user_names invocations instead so that
427 the skeleton names lists can finish building first. In place of
428 b4_used_percent_define_variables and b4_used_percent_code_qualifiers,
429 expect the lists b4_user_percent_define_variables and
430 b4_user_percent_code_qualifiers.
431 * data/c++.m4: Where setting default values for b4_parser_class_name,
432 b4_location_type, b4_filename_type, b4_namespace, and
433 b4_define_location_comparison, update their names to the
434 b4_percent_define_ namespace.
435 * data/glr.c: Don't use b4_check_percent_define_variables and
436 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
437 * data/glr.cc, data/lalr1.cc: Likewise, and use b4_get_percent_define.
438 (b4_parser_class_name, b4_namespace): Define these using
439 b4_get_percent_define for parser_class_name and namespace.
440 * data/location.cc: Use b4_get_percent_define.
441 * data/push.c: Don't use b4_check_percent_define_variables and
442 b4_check_percent_code_qualifiers. Use b4_get_percent_code.
443 * data/yacc.c: Likewise, and don't call m4_exit in
444 b4_use_push_for_pull_if or m4_wrap code will never execute.
445 * src/muscle_tab.c, src/muscle_tab.h (muscle_grow_used_name_list):
446 Rename to...
447 (muscle_grow_user_name_list): ... this for consistency with the
448 terminology used in bison.m4.
449 * src/parse-gram.y (prologue_declaration): Prepend "percent_define_" to
450 %define variable names, and rename muscle used_percent_define_variables
451 to user_percent_define_variables.
452 (grammar_declaration): Rename muscle used_percent_code_qualifiers to
453 user_percent_code_qualifiers.
454 (content): Remove.
455 (content.opt): Replace content RHS with STRING RHS so %define "NAME"
456 {CODE} form is no longer accepted.
457 * tests/input.at (Reject bad %code qualifiers): Rename to...
458 (Reject unused %code qualifiers): ... this, and update test output.
459 (%define error): Update test output.
460
461 2007-01-07 Joel E. Denny <jdenny@ces.clemson.edu>
462
463 Check for unrecognized %define variables similar to checking for
464 unrecognized %code qualifiers. Check for redefined %define variables.
465 * data/bison.m4 (b4_check_for_unrecognized_names): New macro that
466 generalizes...
467 (b4_check_percent_code_qualifiers): ... this, which now wraps it.
468 (b4_check_percent_define_variables): New, also wraps it.
469 * data/glr.c: Unless glr.cc is wrapping glr.c, declare no valid %define
470 variables using b4_check_percent_define_variables.
471 * data/glr.cc, data/lalr1.cc: Declare the valid %define variables as
472 all those exercised in the test suite and all those listed in the
473 `Default values' section of c++.m4. Are there others?
474 * data/push.c, data/yacc.c: Declare no valid %define variables.
475 * src/muscle_tab.c, src/muscle_tab.h (muscle_find_const): New function,
476 similar to muscle_find, but it works even when the muscle stores a
477 const value.
478 (muscle_grow_used_name_list): New function for constructing the used
479 name list muscles that b4_check_for_unrecognized_names requires.
480 * src/parse-gram.y (prologue_declaration): Warn if a variable is
481 %define'd more than once. Define the b4_used_percent_define_variables
482 muscle with muscle_grow_used_name_list.
483 (grammar_declaration): Abbreviate %code code with
484 muscle_grow_used_name_list.
485 * tests/input.at (%define errors): New.
486
487 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
488
489 Provide warn_at, complain_at, and fatal_at function callbacks to the
490 skeletons, and use this for %code qualifier complaints.
491 * data/bison.m4 (b4_error_at): New, invoked by...
492 (b4_warn_at, b4_complain_at, b4_fatal_at): ... these new macros to wrap
493 the skeleton scanner's new @warn_at(...@), @complain_at(...@), and
494 @fatal_at(...@) directives.
495 (b4_check_percent_code_qualifiers): Rewrite to expect locations for
496 qualifiers in b4_used_percent_code_qualifiers and to use
497 b4_complain_at.
498 * src/location.c, src/location.h (boundary_set_from_string): New global
499 function.
500 * src/muscle_tab.c, src/muscle_tab.h (muscle_boundary_grow): New global
501 function.
502 * src/parse-gram.y (grammar_declaration): Add locations for qualifiers
503 to b4_used_percent_code_qualifiers.
504 * src/scan-skel.l (fail_for_at_directive_too_few_args): New static
505 function.
506 (AT_DIRECTIVE_ARGC_MAX): Increase for boundary arguments.
507 (lineno): Rename to...
508 (out_lineno): ... this so I don't misunderstand it again.
509 (SC_AT_DIRECTIVE_SKIP_WS): Don't increment out_lineno for newlines
510 here; these newlines are in the input but not the output file.
511 (SC_AT_DIRECTIVE_ARG): Likewise. Extract directive execution to...
512 (at_directive_perform): ... this new static function, and add handling
513 of new @warn_at(...@), @complain_at(...@), and @fatal_at(...@)
514 directives.
515 * tests/input.at (Reject bad %code qualifiers): Update test output with
516 locations and extend.
517
518 * tests/output.at (Output file name: [, Output file name: ]): Remove
519 bogus comment about these tests failing.
520
521 2007-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
522
523 Clean up b4_check_percent_code_qualifiers a little.
524 * data/bison.m4 (b4_check_percent_code_qualifiers): Expect qualifiers
525 in b4_used_percent_code_qualifiers to be double-M4-quoted. Rewrite
526 documentation and add examples.
527 * src/parse-gram.y (grammar_declaration): Double-M4-quote those
528 qualifiers here.
529
530 2007-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
531
532 Don't use m4_divert since it makes m4_divert_push and m4_divert_pop
533 unreliable -- especially when they're hidden inside another macro.
534 * data/bison.m4, data/c++-skel.m4, data/c++.m4, data/c-skel.m4,
535 data/c.m4: Remove m4_divert(-1).
536 * data/glr.c, data/glr.cc, data/lalr1.cc, data/location.cc,
537 data/push.c, data/yacc.c: Likewise, and replace m4_divert(0) with
538 m4_divert_push(0) and m4_divert_pop(0).
539 * src/output.c (output_skeleton): Don't add an m4_divert_push(0) and
540 an m4_wrap([m4_divert_pop(0)]) to the M4. Diversion -1, which is
541 pushed and popped by m4sugar, should be first on the stack.
542
543 Provide warn, complain, and fatal function callbacks to the skeletons.
544 This provides more flexibility than m4_fatal, improves the error
545 message format, and captures messages for translation. Discussed
546 starting at
547 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00063.html>.
548 * data/bison.m4 (b4_error): New, invoked by...
549 (b4_warn, b4_complain, b4_fatal): ... these new macros to wrap the
550 skeleton scanner's new @warn(...@), @complain(...@), and @fatal(...@)
551 directives. Because these M4 macros might be called when the current
552 diversion is -1 or 0, m4_divert_push and m4_divert_pop is used; thus
553 the previous removal of uses of m4_divert, which caused trouble.
554 (b4_check_percent_code_qualifiers): Use b4_complain instead of
555 m4_fatal to report unrecognized %code qualifiers.
556 * data/c++-skel.m4: Use b4_complain instead of m4_fatal to report C++
557 push parser requests.
558 * data/glr.c: Use b4_complain instead of m4_fatal to report
559 non-deterministic push parser requests.
560 Update @output usage to @output(...@) form.
561 * data/glr.cc, data/lalr1.cc: Use b4_fatal instead of m4_fatal to
562 report missing %defines. Update @output usage to @output(...@) form.
563 * data/location.cc, data/push.c, data/yacc.c: Update @output usage to
564 @output(...@) form.
565 * src/main.c (main): Invoke skel_scanner_free.
566 * src/scan-skel.h (skel_scanner_free): Prototype new function.
567 * src/scan-skel.l (FLEX_NO_OBSTACK): Don't define; we now need the
568 obstack_for_string from flex-scanner.h.
569 (YY_DECL): Use to declare skel_lex static.
570 (decode_at_digraphs): Remove; now handled in the new
571 SC_AT_DIRECTIVE_ARG start condition.
572 (fail_for_at_directive_too_many_args, fail_for_invalid_at): New static
573 functions.
574 (at_directive_name, AT_DIRECTIVE_ARGC_MAX, at_directive_argc,
575 at_directive_argv): New static globals.
576 (INITIAL): Use fail_for_invalid_at.
577 Don't parse `@output file_name\n' or `@basename(...@)'. Instead,
578 recognize the start of a generalized `@directive(...@)' form and
579 start...
580 (SC_AT_DIRECTIVE_ARG): ... this new start condition to parse the
581 directive args (using the new obstack_for_string), to decode the
582 contained @ diagraphs, and to perform the directive. It recognizes
583 @basename(...@), @warn(...@), @complain(...@), @fatal(...@), and
584 @output(...@).
585 (SC_AT_DIRECTIVE_SKIP_WS): New start condition started by
586 SC_AT_DIRECTIVE_ARG to skip whitespace after the argument delimiter,
587 `@,'.
588 (scan_skel): Initialize obstack_for_string on the first call.
589 (skel_scanner_free): New function to free obstack_for_string.
590 * tests/input.at (Reject bad %code qualifiers): Update test output.
591
592 2007-01-04 Joel E. Denny <jdenny@ces.clemson.edu>
593
594 Consolidate the 4 prologue alternative directives (%code, %requires,
595 %provides, and %code-top) into a single %code directive with an
596 optional qualifier field. Discussed at
597 <http://lists.gnu.org/archive/html/bison-patches/2007-01/msg00012.html>.
598 * NEWS (2.3a+): Rewrite the existing entry for the prologue
599 alternatives.
600 * doc/bison.texinfo (Prologue Alternatives): Update.
601 (Decl Summary): Update to %code "requires" and %code "provides".
602 (Calc++ Parser): Update to %code "requires".
603 (Table of Symbols): Remove entries for %requires, %provides, and
604 %code-top. Rewrite %code entry, and add a %code "QUALIFIER" entry.
605 * data/bison.m4 (b4_user_provides, b4_user_requires): Remove as these
606 are replaced by b4_percent_code_provides and b4_percent_code_requires,
607 which are skeleton-specific.
608 (b4_check_percent_code_qualifiers): New. A skeleton can use this to
609 declare what %code qualifiers it supports and to complain if any other
610 qualifiers were used in the grammar.
611 * data/glr.cc: Update to use b4_user_code([b4_percent_code_requires])
612 and b4_user_code([b4_percent_code_provides]) in place of
613 b4_user_requires and b4_user_provides.
614 * data/glr.c, data/lalr1.cc, data/push.c, data/yacc.c: Likewise.
615 Add b4_user_code([b4_percent_code_top]) and
616 b4_user_code([b4_percent_code]).
617 Invoke b4_check_percent_code_qualifiers.
618 * src/parse-gram.y (PERCENT_CODE_TOP, PERCENT_PROVIDES,
619 PERCENT_REQUIRES): Remove.
620 (grammar_declaration): Remove RHS's for %code-top, %provides, and
621 %requires. Rewrite the %code RHS as the unqualified form defining the
622 muscle b4_percent_code. Add another RHS for the qualified %code form,
623 which defines muscles of the form b4_percent_code_QUALIFIER and the
624 b4_used_percent_code_qualifiers muscle.
625 * src/scan-gram.l (PERCENT_CODE_TOP, PERCENT_PROVIDES,
626 PERCENT_REQUIRES): Remove.
627 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Update to use
628 %code "requires" and %code "provides".
629 * tests/input.at (Reject bad %code qualifiers): New.
630
631 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
632
633 Use the new code_props interface for destructors and printers.
634 * src/symtab.h (symbol, semantic_type): Remove destructor_location and
635 printer_location members, and change the type of the destructor and
636 printer members to code_props.
637 (symbol_destructor_set, symbol_destructor_get, symbol_printer_set,
638 symbol_printer_get, semantic_type_destructor_set,
639 semantic_type_printer_set, default_tagged_destructor_set,
640 default_tagless_destructor_set, default_tagged_printer_set,
641 default_tagless_printer_set): Use code_props in arguments and return
642 types in place of char const * and location.
643 (symbol_destructor_location_get, symbol_printer_location_get): Remove
644 since the locations are now contained in the return of
645 symbol_destructor_get and symbol_printer_get.
646 * src/output.c (symbol_destructors_output, symbol_printers_output):
647 Replace with...
648 (symbol_code_props_output): ... this to eliminate duplicate code.
649 (output_skeleton): Update to use symbol_code_props_output.
650 * src/reader.c (symbol_should_be_used): Update use of
651 symbol_destructor_get.
652 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
653 Update uses of the various _destructor_set and _printer_set functions.
654 * src/symtab.c: (default_tagged_destructor_location,
655 default_tagless_destructor_location, default_tagged_printer_location,
656 default_tagless_printer_location): Remove since we...
657 (default_tagged_destructor, default_tagless_destructor,
658 default_tagged_printer, default_tagless_printer): ... change the type
659 of these to code_props.
660 (symbol_new, semantic_type_new, symbol_destructor_set,
661 semantic_type_destructor_set, symbol_destructor_get,
662 symbol_printer_set, semantic_type_printer_set, symbol_printer_get,
663 symbol_check_alias_consistency, default_tagged_destructor_set,
664 default_tagless_destructor_set, default_tagged_printer_set,
665 default_tagless_printer_set): Update.
666 (symbol_destructor_location_get, symbol_printer_location_get): Remove.
667 (SYMBOL_CODE_PRINT): New similar to SYMBOL_ATTR_PRINT but for
668 code_props members.
669 (symbol_print): Use SYMBOL_CODE_PRINT.
670
671 2007-01-03 Joel E. Denny <jdenny@ces.clemson.edu>
672
673 Use the new code_props interface for rule actions.
674 * src/symlist.h (symbol_list): Replace action, action_location, and
675 used members with a code_props action_props member.
676 * src/reader.c (symbol_should_be_used, grammar_rule_check,
677 grammar_midrule_action, grammar_current_rule_merge_set,
678 grammar_current_rule_symbol_append, packgram): Update.
679 * src/scan-code.h (translate_rule_action): Remove, no longer used.
680 * src/scan-code.l (handle_action_dollar): Update.
681 (translate_rule_action): Remove, no longer used.
682 * src/symlist.c (symbol_list_sym_new, symbol_list_syms_print): Update.
683
684 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
685
686 Use the new code_props interface in parse-gram.y.
687 * src/parse-gram.y (prologue_declaration, braceless, epilogue.opt):
688 Update all uses of translate_* functions to use the new code_props
689 interface and to use gram_scanner_last_string_free and
690 code_scanner_last_string_free where possible.
691 (grammar_declaration): symbol_list_destructor_set and
692 symbol_list_printer_set now perform the translation, so don't do it
693 here. Use gram_scanner_last_string_free where possible.
694 * src/scan-code.h, src/scan-code.l (translate_symbol_action,
695 translate_code): Remove, no longer used.
696 * src/symlist.h, src/symlist.c (symbol_list_destructor_set,
697 symbol_list_printer_set): Perform code translation here rather than
698 depending on the caller to do so.
699
700 * src/symlist.h (struct symbol_list): Correct some documentation typos.
701 * src/scan-gram.h (gram_last_string): Remove declaration.
702 * src/scan-gram.l (last_string): Declare it static.
703
704 2007-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
705
706 Encapsulate code properties and related functionality for the various
707 destructors, printers, and actions into a code_props structure and
708 interface. This patch merely implements code_props in scan-code.h and
709 scan-code.l. Future patches will rewrite other modules to use it.
710 Discussed starting at
711 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00020.html>.
712 * src/location.h (EMPTY_LOCATION_INIT): Define so that it's easier to
713 consistently initialize const structs that have an empty location
714 field.
715 * src/location.c (empty_location): Initialize with EMPTY_LOCATION_INIT
716 to ensure consistency.
717 * src/scan-code.h (code_props): New structure.
718 (code_props_none_init, CODE_PROPS_NONE_INIT, code_props_none): New
719 function, macro, and const global variable for initializing a
720 code_props with no code.
721 (code_props_plain_init, code_props_symbol_action_init,
722 code_props_rule_action_init, code_props_translate_code): The rest of
723 the new code_props functional interface. Among other things, the init
724 functions set the code_props kind field so that
725 code_props_translate_code will know whether to behave like
726 translate_symbol_action, translate_rule_action, or translate_code.
727 These old translate functions must remain until all other modules are
728 updated to use the new code_props interface.
729 (code_scanner_last_string_free): New function similar to
730 gram_scanner_last_string_free.
731 (code_scanner_free): Add documentation.
732 * src/scan-code.l: Implement the new interface.
733 (code_lex): Make it static, add a code_props* argument, and remove the
734 rule argument.
735 (last_string): New static global similar to the one in scan-gram.l.
736 (SC_RULE_ACTION): Update to use the code_props* argument to code_lex
737 instead of rule.
738 (SC_SYMBOL_ACTION): For $$, set the is_value_used member of the
739 code_props since Bison may one day use this information for destructors
740 and printers.
741 (<*><<EOF>>): Use STRING_FINISH so that last_string is set.
742 (handle_action_dollar): Use symbol_list_n_get and set used flag
743 directly since symbol_list_n_used_set is removed.
744 (translate_action): Add a code_props* argument and remove the rule,
745 action, and location arguments. Pass the code_props* on to code_lex.
746 (translate_rule_action, translate_symbol_action, translate_code):
747 Rewrite as wrappers around the new code_props interface.
748 * src/symlist.h, src/symlist.c (symbol_list_n_used_set): Remove since
749 it would eventually need to break the encapsulation of code_props.
750
751 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
752
753 * etc/.cvsignore: New.
754
755 2007-01-01 Joel E. Denny <jdenny@ces.clemson.edu>
756
757 Add maintainer-push-check to run maintainer-check using push parsing in
758 place of pull parsing where available.
759 * Makefile.am (maintainer-push-check): New.
760 * data/bison.m4 (b4_use_push_for_pull_if): New.
761 * data/push.c: Redefine b4_push_if and b4_use_push_for_pull_if
762 appropriately based on their existing values.
763 (yypush_parse): Don't print push-parser-specific diagnostics if push
764 parsing is being used in place of pull parsing.
765 * data/yacc.c: If push parsing should replace pull parsing, redirect to
766 push.c.
767 * src/output.c (prepare): Check BISON_USE_PUSH_FOR_PULL environment
768 variable, and insert b4_use_push_for_pull_flag into muscles.
769 * tests/Makefile.am (maintainer-push-check): New.
770
771 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
772
773 * data/push.c (yypush_parse): Set yynew = 1 at the end of a parse
774 (whether successful or failed) so that yypush_parse can be invoked
775 again to start a new parse using the same yypstate.
776 * tests/torture.at (AT_DATA_STACK_TORTURE): For push mode, extend to
777 check multiple yypull_parse invocations on the same yypstate. For pull
778 mode, extend to check multiple yyparse invocations.
779 (Exploding the Stack Size with Alloca): Extend to try with
780 %push-pull-parser.
781 (Exploding the Stack Size with Malloc): Likewise.
782
783 * tests/calc.at (Simple LALR Calculator): Don't specify
784 %skeleton "push.c" since %push-pull-parser implies that now.
785 * tests/headers.at (export YYLTYPE): Don't check for the push
786 declarations. Otherwise, this test case can't be used to see if push
787 mode can truly emulate pull mode.
788 * tests/input.at (Torturing the Scanner): Likewise.
789 * tests/local.at (AT_YACC_OR_PUSH_IF, AT_PUSH_IF): Remove.
790 (AT_YYERROR_SEES_LOC_IF): Rather than AT_YACC_OR_PUSH_IF, use
791 AT_YACC_IF, which now includes the case of push mode since %skeleton
792 need not be used for push mode. This will be more intuitive once
793 push.c is renamed to yacc.c.
794
795 2006-12-31 Joel E. Denny <jdenny@ces.clemson.edu>
796
797 For push mode, convert yyparse from a macro to a function, invoke yylex
798 instead of passing a yylexp argument to yypull_parse, and don't
799 generate yypull_parse or yyparse unless %push-pull-parser is declared.
800 Discussed starting at
801 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00163.html>.
802 * data/bison.m4 (b4_pull_if): New.
803 * data/c.m4 (b4_identification): Define YYPULL similar to YYPUSH.
804 * data/push.c: Improve M4 quoting a little.
805 (b4_generate_macro_args, b4_parenthesize): Remove.
806 (yyparse): If there's a b4_prefix, #define this to b4_prefix[parse]
807 any time a pull parser is requested.
808 Don't #define this as a wrapper around yypull_parse. Instead, when
809 both push and pull are requested, make it a function that does that
810 same thing.
811 (yypull_parse): If there's a b4_prefix, #define this to
812 b4_prefix[pull_parse] when both push and pull are requested.
813 Don't define this as a function unless both push and pull are
814 requested.
815 Remove the yylexp argument and hard-code yylex invocation instead.
816 * etc/bench.pl.in (bench_grammar): Use %push-pull-parser instead of
817 %push-parser.
818 * src/getargs.c (pull_parser): New global initialized to true.
819 * getargs.h (pull_parser): extern it.
820 * src/output.c (prepare): Insert pull_flag muscle.
821 * src/parse-gram.y (PERCENT_PUSH_PULL_PARSER): New token.
822 (prologue_declaration): Set both push_parser and pull_parser = true for
823 %push-pull-parser. Set push_parser = true and pull_parser = false for
824 %push-parser.
825 * src/scan-gram.l: Don't accept %push_parser as an alternative to
826 %push-parser since there's no backward-compatibility concern here.
827 Scan %push-pull-parser.
828 * tests/calc.at (Simple LALR(1) Calculator): Use %push-pull-parser
829 instead of %push-parser.
830 * tests/headers.at (export YYLTYPE): Make yylex static, and don't
831 prototype it in the module that calls yyparse.
832 * tests/input.at (Torturing the Scanner): Likewise.
833 * tests/local.at (AT_PUSH_IF): Check for %push-pull-parser as well.
834
835 2006-12-26 Joel E. Denny <jdenny@ces.clemson.edu>
836
837 Update etc/bench.pl. Optimize push mode a little (the yyn change
838 deserves most of the credit).
839 * Makefile.am (SUBDIRS): Add etc subdirectory.
840 * configure.ac (AC_CONFIG_FILES): Add etc/bench.pl and etc/Makefile.
841 * data/push.c (b4_declare_parser_state_variables): Move yyn, yyresult,
842 yytoken, yyval, and yyloc declarations to...
843 (yyparse or yypush_parse): ... here to improve performance. For
844 yypush_parse invocations after the first, be sure to assign yyn its old
845 value again.
846 (yypstate_new): Don't bother initializing the yyresult field since the
847 initial value isn't used.
848 (yyn, yyresult, yytoken, yyval, yyloc): For each NAME in this list,
849 remove the #define that, in push mode, set it to yyps->NAME.
850 * etc/Makefile.am: New.
851 * etc/bench.pl: Remove and build it instead from...
852 * etc/bench.pl.in: ... this new file. Use @abs_top_builddir@ to invoke
853 "tests/bison" from the build directory by default rather than just
854 invoking "bison" from $PATH.
855 (calc_grammar): Update push parser code: don't declare yylval globally,
856 don't define yyparse_wrapper, and don't #define yyparse.
857 (bench_grammar): Update to check all working combinations of yacc.c,
858 push.c, impure, pure, pull, and push.
859
860 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
861
862 For push mode, add pull wrappers around yypush_parse.
863 * data/push.c: (b4_generate_macro_args, b4_parenthesize): New macros.
864 (yypull_parse): New function wrapping yypush_parse.
865 (yyparse): New #define wrapping yypull_parse.
866 * tests/calc.at (_AT_DATA_CALC_Y): Call yyparse even when %push-parser
867 is declared.
868 * tests/headers.at (export YYLTYPE): Make yylex global. For push mode,
869 prototype yylex in the module that calls yyparse, and don't prototype
870 yyparse there. Otherwise, the yyparse expansion won't compile.
871 * tests/input.at (Torturing the Scanner): Likewise.
872
873 2006-12-25 Joel E. Denny <jdenny@ces.clemson.edu>
874
875 Enable push parsers to operate in impure mode. Thus, %push-parser no
876 longer implies %pure-parser. The point of this change is to move
877 towards being able to test the push parser code by running the entire
878 test suite as if %push-parser had been declared.
879 * data/push.c (yypush_parse): For impure mode, remove the
880 yypushed_char, yypushed_val, and yypushed_loc arguments.
881 Instead, declare these as local variables initialized to the global
882 yychar, yylval, and yylloc.
883 For the first yypush_parse invocation only, restore the initial values
884 of these global variables when it's time to read a token since they
885 have been overwritten.
886 * src/parse-gram.y (prologue_declaration): Don't set pure_parser for
887 %push-parser.
888 * tests/calc.at (Simple LALR(1) Calculator): Always declare
889 %pure-parser along with %push-parser since this test case was designed
890 for pure push parsers.
891 * tests/local.at (AT_PURE_OR_PUSH_IF): Remove unused.
892 (AT_YACC_OR_PUSH_IF): New.
893 (AT_YYERROR_SEES_LOC_IF): Fix enough that the test suite passes, but
894 add a note that it's still wrong for some cases (as it has been for a
895 while).
896 (AT_PURE_LEX_IF): Use AT_PURE_IF instead of AT_PURE_OR_PUSH_IF since
897 %push-parser no longer implies %pure-parser.
898
899 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
900
901 Remove some unnecessary differences between the pull parser code and
902 the push parser code. This patch enables yynerrs in push mode.
903 * data/push.c: Reformat M4 a little.
904 (b4_yyerror_range): Remove and convert all uses to just yyerror_range.
905 (b4_declare_scanner_communication_variables): Don't omit yynerrs just
906 because push mode is on. Instead, if pure mode is on, move yynerrs
907 to...
908 (b4_declare_parser_state_variables): ... here.
909 (yynerrs, yyerror_range): For push mode, #define each NAME in this list
910 to yyps->NAME so it can be used in yypush_parse.
911 (yypush_parse): Don't omit uses of yynerrs in push mode.
912
913 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
914
915 Fix bug such that the first pushed token's value and location are
916 sometimes overwritten (sometimes by %initial-action) before being used.
917 * data/push.c (yypush_parse): Rename arguments yynchar, yynlval, and
918 yynlloc to yypushed_char, yypushed_val, and yypushed_loc for clarity.
919 For the first yypush_parse invocation, initialize yychar to YYEMPTY to
920 more closely mimic the pull parser logic.
921 Don't copy the pushed token to yychar, yylval, and yylloc until it's
922 time to read a token, which is after any initialization of yylval and
923 yylloc.
924 (gottoken): Rename label to...
925 (yyread_pushed_token): ... for clarity and to avoid infringing on the
926 user namespace.
927
928 2006-12-20 Joel E. Denny <jdenny@ces.clemson.edu>
929
930 Rearrange initialization of the parser state variables so that the
931 skeleton doesn't have to have a copy for pull mode and another for push
932 mode. This patch also fixes at least a bug such that yylloc was not
933 initialized (with b4_location_initial_line and
934 b4_location_initial_column) upon calling yypush_parse. However, that
935 initialization now overwrites the first token's location;
936 %initial-action assigning @$ already did the same thing, and both bugs
937 will be fixed in a later patch.
938 * data/push.c (b4_yyssa): Remove and convert all uses to just yyssa.
939 (b4_declare_parser_state_variables): Remove initialization of yytoken,
940 yyss, yyvs, yyls, and yystacksize.
941 (yypstate_new): Remove initialization of some yypstate fields: yystate,
942 yyerrstatus, yytoken, yyss, yyvs, yyls, yystacksize, yyssp, yyvsp, and
943 yylsp.
944 (yyssa, yyvsa, yylsa): For push mode, #define each NAME in this list to
945 yyps->NAME so it can be used in yypush_parse.
946 (yyparse or yypush_parse): For yypush_parse, don't print the
947 "Starting parse" diagnostic for invocations after the first.
948 Add initialization of yytoken, yyss, yyvs, yyls, and yystacksize; for
949 yypush_parse, only do it for the first invocation.
950 Allow yystate, yyerrstatus, yyssp, yyvsp, yylsp, and yylloc
951 initialization to occur in yypush_parse but only on the first
952 invocation.
953
954 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
955
956 * data/push.c: Add CPP guards around push parser declarations in both
957 the header and the code file.
958 In the code file, move the push parser declarations to the same place
959 they appear in the header file.
960 Clean up the M4 some, especially the inconsistent underquoting in
961 some b4_c_function_def and b4_c_function_decl uses.
962
963 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
964
965 Encapsulate the push parser state variables into an M4 macro so the
966 push skeleton doesn't have to list them again for pull mode's yyparse.
967 For push mode, remove yypush_parse's local equivalents of these
968 variables to eliminate unnecessary copying between the two sets at
969 run-time. This patch also fixes at least a bug related to multiple
970 %initial-action invocations in push mode.
971 * data/push.c (b4_declare_parser_variables): Rename to...
972 (b4_declare_scanner_communication_variables): ... this for clarity and
973 update both uses.
974 (b4_declare_yyparse_variables): Remove and move its contents to the one
975 spot where it was invoked.
976 (b4_declare_parser_state_variables): New macro containing the parser
977 state variables required by push mode.
978 (struct yypstate): Replace all fields but yynew with
979 b4_declare_parser_state_variables.
980 (yystate, yyn, yyresult, yyerrstatus, yytoken, yyss, yyssp, yyvs,
981 yyvsp, yyls, yylsp, yystacksize, yyval, yyloc): For push mode, #define
982 each NAME in this list to yyps->NAME so it can be used in yypush_parse.
983 (yyparse or yypush_parse): For yyparse in pull mode, replace local
984 parser state variable declarations with
985 b4_declare_parser_state_variables.
986 Don't initialize parser state variables when calling yypush_parse since
987 yypstate_new already does that.
988 Invoke the user's initial action only upon the first yypush_parse
989 invocation.
990 Remove all code that copies between the local parser state variables
991 and the yypstate.
992
993 2006-12-19 Joel E. Denny <jdenny@ces.clemson.edu>
994
995 * data/push.c (union yyalloc): Rename yyss, yyvs, and yyls fields to
996 prevent a name collision in a future patch where these names will
997 sometimes be #define'd.
998 (YYSTACK_RELOCATE): Add an argument to select a union yyalloc field
999 since it no longer has the same name as the existing argument.
1000 (yyparse or yypush_parse): Update all uses of YYSTACK_RELOCATE.
1001
1002 2006-12-19 Paolo Bonzini <bonzini@gnu.org>
1003 and Joel E. Denny <jdenny@ces.clemson.edu>
1004
1005 * doc/bison.texinfo (Decl Summary): In the %language entry, mention
1006 that the argument is case-insensitive, and there's no `=' here.
1007 For the %skeleton entry, mention that %language is better.
1008 (Bison Options): Likewise for --language and --skeleton. Move the
1009 --skeleton entry so that the `Tuning the parser' section is sorted
1010 alphabetically on long options.
1011 (C++ Bison Interface): Don't use the word skeleton. Don't explain the
1012 %language directive in detail here; cross-reference the %language
1013 documentation instead.
1014 (Calc++ Parser): Use `%require "@value{VERSION}"' rather than
1015 `%require "2.3b"' so that the example is always up-to-date.
1016 (Table of Symbols): Add entries for %language and %skeleton.
1017 * examples/extexi (normalize): Instead of replacing every %require
1018 argument with the current Bison version, just substitute for
1019 `@value{VERSION}'. This guarantees that we're testing what actually
1020 appears in the documentation.
1021 * examples/calc++/Makefile.am ($(calc_extracted)): Use `$(VERSION)'
1022 rather than `@VERSION@'.
1023
1024 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
1025
1026 * NEWS: Reword the %language news a bit, and put it earlier.
1027
1028 * src/getargs.c (skeleton_arg): Last arg is now location const *.
1029 Rewrite to simplify the logic.
1030 (language_argmatch): Likewise.
1031 (program_name): We now own this var.
1032 * src/getargs.h (struct bison_language): Use char[] rather than
1033 const char *.
1034
1035 * doc/bison.texinfo (Decl Summary, Bison Options): Don't claim
1036 Java is supported.
1037 * src/complain.c (program_name): Remove decl; no longer needed.
1038 * src/main.c (program_name): Remove; now belongs to getargs.
1039
1040 2006-12-18 Paolo Bonzini <bonzini@gnu.org>
1041
1042 * NEWS: Document %language.
1043
1044 * data/Makefile.am (dist_pkgdata_DATA): Add c-skel.m4, c++-skel.m4.
1045
1046 * data/c-skel.m4, data/c++-skel.m4: New files.
1047 * data/glr.c: Complain on push parsers.
1048
1049 * doc/bison.texinfo (C++ Parser Interface): Prefer %language
1050 over %skeleton.
1051 (Decl Summary): Document %language and %skeleton.
1052 (Command line): Document -L.
1053
1054 * examples/extexi: Rewrite %require directive.
1055 * examples/calc++/Makefile.am: Pass VERSION to extexi.
1056
1057 * src/files.c (compute_exts_from_gc): Look in language structure
1058 for .y extension.
1059 (compute_file_name_parts): Check whether .tab should be added.
1060 * src/getargs.c (valid_languages, skeleton_prio, language_prio):
1061 (language, skeleton_arg, language_argmatch): New.
1062 (long_options): Add --language.
1063 (getargs): Use skeleton_arg, add -L/--language.
1064 * src/getargs.h: Include location.h.
1065 (struct bison_language, language, skeleton_arg, language_argmatch): New.
1066 * src/output.c (prepare): Pick default skeleton from struct language.
1067 Don't dispatch C skeletons here.
1068 * src/parse-gram.y (PERCENT_LANGUAGE): New.
1069 (prologue_declaration): Add "%language" rule, use skeleton_arg.
1070 * src/scan-gram.l ("%language"): New rule.
1071
1072 * tests/calc.at: Test %skeleton and %language.
1073 * tests/local.at (AT_SKEL_CC_IF): Look for %language.
1074 (AT_GLR_IF): Look for %skeleton "glr.cc".
1075 (AT_LALR1_CC_IF, AT_GLR_CC_IF): Rewrite.
1076 (AT_YACC_IF): Reject %language.
1077
1078 2006-12-18 Paul Eggert <eggert@cs.ucla.edu>
1079
1080 * src/symtab.h (struct semantic_type): Remove the tag 'semantic_type',
1081 since it wasn't used; only the typedef name 'semantic_type' is needed.
1082 Also, omit trailing white space.
1083
1084 * bootstrap: Sync from coreutils.
1085 (gnulib_extra_files): Add build-aux/announce.gen.
1086 (slurp): Adjust .gitignore files like .cvsignore files.
1087 * build-aux/announce-gen: Remove from CVS, since bootstrap
1088 now creates this.
1089
1090 2006-12-16 Joel E. Denny <jdenny@ces.clemson.edu>
1091
1092 Make %push-parser imply %pure-parser. This fixes several bugs; see
1093 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00148.html>.
1094 * src/parse-gram.y (prologue_declaration): For %push-parser, also set
1095 pure_parser = true.
1096 * data/push.c: Don't bother testing b4_push_if when deciding whether
1097 to expand b4_declare_parser_variables globally.
1098 (yypush_parse): Likewise in here.
1099
1100 * data/push.c (yypush_parse): Add b4_parse_param to arguments.
1101 (yy_reduce_print): Reformat M4 for readability.
1102
1103 2006-12-15 Bob Rossi <bob@brasko.net>
1104 and Joel Denny <jdenny@ces.clemson.edu>
1105
1106 * data/push.c (yypstate): Add typedef, and update all uses of
1107 struct yypstate to just yypstate.
1108 * tests/calc.at (_AT_DATA_CALC_Y): Update here as well.
1109
1110 2006-12-14 Bob Rossi <bob@brasko.net>
1111
1112 * data/push.c (yypush_parse): Declare prototype regardless of
1113 %locations option.
1114
1115 2006-12-14 Bob Rossi <bob@brasko.net>
1116
1117 * data/push.c (yyparse): Remove the prototype and the #define when in
1118 push-parser mode.
1119
1120 2006-12-13 Bob Rossi <bob@brasko.net>
1121
1122 * data/push.c (yypstate_init): Rename to...
1123 (yypstate_new): ... this and use b4_c_function_def.
1124 (yypstate_delete): New.
1125 (yypush_parse): Change parameters yynval and yynlloc to be const.
1126 * tests/calc.at (_AT_DATA_CALC_Y): Use new yypstate_new and
1127 yypstate_delete functions.
1128
1129 2006-12-13 Joel E. Denny <jdenny@ces.clemson.edu>
1130
1131 * configure.ac (AC_PREREQ): Require Autoconf 2.61 because of our
1132 strange test case titles. Reported by Bob Rossi.
1133
1134 2006-12-13 Paul Eggert <eggert@cs.ucla.edu>
1135
1136 * TODO: Add pointer to Sylvain Schmitz's work on static detection
1137 of potential ambiguities in GLR grammers.
1138
1139 2006-12-12 Joel E. Denny <jdenny@ces.clemson.edu>
1140
1141 * tests/testsuite.at (AT_CHECK): When checking if $1 starts with
1142 `bison ', use m4_index instead of m4_substr since chopping up a string
1143 containing M4-special characters causes problems here.
1144
1145 Fix a couple of bugs related to special characters in user-specified
1146 file names, and make it easier for skeletons to compute output file
1147 names with the same file name prefix as Bison-computed output file
1148 names.
1149 * data/glr.cc, data/push.c, data/yacc.c: In @output, use
1150 b4_parser_file_name and b4_spec_defines_file instead of
1151 @output_parser_name@ and @output_header_name@, which are now redundant.
1152 * data/glr.c, data/lalr1.cc: Likewise. Also, in header #include's, use
1153 b4_parser_file_name, b4_spec_defines_file, and the new
1154 @basename(FILENAME@) instead of @output_parser_name@ and
1155 @output_header_name@, which inappropriately escaped the file names as
1156 C string literals.
1157 * src/files.c (all_but_ext): Remove static qualifier.
1158 (compute_output_file_names): Move `free (all_but_ext)' to...
1159 (output_file_names_free): ... here since all_but_ext is needed later.
1160 * src/files.h (all_but_ext): Extern.
1161 * src/muscle_tab.h (MUSCLE_INSERT_STRING_RAW): New macro that does
1162 exactly what MUSCLE_INSERT_STRING used to do.
1163 (MUSCLE_INSERT_STRING): Use MUSCLE_OBSTACK_SGROW so that M4-special
1164 characters are escaped properly.
1165 * src/output.c (prepare): Define muscle file_name_all_but_ext as
1166 all_but_ext.
1167 For pkgdatadir muscle, maintain previous functionality by using
1168 MUSCLE_INSERT_STRING_RAW instead of MUSCLE_INSERT_STRING. The problem
1169 is that b4_pkgdatadir is used inside m4_include in the skeletons, so
1170 digraphs would never be expanded. Hopefully no one has M4-special
1171 characters in his Bison installation path.
1172 * src/scan-skel.l: Don't parse @output_header_name@ and
1173 @output_parser_name@ anymore since they're now redundant.
1174 In @output, use decode_at_digraphs.
1175 Parse a new @basename command that invokes last_component.
1176 (decode_at_digraphs): New.
1177 (BASE_QPUTS): Remove unused.
1178 * tests/output.at (AT_CHECK_OUTPUT_FILE_NAME): New macro.
1179 (Output file name): New tests.
1180
1181 2006-12-09 Joel E. Denny <jdenny@ces.clemson.edu>
1182
1183 Warn about output files that are generated by the skeletons and that
1184 conflict with other output files.
1185 * data/glr.c: Don't generate the header file here when glr.cc does.
1186 * src/files.c (file_names, file_names_count): New static globals.
1187 (compute_output_file_names): Invoke output_file_name_check for files
1188 not generated by the skeletons and remove existing checks.
1189 (output_file_name_check): New function that warns about conflicting
1190 output file names.
1191 (output_file_names_free): Free file_names.
1192 * src/files.h (output_file_name_check): Declare.
1193 * src/scan-skel.l: Invoke output_file_name_check for files generated by
1194 the skeletons.
1195 * tests/output.at (AT_CHECK_CONFLICTING_OUTPUT): New.
1196 (Conflicting output files): New tests.
1197
1198 2006-12-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1199
1200 * doc/bison.texinfo: Fix a couple of typos.
1201
1202 2006-12-08 Bob Rossi <bob@brasko.net>
1203
1204 * data/push.c: (yypvarsinit, yypvars, struct yypvars, yypushparse):
1205 Rename to...
1206 (yypstate_init, yypstate, struct yypstate, yypush_parse): ... these and
1207 update all uses.
1208 (b4_yyssa, b4_yyerror_range, yypstate_init): Rename pv to yyps.
1209 (yypush_parse): Rename yypvars argument to yyps and remove redundant
1210 local pv.
1211 (yypstate_init, yypush_parse): Declare in Bison-generated header file.
1212 * tests/calc.at (_AT_DATA_CALC_Y): Use newly named functions.
1213
1214 2006-12-07 Bob Rossi <bob@brasko.net>
1215 and Joel Denny <jdenny@ces.clemson.edu>
1216
1217 * data/push.c (yypvarsinit): Change return type from void* to struct
1218 yypvars*. No longer cast to void* on return.
1219 (struct yypvars): Remove yylen since it need not be remembered between
1220 yypushparse invocations.
1221 (yypushparse): Don't copy between yylen and pv->yylen.
1222
1223 2006-12-05 Bob Rossi <bob@brasko.net>
1224
1225 * data/push.c (yychar_set, yylval_set, yylloc_set): Delete.
1226 (yypushparse): Add yynchar, yynlval, yynlloc parameters.
1227 (b4_declare_parser_variables): Do not declare yynerrs for push mode.
1228 (struct yypvars): Remove b4_declare_parser_variables.
1229 (yypvarsinit): Remove init code for removed variables.
1230 (global scope): Do not declare b4_declare_parser_variables if
1231 push or pure mode.
1232 (yypushparse): Add b4_declare_parser_variables.
1233 Init new local variables, and remove init code for removed
1234 yypvars variables.
1235 (yyparse): Delete.
1236 * tests/calc.at (_AT_DATA_CALC_Y): Call yypushparse for push mode
1237 and yyparse for other modes.
1238 (AT_CHECK_CALC_LALR): Added '%skeleton "push.c"' for push tests.
1239 * tests/local.at (AT_PUSH_IF, AT_PURE_OR_PUSH_IF): Added.
1240 (AT_YYERROR_SEES_LOC_IF): push-parser makes this false.
1241 (AT_PURE_LEX_IF): True if pure or push parser.
1242
1243 2006-12-05 Joel E. Denny <jdenny@ces.clemson.edu>
1244
1245 Document Yacc prologue alternatives and default %destructor's and
1246 %printer's as experimental. Don't mention Java yet. Discussed at
1247 <http://lists.gnu.org/archive/html/bison-patches/2006-12/msg00002.html>.
1248 * NEWS (2.3a+): Say they're experimental. Remove any mention of Java.
1249 (2.3a): Annotate this entry to say the old forms of these features were
1250 also experimental.
1251 * doc/bison.texinfo (Prologue Alternatives, Freeing Discarded Symbols,
1252 Table of Symbols): Say they're experimental. Comment out any mention
1253 of Java (we'll want this back eventually).
1254
1255 2006-12-01 Joel E. Denny <jdenny@ces.clemson.edu>
1256
1257 Support a file name argument to %defines. Deprecate `=' in
1258 %file-prefix, %name-prefix, and %output. Discussed at
1259 <http://lists.gnu.org/archive/html/help-bison/2006-09/msg00001.html>.
1260 * NEWS (2.3a+): Mention.
1261 * doc/bison.texinfo (Decl Summary, Table of Symbols): Add entry for new
1262 form of %defines, and remove `=' from entries for %file-prefix,
1263 %name-prefix, and %output.
1264 * src/parse-gram.y (prologue_declaration): Implement.
1265 * tests/calc.at (Simple LALR Calculator, Simple GLR Calculator, Simple
1266 LALR1 C++ Calculator, Simple GLR C++ Calculator): Remove the `=' from
1267 all but one occurrence of %name-prefix.
1268 * tests/headers.at (export YYLTYPE): Remove the `=' from %name-prefix.
1269 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Likewise.
1270 * tests/output.at (AT_CHECK_OUTPUT): Remove the `=' from all but one
1271 occurrence of each of %file-prefix and %output. Add check for %defines
1272 with argument.
1273 * tests/reduce.at (Useless Terminals, Useless Nonterminals,
1274 Useless Rules, Reduced Automaton, Underivable Rules, Empty Language):
1275 Remove the `=' from %output.
1276
1277 2006-11-21 Joel E. Denny <jdenny@ces.clemson.edu>
1278
1279 Don't escape $ in test case titles since Autoconf 2.61 now does that
1280 correctly.
1281 * tests/actions.at (Default %printer and %destructor are not for error
1282 or $undefined): Here.
1283 (Default %printer and %destructor are not for $accept): Here.
1284 * tests/input.at (Invalid $n and @n): Here.
1285
1286 2006-11-20 Joel E. Denny <jdenny@ces.clemson.edu>
1287
1288 Rename <!> to <>. Discussed starting at
1289 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00039.html>.
1290 * NEWS (2.3a+): Update.
1291 * doc/bison.texinfo (Freeing Discarded Symbols, Table of Symbols):
1292 Update.
1293 * src/parse-gram.y (TYPE_TAG_NONE, generic_symlist_item): Implement.
1294 * src/scan-gram.l (INITIAL): Implement.
1295 * src/symlist.c (symbol_list_default_tagless_new): Update comment.
1296 * src/symlist.h (symbol_list, symbol_list_default_tagless_new): Update
1297 comment.
1298 * tests/actions.at (Default tagless %printer and %destructor,
1299 Default tagged and per-type %printer and %destructor,
1300 Default %printer and %destructor are not for error or $undefined,
1301 Default %printer and %destructor are not for $accept,
1302 Default %printer and %destructor for mid-rule values): Update.
1303 * tests/input.at (Default %printer and %destructor redeclared,
1304 Unused values with default %destructor): Update.
1305
1306 2006-11-17 Joel E. Denny <jdenny@ces.clemson.edu>
1307
1308 Don't let %prec take a nonterminal.
1309 * src/reader.c (grammar_current_rule_prec_set): Make the %prec symbol a
1310 token.
1311 * tests/input.at (%prec takes a token): New test checking that %prec
1312 won't take a nonterminal.
1313
1314 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1315
1316 * tests/testsuite.at (AT_CHECK): Don't miss an exit value of 0 because
1317 it was double-quoted.
1318 * src/Makefile.am (YACC): Use --warnings=all,error so that Bison's own
1319 grammar is maintained with Bison's highest standards.
1320 * src/getargs.c: Fix some typos in Doxygen comments.
1321
1322 2006-11-10 Joel E. Denny <jdenny@ces.clemson.edu>
1323
1324 Fix memory leaks in scanners generated by at least Flex 2.5.9 and
1325 later. Reported by Paul Eggert in
1326 <http://lists.gnu.org/archive/html/bison-patches/2006-11/msg00014.html>.
1327 * src/flex-scanner.h (yylex_destroy): Define for Flex before 2.5.9.
1328 * src/scan-code.l (translate_action): Don't bother invoking
1329 yy_delete_buffer (YY_CURRENT_BUFFER) before creating the first buffer.
1330 (code_scanner_free): Instead of invoking
1331 yy_delete_buffer (YY_CURRENT_BUFFER) directly, invoke yylex_destroy,
1332 which frees more.
1333 * src/scan-gram.l (gram_scanner_free): Likewise.
1334 * src/scan-skel.l (scan_skel): Likewise.
1335
1336 2006-11-09 Joel E. Denny <jdenny@ces.clemson.edu>
1337
1338 * src/files.c (tr): Change return type to void.
1339 * src/muscle_tab.c (muscle_insert): Free storage in case muscle_grow
1340 has been called previously for the same key.
1341 (muscle_find): Return storage instead of value so that
1342 --enable-gcc-warnings doesn't produce warnings that the return discards
1343 const. aver that the value and storage are the same since storage
1344 could potentially be NULL when value is not.
1345 * tests/testsuite.at (AT_CHECK): Treat an unspecified exit value the
1346 same as 0.
1347
1348 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
1349
1350 * bootstrap.conf (excluded_files): Exclude m4/codeset.m4 (undoing
1351 the earlier change today), m4/intl.m4, m4/intldir.m4. This gives
1352 us a slightly cleaner distribution, and also works.
1353 * m4/.cvsignore: Add inline.m4, wint_t.m4 to accommodate recent
1354 gnulib changes.
1355
1356 2006-11-08 Joel E. Denny <jdenny@ces.clemson.edu>
1357 and Paul Eggert <eggert@cs.ucla.edu>
1358
1359 Don't let Bison leak memory except when it complains.
1360 * src/files.h (parser_file_name, spec_verbose_file, spec_graph_file):
1361 (spec_defines_file, dir_prefix): Now char *, not const char *,
1362 since they are freed.
1363 * src/files.c: Likewise.
1364 (all_but_ext, all_but_tab_ext, src_extension, header_extension):
1365 Likewise.
1366 (tr): Now operates in-place. All uses changed.
1367 (compute_exts_from_gf, compute_exts_from_src): Don't leak temporary
1368 values.
1369 (compute_file_name_parts, compute_output_file_names): Don't store
1370 read-only data in variables that will be freed.
1371 (compute_output_file_names): Free all_but_ext, all_but_tab_ext,
1372 src_extension, and header_extension.
1373 (output_file_names_free): New public function to free
1374 spec_verbose_file, spec_graph_file, spec_defines_file,
1375 parser_file_name, and dir_prefix.
1376 * src/getargs.c (getargs): Don't store read-only data in variables that
1377 will be freed.
1378 * src/main.c (main): Invoke output_file_names_free, code_scanner_free
1379 (which previously existed but was unused), and quotearg_free.
1380 * src/muscle_tab.h (muscle_insert): value arg is now a `char const *'.
1381 * src/muscle_tab.c: Likewise.
1382 (muscle_entry): Make the value char const *,
1383 and add a new storage member that is char * and can be freed.
1384 (muscle_entry_free): New private function.
1385 (muscle_init): Use it instead of free.
1386 (muscle_insert, muscle_grow): Update and use new storage member.
1387 (muscle_code_grow): Free the string passed to muscle_grow
1388 since it's not needed anymore.
1389 * src/parse-gram.y (%union): Make `chars' member a `char const *', and
1390 add a new `char *code' member.
1391 ("{...}"): Declare semantic type as code.
1392 * src/scan-code.h (translate_rule_action):
1393 (translate_symbol_action, translate_code, translate_action): Return
1394 `char const *' rather than `char *' since external code should not free
1395 these strings.
1396 * src/scan-code.l: Likewise.
1397 * src/scan-gram.l (<SC_BRACED_CODE>): Use val->code for BRACED_CODE,
1398 which is "{...}" in the parser.
1399 * tests/Makefile.am (maintainer-check-valgrind): Set
1400 VALGRIND_OPTS='--leak-check=full --show-reacheable=yes' before invoking
1401 Valgrind.
1402 * tests/calc.at (_AT_DATA_CALC_Y): fclose the FILE* so Valgrind doesn't
1403 complain.
1404 * tests/testsuite.at (AT_CHECK): Redefine so that running Bison and
1405 expecting a non-zero exit status sets --leak-check=summary and
1406 --show-reachable=no for Valgrind. Bison unabashedly leaks memory in
1407 this case, and we don't want to hear about it.
1408
1409 2006-11-08 Paul Eggert <eggert@cs.ucla.edu>
1410
1411 * bootstrap (runtime-po/Makevars): Derive from po/Makevars
1412 instead of from the template, to simplify configuration a bit.
1413 * bootstrap.conf (excluded_files): Don't exclude m4/codeset.m4
1414 and m4/wint_t.m4, as they are needed with the latest gnulib.
1415
1416 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
1417
1418 Disable unset/unused mid-rule value warnings by default, and recognize
1419 --warnings=midrule-values to enable them. Discussed starting at
1420 <http://lists.gnu.org/archive/html/help-bison/2006-10/msg00030.html>.
1421 * NEWS (2.3a+): Mention.
1422 * src/getargs.c, src/getargs.h (warnings_args, warnings_types, enum
1423 warnings): Add entry for midrule-values subargument.
1424 * src/reader.c (symbol_should_be_used): Don't return true just because
1425 the value is a set/used mid-rule value unless
1426 --warnings=midrule-values was specified.
1427 * tests/input.at (Unused values, Unused values before symbol
1428 declarations): Run tests with and without --warnings=midrule-values.
1429
1430 * src/reader.c (check_and_convert_grammar): Use symbol_list_free rather
1431 than LIST_FREE directly.
1432
1433 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
1434
1435 Finish implementing --warnings=error, which should not be implied by
1436 --warnings=all (or by its synonyms -W and --warnings without
1437 subarguments).
1438 * src/complain.c (set_warning_issued): New function to report that
1439 warnings are being treated as errors and to record an error if so.
1440 Invoke...
1441 (warn_at, warn): ... here.
1442 * src/getargs.c (warnings_args, warnings_types): Reorder so that
1443 "error - warnings are errors" does not appear above "all - all of the
1444 above".
1445 (getargs): For -W and --warnings without subarguments, don't let
1446 FLAGS_ARGMATCH set warnings_error in warnings_flag.
1447 * src/getargs.h (enum warnings): Unset warnings_error in warnings_all.
1448
1449 2006-10-31 Joel E. Denny <jdenny@ces.clemson.edu>
1450
1451 * src/getargs.c (flags_argmatch): Don't cause segmentation fault for
1452 empty subargument list. For example: `bison --warnings= parser.y'.
1453
1454 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1455
1456 * data/push.c, data/yacc.c: Make sure there's a newline at the end of
1457 the parser header file so that gcc doesn't warn.
1458
1459 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1460
1461 Split the default %destructor/%printer into two kinds: <*> and <!>.
1462 Discussed starting at
1463 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00060.html>.
1464 * NEWS (2.3a+): Mention.
1465 * doc/bison.texinfo (Freeing Discarded Symbols): Document this and the
1466 previous change today related to mid-rules.
1467 (Table of Symbols): Remove %symbol-default and add <*> and <!>.
1468 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): Remove.
1469 (TYPE_TAG_ANY): Add as <*>.
1470 (TYPE_TAG_NONE): Add as <!>.
1471 (generic_symlist_item): Remove RHS for %symbol-default and add RHS's
1472 for <*> and <!>.
1473 * src/scan-gram.l (PERCENT_SYMBOL_DEFAULT): Remove.
1474 (TYPE_TAG_ANY, TYPE_TAG_NONE): Add.
1475 * src/symlist.c (symbol_list_default_new): Split into tagged and
1476 tagless versions.
1477 (symbol_list_destructor_set, symbol_list_printer_set): Split
1478 SYMLIST_DEFAULT case into SYMLIST_DEFAULT_TAGGED and
1479 SYMLIST_DEFAULT_TAGLESS.
1480 * src/symlist.h: Update symbol_list_default*_new prototypes.
1481 (symbol_list.content_type): Split enum value SYMLIST_DEFAULT into
1482 SYMLIST_DEFAULT_TAGGED and SYMLIST_DEFAULT_TAGLESS.
1483 * src/symtab.c (default_destructor, default_destructor_location,
1484 default_printer, default_printer_location): Split each into tagged and
1485 tagless versions.
1486 (symbol_destructor_get, symbol_destructor_location_get,
1487 symbol_printer_get, symbol_printer_location_get): Implement tagged
1488 default and tagless default cases.
1489 (default_destructor_set, default_printer_set): Split each into tagged
1490 and tagless versions.
1491 * src/symtab.h: Update prototypes.
1492 * tests/actions.at (Default %printer and %destructor): Rename to...
1493 (Default tagless %printer and %destructor): ... this, and extend.
1494 (Per-type %printer and %destructor): Rename to...
1495 (Default tagged and per-type %printer and %destructor): ... this, and
1496 extend.
1497 (Default %printer and %destructor for user-defined end token): Extend.
1498 (Default %printer and %destructor are not for error or $undefined):
1499 Update.
1500 (Default %printer and %destructor are not for $accept): Update.
1501 (Default %printer and %destructor for mid-rule values): Extend.
1502 * tests/input.at (Default %printer and %destructor redeclared): Extend.
1503 (Unused values with default %destructor): Extend.
1504
1505 2006-10-21 Joel E. Denny <jdenny@ces.clemson.edu>
1506
1507 Don't apply the default %destructor/%printer to an unreferenced midrule
1508 value. Mentioned at
1509 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00104.html>.
1510 * src/symtab.c (dummy_symbol_get): Name all dummy symbols initially
1511 like $@n instead of just @n so that the default %destructor/%printer
1512 logic doesn't see them as user-defined symbols.
1513 (symbol_is_dummy): Check for both forms of the name.
1514 * src/reader.c (packgram): Remove the `$' from each midrule symbol
1515 name for which the midrule value is referenced in any action.
1516 * tests/actions.at (Default %printer and %destructor for mid-rule
1517 values): New test.
1518 * tests/regression.at (Rule Line Numbers, Web2c Report): Update output
1519 for change to dummy symbol names.
1520
1521 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
1522
1523 Warn about unset midrule $$ if the corresponding $n is used.
1524 * src/reader.c (symbol_should_be_used): Check midrule parent rule for
1525 $n usage.
1526 (packgram): Before invoking grammar_rule_check on any rule, make sure
1527 all actions have already been scanned in order to set `used' flags.
1528 Otherwise, checking that a midrule's $$ is set will not always work
1529 properly because the midrule check must forward-reference the midrule's
1530 parent rule.
1531 * tests/input.at (AT_CHECK_UNUSED_VALUES): Extend to check the new
1532 warning.
1533
1534 2006-10-20 Joel E. Denny <jdenny@ces.clemson.edu>
1535
1536 More improvements to the documentation of the prologue alternatives:
1537 * NEWS (2.3a+): Mention the new `Prologue Alternatives' section in the
1538 Bison manual.
1539 * doc/bison.texinfo (Prologue Alternatives): Correct some errors. Add
1540 some text to clarify the relative importance of the new directives and
1541 to show how these directives may be viewed as code labels.
1542
1543 2006-10-16 Joel E. Denny <jdenny@ces.clemson.edu>
1544
1545 Similar to the recently removed %before-header, add %code-top as the
1546 alternative to the pre-prologue. Mentioned at
1547 <http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00063.html>.
1548 Also, let the prologue alternatives appear in the grammar section.
1549 * src/parse-gram.y (PERCENT_CODE_TOP): New token.
1550 (prologue_declaration): Move the existing prologue alternatives to...
1551 (grammar_declaration): ... here and add %code-top.
1552 * src/scan-gram.l (PERCENT_CODE_TOP): New token.
1553
1554 Clean up and extend documentation for the prologue alternatives.
1555 * NEWS (2.3a+): Describe prologue alternatives.
1556 * doc/bison.texinfo (Prologue): Move discussion of prologue
1557 alternatives to...
1558 (Prologue Alternatives): ... this new section, and extend it to discuss
1559 all 4 directives in detail.
1560 (Table of Symbols): Clean up discussion of prologue alternatives and
1561 add %code-top.
1562
1563 2006-10-16 Juan Manuel Guerrero <juan.guerrero@gmx.de>
1564
1565 DJGPP specific issues.
1566
1567 * djgpp/config.bat: config.hin has been moved to lib. Adjust
1568 config.bat accordingly.
1569 * djgpp/config.sed: Adjust config.sed for the use of autoconf 2.60.
1570 * djgpp/config.site: Likewise.
1571
1572 2006-10-16 Paolo Bonzini <bonzini@gnu.org>
1573
1574 Replace %*-header with %provides, %requires, %code. See discussion at
1575 http://lists.gnu.org/archive/html/bison-patches/2006-10/msg00002.html
1576
1577 * data/bison.m4 (b4_user_requires, b4_user_provides): New.
1578 (b4_user_start_header): Remove.
1579 * data/glr.c: Use new macros instead of b4_*start_header
1580 and b4_*end_header.
1581 * data/glr.cc: Likewise.
1582 * data/lalr1.cc: Likewise.
1583 * data/push.c: Likewise.
1584 * data/yacc.c: Likewise.
1585
1586 * doc/bison.texinfo: Remove %before-header, rename
1587 %{start,end,after}-header to %requires, %provides, %code.
1588
1589 * src/parse-gram.y: Likewise (also rename token names accordingly).
1590 * src/scan-gram.l: Likewise.
1591 * tests/actions.at: Likewise.
1592
1593 2006-10-14 Paul Eggert <eggert@cs.ucla.edu>
1594
1595 * lib/Makefile.am (AM_CFLAGS): Remove $(WERROR_CFLAGS).
1596 Problem reported by Joel E. Denny.
1597
1598 2006-10-14 Jim Meyering <jim@meyering.net>
1599
1600 (Sync from coreutils.)
1601 Work also when the working directory (with e.g. coreutils sources)
1602 is version controlled with git, rather than CVS.
1603 * bootstrap (CVS_only_file): Test for the existence of README-cvs,
1604 rather than CVS.
1605 In messages and comments, say e.g., "checked-out sources",
1606 rather than "CVS sources".
1607 (version_controlled_file): New function. Work for git as well as
1608 for CVS. Don't use grep's -q option.
1609 (slurp): Call it here, in place of CVS-specific code.
1610
1611 2006-10-14 Joel E. Denny <jdenny@ces.clemson.edu>
1612
1613 Fix testsuite for ./configure --enable-gcc-warnings:
1614 * configure.ac (gcc-warnings): Move -Wall before -Wno-sign-compare.
1615 Otherwise, gcc 4.1.0 (at least) warns about sign comparisons in
1616 __AT_CHECK_PRINTER_AND_DESTRUCTOR in tests/actions.at.
1617 * test/input.at (Torturing the Scanner): #include <stdlib.h> for abort.
1618 * test/regression.at (Diagnostic that expects two alternatives):
1619 Likewise.
1620
1621 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
1622
1623 * bootstrap.conf (gnulib_modules): Add config-h.
1624 * djgpp/subpipe.c: Include <config.h> unconditionally; don't
1625 worry about HAVE_CONFIG_H.
1626 * lib/abitset.c: Likewise.
1627 * lib/bitset.c: Likewise.
1628 * lib/bitset_stats.c: Likewise.
1629 * lib/bitsetv-print.c: Likewise.
1630 * lib/bitsetv.c: Likewise.
1631 * lib/ebitset.c: Likewise.
1632 * lib/get-errno.c: Likewise.
1633 * lib/lbitset.c: Likewise.
1634 * lib/subpipe.c: Likewise.
1635 * lib/timevar.c: Likewise.
1636 * lib/vbitset.c: Likewise.
1637 * lib/bitset.c: Include "bitset.h" first, to test interface.
1638 * lib/bitset_stats.c: Include "bitset_stats.h" first.
1639 * lib/bitsetv-print.c: Include "bitsetv-print.h" first.
1640 * lib/bitsetv.c: Include "bitsetv.h" first.
1641 * lib/get-errno.c: Include "get-errno.h" first.
1642 * m4/.cvsignore: Add config-h.m4.
1643 * tests/actions.at (Default %printer and %destructor for ...):
1644 Adjust expected line numbers in output to reflect removal of #if
1645 HAVE_CONFIG_H lines.
1646 * tests/glr-regression.at (Missed %merge type warnings when ...):
1647 Likewise.
1648 * tests/regression.at (Braced code in declaration in rules section):
1649 Likewise.
1650 * tests/atlocal.in (CPPFLAGS): Don't define HAVE_CONFIG_H.
1651 * tests/local.at (AT_DATA_GRAMMAR_PROLOGUE):
1652 Include <config.h> unconditionally.
1653
1654 * bootstrap: Sync from coreutils, as follows:
1655
1656 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1657
1658 * bootstrap (symlink_to_gnulib): Fix bug: the dot_dots shell
1659 variable was sometimes used without being initialized. This
1660 messed up the installation of the INSTALL file in some cases.
1661
1662 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1663
1664 * bootstrap (usage, main program, symlink_to_gnulib): Add option
1665 --copy. Inspired by a suggestion from Bruno Haible.
1666
1667 2006-10-03 Jim Meyering <jim@meyering.net>
1668
1669 * bootstrap: Undo last change to this file, since now gnulib-tool
1670 sticks with the automake default in generating dependencies.
1671
1672 2006-10-12 Paul Eggert <eggert@cs.ucla.edu>
1673
1674 * configure.ac: Use AC_PROG_CC_STDC; this is more modern than
1675 the old AC_PROG_CC / AM_PROG_CC_STDC combination.
1676
1677 * doc/bison.1: Add copyright notice.
1678
1679 * data/glr.c: Don't include <stdarg.h>; not used.
1680
1681 * NEWS: The -g and --graph options now output graphs in Graphviz
1682 DOT format, not VCG format.
1683 * doc/bison.1: Likewise.
1684 * doc/bison.texinfo (Understanding, Bison Options): Likewise.
1685 * THANKS: Add Satya Kiran Popuri, who proposed the initial version
1686 of this change in
1687 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00158.html>.
1688 * TODO: Remove Graphviz entry.
1689 * src/Makefile.am (bison_SOURCES): Add graphviz.c and graphviz.h;
1690 remove vcg.c, vcg.h, vcg_defaults.h.
1691 * src/vcg.c, src/vcg.h, src/vcg_defaults.h: Remove.
1692 * src/graphviz.c, src/graphviz.h: New files.
1693 * src/files.c (compute_output_file_names): Output .dot, not .vcg.
1694 * src/files.h: Make comment more generic.
1695 * src/main.c (main): Likewise.
1696 * src/print_graph.h: Likewise.
1697 * src/getargs.c (usage): Make usage description more generic.
1698 * src/print_graph.c: Include graphviz.h rather than vcg.h.
1699 (static_graph, fgraph): Remove. All uses changed to pass
1700 arguments instead of sharing a static var.
1701 (print_core, print_actions, print_state, print_graph):
1702 Output graphviz format rather than VCG format.
1703 * tests/.cvsignore: Remove *.vcg; add *.dot.
1704 * tests/output.at: Expect *.dot files, not *.vcg files.
1705
1706 * data/Makefile.am (dist_pkgdata_DATA): Add bison.m4; this
1707 accommodates the 2006-10-08 change.
1708
1709 2006-10-11 Bob Rossi <bob@brasko.net>
1710
1711 * data/push.c (yypushparse, yypvarsinit, yypvars): Wrap in b4_push_if.
1712 (b4_yyssa, b4_yyerror_range): New macros.
1713 (struct yypvars): Remove yyssa_ptr and yyerror_range_ptr fields.
1714 (yypvarsinit): Remove init of removed fields.
1715 (yypushparse): Remove use of removed fields; use new macros instead.
1716
1717 2006-10-11 Paul Eggert <eggert@cs.ucla.edu>
1718
1719 * data/push.c (yypushparse): Fix memory leak if yymsg is malloced
1720 in a push parser. Reindent slightly to match yacc.c better.
1721
1722 2006-10-11 Bob Rossi <bob@brasko.net>
1723
1724 * data/push.c (struct yypvars): Remove yymsgbuf, yymsgbuf_ptr, yymsg,
1725 yymsg_alloc fields.
1726 (yypvarsinit, yypushparse): Remove init of removed fields.
1727 (yypushparse): Use yymsgbuf instead of yymsgbuf_ptr.
1728
1729 2006-10-09 Paul Eggert <eggert@cs.ucla.edu>
1730
1731 * THANKS: Add Paolo Bonzini and Bob Rossi.
1732
1733 2006-10-08 Paolo Bonzini <bonzini@gnu.org>
1734
1735 * data/c.m4 (b4_copyright, b4_epilogue, b4_location_initial_column,
1736 b4_location_initial_line, p4_parse_param, b4_ints_in, b4_flag_if,
1737 b4_define_flag_if and uses, b4_basename, b4_syncline, b4_user_code,
1738 b4_define_user_cde and uses): Remove.
1739 (b4_comment, b4_prefix, b4_sync_start): New.
1740 * data/bison.m4: New file, with most of the content removed from c.m4.
1741 * src/muscle_tab.h: Use "do {...} while(0)" throughout.
1742 * src/output.c (output_skeleton): Pass bison.m4.
1743 (prepare): Pass glr_flag and nondeterministic_flag. Pass prefix
1744 only if specified.
1745
1746 2006-10-05 Paul Eggert <eggert@cs.ucla.edu>
1747
1748 Fix test failure reported by Tom Lane in
1749 <http://lists.gnu.org/archive/html/bug-bison/2006-10/msg00000.html>
1750 and try to make such failures easier to catch in the future.
1751 * data/glr.c (YYTRANSLATE): Don't check for nonpositive arg;
1752 that's now the caller's responsibility.
1753 (yyprocessOneStack, yyrecoverSyntaxError, yyparse):
1754 Set yychar = YYEOF if it's negative.
1755 * tests/actions.at (yylex): Abort if asked to read past EOF.
1756 * tests/conflicts.at (yylex): Likewise.
1757 * tests/cxx-type.at (yylex): Likewise.
1758 * tests/glr-regression.at (yylex): Likewise.
1759 * tests/input.at (yylex): Likewise.
1760 * tests/regression.at (yylex): Likewise.
1761 * tests/torture.at (yylex): Likewise.
1762
1763 2006-10-01 Paul Eggert <eggert@cs.ucla.edu>
1764
1765 Fix problems with translating English-language diagnostics.
1766 * bootstrap: Fix bug introduced in recent bootstrap changes, with
1767 respect to bison-runtime pot generation. The YY_ stuff
1768 wasn't being captured.
1769 * bootstrap.conf (XGETTEXT_OPTIONS_RUNTIME): New var.
1770 * po/POTFILES.in: Add src/location.c, src/scan-code.l.
1771 * runtime-po/POTFILES.in: Add data/push.c.
1772
1773 2006-09-29 Paul Eggert <eggert@cs.ucla.edu>
1774
1775 Merge bootstrap changes from coreutils.
1776
1777 2006-09-28 Jim Meyering <jim@meyering.net>
1778
1779 Automatically generated dependencies are important even
1780 when all of the sources in a directory come from gnulib.
1781 * bootstrap (gnulib_tool): Remove the "no-dependencies" automake
1782 option that gnulib-tool adds to what becomes our lib/gnulib.mk.
1783
1784 2006-09-23 Jim Meyering <jim@meyering.net>
1785
1786 * bootstrap (gnulib_tool_options): Add "--local-dir gl".
1787
1788 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1789
1790 * bootstrap: Add support for --force.
1791 (usage): New function. Describe usage less tersely.
1792 (CVS_only_file): New var.
1793
1794 2006-09-21 Paul Eggert <eggert@cs.ucla.edu>
1795
1796 * data/push.c (YYPUSH_MORE): Make it an enum instead.
1797 (yypushparse): Use YYPUSH_MORE instead of the mystery constant.
1798 Adjust white space and comments to match GNU style better.
1799
1800 2006-09-20 Bob Rossi <bob@brasko.net>
1801
1802 * data/push.c (yyresult_get): Remove function.
1803 (YYPUSH_MORE): Add #define.
1804 (yypushparse): Modify return value.
1805
1806 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1807
1808 * stamp-h.in: Remove; no longer needed.
1809 * .cvsignore: Replace autom4te.cache and config.cache with *.cache.
1810 Remove config.h, config.hin, intl (no longer created).
1811 * lib/.cvsignore: Add config.h, config.hin, configmake.h, inttypes.h,
1812 stamp-h1.
1813
1814 Sync bootstrap from coreutils, as follows:
1815
1816 2006-09-18 Paul Eggert <eggert@cs.ucla.edu>
1817
1818 * bootstrap (symlink_to_gnulib): New function.
1819 (cp_mark_as_generated): Use it, to prefer symlinks-to-gnulib
1820 to copies-of-gnulib.
1821 (cp_mark_as_generated, slurp, gnulib_files):
1822 Avoid making a copy if it's the same as the old version.
1823 (gnulib_files): Add support for this variable (used by Bison).
1824
1825 2006-09-20 Paul Eggert <eggert@cs.ucla.edu>
1826
1827 * src/getargs.c (usage): Rework to use conventions similar to
1828 coreutils, to make translation a bit easier and the code a bit
1829 smaller. Problem reported by Tim Van Holder.
1830
1831 2006-09-15 Paul Eggert <eggert@cs.ucla.edu>
1832
1833 Use some of gnulib's new modules, taken from coreutils.
1834
1835 * bootstrap: Sync from coreutils, except add support for gnulib_files.
1836 * bootstrap.conf: New file.
1837 (gnulib_modules): Add configmake, inttypes, unistd.
1838 (XGETTEXT_OPTIONS): Add complain, complain_at,
1839 fatal, fatal_at, warn, warn_at, unexpected_end.
1840 * configure.ac (AC_CONFIG_HEADERS): config.h is now in lib, not here.
1841 (gl_USE_SYSTEM_EXTENSIONS): Remove; gl_EARLY now does this.
1842 (gl_EARLY): Add.
1843 (AM_STDBOOL_H): Remove; gl_INIT now dows this.
1844 (gl_INIT): Add
1845 (GNULIB_AUTOCONF_SNIPPET): Remove.
1846 (AM_GNU_GETTEXT): Add; require formatstring macros since that's
1847 the pickiest.
1848 * lib/.cvsignore: Add inttypes_.h.
1849 * lib/Makefile.am: Include gnulib.mk first so we can append to it.
1850 (AM_CFLAGS): Add WERROR_CFLAGS, to be more like coreutils.
1851 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES): Remove
1852 no-longer-necessary initializations.
1853 (lib_SOURCES): Remove, replacing by libbison_a_SOURCES.
1854 * lib/subpipe.c: Include <unistd.h> unconditionally, now that we
1855 use the unistd module.
1856 * src/system.h: Likewise.
1857 * m4/.cvsignore: Remove *_gl.m4, gnulib.m4, inttypes_h.m4, uintmax_t.m4,
1858 ulonglong.m4. Add gettext.m4, gnulib-cache.m4, gnulib-comp.m4,
1859 gnulib-tool.m4, inttypes-h.m4, inttypes-pri.m4, inttypes.m4.
1860 * src/Makefile.am (DEFS): Remove, since configmake does this for us.
1861 (AM_CPPFLAGS): Remove -I../lib, since Automake does that for us.
1862 * src/system.h: Include inttypes.h unconditionally, now that we
1863 use the inttypes module. Don't bother to include stdint.h, since
1864 inttypes.h now does that for us.
1865 (LOCALEDIR): Remove, now that we use the configmake module.
1866 * src/getargs.c: Include configmake.h.
1867 * src/main.c: Likewise.
1868 * src/output.c: Likewise.
1869 * tests/atlocal.in (CPPFLAGS): Include from $abs_top_builddir/lib,
1870 not from $abs_top_builddir, since config.h moved.
1871
1872
1873 Port to GCC 2.95. First two problems reported by Michael Deutschmann in
1874 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00018.html>.
1875
1876 * src/parse-gram.y (symbol_declaration): Don't put statements
1877 before declarations; it's not portable to C89.
1878 * src/scan-code.l (handle_action_at): Likewise.
1879
1880 * src/scan-code.l: Always initialize braces_level; the old code
1881 left it uninitialized and therefore had undefined behavior.
1882
1883 Don't attempt to redefine 'assert', since it runs afoul of
1884 systems where standard headers (mistakenly) include <assert.h>.
1885 Instead, define and use our own alternative, called 'aver'.
1886 * src/reader.c: Don't include assert.h, since we no longer
1887 use assert.
1888 * src/scan-code.l: Likewise.
1889 * src/system.h (assert): Remove, replacing with....
1890 (aver): New function, taking a bool arg. All uses changed.
1891 * src/tables.c (pack_vector): Ensure that aver arg is bool,
1892 not merely an integer.
1893
1894 2006-09-15 Bob Rossi <bob@brasko.net>
1895
1896 * data/Makefile.am (dist_pkgdata_DATA): Add push.c.
1897 * data/c.m4 (YYPUSH): New.
1898 (b4_push_if): New macro. Use it instead of #ifdef YYPUSH.
1899 * src/getargs.c (push_parser): New var.
1900 * src/getargs.h (push_parser): New declaration.
1901 * src/output.c (prepare): Add macro insertion of `push_flag'.
1902 * src/parse-gram.y (PERCENT_PUSH_PARSER): New token.
1903 (prologue_declaration): Parse %push-parser.
1904 * src/scan-gram.l: Scan new PERCENT_PUSH_PARSER token.
1905 * tests/calc.at (_AT_CHECK_CALC_ERROR): Add "Return" and "Now" to
1906 list of removed lines from the traces observed.
1907 (AT_CHECK_CALC_LALR): Added push parser tests.
1908
1909 2006-09-13 Paul Eggert <eggert@cs.ucla.edu>
1910
1911 * NEWS: Version 2.3a.
1912 * configure.ac (AC_INIT): Likewise.
1913
1914 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Remove
1915 "#define YYSTYPE int" that caused "make maintainer-check" to fail
1916 due to header ordering dependencies. I don't know why the #define
1917 was there.
1918
1919 Fix glr.cc and lalr1.cc's use of YYDEBUG so that there's zero
1920 runtime cost when YYDEBUG is not defined, and so that some tests
1921 that used to fail now work. Problem and initial suggestion by
1922 Paolo Bonzini.
1923 * data/c++.m4 (b4_parse_param_cons): Omit leading ','.
1924 * data/glr.cc (b4_parser_class_name):
1925 Initialize yycdebug_ only if YYDEBUG. Also, initialize yydebug_.
1926 (debug_level, set_debug_level): Affect yydebug_, not ::yydebug.
1927 (yydebug_) [YYDEBUG]: New member.
1928 (yycdebug_): Now defined only if YYDEBUG.
1929 * data/lalr1.cc (yydebug_, yycdebug_): Now defined only if YYDEBUG.
1930 (YYCDEBUG) [!YYDEBUG]: Don't use yydebug_ and yycdebug_.
1931 (b4_parser_class_name): Initialize yydebug_ and yycdebug_ only
1932 if YYYDEBUG.
1933 (debug_stream, set_debug_stream, debug_level, set_debug_level):
1934 Define only if YYDEBUG.
1935 * tests/calc.at (_AT_DATA_CALC_Y) [!YYDEBUG]: Omit call to
1936 set_debug_level.
1937 * tests/regression.at (_AT_DATA_DANCER_Y) [!YYDEBUG]: Likewise.
1938 * tests/calc.at (AT_CHECK_CALC_GLR_CC): Uncomment calls to
1939 AT_CHECK_CALC_GLR_CC that are working now.
1940
1941 2006-09-12 Paul Eggert <eggert@cs.ucla.edu>
1942
1943 * data/glr.cc (YYERROR_VERBOSE, YYTOKEN_TABLE): Remove.
1944 We don't need them in glr.cc, and glr.c defines them.
1945 Defining YYERROR_VERBOSE to 0 here breaks glr.c, since glr.c
1946 assumes that defining it to anything is the same as defining
1947 it to 1. Problem reported by Paolo Bonzini.
1948
1949 2006-09-12 Paolo Bonzini <bonzini@gnu.org> (tiny change)
1950
1951 * data/c.m4 (b4_null, b4_case): Define.
1952 * src/output.c (prepare_symbols): Use b4_null.
1953 (user_actions_output): Use b4_case.
1954
1955 2006-09-11 Paul Eggert <eggert@cs.ucla.edu>
1956
1957 * data/glr.c (b4_shared_declarations): Put start-header first,
1958 before any #includes that we generate, so that feature-test
1959 macros work. Problem reported by Michael Deutschmann in
1960 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00004.html>.
1961 * data/lalr1.cc: Likewise.
1962 * doc/bison.texinfo (Prologue): Document that feature-test macros
1963 should be defined before any Bison declarations.
1964 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Put defns
1965 that depend on location.hh after, not before, Bison decls, since
1966 we now include location.hh after the first user prologue.
1967
1968 * doc/bison.texinfo (Calc++ Parser): Fix memory leak reported by
1969 Sander Brandenburg in
1970 <http://lists.gnu.org/archive/html/bug-bison/2006-09/msg00002.html>.
1971 Also, fix minor white space and comment issues.
1972 (Prologue): Mention that it's better to define feature-test macros
1973 before Bison declarations. Problem reported by Michael Deutschmann.
1974
1975 * README-cvs: Fix typo: "&" should be "&&". Problem reported
1976 by Jim Meyering.
1977 * m4/.cvsignore: Add argmatch.m4. Remove obstack.m4, strerror_r.m4.
1978 This adjusts to recent gnulib changes.
1979
1980 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
1981
1982 Finish implementation of per-type %destructor/%printer. Discussed
1983 starting at
1984 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>
1985 and
1986 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>.
1987 * NEWS (2.3+): Add a description of this feature to the default
1988 %destructor/%printer description.
1989 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise.
1990 * src/symlist.c (symbol_list_destructor_set, symbol_list_printer_set):
1991 Invoke semantic_type_destructor_set or semantic_type_printer_set when a
1992 list node contains a semantic type.
1993 * src/symtab.c, src/symtab.h: Extend with a table that associates
1994 semantic types with their %destructor's and %printer's.
1995 (semantic_type_from_uniqstr, semantic_type_get,
1996 semantic_type_destructor_set, semantic_type_printer_set): New functions
1997 composing the public interface of that table.
1998 (symbol_destructor_get, symbol_destructor_location_get,
1999 symbol_printer_get, symbol_printer_location_get): If there's no
2000 per-symbol %destructor/%printer, look up the per-type before trying
2001 the default.
2002 * tests/actions.at (Per-type %printer and %destructor): New test case.
2003 * tests/input.at (Default %printer and %destructor redeclared):
2004 Extend to check that multiple occurrences of %symbol-default in a
2005 single %destructor/%printer declaration is an error.
2006 (Per-type %printer and %destructor redeclared, Unused values with
2007 per-type %destructor): New test cases.
2008
2009 2006-09-04 Joel E. Denny <jdenny@ces.clemson.edu>
2010
2011 Require default %destructor/%printer to be declared using
2012 %symbol-default instead of an empty symbol list, and start working on
2013 new per-type %destructor/%printer. Discussed at
2014 <http://lists.gnu.org/archive/html/bison-patches/2006-09/msg00007.html>.
2015 * NEWS (2.3+): Add %symbol-default to example.
2016 * bison.texinfo (Freeing Discarded Symbols): Likewise.
2017 (Table of Symbols): Add entry for %symbol-default.
2018 * src/parse-gram.y (PERCENT_SYMBOL_DEFAULT): New token.
2019 (generic_symlist, generic_symlist_item): New nonterminals for creating
2020 a list in which each item is a symbol, semantic type, or
2021 %symbol-default.
2022 (grammar_declaration): Use generic_symlist in %destructor and %printer
2023 declarations instead of symbols.1 or an empty list.
2024 (symbol_declaration, precedence_declaration, symbols.1): Update actions
2025 for changes to symbol_list.
2026 * src/reader.c: Update for changes to symbol_list.
2027 * src/scan-code.l: Likewise.
2028 * src/scan-gram.l: Scan new PERCENT_SYMBOL_DEFAULT token.
2029 * src/symlist.c, src/symlist.h: Extend such that a list node may
2030 represent a semantic type or a %symbol-default in addition to just an
2031 ordinary symbol. Add switched functions for setting %destructor's and
2032 %printer's.
2033 * tests/actions.at, tests/input.at: Add %symbol-default to all default
2034 %destructor/%printer declarations.
2035
2036 2006-08-23 Joel E. Denny <jdenny@ces.clemson.edu>
2037
2038 Whether the default %destructor/%printer applies to a particular symbol
2039 isn't a question of whether the user *declares* that symbol (in %token,
2040 for example). It's a question of whether the user by any means
2041 *defines* the symbol at all (by simply using a char token, for
2042 example). $end is defined by Bison whereas any other token with token
2043 number 0 is defined by the user. The error token is always defined by
2044 Bison regardless of whether the user declares it with %token, but we
2045 may one day let the user define error as a nonterminal instead.
2046 * NEWS (2.3+): Say "user-defined" instead of "user-declared".
2047 * doc/bison.texinfo (Freeing Discarded Symbols): Likewise, and document
2048 the meaning of "user-defined".
2049 * tests/actions.at (Default %printer and %destructor for user-declared
2050 end token): Rename to...
2051 (Default %printer and %destructor for user-defined end token): ...
2052 this.
2053
2054 * src/symtab.c (symbol_destructor_get, symbol_printer_get): In the
2055 computation of whether to apply the default, don't maintain a list of
2056 every Bison-defined symbol. Instead, just check for a first character
2057 of '$', which a user symbol cannot have, and check for the error token.
2058
2059 2006-08-21 Joel E. Denny <jdenny@ces.clemson.edu>
2060
2061 Don't apply the default %destructor or %printer to the error token,
2062 $undefined, or $accept. This change fits the general rule that the
2063 default %destructor and %printer are only for user-declared symbols,
2064 and it solves several difficulties that are described in the new test
2065 cases listed below.
2066 * src/symtab.c (symbol_destructor_get, symbol_printer_get): Implement.
2067 * tests/actions.at (Default %printer and %destructor are not for error
2068 or $undefined, Default %printer and %destructor are not for $accept):
2069 New test cases.
2070
2071 2006-08-19 Joel E. Denny <jdenny@ces.clemson.edu>
2072
2073 Allow %start after the first rule.
2074 * src/reader.c (grammar_current_rule_begin): Don't set the start symbol
2075 when parsing the first rule.
2076 (check_and_convert_grammar): Search for it here after all grammar
2077 declarations have been parsed. Skip midrules, which have dummy LHS
2078 nonterminals.
2079 * src/symtab.c (symbol_is_dummy): New function.
2080 * src/symtab.h (symbol_is_dummy): Declare it.
2081 * tests/input.at (%start after first rule): New test.
2082
2083 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
2084
2085 Redo some of the previous commit: add back the ability to use
2086 non-aliased/undeclared string literals since it might be useful to
2087 those declaring %token-table.
2088 * src/reader.c (check_and_convert_grammar): Undo changes in previous
2089 commit: don't worry about complaints from symbols_pack.
2090 * src/symtab.c (symbol_new, symbol_class_set,
2091 symbol_check_alias_consistency): Undo changes in previous commit: count
2092 each string literal as a new symbol and token, assign it a symbol
2093 number, and don't complain about non-aliased string literals.
2094 (symbols_pack): Since symbol_make_alias still does not decrement symbol
2095 and token counts but does still set aliased tokens to the same number,
2096 symbol_pack_processor now leaves empty slots in the symbols array.
2097 Remove those slots.
2098 * tests/regression.at (Undeclared string literal): Remove test case
2099 added in previous commit since non-aliased string literals are allowed
2100 again.
2101 (Characters Escapes, Web2c Actions): Undo changes in previous commit:
2102 remove unnecessary string literal declarations.
2103 * tests/sets.at (Firsts): Likewise.
2104
2105 2006-08-18 Joel E. Denny <jdenny@ces.clemson.edu>
2106
2107 Don't allow an undeclared string literal, but allow a string literal to
2108 be used before its declaration.
2109 * src/reader.c (check_and_convert_grammar): Don't invoke packgram if
2110 symbols_pack complained.
2111 * src/symtab.c (symbol_new): Don't count a string literal as a new
2112 symbol.
2113 (symbol_class_set): Don't count a string literal as a new token, and
2114 don't assign it a symbol number since symbol_make_alias does that.
2115 (symbol_make_alias): It's not necessary to decrement the symbol and
2116 token counts anymore. Don't assume that an alias declaration occurs
2117 before any uses of the identifier or string, and thus don't assert that
2118 one of them has the highest symbol number so far.
2119 (symbol_check_alias_consistency): Complain if there's a string literal
2120 that wasn't declared as an alias.
2121 (symbols_pack): Bail if symbol_check_alias_consistency failed since
2122 symbol_pack asserts that every token has been assigned a symbol number
2123 although undeclared string literals have not.
2124 * tests/regression.at (String alias declared after use, Undeclared
2125 string literal): New test cases.
2126 (Characters Escapes, Web2c Actions): Declare string literals as
2127 aliases.
2128 * tests/sets.at (Firsts): Likewise.
2129
2130 2006-08-14 Joel E. Denny <jdenny@ces.clemson.edu>
2131
2132 In the grammar scanner, STRING_FINISH unclosed constructs and return
2133 them to the parser in order to improve error messages.
2134 * src/scan-gram.l (SC_ESCAPED_STRING, SC_ESCAPED_CHARACTER,
2135 SC_BRACED_CODE, SC_PROLOGUE): Implement.
2136 * tests/input.at (Unclosed constructs): New test case.
2137 * tests/regression.at (Invalid inputs): Update now that unclosed %{ is
2138 seen.
2139
2140 * src/scan-gram.h, src/scan-gram.l (gram_last_braced_code_loc): Remove
2141 unused global.
2142
2143 2006-08-13 Joel E. Denny <jdenny@ces.clemson.edu>
2144
2145 Handle string aliases for character tokens correctly.
2146 * src/symtab.c (symbol_user_token_number_set): If the token has an
2147 alias, check and set its alias's user token number instead of its own,
2148 which is set to indicate the alias. Previously, every occurrence of
2149 the character token in the grammar overwrote that alias indicator with
2150 the character code.
2151 * tests/input.at (String aliases for character tokens): New test.
2152
2153 2006-08-12 Joel E. Denny <jdenny@ces.clemson.edu>
2154
2155 * src/parse-gram.y: Add `%expect 0' so we don't overlook conflicts.
2156
2157 2006-08-11 Paul Eggert <eggert@cs.ucla.edu>
2158
2159 * bootstrap: Put in need-ngettext argument to AM_GNU_GETTEXT,
2160 to prevent failures when building on older platforms.
2161 Check for autopoint failure.
2162 Set XGETTEXT_OPTIONS to values that check for C format strings,
2163 so that translators are warned about them (this also helps
2164 prevent core dumps).
2165
2166 * lib/subpipe.c (create_subpipe): Use new gnulib pipe_safer
2167 function, since it simplifies our code a bit.
2168
2169 * configure.ac (AC_ARG_ENABLE): Use -Wextra -Wno-sign-compare
2170 rather than -W, so we don't get bogus warnings about sign comparisons.
2171 Add -Wpointer-arith, since that warning is useful (it reports code
2172 that does not conform to C89 and that some compilers reject).
2173 * data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c: Undo latest change,
2174 since it's no longer needed.
2175
2176 2006-08-10 Joel E. Denny <jdenny@ces.clemson.edu>
2177
2178 Clean up scanners a bit.
2179 * src/flex-scanner.h (FLEX_NO_OBSTACK): New macro that blocks obstack
2180 definitions so gcc won't warn when obstack_for_string is unused.
2181 * src/scan-code.l: config.h and system.h are already #include'd by
2182 scan-code-c.c, so get rid of them here.
2183 * src/scan-gram.l: Likewise.
2184 * src/scan-skel.l: Likewise, and use flex-scanner.h without obstack
2185 definitions rather than duplicating the rest of it.
2186 * src/scan-gram-c.c, scan-skel-c.c: #include "system.h".
2187
2188 2006-08-09 Joel E. Denny <jdenny@ces.clemson.edu>
2189
2190 Suppress signed/unsigned comparison warnings for yycheck.
2191 * data/c.m4 (b4_safest_int_type): New macro.
2192 * data/glr.c, data/lalr1.cc: Wherever you compare yycheck[i] against
2193 a signed int type, cast it to b4_safest_int_type first.
2194 * data/yacc.c: Likewise.
2195 (b4_safest_int_type): Overwrite the one from c.m4 since b4_int_type is
2196 also overwritten.
2197
2198 2006-08-09 Ralf Wildenhues <Ralf.Wildenhues@gmx.de> (tiny change)
2199
2200 * doc/bison.texinfo: Fix some typos.
2201
2202 2006-08-02 Paul Eggert <eggert@cs.ucla.edu>
2203
2204 * m4/.cvsignore: Add inttypes_h.m4,lib-ld.m4, lib-prefix.m4,
2205 po.m4, stdint_h.m4, uintmax_t.m4, ulonglong.m4, warning.m4.
2206
2207 * bootstrap (gnulib_tool): Stop using --assume-autoconf;
2208 the latest gnulib does this a different way.
2209 (get_translations): Sharuzzaman Ahmat Raslan reported that the ms
2210 translation was patched, so stop omitting it.
2211
2212 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2213
2214 Enable declaration of default %printer/%destructor. Make the parser
2215 use these for all user-declared grammar symbols for which the user does
2216 not declare a specific %printer/%destructor. Thus, the parser uses it
2217 for token 0 if the user declares it but not if Bison generates it as
2218 $end. Discussed starting at
2219 <http://lists.gnu.org/archive/html/bison-patches/2006-02/msg00064.html>,
2220 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00091.html>,
2221 and
2222 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>.
2223 * NEWS (2.3+): Mention.
2224 * doc/bison.texinfo (Actions in Mid-Rule): It's no longer impossible to
2225 declare a %destructor for a mid-rule's semantic value. It's just
2226 impossible to declare one specific to it.
2227 (Freeing Discarded Symbols): Mention that @$ can be used in %destructor
2228 code. Describe default %destructor form.
2229 * src/parse-gram.y (grammar_declaration): Parse default
2230 %printer/%destructor declarations.
2231 * src/output.c (symbol_destructors_output): Use symbol_destructor_get
2232 and symbol_destructor_location_get rather than accessing the destructor
2233 and destructor_location members of struct symbol.
2234 (symbol_printers_output): Likewise but for %printer's.
2235 * src/reader.c (symbol_should_be_used): Likewise but for %destructor's
2236 again.
2237 * src/symtab.c (default_destructor, default_destructor_location,
2238 default_printer, default_printer_location): New static global
2239 variables to record the default %destructor and %printer.
2240 (symbol_destructor_get, symbol_destructor_location_get,
2241 symbol_printer_get, symbol_printer_location_get): New functions to
2242 compute the appropriate %destructor and %printer for a symbol.
2243 (default_destructor_set, default_printer_set): New functions to set the
2244 default %destructor and %printer.
2245 * src/symtab.h: Prototype all those new functions.
2246 * tests/actions.at (Default %printer and %destructor): New test to
2247 check that the right %printer and %destructor are called, that they're
2248 not called for $end, and that $$ and @$ work correctly.
2249 (Default %printer and %destructor for user-declared end token): New
2250 test to check that the default %printer and %destructor are called for
2251 a user-declared end token.
2252 * tests/input.at (Default %printer and %destructor redeclared, Unused
2253 values with default %destructor): New tests to check related grammar
2254 warnings and errors.
2255
2256 2006-07-29 Joel E. Denny <jdenny@ces.clemson.edu>
2257
2258 Clean up handling of %destructor for the end token (token 0).
2259 Discussed starting at
2260 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00019.html>
2261 and
2262 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00013.html>.
2263
2264 Make the skeletons consistent in how they pop the end token and invoke
2265 its %destructor.
2266 * data/glr.c (yyrecoverSyntaxError, yyparse): Don't pop the start
2267 state, which has token number 0, since this would invoke the
2268 %destructor for the end token.
2269 * data/lalr1.cc (yy::parser::parse): Don't check for the final state
2270 until after shifting the end token, or else it won't be popped.
2271 * data/yacc.c (yyparse): Likewise.
2272
2273 * data/glr.c (yyparse): Clear the lookahead after shifting it even when
2274 it's the end token. Upon termination, destroy an unshifted lookahead
2275 even when it's the end token.
2276 * data/lalr1.cc (yy::parser::parse): Likewise.
2277 * data/yacc.c (yyparse): Likewise.
2278
2279 * src/reader.c (packgram): Don't check rule 0. This suppresses unused
2280 value warnings for the end token when the user gives the end token a
2281 %destructor.
2282
2283 * tests/actions.at (Printers and Destructors): Test all the above.
2284
2285 2006-07-24 Paul Eggert <eggert@cs.ucla.edu>
2286
2287 Update to latest gnulib and gettext versions.
2288 * bootstrap (gnulib-modules): Remove hard-locale, stdio-safer.
2289 Add fopen-safer.
2290 (gnulib_files): Add m4/warning.m4. Don't worry about files
2291 overwritten by autopoint.
2292 Replace gt_INTL_SUBDIR_CORE with an empty body in m4/gettext_gl.m4.
2293 Suppress "id", "ms", "tr" translations for now, since gettext 0.15
2294 rejects them.
2295 Don't use autoreconf; instead, invoke autopoint etc. by hand,
2296 so that we can remove the intl files at a better time.
2297 (intl_files_to_remove): Remove aclocal.m4, since it gets
2298 rebuilt anyway. Remove m4/inttypes_h.m4, m4/inttypes.m4,
2299 m4/isc-posix.m4, m4/lib-ld.m4, m4/lib-prefix.m4, m4/po.m4,
2300 m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
2301 Add m4/inttypes-h.m4, m4/lock.m4, m4/visibility.m4.
2302 Remove datarootdir hack; no longer needed.
2303 * configure.ac: Use gl_WARNING_CFLAGS rather than BISON_WARNING.
2304 (AM_GNU_GETTEXT_VERSION): Bump from 0.12 to 0.15.
2305 * lib/.cvsignore: Remove hard-locale.c, hard-locale.h, strdup.c,
2306 strdup.h.
2307 * m4/.cvsignore: Remove hard-locale.m4, strdup.m4.
2308 * m4/warning.m4: Remove from CVS, since we now use gnulib's version.
2309
2310 2006-07-20 Paul Eggert <eggert@cs.ucla.edu>
2311
2312 * bootstrap: Adjust to today's change to gnulib-tool by invoking
2313 it with --assume-autoconf='latest-stable'.
2314
2315 2006-07-13 Joel E. Denny <jdenny@ces.clemson.edu>
2316
2317 * src/parse-gram.y (grammar_declaration): Don't confuse Doxygen (at
2318 least 1.4.7 and 1.4.4) by putting a #line between `typedef union
2319 YYSTYPE' and `{'.
2320 * src/muscle_tab.h (muscle_grow): Replace the header comments with
2321 those from muscle_tab.c since the old ones are misleading.
2322
2323 2006-07-13 Akim Demaille <akim@epita.fr>
2324
2325 Support %define "KEY" {VALUE}.
2326 * src/scan-code.h, src/scan-code.l (translate_action)
2327 (translate_rule_action, translate_symbol_action, translate_code):
2328 Return char *, not const char *.
2329 * src/parse-gram.y (declaration): Rename as...
2330 (prologue_declaration): this.
2331 (string_content): Remove this nonterminal, use STRING.
2332 (braceless, content, content.opt): New nonterminal.
2333 Use them.
2334 (%define): Now accept content.opt, i.e., accept also BRACED_CODE
2335 as value.
2336 * src/scan-gram.l (getargs.h): Don't include it.
2337
2338 2006-07-12 Paul Eggert <eggert@cs.ucla.edu>
2339
2340 * data/lalr1.cc (YYCDEBUG): Use 'if (yydebug_) (*yycdebug_)'
2341 rather than a for-loop that declares a local bool variable. This
2342 should work around a compatibility problem with a Cray x1e C++
2343 compiler reported by Hung Nguyen in
2344 <http://lists.gnu.org/archive/html/help-bison/2006-07/msg00022.html>.
2345 The for-loop was introduced in the 2004-11-17 change but I don't
2346 know why it was needed.
2347
2348 2006-07-12 Akim Demaille <akim@epita.fr>
2349
2350 * data/c.m4: Comment changes.
2351
2352 2006-07-10 Akim Demaille <akim@lrde.epita.fr>
2353
2354 * src/complain.c (error_message, ERROR_MESSAGE): New.
2355 To factor...
2356 (fatal_at, fatal, warn_at, warn, complain_at, complain): these.
2357 * src/complain.h, src/complain.c (warning_issued): Remove, unused.
2358
2359 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
2360
2361 * NEWS: Instead of %union, you can define and use your own union type
2362 YYSTYPE if your grammar contains at least one <type> tag.
2363 Your YYSTYPE need not be a macro; it can be a typedef.
2364 * doc/bison.texinfo (Value Type, Multiple Types, Location Type):
2365 (Union Decl, Decl Summary): Document this.
2366 * data/glr.c (YYSTYPE): Implement this.
2367 * data/glr.cc (YYSTYPE): Likewise.
2368 * data/lalr1.cc (YYSTYPE): Likewise.
2369 * data/yacc.c (YYSTYPE): Likewise.
2370 * src/output.c (prepare): Output tag_seen_flag.
2371 * src/parse-gram.y (declaration, grammar_declaration):
2372 Use 'union_seen' rather than 'typed' to determine whether
2373 %union has been seen, since grammars can now be typed without
2374 %union.
2375 (symbol_declaration, type.opt, symbol_def):
2376 Keep track of whether a tag has been seen.
2377 * src/reader.c (union_seen, tag_seen): New vars.
2378 (typed): remove.
2379 * src/reader.h (union_seen, tag_seen, typed): Likewise.
2380 * src/scan-code.l (untyped_var_seen): New variable.
2381 (handle_action_dollar): Adjust to above changes.
2382 (handle_action_dollar, handle_action_at):
2383 Improve overflow checking for outlandish numbers.
2384 * tests/input.at (AT_CHECK_UNUSED_VALUES): Redo test to
2385 avoid new diagnostics generated by above changes.
2386 * tests/regression.at (YYSTYPE typedef): Add test to check
2387 for type tags without %union.
2388
2389 * src/symlist.c (symbol_list_length): Return int, not unsigned
2390 int, since callers expect int. This may need to get revisited
2391 once we have proper integer overflow checking.
2392
2393 * src/scan-gram.h (gram_scanner_cursor): Remove decl, since this
2394 object is now static.
2395
2396 * src/getargs.c (flags_argmatch): Return void, not int,
2397 to pacify ./configure --enable-gcc-warnings.
2398
2399 * src/flex-scanner.h (STRING_FREE): Don't use FLEX_PREFIX (last_string)
2400 since last_string is already defined to FLEX_PREFIX (last_string).
2401
2402 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
2403
2404 Implement --warnings/-W.
2405 * src/getargs.c (report_argmatch, trace_argmatch): Remove,
2406 replaced by...
2407 (flags_argmatch, FLAGS_ARGMATCH): this new function and macro.
2408 Adjust callers.
2409 * src/getargs.h, src/getargs.c (warnings, warnings_flags)
2410 (warnings_args, warnings_types): New.
2411 (getargs, short_options, long_options): Accept -W/--warnings.
2412 Sort the options by alphabetical order, upper case letter right
2413 before its lower case.
2414
2415 2006-07-09 Joel E. Denny <jdenny@ces.clemson.edu>
2416
2417 Change %merge result type clash warnings to errors. Discussed at
2418 <http://lists.gnu.org/archive/html/bison-patches/2006-07/msg00026.html>.
2419 * src/reader.c (record_merge_function_type): Use complain_at.
2420 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
2421 declared later): Update test case results.
2422
2423 2006-07-09 Akim Demaille <akim@lrde.epita.fr>
2424
2425 * src/getargs.h, src/getargs.c: Swap --report and --trace handling
2426 to be in alphabetical order.
2427 (trace_args): Spelling fixes.
2428
2429 2006-07-09 Paul Eggert <eggert@cs.ucla.edu>
2430
2431 * data/yacc.c (YYID, yy_stack_print): Prefix local vars with "yy"
2432 so they don't collide with user-defined macros.
2433 (yy_stack_print): Don't assume that yytype_int16 promotes to int;
2434 this was never guaranteed, and now that we're using gnulib stdint,
2435 which defines int_fast16_t to long int, the problem is exposed.
2436
2437 2006-07-08 Paul Eggert <eggert@cs.ucla.edu>
2438
2439 * data/c.m4 (b4_basename): Simplify a bit, since we don't
2440 need the full POSIX semantics (and weren't implementing them
2441 anyway).
2442
2443 Adjust to Autoconf 2.60 and today's gnulib.
2444 * bootstrap (gnulib_modules): Add stdint.
2445 Remove special case for m4/onceonly_2_57.m4, since gnulib-tool
2446 no longer copies it.
2447 (intl_files_to_remove): Remove m4/longlong.m4 and m4/wchar_t.m4,
2448 since stdint needs the former and wcwidth (which is now required
2449 by mbswidth) needs the latter.
2450 Append 'datarootdir = @datarootdir@' to po/Makefile.in.in, to
2451 work around a compatibility glitch between gettext 0.14.6 and
2452 Autoconf 2.60.
2453 * configure.ac (AC_PREREQ): Require Autoconf 2.60.
2454 Do not check for uintptr_t, since new stdint module does the right
2455 thing.
2456 * lib/.cvsignore: Remove alloca.c, alloca.h, alloca_.h.
2457 Add stdint.h, stdint_.h, wcwidth.h.
2458 * m4/.cvsignore: Remove alloca.m4, onceonly.m4.
2459 Add absolute-header.m4, double-slash-root.m4, longlong.m4,
2460 stdint.m4, wchar_t.m4, wcwidth.m4.
2461 * src/files.c: Include <dirname.h> and <stdio-safer.h> in the
2462 usual order for ../lib/*.h files.
2463 (file_name_split): Use last_component, not base_name, to adjust
2464 to gnulib changes.
2465 * src/parse-gram.h: Include <strverscmp.h> in the usual order
2466 for ../lib/*.h files.
2467 (YYTYPE_INT16, YYTYPE_INT8, YYTYPE_UINT16, YYTYPE_UINT8):
2468 Define unconditionally, since we now assume the stdint module.
2469 * src/scan-skel.l: Include <dirname.h>.
2470 (BASE_QPUTS): Use last_component, not base_name.
2471 * src/system.h: Include <unlocked-io.h> in the usual order
2472 for ../lib/*.h files. Include <stdint.h> unconditionally,
2473 since we now use the stdint module.
2474 (uintptr_t): Declare if UINTPTR_MAX is not defined, not
2475 HAVE_UINTPTR_T, since we now use the stdint module.
2476 (base_name): Remove decl, since files now include <dirname.h>
2477 to get the decl.
2478
2479 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
2480
2481 * data/c.m4 (b4_location_initial_column, b4_location_initial_line):
2482 New, default to 1.
2483 * data/yacc.c, data/glr.c, data/location.cc: Use them.
2484 * NEWS, doc/bison.texinfo: The initial column and line are 1 by
2485 default.
2486 * tests/calc.at: Adjust.
2487
2488 2006-07-08 Akim Demaille <akim@lrde.epita.fr>
2489
2490 * data/c.m4 (b4_basename): New.
2491 (b4_syncline): Also output the location of its invocation (from
2492 the skeleton).
2493 (b4_user_action, b4_define_user_action, b4_user_actions)
2494 (b4_user_initial_action, b4_user_post_prologue, b4_user_start_header)
2495 (b4_user_stype): New.
2496 * data/yacc.c, data/glr.c, data/lalr1.cc, data/glr.cc: Use them.
2497
2498 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
2499
2500 In the grammar file, the first column is 1 not 0 on the first line as
2501 on every other line.
2502 * src/parse-gram.y (%initial-action): Initialize @$ correctly.
2503 * tests/input.at (Torturing the Scanner): Update output.
2504
2505 * src/scan-gram.l (scanner_cursor): Declare it static.
2506
2507 2006-07-07 Joel E. Denny <jdenny@ces.clemson.edu>
2508
2509 In warnings, say "previous declaration" rather than "first
2510 declaration".
2511 * src/symtab.c (redeclaration): Do that here.
2512 * src/reader.c (record_merge_function_type): In the case of a result
2513 type clash, report the previous declaration rather than the very first
2514 one in the grammar file.
2515 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
2516 declared later): Add a third declaration to check this behavior.
2517 * tests/input.at (Incompatible Aliases): Update output.
2518
2519 2006-06-27 Akim Demaille <akim@epita.fr>
2520
2521 * doc/Doxyfile.in: New.
2522 * doc/Makefile.am: Use it.
2523 * src/lalr.h, src/symtab.h: Initial doxygenation.
2524
2525 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2526
2527 Don't miss %merge result type warnings just because the LHS types are
2528 declared after the %merge. This continues the effort of the previous
2529 patch.
2530 * src/reader.c (get_merge_function): Don't set the merger type yet.
2531 (record_merge_function_type): New function for setting the merger type
2532 and checking for clashes.
2533 (grammar_current_rule_merge_set): Set the location of the %merge for
2534 the current rule.
2535 (packgram): Invoke record_merge_function_type for each rule now that
2536 all symbol type declarations have been parsed.
2537 * src/reader.h (merger_list.type_declaration_location): New member
2538 storing the location of the first %merge from which the type for this
2539 merging function was derived.
2540 * src/symlist.h (symbol_list.merger_declaration_location): New member
2541 storing the location of a rule's %merge, if any.
2542 * tests/glr-regression.at (Missed %merge type warnings when LHS type is
2543 declared later): New test to catch the error fixed by the above patch.
2544
2545 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2546
2547 Get action warnings (grammar_rule_check) right even when symbol
2548 declarations appear after the rules. Discussed at
2549 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00108.html>
2550 and
2551 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00151.html>.
2552 Don't mistake the type of $$ in a midrule to be that of its parent
2553 rule's $$.
2554 * src/reader.c (grammar_current_rule_end): Don't invoke
2555 grammar_rule_check yet since not all symbol declarations may have been
2556 parsed yet.
2557 (grammar_midrule_action): Likewise.
2558 Don't record whether the midrule's $$ has been used yet since actions
2559 haven't been translated yet.
2560 Record the midrule's parent rule and its RHS index within the parent
2561 rule.
2562 (grammar_current_rule_action_append): Don't translate the action yet
2563 since not all symbol declarations may have been parsed yet and, thus,
2564 warnings about types for $$, $n, @$, and @n can't be reported yet.
2565 (packgram): Translate the action and invoke grammar_rule_check now that
2566 all symbol declarations have been parsed.
2567 * src/scan-code.l (handle_action_dollar): Now that this is invoked
2568 after parsing the entire grammar file, the symbol list here in the case
2569 of a midrule is actually the midrule's empty RHS, so reference its
2570 parent rule's RHS where necessary.
2571 On the other hand, now that you can already know it's a midrule, you
2572 aren't forced to think $$ has the same type as its parent rule's $$.
2573 (handle_action_at): In the case of a midrule, reference the parent rule
2574 where necessary.
2575 * src/symlist.c (symbol_list_new): Initialize new midrule-related
2576 members.
2577 (symbol_list_length): Now that this is invoked after all rules have
2578 been parsed, a NULL symbol (rather than a NULL symbol list node)
2579 terminates a rule. symbol_list_print already does this correctly.
2580 * src/symlist.h (symbol_list.midrule_parent_rule,
2581 symbol_list.midrule_parent_rhs_index): New members so that midrules can
2582 remember their relationships with their parents.
2583 * tests/input.at (Type Clashes): Extend to catch the midrule $$ error
2584 fixed by the above patch.
2585 (_AT_UNUSED_VALUES_DECLARATIONS, AT_CHECK_UNUSED_VALUES): New m4 macros
2586 implementing...
2587 (Unused values): ... this old test case and...
2588 (Unused values before symbol declarations): ... this new test case.
2589 This one is the same as `Unused values' except that all symbol
2590 declarations appear after the rules in order to catch the rest of the
2591 errors fixed by the above patch.
2592
2593 2006-06-26 Joel E. Denny <jdenny@ces.clemson.edu>
2594
2595 More cleanup.
2596 * src/reader.c (current_rule): Declare it static since it's no longer
2597 used outside this file.
2598 (grammar_current_rule_action_append): Remove redundant arguments from
2599 translate_rule_action invocation.
2600 * src/reader.h (current_rule): Remove this unused extern.
2601 * src/scan-code.h (translate_rule_action): Remove redundant arguments.
2602 * src/scan-code.l (translate_rule_action): Likewise.
2603
2604 2006-06-25 Joel E. Denny <jdenny@ces.clemson.edu>
2605
2606 Clean up yesterday's patch.
2607 * parse-gram.y (rhs): Move grammar_midrule_action invocation from here
2608 to...
2609 * src/reader.c (grammar_current_rule_action_append): ... here for
2610 consistency with grammar_current_rule_symbol_append.
2611 * tests/regression.at (Braced code in declaration in rules section):
2612 Make yyerror and yylex static as usual.
2613
2614 2006-06-24 Joel E. Denny <jdenny@ces.clemson.edu>
2615
2616 Fix bug that mistakes braced code in a declaration in the rules section
2617 to be a rule action. Mentioned at
2618 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00105.html>.
2619 * src/scan-gram.l: Move midrule action detection from the start of the
2620 scanning of any braced code to...
2621 * src/parse-gram.y (rhs): ... the parsing of braced code as a rule
2622 action. For readability, use $2 and @2 rather than the equivalent
2623 global variables.
2624 * tests/regression.at (Braced code in declaration in rules section):
2625 New test to catch the error fixed by the above patch.
2626
2627 Work on code readability some.
2628 * src/scan-code.l (current_rule): Get rid of this misleading and
2629 redundant declaration: it's actually extern'ed in reader.h.
2630 (YY_DECL, code_lex, handle_action_dollar, handle_action_at,
2631 translate_action): Add a rule argument and use it instead of the global
2632 current_rule.
2633 (translate_rule_action): This already receives current_rule through an
2634 argument, so pass it on to translate_action instead of assigning
2635 current_rule to current_rule.
2636 (translate_symbol_action, translate_code): Pass rule = NULL to
2637 translate_action.
2638
2639 2006-06-23 Joel E. Denny <jdenny@ces.clemson.edu>
2640
2641 Rename %before-definitions to %start-header and %after-definitions to
2642 %end-header. Don't use these declarations to separate pre-prologue
2643 blocks from post-prologue blocks. Add new order-independent
2644 declarations %before-header and %after-header as alternatives to the
2645 traditional Yacc pre-prologue and post-prologue blocks. Discussed at
2646 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00110.html>.
2647 * NEWS (2.3+): Update for these changes.
2648 * data/glr.c (b4_before_definitions): Update to...
2649 (b4_start_header): ... this.
2650 (b4_after_definitions): Update to...
2651 (b4_end_header): ... this.
2652 * data/glr.cc: Likewise.
2653 * data/lalr1.cc: Likewise.
2654 * data/yacc.c: Likewise.
2655 * doc/bison.texinfo (The prologue): Update names, and replace remaining
2656 prologue blocks with %*-header declarations.
2657 (Calc++ Parser): Likewise.
2658 (Bison Declaration Summary): Update names.
2659 (Table of Symbols): Update description.
2660 * src/parse-gram.y (PERCENT_AFTER_DEFINITIONS): Update to...
2661 (PERCENT_END_HEADER): ... this.
2662 (PERCENT_BEFORE_DEFINITIONS): Update to...
2663 (PERCENT_START_HEADER): ... this.
2664 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
2665 (declaration): Update token names and m4 macro names.
2666 When parsing %end-header and %start-header, invoke translate_code
2667 before muscle_code_grow, and no longer set global booleans to remember
2668 whether these declarations have been seen.
2669 Parse new %after-header and %before-header.
2670 * src/reader.c (before_definitions, after_definitions): Remove.
2671 (prologue_augment): Accept a new bool argument to specify whether to
2672 augment the pre-prologue or post-prologue.
2673 * src/reader.h (before_definitions, after_definitions): Remove these
2674 extern's.
2675 (prologue_augment): Add new bool argument.
2676 * src/scan-gram.l (PERCENT_AFTER_DEFINITIONS): Update to...
2677 (PERCENT_END_HEADER): ... this.
2678 (PERCENT_BEFORE_DEFINITIONS): Update to...
2679 (PERCENT_START_HEADER): ... this.
2680 (PERCENT_AFTER_HEADER, PERCENT_BEFORE_HEADER): New tokens.
2681 * tests/actions.at (Printers and Destructors): Update names.
2682
2683 2006-06-22 Joel E. Denny <jdenny@ces.clemson.edu>
2684
2685 Add comparison operators for C++ location classes. Discussed at
2686 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00092.html>.
2687 * data/c++.m4 (b4_define_location_comparison): New boolean %define
2688 declaration indicating whether filename_type has an operator==. If
2689 filename_type is `std::string', it defaults to `1', `0' otherwise.
2690 * data/location.cc: Iff b4_define_location_comparison is `1', add
2691 operator== and operator!= for class position and for class location.
2692
2693 Some minor fixes.
2694 * src/scan-action.l: Remove unused file.
2695 * src/symtab.c (symbol_printer_set): Use printer_location not
2696 destructor_location.
2697 * src/symtab.h (struct symbol): Replace incorrect source comment for
2698 printer members.
2699 * tests/input.at (Incompatible Aliases): Update output with correct
2700 printer location.
2701
2702 2006-06-20 Joel E. Denny <jdenny@ces.clemson.edu>
2703
2704 Don't put the pre-prologue in the header file. For the yacc.c code
2705 file and the glr.c header and code files, move the pre-prologue before
2706 the token definitions. Add new %before-definitions and
2707 %after-definitions to declare code that will go in both the header file
2708 and code file. Discussed at
2709 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00000.html>,
2710 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00016.html>,
2711 and
2712 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00055.html>.
2713 * NEWS (2.3+): Describe these changes.
2714 * data/glr.c (b4_pre_prologue): Move from within to before...
2715 (b4_shared_declarations): ... this.
2716 Add new b4_before_definitions before b4_token_enums.
2717 Add new b4_after_definitions at the end.
2718 * data/glr.cc (b4_pre_prologue): Replace with...
2719 (b4_before_definitions): ... this in the header file.
2720 (b4_after_definitions): New near the end of the header file.
2721 * data/lalr1.cc (b4_pre_prologue): Move from the header file to the
2722 code file right before including the header file.
2723 (b4_before_definitions): New in the previous position of
2724 b4_pre_prologue in the header file.
2725 (b4_after_definitions): New near the end of the header file.
2726 * data/yacc.c: Clean up some m4 quoting especially in the header file.
2727 (b4_token_enums_defines): In the code file, move to right before
2728 YYSTYPE for consistency with the header file.
2729 (b4_before_definitions): New right before b4_token_enums_defines in
2730 both the header and code file.
2731 (b4_after_definitions): New right after YYLTYPE and yylloc in both the
2732 header and code file.
2733 * doc/bison.texinfo (Prologue): Show use of %before-definitions instead
2734 of prologues for %union dependencies.
2735 (Bison Declaration Summary): In %defines description, mention the
2736 effect of %before-definitions and %after-definitions on the header
2737 file.
2738 (Calc++ Parser): Forward declare driver in a %before-definitions rather
2739 than in the pre-prologue so that make check succeeds.
2740 (Table of Symbols): Add entries for %before-definitions and
2741 %after-definitions.
2742 * src/parse-gram.y (PERCENT_BEFORE_DEFINITIONS): New token for
2743 %before-definitions.
2744 (PERCENT_AFTER_DEFINITIONS): New token for %after-definitions.
2745 (declaration): Parse those declarations and append to
2746 b4_before_definitions and b4_after_definitions, respectively.
2747 * src/reader.c (before_definitions, after_definitions): New bools to
2748 track whether those declarations have been seen.
2749 (prologue_augment): Add to the post-prologue if %union,
2750 %before-definitions, or %after-definitions has been seen.
2751 * src/reader.h (before_definitions, after_definitions): New extern's.
2752 * src/scan-gram.l: Scan the new declarations.
2753 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Place the second
2754 prologue block in a %before-definitions or a %after-definitions based
2755 on whether the %union is declared.
2756 * tests/regression.at (Early token definitions with --yacc, Early token
2757 definitions without --yacc): Move tests for token definitions into the
2758 post-prologue since token names are no longer defined in the
2759 pre-prologue.
2760
2761 2006-06-20 Akim Demaille <akim@epita.fr>
2762
2763 * src/symtab.h, src/symtab.c (symbol_from_uniqstr): New.
2764 (symbol_get): Use it.
2765 * src/parse-gram.y: Use it.
2766
2767 2006-06-19 Joel E. Denny <jdenny@ces.clemson.edu>
2768
2769 * src/scan-gram.l: Remove unused declaration of last_string_1 so the
2770 build succeeds when configured with --enable-gcc-warnings.
2771
2772 2006-06-19 Paul Eggert <eggert@cs.ucla.edu>
2773
2774 * src/parse-gram.y (char_name): New function.
2775 (CHAR, STRING, string_content): For %printer, properly escape.
2776 (ID): Prefer fputs to fprintf.
2777 (id): Reindent to be consistent with other rules.
2778 Properly quote char.
2779
2780 The Translation Project changed its way of publishing translations
2781 to maintainers. I haven't received any responses to my request
2782 for supporting the old way, or for documenting the new way. I
2783 have modified 'bootstrap' to use screen scraping
2784 (in this case, HTML scraping). This is unreliable and inelegant,
2785 but I don't see any better way. Yuck.
2786 * bootstrap (TP_URL, WGET_COMMAND): New vars.
2787 (get_translations): New function, which uses HTML scraping to
2788 deduce locations of latest translations.
2789 Use this function to grab both bison and bison-runtime .po files.
2790 Don't bother priming the pump for the runtime-po domain any more,
2791 as it's now translated better than bison is.
2792
2793 2006-06-19 Akim Demaille <akim@epita.fr>
2794
2795 * src/scan-gram.l: No longer "parse" things after `%union' until
2796 `{'. Rather, return a single "%union" token.
2797 No longer make symbols: return strings, and leave the conversion
2798 to symbols to the parser.
2799 (SC_PRE_CODE, token_type): Remove.
2800 * src/parse-gram.y (%union): New field `character'.
2801 Sort tokens.
2802 (CHAR): New token.
2803 (ID, ID_COLON): Now that the scanner no longer makes them
2804 identifiers, adjust all uses to invoke symbol_get.
2805 (id_colon): New, wraps the conversion from string to symbol.
2806 (%union): Accept a possible union_name.
2807 (symbol): Now can be a char.
2808 * data/c.m4 (b4_union_name): Leave a default value.
2809 * data/glr.c, data/yacc.c: Use it.
2810
2811 2006-06-11 Joel E. Denny <jdenny@ces.clemson.edu>
2812
2813 For associating token numbers with token names for "yacc.c", don't use
2814 #define statements unless `--yacc' is specified; always use enum
2815 yytokentype. Most important discussions start at:
2816 <http://lists.gnu.org/archive/html/bison-patches/2005-09/msg00053.html>,
2817 <http://lists.gnu.org/archive/html/bison-patches/2005-12/msg00052.html>,
2818 and
2819 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00043.html>.
2820 * NEWS (2.3+): Mention.
2821 * data/c.m4 (b4_yacc_if): New.
2822 (b4_token_enums_defines): Use b4_yacc_if to decide whether to add the
2823 token #define's.
2824 * doc/bison.texinfo (Bison Options): Describe the effect of `--yacc'
2825 on token name definitions.
2826 * src/getargs.c (usage): Capitalize `Yacc' in English.
2827 * src/output.c (prepare): Define b4_yacc_flag.
2828 * tests/regression.at (Early token definitions): Test that tokens names
2829 are defined before the pre-prologue not just before the post-prologue.
2830 Remove this test case and copy to...
2831 (Early token definitions with --yacc): ... this to test #define's.
2832 (Early token definitions without --yacc): ... and this to test enums.
2833
2834 2006-06-11 Paul Eggert <eggert@cs.ucla.edu>
2835
2836 * NEWS: Reword the post-2.3 change to not be so optimistic about
2837 removing the old "look-ahead" spelling.
2838 Update previous look-ahead/lookahead change reports.
2839 * REFERENCES: look-ahead -> lookahead (since that's
2840 what he actually wrote).
2841 * doc/refcard.tex: look ahead -> lookahead,
2842 look-ahead -> lookahead
2843
2844 2006-06-09 Joel E. Denny <jdenny@ces.clemson.edu>
2845
2846 For consistency, use `lookahead' instead of `look-ahead' or
2847 `look_ahead'. Discussed starting at
2848 <http://lists.gnu.org/archive/html/bison-patches/2006-01/msg00049.html>
2849 and then at
2850 <http://lists.gnu.org/archive/html/bison-patches/2006-06/msg00017.html>.
2851 * NEWS: For the next release, note the change to `--report'.
2852 * TODO, doc/bison.1: Update English.
2853 * doc/bison.texinfo: Update English.
2854 (Understanding Your Parser, Bison Options): Document as
2855 `--report=lookahead' rather than `--report=look-ahead'.
2856 * src/conflicts.c: Update English in comments.
2857 (lookahead_set): Rename from look_ahead_set.
2858 (flush_reduce): Rename argument look_ahead_tokens to lookahead_tokens.
2859 (resolve_sr_conflict): Rename local look_ahead_tokens to
2860 lookahead_tokens, and update other uses.
2861 (flush_shift, set_conflicts, conflicts_solve, count_sr_conflicts,
2862 count_rr_conflicts, conflicts_free): Update uses.
2863 * src/getargs.c (report_args): Move "lookahead" before alternate
2864 spellings.
2865 (report_types): Update uses.
2866 (usage): For `--report' usage description, state `lookahead' spelling
2867 rather than `look-ahead'.
2868 * src/getargs.h (report.report_lookahead_tokens): Rename from
2869 report_look_ahead_tokens.
2870 * src/lalr.c: Update English in comments.
2871 (compute_lookahead_tokens): Rename from compute_look_ahead_tokens.
2872 (state_lookahead_tokens_count): Rename from
2873 state_look_ahead_tokens_count.
2874 Rename local n_look_ahead_tokens to n_lookahead_tokens.
2875 (lookahead_tokens_print): Rename from look_ahead_tokens_print.
2876 Rename local n_look_ahead_tokens to n_lookahead_tokens.
2877 Update other uses.
2878 Update English in output.
2879 (add_lookback_edge, initialize_LA, lalr, lalr_free): Update uses.
2880 * src/print.c: Update English in comments.
2881 (lookahead_set): Rename from look_ahead_set.
2882 (print_reduction): Rename argument lookahead_token from
2883 look_ahead_token.
2884 (print_core, state_default_rule, print_reductions, print_results):
2885 Update uses.
2886 * src/print_graph.c: Update English in comments.
2887 (print_core): Update uses.
2888 * src/state.c: Update English in comments.
2889 (reductions_new): Update uses.
2890 (state_rule_lookahead_tokens_print): Rename from
2891 state_rule_look_ahead_tokens_print, and update other uses.
2892 * src/state.h: Update English in comments.
2893 (reductions.lookahead_tokens): Rename from look_ahead_tokens.
2894 (state_rule_lookahead_tokens_print): Rename from
2895 state_rule_look_ahead_tokens_print.
2896 * src/tables.c: Update English in comments.
2897 (conflict_row, action_row): Update uses.
2898 * tests/glr-regression.at
2899 (Incorrect lookahead during deterministic GLR,
2900 Incorrect lookahead during nondeterministic GLR): Rename
2901 print_look_ahead to print_lookahead.
2902 * tests/torture.at: Update English in comments.
2903 (AT_DATA_LOOKAHEAD_TOKENS_GRAMMAR): Rename from
2904 AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR.
2905 (Many lookahead tokens): Update uses.
2906 * data/glr.c: Update English in comments.
2907 * lalr1.cc: Likewise.
2908 * yacc.c: Likewise.
2909 * src/conflicts.h: Likewise.
2910 * src/lalr.h: Likewise.
2911 * src/main.c: Likewise.
2912 * src/output.c: Likewise.
2913 * src/parse-gram.c: Likewise.
2914 * src/tables.h: Likewise.
2915 * tests/calc.at: Likewise.
2916
2917 2006-06-08 Joel E. Denny <jdenny@ces.clemson.edu>
2918
2919 * src/flex-scanner.h (yytext): Remove stray `*/' in #define.
2920
2921 2006-06-07 Paul Eggert <eggert@cs.ucla.edu>
2922
2923 * TODO: Add request from Nelson H. F. Beebe to be able to install
2924 Bison without installing the yacc script.
2925
2926 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
2927
2928 * src/flex-scanner.h: For the sake of Flex 2.5.4, don't #define yyleng
2929 and yytext if they're already #define'd.
2930 * src/flex-scanner.h, src/location.h: Move #include "system.h" to...
2931 * src/scan-code-c.c: ... here.
2932 * src/scan-code.l, src/scan-gram.l: ... and here. Also #include
2933 <config.h>.
2934
2935 2006-06-07 Joel E. Denny <jdenny@ces.clemson.edu>
2936
2937 Get Bison to build again when configured with --enable-gcc-warnings.
2938 * src/location.c, src/location.h, src/main.c, src/scan-code.l: Add some
2939 missing #include's.
2940 * src/scan-code.l (handle_action_dollar, handle_action_at): Rename
2941 loc argument as it shadows a global.
2942 * src/scan-gram.l: Remove stray comma that prevents boundary_set
2943 invocation.
2944
2945 * src/.cvsignore: Add scan-code.c.
2946
2947 2006-06-07 Akim Demaille <akim@epita.fr>
2948
2949 * src/scan-gram.l: Move the "add a trailing ; to actions" code
2950 to...
2951 * src/scan-code.l: here.
2952 * tests/input.at (Torturing the Scanner): Fix another location
2953 error.
2954
2955 2006-06-07 Akim Demaille <akim@epita.fr>
2956
2957 * src/Makefile.am (BUILT_SOURCES): Fix the trailing backslash.
2958
2959 2006-06-06 Akim Demaille <akim@epita.fr>
2960
2961 Extract the parsing of user actions from the grammar scanner.
2962 As a consequence, the relation between the grammar scanner and
2963 parser is much simpler. We can also split "composite tokens" back
2964 into simple tokens.
2965 * src/gram.h (ITEM_NUMBER_MAX, RULE_NUMBER_MAX): New.
2966 * src/scan-gram.l (add_column_width, adjust_location): Move to and
2967 rename as...
2968 * src/location.h, src/location.c (add_column_width)
2969 (location_compute): these.
2970 Fix the column count: the initial column is 0.
2971 (location_print): Be robust to ending column being 0.
2972 * src/location.h (boundary_set): New.
2973 * src/main.c: Adjust to scanner_free being renamed as
2974 gram_scanner_free.
2975 * src/output.c: Include scan-code.h.
2976 * src/parse-gram.y: Include scan-gram.h and scan-code.h.
2977 Use boundary_set.
2978 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_INITIAL_ACTION)
2979 (PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Remove the {...} part,
2980 which is now, again, a separate token.
2981 Adjust all dependencies.
2982 Whereever actions with $ and @ are used, use translate_code.
2983 (action): Remove this nonterminal which is now useless.
2984 * src/reader.c: Include assert.h, scan-gram.h and scan-code.h.
2985 (grammar_current_rule_action_append): Use translate_code.
2986 (packgram): Bound check ruleno, itemno, and rule_length.
2987 * src/reader.h (gram_in, gram__flex_debug, scanner_cursor)
2988 (last_string, last_braced_code_loc, max_left_semantic_context)
2989 (scanner_initialize, scanner_free, scanner_last_string_free)
2990 (gram_out, gram_lineno, YY_DECL_): Move to...
2991 * src/scan-gram.h: this new file.
2992 (YY_DECL): Rename as...
2993 (GRAM_DECL): this.
2994 * src/scan-code.h, src/scan-code.l, src/scan-code-c.c: New.
2995 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
2996 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
2997 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
2998 Move these declarations, and...
2999 (obstack_for_string, STRING_GROW, STRING_FINISH, STRING_FREE):
3000 these to...
3001 * src/flex-scanner.h: this new file.
3002 * src/scan-gram.l (rule_length, rule_length_overflow)
3003 (increment_rule_length): Remove.
3004 (last_braced_code_loc): Rename as...
3005 (gram_last_braced_code_loc): this.
3006 Adjust to the changes of the parser.
3007 Move all the handling of $ and @ into...
3008 * src/scan-code.l: here.
3009 * src/scan-gram.l (handle_dollar, handle_at): Remove.
3010 (handle_action_dollar, handle_action_at): Move to...
3011 * src/scan-code.l: here.
3012 * src/Makefile.am (bison_SOURCES): Add flex-scanner.h,
3013 scan-code.h, scan-code-c.c, scan-gram.h.
3014 (EXTRA_bison_SOURCES): Add scan-code.l.
3015 (BUILT_SOURCES): Add scan-code.c.
3016 (yacc): Be robust to white spaces.
3017
3018 * tests/conflicts.at, tests/input.at, tests/reduce.at,
3019 * tests/regression.at: Adjust the column numbers.
3020 * tests/regression.at: Adjust the error message.
3021
3022 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
3023
3024 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
3025 Use Akim's wording from
3026 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00056.html>.
3027
3028 2006-06-06 Joel E. Denny <jdenny@ces.clemson.edu>
3029
3030 Between Bison releases, manually append `+' to the previous Bison
3031 release number, and use that as a signal to automatically print the
3032 ChangeLog's CVS Id keyword from --version. Discussed starting at
3033 <http://lists.gnu.org/archive/html/bison-patches/2006-05/msg00028.html>.
3034 * ChangeLog: Add Id header.
3035 * configure.ac (AC_INIT): Append `+' to `2.3'.
3036 * src/.cvsignore: Add revision.c.
3037 * src/Makefile.am (bison_SOURCES): Add revision.c and revision.h.
3038 (BUILT_SOURCES): Add revision.c.
3039 (revision.c): New target rule. This file defines a new global variable
3040 named revision. It initializes it with either the Id from ChangeLog
3041 or, if VERSION doesn't contain `+', with the empty string.
3042 * src/getargs.c (version): Print the value of revision.
3043 * src/revision.h: Extern revision.
3044
3045 2006-06-05 Paul Eggert <eggert@cs.ucla.edu>
3046
3047 * NEWS: Version 2.3.
3048 * configure.ac (AC_INIT): Likewise.
3049
3050 2006-05-30 Paul Eggert <eggert@cs.ucla.edu>
3051
3052 * data/glr.c (YYRECOVERING): Define to be a function-like macro
3053 with no arguments, not as an object-like macro. This is for
3054 compatibility with data/yacc.c. Problem reported by John P. Hartmann in
3055 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00059.html>.
3056 * doc/bison.texinfo (Action Features, Error Recovery, Table of Symbols):
3057 Document this.
3058
3059 2006-05-30 Joel E. Denny <jdenny@ces.clemson.edu>
3060
3061 * src/getargs.c (usage): Back out yesterday's modification of the
3062 --help output so that we don't have to wait for translation before
3063 releasing 2.3.
3064
3065 2006-05-29 Paul Eggert <eggert@cs.ucla.edu>
3066
3067 * doc/bison.texinfo (Introduction): Don't say "GLR grammar".
3068 Problem reported by Akim Demaille.
3069
3070 2006-05-29 Joel E. Denny <jdenny@ces.clemson.edu>
3071
3072 * src/getargs.c (usage): Mention GLR not just LALR(1) in --help output.
3073
3074 2006-05-26 Paul Eggert <eggert@cs.ucla.edu>
3075
3076 * data/yacc.c (yy_reduce_print): Omit trailing white space in
3077 generated source code. Problem reported by Frans Englich in
3078 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00049.html>.
3079
3080 2006-05-22 Paul Eggert <eggert@cs.ucla.edu>
3081
3082 * Makefile.maint (gzip_rsyncable, GZIP_ENV): Compute within the
3083 shell, not within 'make', so that 'make' by an ordinary builder
3084 (using GNU make) does not worry about configuring gzip. This also
3085 works around a bug reported independently by Keith Thompson and by
3086 Georg Schwarz, whereby gzip 1.2.4 --help would output usage on
3087 stderr rather than stdout, messing up the build logs.
3088
3089 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
3090
3091 * data/yacc.c (yyparse): Wrap the final return from yyparse inside YYID
3092 to make sure that YYID will never be unused. This fixes a 'make
3093 maintainer-check' failure caused by the recent changes to the 'Trivial
3094 grammars' test case, which caused g++ 4.1.0 to complain that YYID was
3095 not used.
3096 * data/glr.c (yyparse): Wrap yyparse's return inside YYID just in case.
3097
3098 2006-05-21 Joel E. Denny <jdenny@ces.clemson.edu>
3099
3100 * data/glr.c (yyresolveLocations): Remove bogus YYASSERT that the
3101 state before an empty RHS is always resolved here. Only the location
3102 of that state is guaranteed to be resolved, and that's enough. This
3103 fixes the remaining bug reported by Derek M. Jones in
3104 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
3105 * tests/glr-regression.at (Uninitialized location when reporting
3106 ambiguity): Test the above case.
3107 Also, the embedded comments in this test case claim it checks the case
3108 of an empty RHS that has inherited the initial location. However, the
3109 corresponding LHS was already resolved, so yyresolveLocations didn't
3110 actually have reason to modify it. Fix this by forcing
3111 nondeterministic operation at the beginning of the parse.
3112
3113 2006-05-20 Paul Eggert <eggert@cs.ucla.edu>
3114
3115 * data/c.m4 (b4_yy_symbol_print_generate):
3116 (b4_yy_symbol_print_generate): Use 'YYSTYPE const' rather than
3117 'const YYSTYPE', and similarly for YYLTYPE. This fixes one
3118 of the bugs reported today by Derek M Jones in
3119 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00027.html>.
3120 * doc/bison.texinfo (Value Type): Document that YYSTYPE must be
3121 defined to be a type name without parens or brackets.
3122 (Location Type): Similarly for YYLTYPE.
3123 * tests/regression.at (Trivial grammars): Put in a test for this
3124 bug that will be caught by 'make maintainer-check' (though not,
3125 alas, by 'make check' unless your compiler is picky).
3126
3127 2006-05-19 Paul Eggert <eggert@cs.ucla.edu>
3128
3129 * NEWS: Version 2.2.
3130 * configure.ac (AC_INIT): Likewise.
3131
3132 2006-05-17 Joel E. Denny <jdenny@ces.clemson.edu>
3133
3134 * data/glr.c (yyreportTree): Make room in yystates for the state
3135 preceding the RHS. This fixes the segmentation fault reported by Derek
3136 M. Jones in
3137 <http://lists.gnu.org/archive/html/help-bison/2006-05/msg00035.html>.
3138 (yyreportTree, yypdumpstack): Subtract 1 from yyrule before printing
3139 to the user. Reported for yyreportTree by Derek M. Jones later in the
3140 same thread.
3141 * THANKS: Add Derek M. Jones.
3142 Update my email address.
3143 Fix typo in Steve Murphy's name.
3144
3145 2006-05-14 Paul Eggert <eggert@cs.ucla.edu>
3146
3147 * data/glr.c (yyreportSyntaxError): Fix off-by-one error in
3148 checking against YYLAST that caused the parser to miss a potential
3149 alternative in its diagnostic.
3150 Problem reported by Maria Jose Moron Fernandez in
3151 <http://lists.gnu.org/archive/html/bug-bison/2006-05/msg00024.html>.
3152 * data/lalr1.cc (yysyntax_error_): Likewise.
3153 * data/yacc.c (yysyntax_error): Likewise.
3154 * tests/regression.at (_AT_DATA_DANCER_Y): Use static array for
3155 tokens, in case we run into an older C compiler.
3156 (_AT_DATA_EXPECT2_Y, AT_CHECK_EXPECT2): New macros.
3157 Use them to check for the off-by-one error fixed above.
3158
3159 * data/yacc.c (yytnamerr): Fix typo: local var should be of type
3160 YYSIZE_T, not size_t.
3161 * tests/regression.at (Trivial grammars): New test, to catch
3162 the error fixed by the above patch.
3163
3164 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
3165
3166 * doc/bison.texinfo (C++ Bison Interface): Clarify the naming
3167 scheme.
3168 Reported by Steve Murphy.
3169
3170 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
3171
3172 * data/glr.cc, data/lalr1.cc: Using %defines is mandatory.
3173 * data/glr.cc: b4_location_flag is now b4_locations_flag.
3174
3175 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
3176
3177 Implement --trace=m4.
3178 * src/getargs.c (trace_types, trace_args): Accept trace_m4.
3179 * src/output.c (output_skeleton): When set, pass -dV to m4.
3180
3181 Factor the handling of flags in m4.
3182 * src/output.c (prepare): Rename the muscle names debug, defines,
3183 error_verbose to debug_flag, defines_flag, error_verbose_flag.
3184 * data/c.m4: Adjust.
3185 (_b4_define_flag_if, b4_define_flag_if, b4_defines_if): New.
3186 Use b4_define_flag_if to define other b4_FLAG_if macros.
3187 (b4_location_if): As a consequence, rename as...
3188 (b4_locations_if): this, for consistency.
3189 Adjust all the skeletons.
3190
3191 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
3192
3193 * etc/bench.pm: Shorten bench names.
3194
3195 2006-05-14 Akim Demaille <akim@lrde.epita.fr>
3196
3197 * src/output.h, src/output.c (error_verbose): Move to...
3198 * src/getargs.h, src/getargs.c: here.
3199 Sort the flags.
3200 Adjust dependencies.
3201
3202 2006-05-13 Paul Eggert <eggert@cs.ucla.edu>
3203
3204 * data/c.m4 (b4_copyright): Put the special exception for Bison
3205 skeletons here, so we don't have to put it in each skeleton. All
3206 uses changed. Suggested by Akim Demaille. Also, wrap the
3207 copyright notice, in case it is longer than 80 columns. Replace
3208 comma by newline after title.
3209
3210 2006-05-11 Paul Eggert <eggert@cs.ucla.edu>
3211
3212 * doc/bison.texinfo (Calc++ Scanner): The flex behavior is an
3213 incompatibility, not a bug. Mention that it wasn't fixed as of
3214 flex 2.5.33.
3215
3216 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
3217
3218 * examples/extexi: Enforce the precedence of concatenation over
3219 >>.
3220 Reported by Tommy Nordgren.
3221
3222 2006-05-11 Akim Demaille <akim@lrde.epita.fr>
3223
3224 * data/lalr1.cc (yytranslate_): Rename token as t to avoid clashes
3225 with the member "token".
3226 Reported by Martin Nylin.
3227
3228 2006-05-08 Paul Eggert <eggert@cs.ucla.edu>
3229
3230 * data/glr.c: Switch to Bison 2.2 special-exception language in
3231 the copyright notice. Use more-regular format for titles and
3232 copyright notices.
3233 * data/glr.cc: Likewise.
3234 * data/location.cc: Likewise.
3235 * data/yacc.cc: Likewise.
3236 * doc/bison.texinfo (Conditions): Document this.
3237 * NEWS: likewise. Upgrade version to 2.2.
3238
3239 2006-04-27 Akim Demaille <akim@lrde.epita.fr>
3240
3241 * data/glr.cc: Remove dead code.
3242
3243 2006-04-25 Paul Eggert <eggert@cs.ucla.edu>
3244
3245 * bootstrap: Comment out the AM_CPPFLAGS line, since we don't use
3246 that variable and the line breaks the bootstrap. Problem reported
3247 by Juan M. Guerrero.
3248
3249 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
3250
3251 * doc/bison.texinfo (Multiple start-symbols): New.
3252
3253 2006-04-24 Akim Demaille <akim@lrde.epita.fr>
3254
3255 * etc/README, etc/bench.pl: New.
3256
3257 2006-04-03 Akim Demaille <akim@lrde.epita.fr>
3258
3259 * src/scan-gram.l: Be robust to BRACED_CODE appearing before any
3260 rule.
3261 Reported by Mickael Labau.
3262 * tests/input.at (Torturing the Scanner): Test it.
3263
3264 2006-03-16 Paul Eggert <eggert@cs.ucla.edu>
3265
3266 * doc/bison.texinfo (Decl Summary): Don't mention yylloc twice.
3267 Problem reported by Bob Rossi.
3268
3269 2006-03-13 Paul Eggert <eggert@cs.ucla.edu>
3270
3271 * doc/bison.texinfo: Remove @shorttitlepage stuff; it wasn't used
3272 and didn't really work.
3273 For the index, use @ifnotinfo, not @iftex.
3274 Minor cleanups of spacing and terminology.
3275
3276 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
3277
3278 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Fix the definition
3279 of AT_NAME_PREFIX when %name-prefix is not used.
3280
3281 2006-03-12 Akim Demaille <akim@lrde.epita.fr>
3282
3283 Apply --prefix to C++ skeletons too: they change the namespace.
3284 The test suite already exercize these cases.
3285 * data/c++.m4 (b4_namespace): New.
3286 * data/lalr1.cc, data/glr.cc, data/location.cc: Use it instead of `yy'.
3287 * data/lalr1.cc (yytnameerr_): Move its definition into the namespace.
3288 * data/yacc.c, data/glr.c: Remove a useless `[]'.
3289 * doc/bison.texinfo: Document it.
3290 (Option Cross Key): Use @multitable in all formats. It looks
3291 nicer, even in TeX outputs.
3292 (Rules): Use the same code whatever the output type is.
3293 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS)
3294 (_AT_BISON_OPTION_POPDEFS): Support AT_NAME_PREFIX.
3295 * tests/calc.at: Use it, instead of hard coding `yy'.
3296
3297 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
3298
3299 * TODO: Remove dead items.
3300
3301 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
3302
3303 * doc/FAQ: Remove, merged into...
3304 * doc/bison.texinfo (FAQ): this.
3305 * doc/Makefile.am (EXTRA_DIST): Adjust.
3306
3307 2006-03-10 Akim Demaille <akim@lrde.epita.fr>
3308
3309 * data/c.m4 (b4_token_enum): Always define the enum of tokens,
3310 even if empty.
3311 * data/lalrl1.cc, data/glr.cc (parser::token_type): New.
3312 * doc/bison.texinfo (Calc++ Scanner): Use it.
3313
3314 2006-03-09 Paul Eggert <eggert@cs.ucla.edu>
3315
3316 Fix two nits reported by twlevo, plus one more that I discovered.
3317
3318 * src/assoc.h (assoc_to_string): Give a name to the arg, as
3319 this is the usual Bison style.
3320 * src/location.h (location_print): Likewise.
3321
3322 * src/reader.h (token_name): Likewise.
3323
3324 2006-03-08 Paul Eggert <eggert@cs.ucla.edu>
3325
3326 Fix some nits reported by twlevo.
3327 * doc/FAQ: Remove ancient Y2K FAQ, replacing it with "secure"
3328 and "POSIX". Use more-modern syntax for URLs. Mention C++
3329 and ask for Java. Don't hardwire OS version numbers. Add
3330 copyright notice.
3331 * m4/.cvsignore: Add unistd_h.m4, for latest gnulib.
3332 * src/conflicts.c (solved_conflicts_obstack): Now static.
3333
3334 2006-03-08 Joel E. Denny <jdenny@ces.clemson.edu>
3335
3336 * doc/bison.texinfo (Introduction): Mention GLR and C++ as on the web
3337 page. Say "you can use it" not "you may use it" as on the web page;
3338 we're describing capabilities not granting permission.
3339
3340 2006-03-06 Paul Eggert <eggert@cs.ucla.edu>
3341
3342 * data/glr.c (yyresolveLocations): Rename local variables to avoid
3343 shadowing warnings. Use usual patter for iterating through RHS.
3344 * tests/glr-regression.at
3345 (Uninitialized location when reporting ambiguity):
3346 Modify yylex so that it uses its argument, rather than trying
3347 to rely on ARGSUSED (which doesn't work for gcc with warnings).
3348 const char -> char const.
3349
3350 * tests/Makefile.am ($(srcdir)/package.m4, maintainer-check-valgrind):
3351 Don't use tabs inside commands; it messes up 'ps'.
3352 Problem reported by twlevo.
3353
3354 2006-03-06 Joel E. Denny <jdenny@ces.clemson.edu>
3355
3356 * tests/glr-regression.at (Uninitialized location when reporting
3357 ambiguity): New test case.
3358 * data/glr.c (yyresolveLocations): New function, which uses
3359 YYLLOC_DEFAULT.
3360 (yyresolveValue): Invoke yyresolveLocations before reporting an
3361 ambiguity.
3362 * doc/bison.texinfo (Default Action for Locations): Note
3363 YYLLOC_DEFAULT's usage for ambiguity locations.
3364 (GLR Semantic Actions): Cross-reference those notes.
3365
3366 2006-03-04 Joel E. Denny <jdenny@ces.clemson.edu>
3367
3368 * tests/glr-regression.at (Leaked semantic values when reporting
3369 ambiguity): Remove unnecessary union and type declarations.
3370 (Leaked lookahead after nondeterministic parse syntax error): New test
3371 case.
3372 * data/glr.c (yyparse): Check for zero stacks remaining before
3373 attempting to shift the lookahead so that you don't lose it.
3374
3375 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3376
3377 Avoid memory leaks by not invoking longjmp in yyreportAmbiguity.
3378 * tests/glr-regression.at (Leaked semantic values when reporting
3379 ambiguity): New test case.
3380 * data/glr.c (yyreportAmbiguity): Invoke yyyerror directly and return
3381 yyabort rather than invoking yyFail, which invokes longjmp. Remove the
3382 now unnecessary yystackp parameter.
3383 (yyresolveValue): Return yyreportAmbiguity's result. Now the necessary
3384 destructors can be called.
3385
3386 * tests/glr-regression.at: Don't invoke bison with `-t' unnecessarily
3387 in existing testcases.
3388
3389 2006-03-02 Joel E. Denny <jdenny@ces.clemson.edu>
3390
3391 Don't leak semantic values for parent RHS when a user action cuts the
3392 parser, and clean up related code a bit.
3393 * tests/glr-regression.at (Leaked merged semantic value if user action
3394 cuts parse): Rename to...
3395 (Leaked semantic values if user action cuts parse): ... this. Add check
3396 for leaked parent RHS values.
3397 * data/glr.c (yydestroyGLRState): In debugging output, distinguish
3398 between an unresolved state (non-empty chain of semantic options) and
3399 an incomplete one (signaled by an empty chain).
3400 (yyresolveStates): Document the interface. Move all manipulation of a
3401 successfully or unsuccessfully resolved yyGLRState to...
3402 (yyresolveValue): ... here so that yyresolveValue always leaves a
3403 yyGLRState with consistent data and thus is easier to understand.
3404 Remove the yyvalp and yylocp parameters since they are always just
3405 taken from the yys parameter. When reporting a discarded merged value
3406 in debugging output, note that it is incompletely merged. Document the
3407 interface.
3408 (yyresolveAction): If resolving any of the RHS states fails, destroy
3409 them all rather than leaking them. Thus, as long as user actions are
3410 written to clean up the RHS correctly, yyresolveAction always cleans up
3411 the RHS of a semantic option. Document the interface.
3412
3413 2006-02-27 Paul Eggert <eggert@cs.ucla.edu>
3414
3415 * data/glr.c (yyexpandGLRStack): Catch an off-by-one error that
3416 led to a segmentation fault in GNU Pascal. Problem reported
3417 by Waldek Hebisch.
3418
3419 2006-02-21 Joel E. Denny <jdenny@ces.clemson.edu>
3420
3421 * doc/bison.texinfo (Mid-Rule Actions): Explain how to bury a
3422 mid-rule action inside a nonterminal symbol in order to declare a
3423 destructor for its semantic value.
3424
3425 2006-02-16 Paul Eggert <eggert@cs.ucla.edu>
3426
3427 * data/yacc.c [(! defined yyoverflow || YYERROR_VERBOSE) && !
3428 YYSTACK_USE_ALLOCA && ! defined YYSTACK_ALLOC && defined
3429 __cplusplus && ! defined _STDLIB_H && !
3430 ((defined YYMALLOC || defined malloc) && (defined YYFREE ||
3431 defined free))]: Include <stdlib.h> rather than rolling our own
3432 declarations of malloc and free, to avoid problems with
3433 incompatible declarations (using 'throw') C++'s stdlib.h. This
3434 should fix Debian bug 340012
3435 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=340012>,
3436 reported by Guillaume Melquiond.
3437
3438 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
3439
3440 * NEWS: Clarify symbols versus types in unused-value warnings.
3441
3442 * configure.ac (AC_INIT): Bump version number.
3443
3444 2006-02-13 Paul Eggert <eggert@cs.ucla.edu>
3445
3446 * NEWS: Version 2.1a.
3447 * tests/headers.at (AT_TEST_CPP_GUARD_H): Declare yyerror and yylex,
3448 since C99 requires this.
3449
3450 2006-02-11 Paul Eggert <eggert@cs.ucla.edu>
3451
3452 * m4/c-working.m4: New file.
3453 * configure.ac (BISON_TEST_FOR_WORKING_C_COMPILER): Use it.
3454
3455 2006-02-10 Paul Eggert <eggert@cs.ucla.edu>
3456
3457 * Makefile.maint: Merge from coreutils.
3458
3459 2006-02-09 Paul Eggert <eggert@cs.ucla.edu>
3460
3461 More portability fixes for problems summarized by Nelson H. F. Beebe.
3462
3463 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Catch a
3464 configuration screwup "./configure CC=/opt/SUNWspro/bin/c89
3465 CFLAGS="-xarch=generic64" CXX=/opt/SUNWspro/bin/CC
3466 LDFLAGS="-xarch=generic64" with Sun C 5.7 on Solaris 10; this
3467 messes up because C++ code is compiled in 32-bit mode but linked
3468 in 64-bit mode.
3469
3470 2006-02-08 Paul Eggert <eggert@cs.ucla.edu>
3471
3472 More portability fixes for problems summarized by Nelson H. F. Beebe.
3473
3474 * doc/bison.texinfo (Calc++ Scanner): Work around a bug in flex
3475 2.5.31. This resembles the 2005-10-10 patch to src/scan-skel.l.
3476
3477 * examples/calc++/Makefile.am (check_PROGRAMS): Renamed from
3478 nodist_PROGRAMS, since we don't need to actually compile the
3479 example if we're just doing a plain 'make'. This avoids bothering
3480 the installer unnecessarily about problems due to weird C++
3481 compilers.
3482
3483 2006-02-06 Paul Eggert <eggert@cs.ucla.edu>
3484
3485 More portability fixes for problems summarized by Nelson H. F. Beebe.
3486
3487 * tests/headers.at (AT_TEST_CPP_GUARD_H): Use #include <...> rather
3488 than #include "...", and compile with -I'.'. The old method was
3489 not portable, according to Posix and the C standard, and it does
3490 not work with Sun C 5.7, where previous #line directives affect
3491 the working directory used in later #include "..." directives.
3492
3493 2006-02-06 Juan Manuel Guerrero <juan.guerrero@gmx.de>
3494
3495 Various DJGGP specific issues in /djgpp
3496
3497 2006-02-02 Paul Eggert <eggert@cs.ucla.edu>
3498
3499 More portability fixes for problems summarized by Nelson H. F. Beebe.
3500
3501 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check that
3502 '#include <map>' works and that you can apply ++ to iterators.
3503
3504 2006-02-01 Paul Eggert <eggert@cs.ucla.edu>
3505
3506 Work around portability problems summarized by Nelson H. F. Beebe in
3507 <http://lists.gnu.org/archive/html/bug-bison/2005-09/msg00021.html>.
3508
3509 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
3510 that '#include <string>' works.
3511
3512 * data/lalr1.cc (yytranslate_): No longer inline, to work around a
3513 porting problem to g++ 3.4.3 on Darwin 7.9.0, where g++ complained
3514 "warning: sorry: semantics of inline function static data `const
3515 unsigned char translate_table[262]' are wrong (you'll wind up with
3516 multiple copies)".
3517
3518 * lib/bbitset.h (struct bitset_vtable): Rename members not, and,
3519 or, xor to not_, and_, or_, and xor_, respectively. This works
3520 around a bug in GCC 3.4.3 on Irix 6.5, which apparently has a
3521 random system header somewhere that includes the equivalent of
3522 <iso646.h>.
3523
3524 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that "$CC
3525 -E" works; it apparently doesn't work with PathScale EKO Compiler
3526 Suite Version 2.0.
3527
3528 2006-01-30 Joel E. Denny <jdenny@ces.clemson.edu>
3529
3530 During deterministic GLR operation, user actions should be able to
3531 influence the parse by changing yychar. To make this easier to fix and
3532 to make glr.c easier to evolve in general, don't maintain yytoken in
3533 parallel with yychar; just compute yytoken when needed.
3534 * tests/glr-regression.at (Incorrect lookahead during deterministic
3535 GLR): Check that setting yychar in a user action has the intended
3536 effect.
3537 * data/glr.c (yyGLRStack): Remove yytokenp member.
3538 (yyclearin): Don't set *yytokenp.
3539 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Examine
3540 yychar rather than *yytokenp to determine the current lookahead.
3541 Compute yytoken locally when needed.
3542 (yyparse): Likewise. Remove the local yytoken that yytokenp used to
3543 point to.
3544
3545 * doc/bison.texinfo (Bison Options): Remove stray sentence fragment
3546 after `--report' documentation.
3547
3548 2006-01-30 Paul Eggert <eggert@cs.ucla.edu>
3549
3550 * src/parse-gram.y (grammar_declaration): Location of printer
3551 symbol is @1, not list->location. Bug reported by twlevo.
3552 * tests/input.at (Incompatible Aliases): Adjust to above change.
3553
3554 2006-01-29 Paul Eggert <eggert@cs.ucla.edu>
3555
3556 * tests/input.at (AT_CHECK_UNUSED_VALUES): Remove. Instead, do
3557 all the test at once. This makes the output easier to read in the
3558 normal case.
3559
3560 Fix a longstanding bug uncovered by bro-0.9a9/src/parse.y, which I
3561 got from <http://bro-ids.org/download.html>. The bug is that
3562 when two actions appeared in succession, the second one was
3563 scanned before the first one was added to the grammar rule
3564 as a midrule action. Bison then output the incorrect warning
3565 "parse.y:905.17-906.36: warning: unused value: $3".
3566 * src/parse-gram.y (BRACED_CODE, action): These are no longer
3567 associated with a value.
3568 (rhs): Don't invoke grammar_current_rule_action_append.
3569 (action): Invoke it here instead.
3570 * src/reader.c (grammar_midrule_action): Now extern.
3571 (grammar_current_rule_action_append): Don't invoke
3572 grammar_midrule_action; that is now the scanner's job.
3573 * src/reader.h (last_string, last_braced_code_loc):
3574 (grammar_midrule_action): New decls.
3575 * src/scan-gram.l (last_string): Now extern, sigh.
3576 (last_braced_code_loc): New extern variable.
3577 (<INITIAL>"{"): Invoke grammar_midrule_action if the current
3578 rule already has an action.
3579 (<SC_BRACED_CODE>"}"): Set last_braced_code_loc before returning.
3580 * tests/input.at (AT_CHECK_UNUSED_VALUES):
3581 Add some tests to check that the above changes fixed the bug.
3582
3583 2006-01-27 Paul Eggert <eggert@cs.ucla.edu>
3584
3585 * src/reader.c (symbol_should_be_used): Renamed from symbol_typed_p.
3586 All used changed. Check whether the symbol has a destructor,
3587 not whether it is typed.
3588 * tests/input.at (AT_CHECK_UNUSED_VALUES): Add a destructor, so
3589 that the values are still reported as unused. All line numbers
3590 adjusted.
3591
3592 2006-01-23 Paul Eggert <eggert@cs.ucla.edu>
3593
3594 Work around a bug in bro 0.8, which underparenthesizes its
3595 definition of YYLLOC_DEFAULT.
3596 * data/glr.c: Change all uses of YYLLOC_DEFAULT to parenthesize
3597 their arguments.
3598 * data/lalr1.cc: Likewise.
3599 * data/yacc.cc: Likewise.
3600
3601 2006-01-22 Paul Eggert <eggert@cs.ucla.edu>
3602
3603 Work around a bug in Pike 7.0, and give the Pike folks a
3604 better way to override the usual int widths.
3605 * data/yacc.c (b4_int_type): Use yytype_uint8, etc., so that the
3606 user can override the types.
3607 (short): #undef, to work around a bug in Pike 7.0.
3608 (yytype_uint8, yytype_int8, yytype_uint16, yytype_int16): New types.
3609 (union yyalloc.yyss): Use yytype_int16 rather than short.
3610 All uses changed.
3611 (yysigned_char): Remove.
3612 * src/parse-gram.y (YYTYPE_UINT8, YYTYPE_INT8, YYTYPE_UINT16):
3613 (YYTYPE_INT16): New macros, to test the new facility in yacc.c.
3614 * tests/regression.at (Web2c Actions): Adjust to above changes.
3615
3616 * src/reader.c (check_and_convert_grammar): New function.
3617 (reader): Close the input file even if something went wrong during
3618 parsing. Minor file descriptor leak reported by twlevo.
3619
3620 * src/assoc.c (assoc_to_string): Use a default: abort (); case
3621 to pacify gcc -Wswitch-default.
3622 * src/scan-gram.l (adjust_location): Use a default: break; case
3623 to pacify gcc -Wswitch-default.
3624 * src/scan-skel.h (skel_get_lineno, skel_get_in, skel_get_out):
3625 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
3626 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
3627 Move these decls to scan-skel.l, since they don't need to be
3628 visible elsewhere.
3629 * src/scan-skel.l: Accept the above decls.
3630 (skel_lex): New decl, to pacify GCC when unpatched flex 2.5.31
3631 is used.
3632
3633 2006-01-21 Paul Eggert <eggert@cs.ucla.edu>
3634
3635 * Makefile.cfg (local-checks-to-skip): Add changelog-check,
3636 since we don't want to insist on a version number at the start
3637 of the changelog every time.
3638 * Makefile.maint: Sync from coreutils a bit better.
3639 (sc_trailing_blank): Renamed from sc_trailing_space.
3640 All uses changed.
3641 (sc_no_if_have_config_h, sc_require_config_h):
3642 (sc_prohibit_assert_without_use): New rules.
3643 (sc_obsolete_symbols): Don't catch Makefile.maint itself.
3644 (sc_dd_max_sym_length): Fix leading spaces in rule.
3645 (sc_system_h_headers): Prefix with @.
3646 (sc_useless_cpp_parens, m4-check): Output line numbers.
3647 (changelog-check): Allow version only in head.
3648 * data/c.m4: Use "defined FOO" instead of "defined (FOO)", to
3649 satisfy new Makefile.maint rule.
3650 * data/glr.c: Likewise.
3651 * data/glr.cc: Likewise.
3652 * data/lalr1.cc: Likewise.
3653 * data/yacc.c: Likewise.
3654 * lib/ebitsetv.c: Likewise.
3655 * lib/lbitset.c: Likewise.
3656 * lib/subpipe.c: Likewise.
3657 * lib/timevar.c: Likewise.
3658 * src/system.h: Likewise.
3659 * data/yacc.c (YYSTYPE): Don't generate trailing spaces in output.
3660 * djgpp/Makefile.maint: Add copyright notice.
3661 * djgpp/README.in: Likewise.
3662 * djgpp/config.bat: Likewise.
3663 * djgpp/config.site: Likewise.
3664 * djgpp/config_h.sed: Likewise.
3665 * djgpp/djunpack.bat: Likewise.
3666 * djgpp/config.sed: Fix copyright notice to match standard format.
3667 * djgpp/subpipe.h: Likewise.
3668 * lib/bitsetv-print.c: Likewise.
3669 * lib/bitsetv.c: Likewise.
3670 * lib/subpipe.h: Likewise.
3671 * lib/timevar.c: Likewise.
3672 * lib/timevar.h: Likewise.
3673 * djgpp/subpipe.c: Use standard recipe for config.h.
3674 * lib/abitset.c: Likewise.
3675 * lib/bitset.c: Likewise.
3676 * lib/bitset_stats.c: Likewise.
3677 * lib/bitsetv-print.c: Likewise.
3678 * lib/bitsetv.c: Likewise.
3679 * lib/ebitsetv.c: Likewise.
3680 * lib/get-errno.c: Likewise.
3681 * lib/lbitset.c: Likewise.
3682 * lib/subpipe.c: Likewise.
3683 * lib/timevar.c: Likewise.
3684 * lib/vbitset.c: Likewise.
3685 * tests/local.at: Likewise.
3686 * src/scan-gram.l: Don't include verify.h, since system.h does
3687 that for us.
3688 * .x-sc_require_config_h: New file.
3689 * .x-sc_unmarked_diagnostics: New file.
3690
3691 2006-01-20 Paul Eggert <eggert@cs.ucla.edu>
3692
3693 Be a bit more systematic about using 'abort'.
3694 * lib/abitset.c (abitset_test): Remove ATTRIBUTE_UNUSED; not needed.
3695 * lib/bitset.c (bitset_bytes, bitset_init, bitset_op4_cmp):
3696 Put 'default: abort ();' before some other case, to satisfy older
3697 pedantic compilers.
3698 * lib/bitset_stats.c (bitset_stats_init): Likewise.
3699 * lib/ebitset.c (ebitset_elt_find, ebitset_op3_cmp): Likewise.
3700 * lib/lbitset.c (lbitset_elt_find, lbitset_op3_cmp): Likewise.
3701 * src/conflicts.c (resolve_sr_conflict): Likewise.
3702 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str):
3703 (get_decision_str, get_orientation_str, get_node_alignment_str):
3704 (get_arrow_mode_str, get_crossing_type_str, get_view_str):
3705 (get_linestyle_str, get_arrowstyle_str): Likewise.
3706 * src/conflicts.c (resolve_sr_conflict):
3707 Use a default case rather than one for the one remaining enum
3708 value, to catch invalid enum values as well.
3709 * src/lalr.c (set_goto_map, map_goto):
3710 Prefer "assert (FOO);" to "if (!FOO) abort ();".
3711 * src/nullable.c (nullable_compute, token_definitions_output):
3712 Likewise.
3713 * src/reader.c (packgram, reader): Likewise.
3714 * src/state.c (transitions_to, state_new, state_reduction_find):
3715 Likewise.
3716 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias):
3717 (symbol_pack): Likewise.
3718 * src/tables.c (conflict_row, pack_vector): Likewise.
3719 * src/scan-skel.l (QPUTS): Remove unnecessary parens.
3720 (BASE_QPUTS, "@output ".*\n): Remove unnecessary asserts.
3721 * src/system.h: Don't include <assert.h>.
3722 (assert): New macro.
3723
3724 * doc/bison.texinfo (Prologue, Rules, Actions, Union Decl, Action Decl):
3725 (Destructor Decl, Parser Function, Pure Calling):
3726 Describe rules for braces inside C code more carefully.
3727
3728 2006-01-19 Paul Eggert <eggert@cs.ucla.edu>
3729
3730 Fix some porting glitches found by Nelson H. F. Beebe.
3731 * lib/abitset.c (abitset_resize): Rewrite to avoid warnings from
3732 compilers that don't understand that abort () does not return.
3733 * src/state.c (transitions_to): Likewise.
3734 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check
3735 that '#include <cstdlib>' works.
3736 * src/system.h (INT8_MIN, INT16_MIN, INT32_MIN, INT8_MAX):
3737 (INT16_MAX, UINT8_MAX, INT32_MAX, UINT16_MAX, UINT32_MAX):
3738 #undef if ! defined __STDC_VERSION__ || __STDC_VERSION__ < 199901,
3739 for the benefit of some pre-C99 compilers.
3740
3741 * bootstrap: Undo changes to gnulib files that autoreconf made.
3742
3743 Minor fixups to get 'make maintainer-check' to work.
3744 * configure.ac: Don't use -Wnested-externs, as it's incompatible
3745 with the new verify.h implementation.
3746 * data/c.m4 (b4_yy_symbol_print_generate): YYUSE (yyoutput).
3747 * data/glr.c (YYUSE): Depend on __GNUC__ as well.
3748 * data/yacc.c (YYUSE): Likewise.
3749 * data/lalr1.cc (yysyntax_error_): YYUSE (yystate).
3750 * lib/subpipe.c (end_of_output_subpipe): The args are unused.
3751 * src/parse-gram.y (declaration): Don't pass a string constant
3752 to a function that expects char *, since GCC might complain
3753 about the constant value.
3754 * src/reader.c (symbol_typed_p): Add parens to pacify GCC.
3755 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): #undef yylloc and yylval
3756 before #defining them.
3757 * tests/glr-regression.at
3758 (Incorrectly initialized location for empty right-hand side in GLR):
3759 In yyerror, use the msg arg.
3760 (Corrupted semantic options if user action cuts parse):
3761 (Incorrect lookahead during deterministic GLR):
3762 (Incorrect lookahead during nondeterministic GLR):
3763 Don't name a local var 'index'; it shadows string.h's 'index'.
3764
3765 2006-01-19 Akim Demaille <akim@epita.fr>
3766
3767 * tests/calc.at (_AT_DATA_CALC_Y): Initialize the whole initial
3768 location, not just parts of it.
3769
3770 2006-01-18 Paul Eggert <eggert@cs.ucla.edu>
3771
3772 * NEWS: Document the fact that multiple %unions are now allowed.
3773 * doc/bison.texinfo (Union Decl): Likewise.
3774 * TODO: This feature is now implemented, so remove it from
3775 the wishlist.
3776
3777 * Makefile.maint: Merge with coreutils Makefile.maint.
3778 (CVS_LIST): Use build-aux version if available.
3779 (VERSION_REGEXP): New macro.
3780 (syntax-check-rules): Add sc_no_if_have_config_h,
3781 sc_prohibit_assert_without_use, sc_require_config_h,
3782 sc_useless_cpp_parens.
3783 (sc_obsolete_symbols): Check for O_NDELAY.
3784 (sc_dd_max_sym_length): Track coreutils.
3785 (sc_unmarked_diagnostics): Look in all files, not just *.c.
3786 (sc_useless_cpp_parens): New rule.
3787 (news-date-check): Look for version or today's date.
3788 (changelog-check): Don't require version number near head.
3789 (copyright-check): Use current year instead of hardwiring 2005.
3790 (my-distcheck): Depend on $(release_archive_dir)/$(prev-tgz).
3791 (announcement): Add --gpg-key-ID.
3792
3793 * djgpp/config.sed: Add copyright notice, and replace "filesystem"
3794 with "file system".
3795
3796 Avoid undefined behavior that addressed just before the start of an
3797 array. Problem reported by twlevo.
3798 * src/reader.c (packgram): Prepend a new sentinel before ritem.
3799 * src/lalr.c (build_relations): Rely on new sentinel.
3800 * src/gram.c (gram_free): Adjust to new sentinel.
3801
3802 2006-01-12 Joel E. Denny <jdenny@ces.clemson.edu>
3803
3804 * data/glr.c (yyGLRStateSet): Rename yylookaheadStatuses to
3805 yylookaheadNeeds. All uses updated.
3806 (yysplitStack): Rename local yynewLookaheadStatuses to
3807 yynewLookaheadNeeds.
3808 * data/glr-regression.at (Incorrect lookahead during nondeterministic
3809 GLR): In comments, change `lookahead status' to `lookahead need'.
3810
3811 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3812
3813 * data/glr.c (yysplitStack): A little stylistic rewrite.
3814
3815 2006-01-11 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
3816
3817 * data/glr.c (yyaddDeferredAction): Flesh out the comment.
3818
3819 2006-01-11 Joel E. Denny <jdenny@ces.clemson.edu>
3820
3821 * doc/bison.texinfo: Fix some typos.
3822 (GLR Semantic Actions): New subsection discussing special
3823 considerations because GLR semantic actions might be deferred.
3824 (Actions): Mention look-ahead usage of yylval.
3825 (Actions and Locations): Mention look-ahead usage of yylloc.
3826 (Special Features for Use in Actions): Add YYEOF entry and mention it
3827 in the yychar entry.
3828 In the yychar entry, remove mention of the local yychar case (pure
3829 parser) since this is irrelevant information when writing semantic
3830 actions and since it's already discussed in `Table of Symbols' where
3831 yychar is otherwise described as an external variable.
3832 In the yychar entry, don't call it the `current' look-ahead since it
3833 isn't when semantic actions are deferred.
3834 In the yychar and yyclearin entries, add note about deferred semantic
3835 actions.
3836 Add yylloc and yylval entries discussing look-ahead usage.
3837 (Look-Ahead Tokens): When discussing yychar, don't call it the
3838 `current' look-ahead, and do mention yylval and yylloc.
3839 (Error Recovery): Cross-reference `Action Features' when mentioning
3840 yyclearin.
3841 (Table of Symbols): In the yychar entry, don't call it the `current'
3842 look-ahead.
3843 In the yylloc and yylval entries, mention look-ahead usage.
3844
3845 2006-01-08 Joel E. Denny <jdenny@ces.clemson.edu>
3846
3847 * tests/glr-regression.at: Update copyright year to 2006.
3848
3849 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3850
3851 * data/glr.c (yyGLRStateSet): Add yybool* yylookaheadStatuses member to
3852 use during nondeterministic operation to track which stacks have
3853 actually needed the current lookahead.
3854 (yyinitStateSet, yyfreeStateSet, yyremoveDeletes, yysplitStack):
3855 Allocate, deallocate, resize, and otherwise shuffle space for
3856 yylookaheadStatuses in parallel with yystates member of yyGLRStateSet.
3857 (yysplitStack, yyprocessOneStack, yyparse): Set lookahead status
3858 appropriately during nondeterministic operation.
3859 (yySemanticOption): Add int yyrawchar, YYSTYPE yyval, and YYLTYPE yyloc
3860 members to store the current lookahead to be used by the deferred
3861 user action.
3862 (yyaddDeferredAction): Add size_t yyk parameter specifying the stack
3863 from which the RHS is taken. Set the lookahead members of the new
3864 yySemanticOption according to the lookahead status for stack yyk.
3865 (yyglrShiftDefer, yyglrReduce): Pass yyk parameter on to
3866 yyaddDeferredAction.
3867 (yyresolveAction): Set yychar, yylval, and yylloc to the lookahead
3868 members of yySemanticOption before invoking yyuserAction, and then set
3869 them back to their current values afterward.
3870 (yyparse): Set yychar = YYEMPTY where yytoken = YYEMPTY.
3871 (yyreportAmbiguity): Add /*ARGSUSED*/ to pacify lint.
3872 * tests/glr-regression.at: Remove `.' from the ends of recent test case
3873 titles for consistency.
3874 (Leaked merged semantic value if user action cuts parse): In order to
3875 suppress lint warnings, use arguments in merge function, and assign
3876 char value < 128 in main.
3877 (Incorrect lookahead during deterministic GLR): New test case.
3878 (Incorrect lookahead during nondeterministic GLR): New test case.
3879
3880 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3881
3882 * data/c.m4 (b4_yy_symbol_print_generate): In yy_symbol_print, accept
3883 !yyvaluep as signal that no semantic value is available to print.
3884 * data/glr.c (yydestroyGLRState): If state is not resolved, don't try
3885 to print a semantic value.
3886
3887 2006-01-06 Joel E. Denny <jdenny@ces.clemson.edu>
3888
3889 * tests/glr-regression.at: For consistency with my newer test cases,
3890 don't thank myself.
3891
3892 2006-01-05 Joel E. Denny <jdenny@ces.clemson.edu>
3893
3894 * data/glr.c (yyresolveValue): When merging semantic options, if at
3895 least one user action succeeds but a later one cuts the parse, then
3896 destroy the semantic value before returning rather than leaking it.
3897 (yyresolveStates): If a user action cuts the parse and thus
3898 yyresolveValue fails, ignore the (unset) semantic value rather than
3899 corrupting the yyGLRState, and empty the semantic options list since
3900 the user actions should have called all necessary destructors.
3901 Simplify code with YYCHK.
3902 * tests/glr-regression.at (Corrupted semantic options if user action
3903 cuts parse): New test case.
3904 (Undesirable destructors if user action cuts parse): New test case.
3905 Before applying any of this patch, this test case never actually failed
3906 for me... but only because the corrupted semantic options usually
3907 masked this bug.
3908 (Leaked merged semantic value if user action cuts parse): New test
3909 case.
3910
3911 2006-01-05 Akim Demaille <akim@epita.fr>
3912
3913 * src/reader.c, src/symlist.h, src/symlist.c: s/mid_rule/midrule/.
3914
3915 2006-01-04 Paul Eggert <eggert@cs.ucla.edu>
3916
3917 * data/c.m4 (b4_c_modern): New macro, with a new provision for
3918 _MSC_VER. Problem reported by Cenzato Marco.
3919 (b4_c_function_def): Use it.
3920 * data/yacc.c (YYMODERN_C): Remove. All uses replaced by
3921 b4_c_modern.
3922 (yystrlen, yystpcpy, yyparse): Use b4_c_function... macros rather
3923 than rolling our own.
3924
3925 2006-01-04 Akim Demaille <akim@epita.fr>
3926
3927 Also warn about non-used mid-rule values.
3928 * src/symlist.h, src/symlist.c (symbol_list): Add a mid_rule
3929 member.
3930 (symbol_list_new): Adjust.
3931 * src/reader.c (symbol_typed_p): New.
3932 (grammar_rule_check): Use it.
3933 (grammar_midrule_action): Bind a mid-rule LHS to its rule.
3934 Check its rule.
3935 * tests/input.at (AT_CHECK_UNUSED_VALUES): New.
3936 Use it.
3937 * tests/actions.at (Exotic Dollars): Adjust.
3938
3939 2006-01-04 Akim Demaille <akim@epita.fr>
3940
3941 * src/reader.c (grammar_midrule_action): If $$ is set in a
3942 mid-rule, move the `used' bit to its lhs.
3943 * tests/input.at (Unused values): New.
3944 * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
3945
3946 2006-01-03 Paul Eggert <eggert@cs.ucla.edu>
3947
3948 * doc/bison.texinfo (Bison Options): Say more accurately what
3949 --yacc does.
3950 * src/parse-gram.y (rules_or_grammar_declaration): Don't complain
3951 about declarations in the grammar when in Yacc mode, as POSIX does
3952 not require a diagnostic when the grammar uses extensions.
3953
3954 * src/reduce.c (reduce_grammar): Remove unnecessary cast to bool.
3955
3956 Warn about dubious constructions like "%token T T".
3957 Reported by twlevo.
3958 * src/symtab.h (struct symbol.declared): New member.
3959 * src/symtab.c (symbol_new): Initialize it to false.
3960 (symbol_class_set): New arg DECLARING, specifying whether
3961 this is a declaration that we want to warn about, if there
3962 is more than one of them. All uses changed.
3963
3964 * data/glr.c, data/glr.cc, data/lalr1.cc, data/yacc.c:
3965 Allow multiple %union directives, whose contents concatenate.
3966 * src/parse-gram.y (grammar_declaration): Likewise.
3967 Use muscle_code_grow, so that we don't need stype_line any more.
3968 All uses changed.
3969
3970 * src/muscle_tab.c (muscle_grow): Fix comment.
3971
3972 * ChangeLog, data/c.m4, data/glr.c, data/glr.cc, data/location.cc:
3973 * data/yacc.c, src/getargs.c, src/output.c, tests/cxx-type.at:
3974 Update copyright year to 2006.
3975
3976 2006-01-03 Akim Demaille <akim@epita.fr>
3977
3978 Have glr.cc pass (some of) the calc.at tests.
3979 * data/glr.cc (b4_parse_param_orig): New.
3980 (b4_parse_param): Improve its definition, and bound it more
3981 clearly in the skeleton.
3982 (b4_epilogue): Append, instead of prepending, in order to keep
3983 #line consistency.
3984 Simplify the generation of auxiliary functions: locations and
3985 purity are mandated.
3986 (b4_global_tokens_and_yystype): Honor it.
3987 * data/location.cc (c++.m4): Don't include it.
3988 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Define AT_GLR_CC_IF
3989 and AT_SKEL_CC_IF.
3990 * tests/calc.at (AT_CHECK_CALC): Rely on AT_SKEL_CC_IF instead of
3991 AT_LALR1_CC_IF.
3992 Be sure to initialize the first position's filename.
3993 (AT_CHECK_CALC_LALR1_CC): Add %location and %defines, they are
3994 mandated anyway.
3995 (AT_CHECK_CALC_GLR_CC): New.
3996 Use it to exercise glr.cc as a lalr1.cc drop-in replacement.
3997
3998 2006-01-02 Akim Demaille <akim@epita.fr>
3999
4000 * src/output.c (output_skeleton): Don't hard wire the inclusion of
4001 c.m4.
4002 * data/c++.m4, data/glr.c, data/yacc.c: Include c.m4.
4003 * data/glr.cc: Do not include stack.hh.
4004
4005 2006-01-02 Joel E. Denny <jdenny@ces.clemson.edu>
4006
4007 * data/glr.c: Reformat whitespace with tabs.
4008 (b4_lpure_formals): Remove this unused m4 macro.
4009 * tests/cxx-type.at: Reformat whitespace with tabs.
4010 (_AT_TEST_GLR_CXXTYPES): In union Node, rename node_info to nodeInfo
4011 since it's a member. Rename type to isNterm for clarity.
4012
4013 2005-12-29 Akim <akim@sulaco.local>
4014
4015 Let glr.cc catch up with symbol_value_print.
4016 * data/glr.cc (b4_yysymprint_generate): Replace by...
4017 (b4_yy_symbol_print_generate): this.
4018 (yy_symbol_print, yy_symbol_value_print): Declare them.
4019
4020 2005-12-28 Paul Eggert <eggert@cs.ucla.edu>
4021
4022 * src/location.h (boundary): Note that a line or column equal
4023 to INT_MAX indicates an overflow.
4024 * src/scan-gram.l: Include verify.h. Don't include get-errno.h.
4025 (rule_length_overflow, increment_rule_length, add_column_width):
4026 New functions.
4027 (<INITIAL>{id}, <SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'"):
4028 (<SC_BRACED_CODE>"}"):
4029 Use increment_rule_length rather than incrementing it by hand.
4030 (adjust_location, handle_syncline): Diagnose overflow.
4031 (handle_action_dollar, handle_action_at):
4032 Fix bug with monstrosities like $-2147483648.
4033 Remove now-unnecessary checks.
4034 (scan_integer): Verify assumptions and remove now-unnecessary checks.
4035 (convert_ucn_to_byte): Verify assumptions.
4036 (handle_syncline): New arg LOC. All callers changed.
4037 Don't store through a value derived from char const * pointer.
4038
4039 * src/reader.c (grammar_rule_check): Rewrite slightly to avoid
4040 GCC warnings.
4041
4042 2005-12-27 Paul Eggert <eggert@cs.ucla.edu>
4043
4044 * src/reader.c (grammar_midrule_action, grammar_symbol_append):
4045 Remove unnecessary forward static decls.
4046
4047 2005-12-27 Akim Demaille <akim@epita.fr>
4048
4049 * src/reader.c (grammar_current_rule_check): Also check that $$
4050 is used.
4051 Take the rule to check as argument, hence rename as...
4052 (grammar_rule_check): this.
4053 * src/reader.h, src/reader.c (grammar_rule_begin, grammar_rule_end):
4054 Rename as...
4055 (grammar_rule_begin, grammar_rule_end): these, for consistency.
4056 (grammar_midrule_action, grammar_symbol_append): Now static.
4057 * tests/torture.at (input): Don't rely on the default action
4058 being always performed.
4059 * tests/calc.at: "Set" $$ even when the action is "cut" with
4060 YYERROR or other.
4061 * tests/actions.at (Exotic Dollars): Instead of using unused
4062 values, check that the warning is issued.
4063
4064 2005-12-22 Paul Eggert <eggert@cs.ucla.edu>
4065
4066 * NEWS: Improve wording for unused-value warnings.
4067
4068 2005-12-22 Akim Demaille <akim@epita.fr>
4069
4070 * data/lalr1.cc, data/yacc.c, data/glr.c, data/c.m4
4071 (b4_yysymprint_generate): Rename as...
4072 (b4_yy_symbol_print_generate): this.
4073 Generate yy_symbol_print instead of yysymprint.
4074 Generate also yy_symbol_value_print, and use it.
4075
4076 2005-12-22 Akim Demaille <akim@epita.fr>
4077
4078 * NEWS: Warn about unused values.
4079 * src/symlist.h, src/symlist.c (symbol_list, symbol_list_new): Add
4080 a `used' member.
4081 (symbol_list_n_get, symbol_list_n_used_set): New.
4082 (symbol_list_n_type_name_get): Use symbol_list_n_get.
4083 * src/scan-gram.l (handle_action_dollar): Flag used symbols.
4084 * src/reader.c (grammar_current_rule_check): Check that values are
4085 used.
4086 * src/symtab.c (symbol_print): Accept 0.
4087 * tests/existing.at: Remove the type information.
4088 Empty the actions.
4089 Remove useless actions (beware of mid-rule actions: perl -000
4090 -pi -e 's/\s*\{\}(?=[\n\s]*[|;])//g').
4091 * tests/actions.at (Exotic Dollars): Use unused values.
4092 * tests/calc.at: Likewise.
4093 * tests/glr-regression.at (No users destructors if stack 0 deleted):
4094 Likewise.
4095
4096 * src/gram.c (rule_useful_p, rule_never_reduced_p): Use
4097 rule_useful_p.
4098
4099 2005-12-21 Paul Eggert <eggert@cs.ucla.edu>
4100
4101 Undo 2005-12-01 tentative license wording change. The wording is
4102 still being reviewed by the lawyers, and we don't want to wait for
4103 them before publishing a test release. For now, revert to the
4104 previous wording.
4105 * NEWS: Undo 2005-12-01 change.
4106 * data/glr.c: Revert to previous license wording.
4107 * data/glr.cc: Likewise.
4108 * data/lalr1.cc: Likewise.
4109 * data/location.cc: Likewise.
4110 * data/yacc.c: Likewise.
4111
4112 * NEWS: Reword %destructor vs YYABORT etc.
4113 * data/glr.c: Use American spacing, for consistency.
4114 * data/glr.cc: Likewise.
4115 * data/lalr1.cc: Likewise.
4116 * data/yacc.c: Likewise.
4117 * data/yacc.c: Reformat comments slightly.
4118 * doc/bison.texinfo: Replace "non-" with "non" when that makes sense,
4119 for consistency. Fix some spelling errors and reword recently-included
4120 text slightly.
4121 * tests/cxx-type.at: Cast results of malloc, for C++.
4122
4123 2005-12-21 Joel E. Denny <address@hidden>
4124
4125 * tests/cxx-type.at: Construct a tree, count the parents of shared
4126 nodes, and free each node once and only once. Previously, the memory
4127 for semantic values was leaked instead.
4128
4129 2005-12-21 Joel E. Denny <address@hidden>
4130
4131 * data/glr.c (struct yyGLRStack): If pure, add yyval and yyloc members.
4132 (yylval, yylloc): If pure, #define to yystackp->yyval and
4133 yystackp->yyloc similar to yychar and yynerrs.
4134 (yyparse): If pure, remove local yylval and yylloc. Add local
4135 yystackp to accommodate pure definitions of yylval and yylloc.
4136 (b4_lex_param, b4_lyyerror_args, b4_lpure_args): If pure, change
4137 yylvalp and yyllocp to &yylval and &yylloc.
4138 (nerrs, char, lval, lloc): If pure, add #define's for b4_prefix[]
4139 namespace. Previously, nerrs and char were missing, but lval and lloc
4140 weren't necessary.
4141 (yyprocessOneStack, yyreportSyntaxError, yyrecoverSyntaxError): Remove
4142 yylvalp and yyllocp parameters since, if pure, these are now always
4143 accessible through yystackp. If not pure, they are still accessible
4144 globally.
4145 * data/glr.c, data/yacc.c (YYLLOC_DEFAULT): Change `if (N)' to
4146 `if (YYID (N))' to pacify lint.
4147
4148 2005-12-21 Akim Demaille <akim@epita.fr>
4149
4150 YYACCEPT, YYERROR, and YYABORT, as user actions, should not
4151 destroy the RHS symbols of a rule.
4152 * data/yacc.c (yylen): Initialize to 0.
4153 Keep its value to the number of items to possibly shift.
4154 In particular, a regular successful parse that ends on YYFINAL by
4155 a (internal) YYACCEPT must not have yylen != 0.
4156 (yyerrorlab, yyreturn): Pop the RHS.
4157 Reorder a bit to emphasize the `shifting' bits of code.
4158 (YYPOPSTACK): Now accept a number of items to pop.
4159 * data/lalr1.cc: Likewise.
4160 * data/glr.c: Formatting changes.
4161 Use goto instead of fall through.
4162 * doc/bison.texinfo (Destructor Decl): Complete.
4163
4164 2005-12-20 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4165
4166 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
4167 * djgpp/Makefile.maint: Fix PACKAGE variable computation.
4168 * djgpp/config.bat: Replace every occurence of the file name
4169 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
4170 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
4171 * djgpp/config.sed: Replace every occurence of the file name
4172 scan-gram-c.c with c-scan-gram.c. The same for scan-skel-c.c with
4173 c-scan-skel.c to conform with the 8.3 file name restriction on MSDOS.
4174 * djgpp/djunpack.bat: DJGPP specific file.
4175 * djgpp/fnchange.lst: DJGPP specific file.
4176 * djgpp/README.in: Add new information about how to unpack the bison
4177 source on MSDOS and other systems which have 8.3 file name restrictions
4178 using djunpack.bat and fnchange.lst.
4179
4180 2005-12-12 Paul Eggert <eggert@cs.ucla.edu>
4181
4182 * bootstrap (build_cvs_prefix): Remove; unused.
4183 (CVS_PREFIX): Adjust to yesterday's Savannah reorganization
4184 when getting gnulib.
4185
4186 2005-12-12 "Joel E. Denny" <jdenny@ces.clemson.edu>
4187
4188 * data/glr.c: Reorder typedef declarations for structs to match order
4189 of struct declarations.
4190 Rename yystack everywhere to yystackp except in yyparse where it's not
4191 a pointer.
4192 (yyglrShift): Change parameter YYSTYPE yysval to YYSTYPE* yyvalp for
4193 consistency.
4194 (yyis_table_ninf): Change 0 to YYID (0) to pacify lint.
4195 (yyreportSyntaxError): Add /*ARGSUSED*/ to pacify lint.
4196 (yyparse): Change while (yytrue) to while ( YYID (yytrue)) to pacify
4197 lint.
4198
4199 2005-12-09 Paul Eggert <eggert@cs.ucla.edu>
4200
4201 * tests/sets.at (Accept): Fix typos in regular expression used to
4202 sed out the final state number.
4203
4204 Work around portability problem on Solaris 10: flex-generated
4205 files include <stdio.h> before <config.h>, which messes up
4206 because the latter defines __EXTENSIONS__. Address the problem
4207 by creating two new little files that include <config.h> first,
4208 then include the flex-generated files. Rewrite everyone else
4209 to include <config.h> first, as well.
4210 * lib/timevar.c: Always include "config.h".
4211 * src/Makefile.am (bison_SOURCES): Replace scan-gram.l with
4212 scan-gram-c.c, and scan-skel.l with scan-skel-c.c.
4213 (EXTRA_bison_SOURCES): New macro.
4214 * src/scan-gram-c.c, src/scan-skel-c.c: New files.
4215 * src/system.h: Don't include config.h.
4216 * src/LR0.c: Include <config.h> first.
4217 * src/assoc.c: Likewise.
4218 * src/closure.c: Likewise.
4219 * src/complain.c: Likewise.
4220 * src/conflicts.c: Likewise.
4221 * src/derives.c: Likewise.
4222 * src/files.c: Likewise.
4223 * src/getargs.c: Likewise.
4224 * src/gram.c: Likewise.
4225 * src/lalr.c: Likewise.
4226 * src/location.c: Likewise.
4227 * src/main.c: Likewise.
4228 * src/muscle_tab.c: Likewise.
4229 * src/nullable.c: Likewise.
4230 * src/output.c: Likewise.
4231 * src/parse-gram.y: Likewise.
4232 * src/print.c: Likewise.
4233 * src/print_graph.c: Likewise.
4234 * src/reader.c: Likewise.
4235 * src/reduce.c: Likewise.
4236 * src/relation.c: Likewise.
4237 * src/state.c: Likewise.
4238 * src/symlist.c: Likewise.
4239 * src/symtab.c: Likewise.
4240 * src/tables.c: Likewise.
4241 * src/uniqstr.c: Likewise.
4242 * src/vcg.c: Likewise.
4243
4244 * src/parse-gram.y: Fix minor problems uncovered by lint.
4245 (current_lhs, current_lhs_location): Now static.
4246 (current_assoc): Remove unused variable.
4247
4248 Cleanups so that Bison-generated parsers have less lint.
4249 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate):
4250 Prepend /*ARGSUSED*/, for lint's sake.
4251 * data/glr.c (YYUSE): Properly parenthesize, and use an alternate
4252 definition if 'lint' is defined.
4253 (YYID): New macro (or function, if lint).
4254 All uses of /*CONSTCOND*/0 replaced by YYID(0).
4255 * data/yacc.c: Likewise.
4256 * data/glr.c (yyuserAction, yyuserMerge, yy_reduce_print):
4257 (yyrecoverSyntaxError): Prepend /*ARGSUSED*/.
4258 * data/glr.cc (YYLLOC_DEFAULT): Omit /*CONSTCOND*/ since this code
4259 is C++ only.
4260 * data/lalr1.cc (YYUSE): Just use a cast, since this code is C++ only.
4261 * data/yacc.c (YYSTACK_FREE) [defined YYSTACK_ALLOC]:
4262 Use YYID(0) rather than 0, for lint.
4263 (yystrlen): Rewrite to avoid lint warning about ptrdiff_t overflow.
4264 (yysyntax_error): Rewrite to avoid lint warnings about parenthesization.
4265
4266 2005-12-07 Paul Eggert <eggert@cs.ucla.edu>
4267
4268 * tests/glr-regression.at
4269 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
4270 Close memory leak reported by twlevo.
4271
4272 2005-12-06 "Joel E. Denny" <jdenny@ces.clemson.edu>
4273
4274 * data/glr.c (yyprocessOneStack, yyparse): Synchronize the shift for
4275 all stacks.
4276 (yyparse): Iterate another stack in order to call user destructors.
4277 * tests/glr-regression.at (No users destructors if stack 0 deleted):
4278 New test case.
4279 (Duplicated user destructor for lookahead): This test now is expected
4280 to succeed.
4281
4282 2005-12-01 Paul Eggert <eggert@cs.ucla.edu>
4283
4284 * NEWS: Document the following change.
4285 * data/yacc.c: Say "parser skeleton" rather than "file", since
4286 it's no longer just a file.
4287 * data/glr.c: Grant a special exception for C GLR parsers, that
4288 reads like the already-existing exception for C LALR(1) parsers.
4289 * data/glr.cc: Likewise.
4290 * data/lalr1.cc: Likewise.
4291 * data/location.cc: Likewise.
4292 * data/yacc.c: Reword the "written by" statement to clarify that
4293 it was the parser skeleton, not the entire output file.
4294 * data/glr.c: Written by Paul Hilfinger.
4295 * data/glr.cc: Written by Akim Demaille.
4296 * data/lalr1.cc: Likewise.
4297
4298 2005-11-18 Paul Eggert <eggert@cs.ucla.edu>
4299
4300 * data/yacc.c (yy_reduce_print, YY_REDUCE_PRINT):
4301 Fix typos in previous change that broke 'make check'.
4302 YY_REDUCE_PRINT cannot be a pseudo-varargs macro; that isn't
4303 supported in C.
4304 * tests/calc.at (_AT_CHECK_CALC,_AT_CHECK_CALC_ERROR):
4305 Don't check NUM-STDERR-LINES, since the output format is fluctuating.
4306 We can revert this once things settle down.
4307
4308 * src/conflicts.c (conflicts_print): Don't print file name twice
4309 when %expect fails because there were no conflicts.
4310 * doc/bison.texinfo (Expect Decl): Tighten up wording in previous
4311 change.
4312 * tests/conflicts.at (%expect not enough, %expect too much):
4313 (%expect with reduce conflicts): Adjust to new behavior.
4314
4315 2005-11-18 Akim Demaille <akim@epita.fr>
4316
4317 * src/conflicts.c (conflicts_print): Unsatisfied %expectation are
4318 errors.
4319 * NEWS: Document this.
4320 * doc/bison.texinfo (Expect Decl): Likewise.
4321
4322 2005-11-16 Akim Demaille <akim@epita.fr>
4323
4324 Generalize the display of semantic values and locations in traces.
4325 * data/glr.c (yy_reduce_print): Fix indices (again).
4326 * data/c++.m4 (b4_rhs_value, b4_rhs_location): Don't expect
4327 literal integers.
4328 * data/lalr1.cc (yyreduce_print): Rename as...
4329 (yy_reduce_print): this.
4330 Display values and locations.
4331 * data/yacc.c (yy_reduce_print): Likewise.
4332 (YY_REDUCE_PRINT): Adjust to pass the required arguments.
4333 (yysymprint): Move higher to be visible from yy_reduce_print).
4334 (yyparse): Adjust.
4335 * tests/calc.at: Adjust the expected length of the traces.
4336
4337 2005-11-14 Akim Demaille <akim@epita.fr>
4338
4339 * data/glr.c (yy_reduce_print): The loop was quite wrong: type are
4340 from 1 to N, while values and location start at 0.
4341 (b4_rhs_location, b4_rhs_value): Add parens around $1 and $2.
4342
4343 2005-11-14 Akim Demaille <akim@epita.fr>
4344
4345 * data/glr.c (yy_reduce_print): Fix the $ number.
4346
4347 2005-11-14 Akim Demaille <akim@epita.fr>
4348
4349 "Use" parse parameters.
4350 * data/c.m4 (b4_parse_param_for, b4_parse_param_use): New.
4351 * data/glr.c, data/glr.cc: Use them.
4352 * data/glr.c (YYUSE): Have a C++ definition that supports
4353 non-pointer types.
4354
4355 2005-11-14 Akim Demaille <akim@epita.fr>
4356
4357 * data/glr.c (yyexpandGLRStack): Declare only if defined.
4358
4359 2005-11-14 Akim Demaille <akim@epita.fr>
4360
4361 * data/glr.cc: New.
4362 * data/m4sugar/m4sugar.m4 (m4_prepend): New.
4363
4364 2005-11-12 Akim Demaille <akim@epita.fr>
4365
4366 Let position and location be PODs.
4367 * data/location.cc (position::initialize, location::initialize): New.
4368 (position::position, location::location): Define only if
4369 b4_location_constructors is defined.
4370 * data/lalr1.cc (b4_location_constructors): Define it for backward
4371 compatibility.
4372 * doc/bison.texinfo (Initial Action Decl): Use initialize.
4373
4374 2005-11-12 Akim Demaille <akim@epita.fr>
4375
4376 * data/lalr1.cc: Move the body of the ctor and dtor into the
4377 parser file (instead of the header).
4378 Wrap the implementations in a "namespace yy".
4379
4380 2005-11-12 Akim Demaille <akim@epita.fr>
4381
4382 Have glr.c include its header file when created.
4383 * data/glr.c (b4_shared_declarations): New.
4384 Output them verbatim in the parser if !%defines, otherwise
4385 output then in the header file, and include it instead.
4386
4387 2005-11-11 Akim Demaille <akim@epita.fr>
4388
4389 * data/glr.c: Comment changes.
4390
4391 2005-11-11 Akim Demaille <akim@epita.fr>
4392
4393 When yydebug, report semantic and location values for reductions.
4394 * data/glr.c (yy_reduce_print): Report the semantic values and the
4395 locations.
4396 (YY_REDUCE_PRINT): Adjust.
4397 (yyglrReduce): Use them.
4398 (b4_rhs_value, b4_rhs_location): Remove m4_eval invocations.
4399 * data/c.m4 (b4_yysymprint_generate): Specify the const arguments.
4400 * tests/calc.at (_AT_CHECK_CALC_ERROR): Remove the reduction
4401 traces.
4402
4403 2005-11-10 Akim Demaille <akim@epita.fr>
4404
4405 * data/glr.c (yynewGLRStackItem, YY_RESERVE_GLRSTACK): New.
4406 (yyaddDeferredAction, yyglrShift, yyglrShiftDefer): Use them.
4407 (yyexpandGLRStack, YYRELOC): Define only when YYSTACKEXPANDABLE.
4408
4409 2005-11-09 Albert Chin-A-Young <china@thewrittenword.com>
4410
4411 * m4/cxx.m4, examples/Makefile.am: Don't build
4412 examples/calc++ if no C++ compiler is available. (trivial change)
4413
4414 2005-11-09 Akim Demaille <akim@epita.fr>
4415
4416 * src/scan-skel.l: Use a couple of asserts.
4417
4418 2005-11-03 Akim Demaille <akim@epita.fr>
4419
4420 In some (weird) cases, the final state number is incorrect.
4421 Reported by Alexandre Duret-Lutz.
4422 * src/LR0.c (state_list_append): Remove the computation of
4423 final_state.
4424 (save_reductions): Do it here.
4425 (get_state): Alpha conversion.
4426 (generate_states): Use a for loop.
4427 * src/gram.h (item_number_is_rule_number)
4428 (item_number_is_symbol_number): New.
4429 * src/state.c: Use assert.
4430 * src/system.h: Include assert.h.
4431 * tests/sets.at (Accept): New.
4432
4433 2005-10-30 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
4434
4435 * data/glr.c (yyfill): Adjust comment.
4436 (yyresolveAction): Initialize default location properly
4437 for empty right-hand sides.
4438 (yydoAction): Ditto.
4439 Add comment explaining apparently dead code.
4440 * tests/glr-regression.at
4441 (Incorrectly initialized location for empty right-hand side in GLR):
4442 New test.
4443
4444 2005-10-30 Paul Eggert <eggert@cs.ucla.edu>
4445
4446 * bootstrap (cleanup_gnulib): New function. Use it to clean up
4447 gnulib when interrupted. This fixes some race conditions and
4448 works around some portability problems (one noted by Paul
4449 Hilfinger).
4450
4451 2005-10-22 Akim <akim@epita.fr>
4452
4453 * Makefile.cfg: Adjust to config -> build-aux.
4454 Reported by twledo.
4455
4456 2005-10-21 Akim Demaille <akim@epita.fr>
4457
4458 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Pass
4459 the %parse-params.
4460 * data/glr.c (YY_SYMBOL_PRINT, yydestroyGLRState): Adjust.
4461 * data/yacc.c (b4_Pure_if): Rename as...
4462 (b4_yacc_pure_if): this.
4463 (YY_SYMBOL_PRINT, yyparse): Adjust.
4464 * doc/bison.texinfo: Formatting changes.
4465
4466 2005-10-21 Akim Demaille <akim@epita.fr>
4467
4468 Finish the transition config -> build-aux.
4469 * configure.ac, Makefile.am: Use build-aux.
4470 * config/prev-version, config/announce-gen, config/Makefile.am:
4471 Move to...
4472 * build-aux/prev-version, build-aux/announce-gen,
4473 * build-aux/Makefile.am: here.
4474
4475 2005-10-14 Akim Demaille <akim@epita.fr>
4476
4477 * examples/calc++/test: Use set -x only when VERBOSE.
4478
4479 2005-10-13 Paul Eggert <eggert@cs.ucla.edu>
4480
4481 * NEWS: Bison now warns if it finds a stray `$' or `@' in an action.
4482 * src/scan-gram.l (<SC_BRACED_CODE>[$@]): Implement this.
4483
4484 2005-10-13 Akim Demaille <akim@epita.fr>
4485
4486 * src/scan-skel.l: Output the base name parts of the parser and
4487 header file names.
4488 * tests/output.at (AT_CHECK_OUTPUT): Support subdirectories, and
4489 additional checks.
4490 Use this to exercise C++ outputs in subdirs.
4491 Reported by Oleg Smolsky.
4492
4493 2005-10-12 Paul Eggert <eggert@cs.ucla.edu>
4494
4495 * data/c.m4 (b4_c_function_def): Look at __C99_FUNC__, not at
4496 __STDC_VERSION__, as IBM cc 7.0 doesn't define the latter either.
4497 Problem reported by John P. Hartmann.
4498 * data/yacc.c (YYMODERN_C): Likewise. Don't define if the user has
4499 already defined it.
4500
4501 2005-10-12 Akim Demaille <akim@epita.fr>
4502
4503 * src/parse-gram.y (version_check): Exit 63 to please missing
4504 (stands for "version mismatch).
4505 * tests/input.at, doc/bison.texinfo: Adjust.
4506
4507 2005-10-10 Paul Eggert <eggert@cs.ucla.edu>
4508
4509 Work around portability problems with Visual Age C compiler
4510 (xlc and xlC_r) reported by John P. Hartmann.
4511 * data/location.cc (initial_column, initial_line): Remove.
4512 All uses replaced by 0 and 1.
4513 * src/scan-gram.l (gram_wrap): Redefine to avoid bug in flex 2.5.31
4514 that xlc complains about.
4515 * src/scan-skel.l (skel_wrap): Likewise.
4516 * data/c.m4 (b4_c_function_def): Look at __STDC_VERSION__ as well
4517 as __STDC__.
4518 * data/yacc.c (YYMODERN_C): New macro, which also looks at
4519 __STDC_VERSION__. Use it everywhere instead of looking at
4520 __STDC__ and __cplusplus.
4521
4522 2005-10-10 Akim Demaille <akim@epita.fr>
4523
4524 * examples/calc++/test: Be quiet unless VERBOSE.
4525
4526 2005-10-05 Paul Eggert <eggert@cs.ucla.edu>
4527
4528 * data/c.m4 (yydestruct, yysymprint):
4529 Use YYUSE instead of casting to void.
4530 * data/glr.c (YYUSE): New macro.
4531 (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
4532 Use it instead of rolling our own.
4533 (YYLLOC_DEFAULT, YYCHK, YYDPRINTF, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
4534 (YYCHK1):
4535 Use /*CONSTCOND*/ to suppress lint warnings.
4536 * data/lalr1.cc (YYLLOC_DEFAULT, YY_SYMBOL_PRINT, YY_REDUCE_PRINT):
4537 (YY_STACK_PRINT): Use 'false' not '0'.
4538 (YYUSE): New macro.
4539 (yysymprint_, yydestruct_): Use it instead of rolling our own.
4540 * data/yacc.c (YYUSE): New macro.
4541 (YYCOPY, YYSTACK_RELOCATE, YYBACKUP, YYLLOC_DEFAULT):
4542 (YYDPRINTF, YY_SYMBOL_PRINT, YY_STACK_PRINT, YY_REDUCE_PRINT):
4543 (yyerrorlab): Use /*CONSTCOND*/ to suppress lint warnings.
4544
4545
4546 * data/m4sugar/m4sugar.m4 (_m4_map): New macro.
4547 (m4_map, m4_map_sep): Use it. Handle the empty list correctly.
4548
4549 2005-10-04 Paul Eggert <eggert@cs.ucla.edu>
4550
4551 Undo the parts of the unlocked-I/O change that substituted
4552 putc or puts for printf. This might hurt performance a bit,
4553 but some people prefer the printf style.
4554 * data/c.m4 (yysymprint): Prefer printf to puts and putc.
4555 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): Remove.
4556 All uses replaced by YYFPRINTF and YYDPRINTF.
4557 * data/yacc.c: Likewise.
4558 * lib/bitset.c (bitset_print): Likewise.
4559 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer printf to
4560 putc and puts.
4561 * lib/lbitset.c (debug_lbitset): Likewise.
4562 * src/closure.c (print_firsts, print_fderives): Likewise.
4563 * src/gram.c (grammar_dump): Likewise.
4564 * src/lalr.c (look_ahead_tokens_print): Likewise.
4565 * src/output.c (escaped_output): Likewise.
4566 (user_actions_output): Break apart two printfs.
4567 * src/parse-gram.y (%printer): Prefer printf to putc and puts.
4568 * src/reduce.c (reduce_print): Likewise.
4569 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
4570 * src/system.h: Include unlocked-io.h rathe than stdio.h.
4571
4572 * data/glr.c (yyuserMerge, yyreportAmbiguity, yyreportSyntaxError):
4573 Use assignments rather than casts-to-void to suppress
4574 unused-variable warnings. This pacifies 'lint'.
4575 * data/lalr1.cc (yysymprint_, yydestruct_): Use a call to suppress
4576 unused-variable warnings.
4577
4578 2005-10-03 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4579
4580 * Makefile.am: DJGPP specific files added to EXTRA_DIST.
4581
4582 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>
4583
4584 Use unlocked I/O for a minor performance improvement on hosts like
4585 GNU/Linux and Solaris that support unlocked I/O. The basic idea
4586 is to use the gnlib unlocked-io module, and to prefer putc and
4587 puts to printf when either will work (since the latter doesn't
4588 come in an unlocked flavor).
4589 * bootstrap (gnulib_modules): Add unlocked-io.
4590 * data/c.m4 (yysymprint): Prefer puts and putc to printf.
4591 * data/glr.c (YYFPUTC, YYFPUTS, YYDPUTS): New macros.
4592 Prefer them to YYFPRINTF and YYDPRINTF if either will do,
4593 and similarly for puts and putc and printf.
4594 * data/yacc.c: Likewise.
4595 * lib/bitset.c (bitset_print): Likewise.
4596 * lib/bitset.h [USE_UNLOCKED_IO]: Include unlocked-io.h.
4597 * lib/bitsetv.c (bitsetv_dump, debug-bitsetv): Prefer putc and puts
4598 to printf.
4599 * lib/lbitset.c (debug_lbitset): Likewise.
4600 * src/closure.c (print_firsts, print_fderives): Likewise.
4601 * src/gram.c (grammar_dump): Likewise.
4602 * src/lalr.c (look_ahead_tokens_print): Likewise.
4603 * src/output.c (escaped_output): Likewise.
4604 (user_actions_output): Coalesce two printfs.
4605 * src/parse-gram.y (%printer): Prefer putc and puts to printf.
4606 * src/reduce.c (reduce_print): Likewise.
4607 * src/state.c (state_rule_look_ahead_tokens_print): Likewise.
4608 * src/system.h: Include unlocked-io.h rather than stdio.h.
4609
4610 * data/lalr1.cc: Don't put an unmatched ' in a dnl comment, as
4611 this confuses xgettext.
4612
4613 2005-10-02 Akim Demaille <akim@epita.fr>
4614
4615 * bootstrap (gnulib_modules): Add strverscmp.
4616 * lib/.cvsignore: Add strverscmp.c, strverscmp.h.
4617 * m4/.cvsignore: Add strverscmp.m4.
4618 * src/parse-gram.y (%require): New token, new rule.
4619 (version_check): New.
4620 * src/scan-gram.l (%require): Adjust.
4621 * tests/input.at (AT_REQUIRE): New.
4622 Use it.
4623 * doc/bison.texinfo (Require Decl): New.
4624 (Calc++ Parser): Use %require.
4625
4626 2005-10-02 Akim Demaille <akim@epita.fr>
4627
4628 * data/location.cc: New.
4629
4630 2005-10-02 Paul Eggert <eggert@cs.ucla.edu>,
4631 Akim Demaille <akim@epita.fr>
4632
4633 Make sure -odir/foo.cc creates dir/location.hh etc.
4634 * src/files.h (spec_outfile, parser_file_name, spec_name_prefix)
4635 (spec_file_prefix, spec_verbose_file, spec_graph_file)
4636 (spec_defines_file): Now const.
4637 (dir_prefix): New.
4638 (short_base_name): Remove.
4639 * src/files.c: Adjust.
4640 (dirname.h): Include.
4641 (base_name): Don't prototype it.
4642 (finput): Remove, duplicates gram_in.
4643 (full_base_name, short_base_name): Replace by...
4644 (all_but_ext, all_but_tab_ext): these.
4645 (compute_base_names): Rename as...
4646 (compute_file_name_parts): this.
4647 Update to compute the new variables, including dir_prefix.
4648 Adjust dependencies.
4649 * src/output.c (prepare): Output them.
4650 * src/reader.c: Adjust to use gram_in, not finput.
4651 * src/scan-skel.l (@dir_prefix@): New.
4652
4653 2005-10-02 Juan Manuel Guerrero <juan.guerrero@gmx.de>
4654
4655 * lib/subpipe.c: New function end_of_output_subpipe() added
4656 to allow support for non-posix systems. This is a no-op function
4657 for posix systems.
4658
4659 * lib/subpipe.h: New function end_of_output_subpipe() added
4660 to allow support for non-posix systems. This is a no-op function
4661 for posix systems.
4662
4663 * src/output.c (output_skeleton): Use end_of_output_subpipe() to
4664 handle the lack of pipe/fork functionality on non-posix systems.
4665
4666 * djgpp/Makefile.maint: DJGPP specific file.
4667
4668 * djgpp/README.in: DJGPP specific file.
4669
4670 * djgpp/config.bat: DJGPP specific configuration file.
4671
4672 * djgpp/config.sed: DJGPP specific configuration file.
4673
4674 * djgpp/config.site: DJGPP specific configuration file.
4675
4676 * djgpp/config_h.sed: DJGPP specific configuration file.
4677
4678 * djgpp/subpipe.c: DJGPP specific replacement file for lib/subpipe.c.
4679
4680 * djgpp/subpipe.h: DJGPP specific replacement file for lib/subpipe.h.
4681
4682 2005-10-02 Akim Demaille <akim@epita.fr>
4683
4684 * data/location.cc: New, extract from...
4685 * data/lalr1.cc: here.
4686 (location.hh): Include it after the user prologue, in case the
4687 filename type is defined by the user.
4688 Forward declation location and position before the pre-prologue.
4689 (yyresult_): Rename as...
4690 (yyresult): this, it's a local variable, not an attribute.
4691 * data/Makefile.am (dist_pkgdata_DATA): Adjust.
4692
4693 2005-10-01 Akim Demaille <akim@epita.fr>
4694
4695 * examples/extexi: Restore the #line generation.
4696
4697 2005-09-30 Akim Demaille <akim@epita.fr>,
4698 Alexandre Duret-Lutz <adl@gnu.org>
4699
4700 Move the token type and YYSTYPE in the parser class.
4701 * data/lalr1.cc (stack.hh, location.hh): Include earlier.
4702 (parser::token): New, from the moved free definition of tokens.
4703 (parser::semantic_value): Now a full definition instead of an
4704 indirection to YYSTYPE.
4705 (b4_post_prologue): No longer included in the header file, but
4706 in the implementation file.
4707 * doc/bison.texi (C+ Language Interface): Update.
4708 * src/parse-gram.y: Support unary %define.
4709 * tests/actions.at: Define global_tokens_and_yystype for backward
4710 compatibility until we update the tests.
4711 * tests/calc.at: Idem.
4712 (first_line, first_column, last_line, last_column): Define for lalr1.cc
4713 to simplify the code.
4714
4715 2005-09-29 Paul Eggert <eggert@cs.ucla.edu>
4716
4717 Port to SunOS 4.1.4, which lacks strtoul and strerror.
4718 Ah, the good old days! Problem reported by Peter Klein.
4719 * bootstrap (gnulib_modules): Add strerror, strtoul.
4720 * lib/.cvsignore: Add strerror.c, strtol.c, strtoul.c
4721 * m4/.cvsignore: Add strerror.m4, strtol.m4, strtoul.m4.
4722
4723 2005-09-29 Akim Demaille <akim@epita.fr>
4724
4725 * data/c.m4 (b4_error_verbose_if): New.
4726 * data/lalr1.cc: Use it.
4727 (YYERROR_VERBOSE_IF): Remove.
4728 (yyn_, yylen_, yystate_, yynerrs_, yyerrstatus_): Remove as
4729 parser members, replaced by...
4730 (yyn, yylen, yystate, yynerss, yyerrstatus): these parser::parse
4731 local variables.
4732 (yysyntax_error_): Takes the state number as argument.
4733 (yyreduce_print_): Use the argument yyrule, not the former
4734 attribute yyn_.
4735
4736 2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
4737
4738 * bootstrap (gnulib_modules): Add verify.
4739 * lib/.cvsignore: Add verify.h.
4740 * src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
4741 * src/system.h (verify): Remove.
4742 Include verify.h instead.
4743 * src/tables.c (tables_generate): Use new API for 'verify'.
4744
4745 2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
4746
4747 * tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
4748 local variables whose names begin with 'yy'.
4749 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
4750 Trivial changes from Joel E. Denny.
4751
4752 * bootstrap (gnulib_modules): Remove alloca. Bison doesn't need
4753 it itself.
4754 * src/main.c (main) [C_ALLOCA]: Don't flush alloca'ed memory; we
4755 don't use alloca any more.
4756
4757 * data/yacc.c [YYSTACK_USE_ALLOCA && !defined __GNUC__ && ! defined
4758 __BUILTIN_VA_ARG_INCR && ! defined _AIX && ! defined _MSC_VER &&
4759 defined _ALLOCA_H]: Don't include <stdlib.h>; not needed in this case.
4760 * tests/torture.at (Exploding the Stack Size with Alloca): Adjust
4761 to match yacc.c, to test more hosts.
4762
4763 2005-09-20 Paul Eggert <eggert@cs.ucla.edu>
4764
4765 * data/yacc.c (YYSIZE_T): Reindent to make it clearer. This
4766 doesn't affect behavior.
4767 (YYSTACK_ALLOC) [YYSTACK_USE_ALLOCA]: Improve support for
4768 Solaris, AIX, MSC.
4769 (_STDLIB_H): Renamed from YYINCLUDED_STDLIB_H. All uses changed.
4770 This works a bit better with glibc, if user code has already included
4771 stdlib.h.
4772 * doc/bison.texinfo (Bison Parser): Document that users can't
4773 arbitrarily use malloc and free for other purposes. Document
4774 that <alloca.h> and <malloc.h> might be included.
4775 (Table of Symbols): Under YYSTACK_USE_ALLOCA, Don't claim that the
4776 user must declare alloca.
4777
4778 * HACKING (release): Forwarn the Translation Project about
4779 stable releses.
4780
4781 2005-09-20 Akim Demaille <akim@epita.fr>
4782
4783 * data/glr.c: Use b4_token_enums, not b4_token_enums_defines.
4784
4785 2005-09-19 Paul Eggert <eggert@cs.ucla.edu>
4786
4787 * data/yacc.c (YYSIZE_MAXIMUM): New macro.
4788 (YYSTACK_ALLOC_MAXIMUM): Use it.
4789 (yysyntax_error): New function.
4790 (yyparse) [YYERROR_VERBOSE]: Don't leak memory indefinitely if
4791 multiple syntax errors are reported, and alloca is being used.
4792 Instead, reallocate buffers twice as big each time, so that
4793 we waste at most half the allocated memory. Start with a small
4794 (128-byte) buffer that will suffice in most cases anyway.
4795 Use yysyntax_error to do most of the work.
4796
4797 * doc/bison.texinfo (Error Reporting, Table of Symbols):
4798 yynerrs is the number of errors reported, not the number of
4799 errors encountered.
4800
4801 * tests/glr-regression.at (Duplicated user destructor for lookahead):
4802 Mark it as expected to fail.
4803 Cast result of malloc; problem reported by twlevo@xs4all.nl.
4804 * tests/actions.at, tests/calc.at, tests/glr-regression.at:
4805 Don't start user-code symbols with "yy", to avoid name space problems.
4806
4807 2005-09-19 Akim Demaille <akim@epita.fr>
4808
4809 Remove the traits, failed experiment.
4810 It never proved useful, and anyway because of the current
4811 definition, it was not possible to have several specialization of
4812 this traits, making it useless.
4813 * data/lalr1.cc (yy:traits): Remove.
4814 Inline its definitions in the parser class.
4815
4816 2005-09-19 Akim Demaille <akim@epita.fr>
4817
4818 * tests/atlocal.in (LIBS): Pass INTLLIBS to address failures on at
4819 least Mac OSX with a /usr/local install of gettext.
4820
4821 2005-09-19 Akim Demaille <akim@epita.fr>
4822
4823 * data/lalr1.cc (yyparse): Rename yylooka and yyilooka as yychar
4824 and yytoken for similarity with the other skeletons.
4825
4826 2005-09-19 Akim Demaille <akim@epita.fr>
4827
4828 * NEWS, configure.ac: update version number to 2.1a.
4829
4830 2005-09-16 Paul Eggert <eggert@cs.ucla.edu>
4831
4832 * NEWS: Version 2.1.
4833
4834 * NEWS: Remove notice of yytname change, since it was never in an
4835 official release.
4836 * data/glr.c (yydestroyGLRState): Rename local var to avoid shadowing
4837 diagnostic.
4838 * src/output.c (prepare): Likewise.
4839 * data/lalr1.cc (YYERROR_VERBOSE_IF): New macro.
4840 (yysyntax_error_): Use it to avoid GCC warning when YYERROR_VERBOSE
4841 is not defined. This is an awful hack, but it's enough for now.
4842 All callers changed.
4843 * tests/glr-regression-at (make_value): Args are const pointers now,
4844 to avoid GCC warning.
4845 (Duplicated user destructor for lookahead): New test. Currently
4846 skipped. It fails on my host but I'm not sure it'll always fail.
4847
4848 2005-09-16 Akim Demaille <akim@epita.fr>
4849
4850 * src/symtab.h (struct symbol): Declare the printer and destructor
4851 as const, to avoid accidental calls to free.
4852 (symbol_destructor_set, symbol_printer_set): Adjust.
4853 * src/symtab.c: Adjust.
4854
4855 2005-09-16 Akim Demaille <akim@epita.fr>
4856
4857 * data/c.m4 (b4_token_enums): New.
4858 (b4_token_defines): Rename as...
4859 (b4_token_enums_defines): this.
4860 (b4_token_defines): New, output only the #defines.
4861 * data/yacc.c, data/glr.c: Adjust.
4862 * data/lalr1.cc: Use b4_token_enums instead of b4_token_enums_defines.
4863 * data/c.m4 (b4_yydestruct_generate, b4_yysymprint_generate): Define
4864 as default values.
4865
4866 2005-09-16 Akim Demaille <akim@epita.fr>
4867
4868 * data/lalr1.cc (yylex_): Remove, inline its code.
4869 (yyreport_syntax_error_): Remove, replaced by...
4870 (yysyntax_error_): this which returns a string and leaves to the
4871 caller the call to the users' error function.
4872 (yylooka_, yyilooka_, yylval, yylloc, yyerror_range_, yyval, yyloc):
4873 Move from members of the parser object...
4874 (yylooka, yyilooka, yylval, yylloc, yyerror_range, yyval, yyloc):
4875 to local variables of the parse function.
4876
4877 2005-09-16 Akim Demaille <akim@epita.fr>
4878
4879 * doc/bison.texinfo (Calc++ Parser): Don't promote defining YYEOF
4880 since it's in Bison's name space.
4881
4882 2005-09-15 Paul Eggert <eggert@cs.ucla.edu>
4883
4884 * data/glr.c (yyresolveValue): Add default case to pacify
4885 gcc -Wswitch-default. Problem reported by twlevo@xs4all.nl.
4886
4887 * NEWS: Document when yyparse started to return 2.
4888 * doc/bison.texinfo (Parser Function): Document when yyparse
4889 returns 2.
4890
4891 * data/lalr1.cc: Revert part of previous change, as it's incompatible.
4892 (b4_filename_type): Renamed back from b4_file_name_type. All uses
4893 changed.
4894 (class position): file_name -> filename (reverting). All uses changed.
4895
4896 2005-09-14 Paul Eggert <eggert@cs.ucla.edu>
4897
4898 * examples/calc++/Makefile.am ($(calc_sources_generated)): Don't
4899 do anything if $@ exists. This reverts part of the 2005-07-07
4900 patch.
4901
4902 2005-09-11 Paul Eggert <eggert@cs.ucla.edu>
4903
4904 * Makefile.am (EXTRA_DIST): Do not distribute REFERENCES; it
4905 contains obsolete information and isn't worth distributing as a
4906 separate file anyway.
4907 * data/glr.c [defined YYSETJMP]: Don't include <setjmp.h>.
4908 (YYJMP_BUF, YYSETJMP, YYLONGJMP) [!defined YYSETJMP]: New macros.
4909 All uses of jmp_buf, setjmp, longjmp changed to use these instead.
4910 (yyparse): Abort if user code uses longjmp to throw an unexpected
4911 value.
4912
4913 2005-09-09 Paul Eggert <eggert@cs.ucla.edu>
4914
4915 * data/c.m4 (b4_identification): Define YYBISON_VERSION.
4916 Suggested by twlevo@xs4all.nl.
4917
4918 * data/glr.c (YYCHK1): Do not assume YYE is in range.
4919 This avoids a diagnostic from gcc -Wswitch-enum.
4920 Problem reported by twlevo@xs4all.nl.
4921
4922 * doc/bison.texinfo: Don't use "filename", as per GNU coding
4923 standards. Use "file name" or "file" or "name", depending on
4924 the context.
4925 (Invocation): The output of "bison hack/foo.y" goes to foo.tab.c,
4926 not to hack/foo.tab.c.
4927 (Calc++ Top Level): 2nd arg of main is not const.
4928 * data/glr.c: b4_filename -> b4_file_name.
4929 * data/lalr1.cc: Likewise. Also, b4_filename_type -> b4_file_name_type.
4930 All uses changed.
4931 (class position): filename -> file_name. All uses changed.
4932 * data/yacc.c: b4_filename -> b4_file_name.
4933 * lib/bitset.h: filename -> file_name in local vars.
4934 * lib/bitset_stats.c: Likewise.
4935 * src/files.c: Likewise.
4936 * src/scan-skel.l ("@output ".*\n): Likewise.
4937 * src/files.c (file_name_split): Renamed from filename_split.
4938 * src/muscle_tab.c (muscle_init): Output b4_file_name, not b4_filename.
4939
4940 2005-09-08 Paul Eggert <eggert@cs.ucla.edu>
4941
4942 * lib/.cvsignore: Add pipe-safer.c, stdio--.h, unistd--.h,
4943 to accommodate latest gnulib.
4944
4945 * tests/glr-regression.at (Duplicate representation of merged trees):
4946 Add casts to pacify g++. Problem reported by twlevo@xs4all.nl.
4947
4948 * bootstrap: Add comment as to why the AM_LANGINFO_CODESET hack is
4949 needed.
4950
4951 2005-08-26 Paul Eggert <eggert@cs.ucla.edu>
4952
4953 * data/glr.c (yydestroyGLRState): Renamed from yydestroyStackItem.
4954 All uses changed. Invoke user destructor after an error during a
4955 split parse (trivial change from Joel E. Denny).
4956
4957 * tests/glr-regression.at
4958 (User destructor after an error during a split parse): New test case.
4959 Problem reported by Joel E. Denny in:
4960 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00029.html
4961
4962 2005-08-25 Paul Eggert <eggert@cs.ucla.edu>
4963
4964 * README-cvs: Give URLs for recommended tools.
4965 Mention Gzip version problem, and bootstrapping issues.
4966 Remove troubleshooting section, as it's somewhat obsolete.
4967
4968 * bootstrap (no_cache): New var, to accommodate different wget
4969 variants. Use it instead of '-C off'. Problem reported by
4970 twlevo@xs4all.nl.
4971
4972 * data/glr.c (yydestroyStackItem): New function.
4973 (yyrecoverSyntaxError, yyreturn): Use it to improve quality of
4974 debugging information. Problem reported by Joel E. Denny.
4975
4976 2005-08-25 Akim Demaille <akim@epita.fr>
4977
4978 * tests/local.at (AT_COMPILE_CXX): Pass $LINKS too.
4979
4980 2005-08-24 Paul Eggert <eggert@cs.ucla.edu>
4981
4982 * data/glr.c (yyrecoverSyntaxError, yyreturn):
4983 Don't invoke destructor on unresolved entries.
4984 * tests/glr-regression.at
4985 (User destructor for unresolved GLR semantic value): New test case.
4986 Problem reported by Joel E. Denny in:
4987 http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00016.html
4988
4989 2005-08-21 Paul Eggert <eggert@cs.ucla.edu>
4990
4991 * lib/.cvsignore: Remove realloc.c, strncasecmp.c, xstrdup.c.
4992 Add strnlen.c.
4993 * m4/.cvsignore: Remove codeset.m4, gettext.m4, lib-ld.m4,
4994 lib-prefix.m4, po.m4.
4995
4996 * data/glr.c (yyreturn): Use "Cleanup:" rather than "Error:"
4997 in yydestruct diagnostic, since it might not be an error.
4998 Problem reported by Joel Denny near end of
4999 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
5000 * data/lalr1.cc (yyerturn): Likewise.
5001 * data/yacc.c (yyreturn): Likewise.
5002 * tests/calc.at (_AT_CHECK_CALC_ERROR): Adjust to the above change.
5003
5004 * src/files.c: Remove obsolete FIXME comment.
5005
5006 * data/glr.c (YY_SYMBOL_PRINT): Append a newline, for consistency
5007 with the other templates, and to fix bogus run-on messages such
5008 as the one reported at the end of
5009 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00040.html>.
5010 All callers changed to avoid the newline.
5011 (yyprocessOneStack): Output two lines rather than one, to accommodate
5012 the above change. This changes the debug output format slightly.
5013
5014 * data/glr.c (yyresolveValue): Fix redundant parse tree problem
5015 reported by Joel E. Denny in
5016 <http://lists.gnu.org/archive/html/bison-patches/2005-08/msg00004.html>
5017 (trivial change).
5018 * tests/glr-regression.at (Duplicate representation of merged trees):
5019 New test, from Joel E. Denny in:
5020 <http://lists.gnu.org/archive/html/help-bison/2005-07/msg00013.html>.
5021 * THANKS: Add Joel E. Denny.
5022
5023 * configure.ac (AC_INIT): Bump to 2.0c.
5024
5025 2005-07-24 Paul Eggert <eggert@cs.ucla.edu>
5026
5027 * NEWS: Version 2.0b.
5028
5029 * Makefile.am (SUBDIRS): Put examples before tests, so that
5030 "make check" doesn't finish with "All 1 tests passed".
5031
5032 * tests/regression.at (Token definitions): Don't rely on
5033 AT_PARSER_CHECK for data that contains backslashes. It currently
5034 uses 'echo', and 'echo' isn't portable if its argument contains
5035 backslashes. Problem found on OpenBSD 3.4. Also, do not assume
5036 that the byte '\0xff' is not printable in the C locale; it is,
5037 under OpenBSD 3.4 (!). Luckily, '\0x80' through '\0x9e' are
5038 not printable, so use '\0x81' to test.
5039
5040 * data/glr.c (YYOPTIONAL_LOC): Define even if it's not a recent
5041 version of GCC, since the macro is used with non-GCC compilers.
5042
5043 Fix core dump reported by Pablo De Napoli in
5044 <http://lists.gnu.org/archive/html/bug-bison/2005-07/msg00053.html>.
5045 * tests/regression.at (Invalid inputs with {}): New test.
5046 * src/parse-gram.y (token_name): Translate type before using
5047 it as an index.
5048
5049 * data/glr.c (ATTRIBUTE_UNUSED): Remove, since it infringes on
5050 the user's name space. All uses changed to __attribute__
5051 ((__unused__)).
5052 (yyFail, yyMemoryExhausted, yyreportAmbiguity):
5053 Add __attribute__ ((__noreturn__)).
5054
5055 * etc/clcommit: Remove. We weren't using it, and it failed
5056 "make maintainer-distcheck".
5057 * Makefile.maint: Merge from coreutils.
5058 (CVS_LIST, CVS_LIST_EXCEPT): New macros.
5059 (syntax-check-rules): Change list of rules as described below.
5060 (sc_cast_of_alloca_return_value, sc_dd_max_sym_length):
5061 (sc_file_system, sc_obsolete_symbols, sc_prohibit_atoi_atof):
5062 (sc_prohibit_jm_in_m4, sc_root_tests, sc_tight_scope):
5063 (sc_trailing_space): New rules.
5064 (sc_xalloc_h_in_src): Remove.
5065 (sc_cast_of_argument_to_free, sc_cast_of_x_alloc_return_value):
5066 (sc_space_tab, sc_error_exit_success, sc_changelog):
5067 (sc_system_h_headers, sc_sun_os_names, sc_unmarked_diagnostics):
5068 (makefile-check, po-check, author_mark_check):
5069 (makefile_path_separator_check, copyright-check):
5070 Use grep -n, to make it easier to find violations.
5071 Use CVS_LIST and CVS_LIST_EXCEPT.
5072 (header_regexp, h_re): Remove.
5073 (dd_c): New macro.
5074 (sc_dd_max_sym_length, .re-list, news-date-check): New rules.
5075 (my-distcheck): Use more-modern GCC flags.
5076 (signatures, %.asc): Remove.
5077 (rel-files, announcement): Remove signatures.
5078 Restore old updating code, even though we don't use it, so
5079 that we're the same as coreutils.
5080 (alpha, beta, major): Depend on news-date-check.
5081 Make the upload commands.
5082
5083 * data/c.m4, data/lalr1.cc, data/yacc.c: Normalize white space.
5084 * lib/abitset.h, lib/bbitset.h, lib/bitset.h: Likewise.
5085 * lib/bitset_stats.c, lib/ebitset.h, lib/lbitset.c: Likewise.
5086 * lib/libitset.h, lib/timevar.c, lib/vbitset.h: Likewise.
5087 * src/Makefile.am, src/gram.c, src/muscle_tab.h: Likewise.
5088 * src/parse-gram.y, src/system.h, src/tables.c, src/vcg.c: Likewise.
5089 * src/vcg_defaults.h, tests/cxx-type.at, tests/existing.at: Likewise.
5090 * tests/sets.at: Likewise.
5091
5092 * data/m4sugar/m4sugar.m4: Sync from Autoconf, except that
5093 we comment out the Autoconf version number.
5094 * doc/bison.texinfo (Calc++ Scanner): Don't use atoi, as
5095 it's error-prone and "make maintainer-distcheck" rejects it.
5096
5097 * lib/subpipe.c: Include <fcntl.h> without checking for HAVE_FCNTL_H.
5098 Indent calls to "error" to pacify "make maintainer-distcheck",
5099 when the calls are not intended to be translated.
5100 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't check for fcntl.h.
5101
5102 * src/Makefile.am (DEFS): Use +=, to pacify
5103 "make maintainer-distcheck".
5104 (bison_SOURCES): Add scan-skel.h.
5105 (sc_tight_scope): New rule, from coreutils.
5106
5107 * src/files.c (src_extension, header_extension):
5108 Now static, not extern.
5109 * src/getargs.c (short_options): Likewise.
5110 * src/muscle_tab.c (muscle_table): Likewise.
5111 * src/parse-gram.y (current_class, current_type, current_prec):
5112 Likewise.
5113 * src/reader.c (grammar_end, previous_rule_end): Likewise.
5114 * src/getargs.h: Redo comments to pacify "make maintainer-distcheck".
5115 * src/main.c (main): Cast bindtextdomain and textdomain calls to
5116 void, to avoid warning when NLS is disabled.
5117 * src/output.c: Include scan-skel.h.
5118 (scan_skel): Remove decl, since scan-skel.h does this.
5119 (output_skeleton):
5120 Indent calls to "error" to pacify "make maintainer-distcheck".
5121 * src/print_graph.c: Don't include <obstack.h>, as system.h does this.
5122 * src/reader.h (gram_end, gram_lineno): New decls to pacify
5123 "make maintainer-distcheck".
5124 * src/scan-skel.l (skel_lex, skel_get_lineno, skel_get_in):
5125 (skel_get_out, skel_get_leng, skel_get_text, skel_set_lineno):
5126 (skel_set_in, skel_set_out, skel_get_debug, skel_set_debug):
5127 (skel_lex_destroy, scan_skel): Move these decls to...
5128 * src/scan-skel.h: New file.
5129 * src/uniqstr.c (uniqstr_assert):
5130 Indent calls to "error" to pacify "make maintainer-distcheck".
5131
5132 * tests/Makefile.am ($(srcdir)/package.m4): Use $(VAR),
5133 not @VAR@.
5134
5135 * tests/torture.at: Revamp to avoid misuse of atoi that
5136 "make maintainer-distcheck" complained about.
5137
5138 * examples/extexi (message): Don't print a message more than once,
5139 and omit line-number decoration that makes Emacs compile think
5140 that informative messages are worth worrying about.
5141
5142 2005-07-22 Paul Eggert <eggert@cs.ucla.edu>
5143
5144 * configure.ac: Update version number.
5145
5146 * Makefile.am (SUBDIRS): Add examples; somehow this got removed
5147 accidentally.
5148 * examples/calc++/calc++-parser.yy: Remove from CVS, as it's
5149 autogenerated by the maintainer.
5150 * examples/calc++/.cvsignore: Add *.yy.
5151
5152 * lib/bitset.c (bitset_alloc): Don't cast xcalloc result.
5153 * lib/bitset_stats.c (bitset_stats_init): Likewise.
5154 * lib/bitsetv.c (bitsetv_alloc): Likewise.
5155
5156 * po/POTFILES.in: Add lib/xalloc-die.c; remove lib/xmalloc.c.
5157
5158 * src/relation.c (relation_transpose): Rewrite to avoid bogus complaint
5159 from maintainer-distcheck about casting the argument of 'free'.
5160
5161 * NEWS: Mention recent yytname changes.
5162 * THANKS: Add Anthony Heading, twlevo@xs4all.nl.
5163
5164 * bootstrap: For translations that have not yet been upgraded to
5165 the new runtime-po domain, prime the pump by extracting the
5166 relevant strings from the obsolete translations. This code can be
5167 removed once the bison-runtime domain has been translated by each
5168 team.
5169
5170 * src/scan-gram.l (<SC_PRE_CODE>.): Don't double-quote token names,
5171 now that token names are already quoted.
5172
5173 Fix problem reported by Anthony Heading.
5174 * data/glr.c (YYTOKEN_TABLE): New macro.
5175 (yytname): Define if YYTOKEN_TABLE.
5176 * data/yacc.c (YYTOKEN_TABLE, yytname): Likewise.
5177 * data/lalr1.cc (YYTOKEN_TABLE, yytname_): Likewise.
5178 (YYERROR_VERBOSE): Define the same way the other skeletons do.
5179 * src/output.c (prepare_symbols): Output token_table_flag.
5180
5181 2005-07-21 Paul Eggert <eggert@cs.ucla.edu>
5182
5183 * data/glr.c (yyinitGLRStack, yyreturn): Don't call malloc
5184 again if the first call fails.
5185
5186 * data/glr.c (yytnamerr): New function.
5187 (yyreportSyntaxError): Use it to dequote most string literals.
5188 * data/lalr1.c (yytname_): Renamed from yyname_, for compatibility
5189 with other skeletons. All uses changed.
5190 (yytnameerr_): New function.
5191 (yyreport_syntax_error): Use it to dequote most string literals.
5192 * data/yacc.c (yytnamerr): New function.
5193 (yyerrlab): Use it to decode most string literals.
5194 * doc/bison.texinfo (Decl Summary, Calling Convention):
5195 Clarify quoting convention of yytname.
5196 * src/output.c (prepare_symbols): Quote all names. This undoes
5197 the 2005-04-17 change, which is now accomplished (mostly) via
5198 changes in the parsers as described above.
5199 * tests/regression.at (Token definitions, Web2c Actions):
5200 Undo most 2005-04-17 change here, too.
5201
5202 2005-07-20 Paul Eggert <eggert@cs.ucla.edu>
5203
5204 Fix more problems reported by twlevo@xs4all.nl.
5205 * tests/cxx-type.at: Don't pipe output of ./types through sed to
5206 remove trailing spaces. This loses the exit status of ./types,
5207 and isn't needed since ./types shouldn't be emitting trailing
5208 spaces.
5209 * data/glr.c (yyreturn): Don't pop stack if yyinitStateSet failed,
5210 as the stack isn't valid in that case.
5211
5212 * src/scan-gram.l (gram_get_lineno, gram_get_in, gram_get_out):
5213 (gram_get_leng, gram_get_text, gram_set_lineno, gram_set_in):
5214 (gram_set_out, gram_get_debug, gram_set_debug, gram_lex_destroy):
5215 Add declarations to pacify "gcc -Wmissing-prototypes" when flex 2.5.31
5216 is used.
5217 * src/scan-skel.l (skel_get_lineno, skel_get_in, skel_get_out):
5218 (skel_get_leng, skel_get_text, skel_set_lineno, skel_set_in):
5219 (skel_set_out, skel_get_debug, skel_set_debug, skel_lex_destroy):
5220 Likewise.
5221
5222 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Work even with
5223 overly-picky compilers that reject 'char *foo = "bar";'.
5224
5225 * src/symtab.c (SYMBOL_ATTR_PRINT, symbol_print): Direct output
5226 to FILE * parameter, not to stderr. This fixes a typo introduced
5227 in the 2005-07-12 change.
5228
5229 * lib/subpipe.c (create_subpipe): Rewrite slightly to avoid
5230 warnings from GCC 4.
5231
5232 * data/glr.c (yyexpandGLRStack, yyaddDeferredAction, yyexpandGLRStack):
5233 (yyglrShiftDefer, yysplitStack):
5234 Remove unused parameters b4_pure_formals. All uses changed.
5235 (yyglrShift): Remove unused parameters b4_user_formals.
5236 All uses changed.
5237 (yyglrReduce): Removed unused parameter yylocp. All uses changed.
5238
5239 2005-07-18 Paul Eggert <eggert@cs.ucla.edu>
5240
5241 Destructor cleanups and regularization among the three skeletons.
5242 * NEWS: Document the behavior changes.
5243 * data/glr.c (yyrecoverSyntaxError): Don't bother to pop the
5244 stack before failing, as the cleanup code will do it for us now.
5245 * data/lalr1.cc (yyerrlab): Likewise.
5246 * data/glr.c (yyparse): Pop everything off the stack before
5247 freeing it, so that destructors get called properly.
5248 * data/lalr1.cc (yyreturn): Likewise.
5249 * data/yacc.c (yyreturn): Pop and destroy the start symbol, too.
5250 This is more consistent.
5251 * doc/bison.texinfo (Destructor Decl): Mention more reasons
5252 why destructors might be called. 1.875 -> 2.1.
5253 (Destructor Decl, Decl Summary, Table of Symbols):
5254 Some English-language cleanups for %destructor.
5255 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
5256 Add output line for destructor of start symbol.
5257 * tests/calc.at (AT_CHECK_CALC): Add one to line counts,
5258 because of that same extra output line.
5259
5260 * NEWS: Document minor wording changes in diagnostics of
5261 Bison-generated parsers.
5262 * data/glr.c (yyMemoryExhausted): Renamed from yyStackOverflow.
5263 Remove unused formals. All uses changed.
5264 (yyreportAmbiguity): "ambiguity detected" -> "syntax is ambiguous".
5265 (yyparse): Rename yyoverflowlab to yyexhaustedlab.
5266 * data/yacc.c (yyparse): "parser stack overflow" -> "memory exhausted".
5267 Rename yyoverflowab to yyexhaustedlab.
5268 When memory exhaustion occurs during syntax-error reporting,
5269 report it separately rather than in a single diagnostic; this
5270 eases translation.
5271 * doc/bison.texinfo (Memory Management): Renamed from Stack Overflow.
5272 (Memory Exhausted): Renamed from Parser Stack Overflow.
5273 Revamp wording slightly to prefer "memory exhaustion".
5274 * tests/actions.at: "parser stack overflow" -> "memory exhausted".
5275
5276 * data/c.m4 (b4_yysymprint_generate): Use YYFPRINTF, not fprintf.
5277
5278 Add i18n support to the GLR skeleton. Partially fix the C++
5279 skeleton; a C++ expert needs to finish this. Remove debugging
5280 msgids; there's little point to having them translated, since they
5281 can be understood only by someone who can read the
5282 (English-language) source code.
5283
5284 Generate runtime-po/bison-runtime.pot automatically, so that we
5285 don't have to worry about garbage getting in that file. We'll
5286 make sure after the next official release that old msgids don't
5287 get lost. See
5288 <http://lists.gnu.org/archive/html/bison-patches/2005-07/msg00119.html>.
5289
5290 * runtime-po/Makefile.in.in, runtime-po/bison-runtime.pot: Remove.
5291 Now auto-generated.
5292 * PACKAGING: Don't claim that Gawk, GCC, Perl use this method yet.
5293 Fix typos in explanations of the runtime file.
5294 * bootstrap: Change gettext keyword from YYI18N to YY_.
5295 Use standard Makefile.in.in in runtime-po, since we'll arrange
5296 for backward-compatible bison-runtime.po files in a different way.
5297 * data/glr.c (YY_): New macro, from yacc.c.
5298 (yyuserAction, yyreportAmbiguity, yyreportSyntaxError, yyparse):
5299 Translate messages intended for users.
5300 (yyreportSyntaxError): Change "virtual memory" to "memory" to match
5301 the wording in the other skeletons. We don't know that the memory
5302 is virtual.
5303 * data/lalr1.cc (YY_): Renamed from _. All uses changed.
5304 Use same method that yacc.c uses.
5305 Don't translate debugging messages.
5306 (yy::yyreport_syntax_error): Put in a FIXME for the i18n stuff;
5307 it doesn't work (yet), and requires C++ expertise to fix.
5308 * data/yacc.c (YY_): Renamed from YY18N. All uses changed.
5309 Move defn to a more logical place, to be consistent with other
5310 skeletons.
5311 Don't translate debugging messages.
5312 Don't assume line numbers fit in unsigned int; use unsigned long fmts.
5313 * doc/bison.texinfo: Mention <libintl.h>. Change glibc cross reference
5314 to gettext cross reference. Add indexing terms. Mention YYENABLE_NLS.
5315 * runtime-po/POTFILES.in: Add data/glr.c, data/lalr1.cc.
5316
5317 Fix yyerror / yylex test glitches noted by twlevo@xs4all.nl.
5318 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Have yyerror return
5319 void, not int.
5320 * tests/glr-regression.at (Badly Collapsed GLR States):
5321 Likewise.
5322 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5323 yylex should return 0 at EOF rather than aborting.
5324
5325 Improve tests for stack overflow in GLR parser.
5326 Problem reported by twlevo@xs4all.nl.
5327 * data/glr.c (struct yyGLRStack): Remove yyerrflag member.
5328 All uses removed.
5329 (yyStackOverflow): Just longjmp, but with value 2 so that caller
5330 can handle the problem.
5331 (YYCHK1): Use goto (a la yacc.c) rather than setting a flag.
5332 (yyparse): New local variable yyresult to record the result.
5333 Use result of setjmp to set it, rather than storing itinto
5334 struct.
5335 (yyDone): Remove label.
5336 (yyacceptlab, yyabortlab, yyoverflowlab, yyreturn): New labels,
5337 to mimic yacc.c. Do not discard lookahead if it's EOF (possible
5338 if YYABORT is used).
5339 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Exit with
5340 yyparse status; put status > 1 into diagnostic.
5341 Check that status==2 works.
5342 * tests/calc.at, tests/cxx-type.at, tests/glr-regression.at:
5343 Use exit status 3 for failure to open (which shouldn't happen).
5344
5345 2005-07-17 Paul Eggert <eggert@cs.ucla.edu>
5346
5347 * tests/conflicts.at (%nonassoc and eof): Don't exit with status
5348 1 on syntax error; just let yyparse do its thing.
5349 * tests/glr-regression.at (Badly Collapsed GLR States): Likewise.
5350 * tests/torture.at (AT_DATA_STACK_TORTURE): Likewise.
5351 (Exploding the Stack Size with Alloca):
5352 (Exploding the Stack Size with Malloc):
5353 Expect exit status 2, not 1, since the parser is supposed to blow
5354 its stack. Problem reported by twlevo@xs4all.nl.
5355
5356 * data/glr.c (yyparse): Don't assume that the initial calls
5357 to YYMALLOC succeed; in that case, yyparse incorrectly returned 0.
5358 Print a stack-overflow message and fail instead.
5359 Initialize the line-number information before creating the stack,
5360 so that the stack-overflow message can report line zero safely.
5361
5362 2005-07-14 Paul Eggert <eggert@cs.ucla.edu>
5363
5364 Fix problems reported by twlevo@xs4all.nl.
5365 * data/glr.c (YYSTACKEXPANDABLE): Don't define if already defined.
5366 (yyuserMerge): Provide a default case if b4_mergers is empty.
5367 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Define YYSTACKEXPANDABLE.
5368 * tests/glr-regression.at
5369 (Improper handling of embedded actions and dollar(-N) in GLR parsers):
5370 Add casts to pacify C++ compilers.
5371 * tests/glr-regression.at (Improper merging of GLR delayed action
5372 sets): Declare yylex before using it.
5373 * tests/Makefile.am (maintainer-check-g++): Fix a stray
5374 $(GXX) that escaped the renaming of GXX to CXX. Remove bogus
5375 test for valgrind; valgrind is independent of g++.
5376 (maintainer-check-posix): Add _POSIX2_VERSION=200112, to check
5377 for compatibility with POSIX 1003.1-2001 (if running coreutils).
5378 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Port to stricter C++.
5379 Use a destructor, so that we can expand the stack. Change
5380 YYSTYPE to char * so that we can free it. Cast result of malloc.
5381
5382 2005-07-13 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5383
5384 * data/glr.c (yyuserAction): Fix uninitialized variable that caused
5385 a valgrind failure. Problem reported by twlevo@xs4all.nl.
5386
5387 2005-07-13 Paul Eggert <eggert@cs.ucla.edu>
5388
5389 * PACKAGING: New file, suggested by Bruno Haible and taken from
5390 similar wording in gettext's PACKAGING file.
5391 * NEWS: Mention PACKAGING.
5392 * Makefile.am (EXTRA_DIST): Add PACKAGING.
5393
5394 2005-07-12 Paul Eggert <eggert@cs.ucla.edu>
5395
5396 * NEWS: Document recent i18n improvements.
5397 * bootstrap: Get runtime translations into runtime-po.
5398 Create runtime-po files automatically, if possible.
5399 * configure.ac: Invoke BISON_I18N, so that we eat our own dog food.
5400 * data/yacc.c: Rewrite inclusion of <libintl.h> so that ENABLE_NLS
5401 does not infringe on the user's name space.
5402 (YYENABLE_NLS): Renamed from ENABLE_BISON_NLS.
5403 * doc/bison.texinfo (Internationalization): Revamp the English
5404 and Texinfo syntax a bit, to try to make it clearer.
5405 (Bison Options, Option Cross Key): Mention --print-localedir.
5406 * m4/bison-i18n.m4 (BISON_I18N): Rename ENABLE_BISON_NLS to
5407 YYENABLE_NLS. Quote a bit more.
5408 * runtime-po/.cvsignore: New file.
5409 * runtime-po/Makefile.in.in (mostlyclean): Remove *.old.pot.
5410 * runtime-po/Rules-quot: Remove; now created by bootstrap.
5411 * runtime-po/quot.sed: Likewise.
5412 * runtime-po/boldquot.sed: Likewise.
5413 * runtime-po/en@quot.header: Likewise.
5414 * runtime-po/en@boldquot.header: Likewise.
5415 * runtime-po/insert-header.sin: Likewise.
5416 * runtime-po/remove-potcdate.sin: Likewise.
5417 * runtime-po/Makevars: Likewise.
5418 * runtime-po/LINGUAS: Likewise.
5419 * runtime-po/de.po: Likewise; we will rely on the translation project
5420 to maintain this, so "bootstrap" should get it.
5421 * src/getarg.c (PRINT_LOCALEDIR_OPTION): Let the C compiler determine
5422 its value.
5423 * src/main.c (main): Bind the bison-runtime domain, too.
5424
5425 2005-07-12 Bruno Haible <bruno@clisp.org>
5426
5427 * data/yacc.c: Include <libintl.h> when NLS is enabled.
5428 (YYI18N): Renamed from _. Use dgettext when NLS is enabled.
5429 * po/POTFILES.in: Remove autogenerated file src/parse-gram.c.
5430 * runtime-po: New directory.
5431 * runtime-po/Makefile.in.in: New file, copied from po/, with modified
5432 $(DOMAIN).pot-update rule, so that old messages are never dropped.
5433 * runtime-po/Rules-quot: New file, copied from po/.
5434 * runtime-po/quot.sed: Likewise.
5435 * runtime-po/boldquot.sed: Likewise.
5436 * runtime-po/en@quot.header: Likewise.
5437 * runtime-po/en@boldquot.header: Likewise.
5438 * runtime-po/insert-header.sin: Likewise.
5439 * runtime-po/remove-potcdate.sin: Likewise.
5440 * runtime-po/Makevars: New file.
5441 * runtime-po/POTFILES.in: New file.
5442 * runtime-po/LINGUAS: New file.
5443 * runtime-po/bison-runtime.pot: New file.
5444 * runtime-po/de.po: New file.
5445 * m4/bison.m4: New file.
5446 * Makefile.am (SUBDIRS): Add runtime-po.
5447 (aclocaldir, aclocal_DATA): New variables.
5448 * configure.ac: Add AC_CONFIG_FILES of runtime-po/Makefile.in.
5449 Define aclocaldir.
5450 * src/getargs.c (usage): Document --print-localedir option.
5451 (PRINT_LOCALEDIR_OPTION): New enum item.
5452 (long_options): Add --print-localedir option.
5453 (getargs): Handle --print-localedir option.
5454 * doc/bison.texinfo (Bison Parser): Remove paragraph about _().
5455 (Internationalization): New section.
5456
5457 2005-07-12 Akim Demaille <akim@epita.fr>
5458
5459 * src/symtab.h, src/symtab.c (symbol_print): Swap the arguments,
5460 for consistency with the rest of the code.
5461 * src/symlist.h, src/symlist.c (symbol_list_print): Ditto.
5462 Add separators.
5463
5464 2005-07-12 Akim Demaille <akim@epita.fr>
5465
5466 * src/parse-gram.y: Use %printer instead of YYPRINT.
5467
5468 2005-07-12 Akim Demaille <akim@epita.fr>
5469
5470 * src/symtab.h, src/symtab.c (symbol_print): New.
5471 * src/symlist.h, src/symlist.c (symbol_list_print): New.
5472 * src/symlist.c (symbol_list_n_type_name_get): Report the culprit.
5473
5474 2005-07-12 Akim Demaille <akim@epita.fr>
5475
5476 * data/glr.c (b4_syncline): Fix (swap) the definitions of
5477 b4_at_dollar and b4_dollar_dollar.
5478
5479 2005-07-11 Paul Eggert <eggert@cs.ucla.edu>
5480
5481 * doc/bison.texinfo (Mystery Conflicts): Add reference to DeRemer
5482 and Pennello's paper.
5483
5484 2005-07-09 Paul Eggert <eggert@cs.ucla.edu>
5485
5486 * data/yacc.c (yyparse): Undo previous patch. Instead,
5487 set yylsp[0] and yyvsp[0] only if the initial action
5488 sets yylloc and yylval, respectively.
5489
5490 * data/yacc.c (yyparse): In the initial action, set
5491 yylsp[0] and yyvsp[0] rather than yylloc and yylval.
5492 This avoids the use of undefined variables if the initial
5493 action does not set yylloc and/or yylval.
5494
5495 2005-07-07 Paul Eggert <eggert@cs.ucla.edu>
5496
5497 * examples/calc++/calc++-driver.cc, examples/calc++/calc++-driver.hh:
5498 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc:
5499 Remove from CVS. These files are automatically generated.
5500 * examples/extexi: Clarify that this file is now part of Bison,
5501 not GNU M4, and that it works with any POSIX-compatible Awk.
5502 * examples/calc++/Makefile.am (run_extexi): Remove; not used.
5503 ($(calc_extracted)): Renamed from $(calc_sources_extracted),
5504 so that we also get calc++-parser.yy. Geneate it.
5505 Use $(AWK), not gawk, since any conforming Awk will do.
5506 Put comment before action, since older 'make' can't handle comment
5507 in action.
5508 $(BUILT_SOURCES): List all built sources, not just some of them.
5509 $(MAINTAINERCLEANFILES): Remove *.stamp, and all built sources.
5510 $($(srcdir)/calc++-parser.stamp): Work even if POSIXLY_CORRECT.
5511 $($(calc_sources_generated)): Remove unnecessary test for existence
5512 of target. (This had a shell syntax error anyway; a stray "x".)
5513 (calc_extracted): List $(srcdir)/calc++-parser.yy, not
5514 calc++-parser.yy.
5515 * examples/.cvsignore, examples/calc++/.cvsignore: New files.
5516
5517 * bootstrap (gnulib_modules): Add gettext, now that it's no longer
5518 implied by the other modules.
5519
5520 2005-07-06 Akim Demaille <akim@epita.fr>
5521
5522 Bind examples/calc++ to the package.
5523 * examples/calc++/Makefile: Remove, replaced by...
5524 * examples/calc++/Makefile.am: ... this new file.
5525 * examples/calc++/test: Remove input.
5526 * examples/calc++/compile: Remove.
5527 * examples/Makefile.am: New.
5528 * configure.ac, Makefile.am: Adjust.
5529 * doc/Makefile.am (clean-local): New, for more recent texi2dvis.
5530
5531 2005-07-05 Paul Eggert <eggert@cs.ucla.edu>
5532
5533 * data/glr.c (yyFail): Drastically simplify; since the format argument
5534 never had any % directives, we can simply pass it to yyerror.
5535 (yyparse): Use "t a; a=b;" rather than "t a = b;" when a will
5536 be modified later, as that is the usual style in glr.c.
5537 Problems reported by Paul Hilfinger.
5538
5539 Rewrite GLR parser to catch more buffer overrun, storage exhaustion,
5540 and size overflow errors.
5541 * data/glr.c: Include <stdio.h> etc. after user prolog, not before,
5542 in case the user prolog sets feature-test macros like _GNU_SOURCE.
5543 (YYSIZEMAX): New macro.
5544 (yystpcpy): New function, taken from yacc.c.
5545 (struct yyGLRStack.yyspaceLeft): Now size_t, not int.
5546 (yyinitGLRStack, yyfreeGLRstack): Remove unnecessary forward decls,
5547 so that we don't have to maintain their signatures.
5548 (yyFail): Check for buffer overflow, by using vsnprintf rather
5549 than vsprintf. Allocate a bigger buffer if possible.
5550 Report an error if buffer allocation fails.
5551 (yyStackOverflow): New function.
5552 (yyinitStateSet, yyinitGLRStack): Return a boolean indicating whether
5553 the initialization was successful. It might fail if storage was
5554 exhausted.
5555 (yyexpandGLRStack): Add more checks for storage allocation failure.
5556 Use yyStackOverflow to report failures.
5557 (yymarkStackDeleted, yyglrShift, yyglrShiftDefer, yydoAction):
5558 (yysplitStack, yyprocessOneStack, yyparse, yypstack):
5559 Don't assume stack number fits in int.
5560 (yysplitStack): Check for storage allocation failure.
5561 (yysplitStack, yyprocessOneStack): Add pure_formals, so that we
5562 can print diagnostics on storage allocation failure. All callers
5563 changed.
5564 (yyresolveValue): Use yybool for boolean.
5565 (yyreportSyntaxError): Check for size-calculation overflow.
5566 This code is taken from yacc.c.
5567 (yyparse): Check for storage allocation errors when allocating
5568 the initial stack.
5569
5570 2005-07-05 Akim Demaille <akim@epita.fr>
5571
5572 Extract calc++ from the documentation.
5573 * doc/bison.texinfo (Calc++): Add the extraction marks.
5574 * examples/extexi: New, from the aborted GNU Programming 2E.
5575 Separate the different paragraph of a file with empty lines.
5576 * examples/Makefile: Use it to extract the whole calc++ example.
5577
5578 2005-06-24 Akim Demaille <akim@epita.fr>
5579
5580 * doc/bison.texinfo (C++ Parser Interface): Use defcv to define
5581 class typedefs.
5582
5583 2005-06-22 Akim Demaille <akim@epita.fr>
5584
5585 * doc/bison.texinfo (C++ Language Interface): First stab.
5586 (C++ Parsers): Remove.
5587
5588 2005-06-22 Akim Demaille <akim@epita.fr>
5589
5590 * data/lalr1.cc (yylex_): Honor %lex-param.
5591
5592 2005-06-22 Akim Demaille <akim@epita.fr>
5593
5594 Start a set of simple examples.
5595 * examples/calc++/Makefile, examples/calc++/calc++-driver.cc,
5596 * examples/calc++/calc++-driver.hh,
5597 * examples/calc++/calc++-parser.yy,
5598 * examples/calc++/calc++-scanner.ll, examples/calc++/calc++.cc,
5599 * examples/calc++/compile, examples/calc++/test: New.
5600
5601 2005-06-09 Paul Eggert <eggert@cs.ucla.edu>
5602
5603 * data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside
5604 extern "C" {}. This fixes a problem reported by Paul Hilfinger,
5605 which stems from the 2005-05-27 patch.
5606
5607 2005-06-06 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
5608
5609 * data/glr.c: Modify treatment of unused parameters to permit use
5610 of g++ (which doesn't allow __attribute__ ((unused)) for parameters).
5611
5612 2005-05-30 Paul Eggert <eggert@cs.ucla.edu>
5613
5614 Fix infringement on user name space reported by Janos Zoltan Szabo.
5615 * data/yacc.c (yyparse): strlen -> yystrlen.
5616
5617 2005-05-30 Akim Demaille <akim@epita.fr>
5618
5619 * data/lalr1.cc (_): New.
5620 Translate the various messages.
5621
5622 2005-05-27 Paul Eggert <eggert@cs.ucla.edu>
5623
5624 Fix infringement on user name space reported by Bruno Haible.
5625 * data/yacc.c (YYSIZE_T): Define first, so that later decls can use it.
5626 Prefer GCC's __SIZE_TYPE__ if available, so that we don't infringe on
5627 the user's name space.
5628 (alloca): Include <stdlib.h> to get it, if it's not built in.
5629 (YYMALLOC, YYFREE): Define only if needed.
5630 (malloc, free): Declare, but only if needed, as this infringes on
5631 the user name space.
5632
5633 2005-05-25 Paul Eggert <eggert@cs.ucla.edu>
5634
5635 Fix BeOS, FreeBSD, MacOS porting problems reported by Bruno Haible.
5636 * lib/bitset.c (bitset_print): Don't assume size_t can be printed
5637 with %d format.
5638 * lib/ebitset.c (min, max): Undef before defining.
5639 * lib/vbitset.c (min, max): Likewise.
5640 * lib/subpipe.c (create_subpipe): Save local variables in case
5641 vfork clobbers them.
5642
5643 2005-05-24 Bruno Haible <bruno@clisp.org>
5644
5645 * tests/synclines.at (AT_SYNCLINES_COMPILE): Add support for the
5646 error message syntax used by gcc-4.0.
5647
5648 2005-05-23 Paul Eggert <eggert@cs.ucla.edu>
5649
5650 * README: Mention m4 1.4.3. Remove obsolete advice about
5651 Sun Forte Developer 6 update 2, VMS, and MS-DOS.
5652
5653 * bootstrap: Remove workaround for problem I encountered with
5654 gettext 0.14.1; it seems to be fixed now.
5655
5656 2005-05-22 Paul Eggert <eggert@cs.ucla.edu>
5657
5658 * NEWS: Version 2.0a.
5659
5660 * src/files.c: Include "stdio-safer.h"; this fixes a typo in
5661 the previous change.
5662
5663 Various maintainer cleanups.
5664 * .cvsignore: Add a.exe, a.out, b.out,, conf[0-9]*, confdefs*,
5665 conftest*, for benefit of CVS commands run at the same time as
5666 "configure". Add build-aux, since "bootstrap" now creates it and
5667 its subfiles.
5668 * Makefile.cfg (move_if_change): Remove.
5669 * Makefile.maint: Remove the update stuff; we now use "bootstrap".
5670 (ftp-gnu, www-gnu, move_if_change, local_updates, update):
5671 (po_repo, do-po-update, po-update, wget_files, get-targets):
5672 (config.guess-url_prefix, config.sub-url_prefix):
5673 (ansi2knr.c-url_prefix, texinfo.tex-url_prefix):
5674 (standards.texi-url_prefix, make-stds.texi-url_prefix, taget, url):
5675 ($(get-targets), cvs-files, automake_repo, wget-update, cvs-update):
5676 Remove.
5677 * configure.ac (AC_CONFIG_AUX_DIR): Change from config to build-aux;
5678 this is now the recommended name.
5679 * config/.cvsignore: Remove config.guess, config.rpath, config.sub,
5680 depcomp, install-sh, mdate-sh, missing, mkinstalldirs, texinfo.tex,
5681 ylwrap. These files now go into build-aux.
5682 * config/move-if-change: Remove.
5683 * config/prev-version.txt: Bump from 1.75 to 2.0.
5684
5685 * bootstrap: Add stdio-safer, unistd-safer modules.
5686 Remove m4/glibc2.m4 (introduced by latest gnulib, but
5687 we don't need it).
5688 * lib/.cvsignore: Add dup-safer.c, fd-safer.c,
5689 fopen-safer.c, stdio-safer.h, unistd-safer.h.
5690 * lib/subpipe.c: Include "unistd-safer.h".
5691 (create_subpipe): Make sure all the newly-created
5692 file descriptors are > 2, so that diagnostics don't
5693 get sent down them (which might cause Bison to hang, in theory).
5694 * m4/.cvsignore: Add stdio-safer.m4, unistd-safer.m4.
5695 * src/files.c (xfopen): Use fopen_safer, not fopen.
5696
5697 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Port
5698 yesterday's yacc.c fix.
5699
5700 2005-05-21 Paul Eggert <eggert@cs.ucla.edu>
5701
5702 * data/glr.c, data/lalr1.cc: Update copyright date.
5703
5704 Fix a destructor bug reported by Wolfgang Spraul in
5705 <http://lists.gnu.org/archive/html/bug-bison/2005-05/msg00042.html>.
5706 * data/yacc.c (yyabortlab): Don't call destructor, and
5707 don't set yychar to EMPTY.
5708 (yyoverflowlab): Don't call destructor.
5709 (yyreturn): Call destructor, if yychar is neither YYEOF nor YYEMPTY.
5710 * tests/calc.at (AT_CHECK_CALC): Expect one fewer output lines,
5711 since we no longer output the message "discarding lookahead token
5712 end of input ()".
5713
5714 2005-05-20 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
5715
5716 * data/glr.c (YY_SYMBOL_PRINT): Don't print newline at end to
5717 fix a small glitch in debugging output.
5718 (yyprocessOneStack, yyrecoverSyntaxError, yyparse): Print newline
5719 after YY_SYMBOL_PRINT where needed.
5720
5721 (struct yyGLRState): Add some comments.
5722 (struct yySemanticOption): Add some comments.
5723 (union yyGLRStackItem): Add comment.
5724
5725 (yymergeOptionSets): Correct this to properly perform the union,
5726 avoiding infinite reported by Michael Rosien.
5727 Update comment.
5728
5729 * tests/glr-regression.at: Add test for GLR merging error reported
5730 by M. Rosien.
5731
5732 2005-05-13 Paul Eggert <eggert@cs.ucla.edu>
5733
5734 * COPYING, ChangeLog, GNUmakefile, HACKING, Makefile.am,
5735 Makefile.cfg, Makefile.maint, NEWS, README, README-alpha,
5736 README-cvs, TODO, bootstrap, configure.ac, data/Makefile.am,
5737 data/README, data/c.m4, data/glr.c, data/lalr1.cc, data/yacc.c,
5738 data/m4sugar/m4sugar.m4, doc/Makefile.am, doc/bison.texinfo,
5739 doc/fdl.texi, doc/gpl.texi, doc/refcard.tex, lib/Makefile.am,
5740 lib/abitset.c, lib/abitset.h, lib/bbitset.h, lib/bitset.c,
5741 lib/bitset.h, lib/bitset_stats.c, lib/bitset_stats.h,
5742 lib/bitsetv-print.c, lib/bitsetv-print.h, lib/bitsetv.c,
5743 lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/get-errno.c,
5744 lib/get-errno.h, lib/lbitset.c, lib/lbitset.h, lib/libiberty.h,
5745 lib/main.c, lib/subpipe.c, lib/subpipe.h, lib/timevar.c,
5746 lib/timevar.def, lib/timevar.h, lib/vbitset.c, lib/vbitset.h,
5747 lib/yyerror.c, m4/cxx.m4, m4/m4.m4, m4/subpipe.m4, m4/timevar.m4,
5748 m4/warning.m4, src/LR0.c, src/LR0.h, src/Makefile.am, src/assoc.c,
5749 src/assoc.h, src/closure.c, src/closure.h, src/complain.c,
5750 src/complain.h, src/conflicts.c, src/conflicts.h, src/derives.c,
5751 src/derives.h, src/files.c, src/files.h, src/getargs.c,
5752 src/getargs.h, src/gram.c, src/gram.h, src/lalr.c, src/lalr.h,
5753 src/location.c, src/location.h, src/main.c, src/muscle_tab.c,
5754 src/muscle_tab.h, src/nullable.c, src/nullable.h, src/output.c,
5755 src/output.h, src/parse-gram.c, src/parse-gram.h,
5756 src/parse-gram.y, src/print.c, src/print.h, src/print_graph.c,
5757 src/print_graph.h, src/reader.c, src/reader.h, src/reduce.c,
5758 src/reduce.h, src/relation.c, src/relation.h, src/scan-gram.l,
5759 src/scan-skel.l, src/state.c, src/state.h, src/symlist.c,
5760 src/symlist.h, src/symtab.c, src/symtab.h, src/system.h,
5761 src/tables.c, src/tables.h, src/uniqstr.c, src/uniqstr.h,
5762 src/vcg.c, src/vcg.h, src/vcg_defaults.h, tests/Makefile.am,
5763 tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at,
5764 tests/cxx-type.at, tests/existing.at, tests/glr-regression.at,
5765 tests/headers.at, tests/input.at, tests/local.at, tests/output.at,
5766 tests/reduce.at, tests/regression.at, tests/sets.at,
5767 tests/synclines.at, tests/testsuite.at, tests/torture.at:
5768 Update FSF postal mail address.
5769
5770 2005-05-11 Paul Eggert <eggert@cs.ucla.edu>
5771
5772 * tests/local.at (AT_COMPILE_CXX): Treat LDFLAGS like AT_COMPILE does.
5773 Problem reported by Ralf Menzel.
5774
5775 2005-05-01 Paul Eggert <eggert@cs.ucla.edu>
5776
5777 * tests/actions.at: Test that stack overflow invokes destructors.
5778 From Marcus Holland-Moritz.
5779 * data/yacc.c (yyerrlab): Move the code that destroys the stack
5780 from here....
5781 (yyreturn): to here. That way, destructors are called properly
5782 even if the stack overflows, or the user calls YYACCEPT or
5783 YYABORT. Stack-overflow problem reported by Marcus Holland-Moritz.
5784 (yyoverflowlab): Destroy the lookahead.
5785
5786 2005-04-24 Paul Eggert <eggert@cs.ucla.edu>
5787
5788 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): Add more-descriptive comment.
5789
5790 2005-04-17 Paul Eggert <eggert@cs.ucla.edu>
5791
5792 * NEWS: Bison-generated C parsers no longer quote literal strings
5793 associated with tokens.
5794 * src/output.c (prepare_symbols): Don't escape strings,
5795 since users don't want to see C escapes.
5796 * tests/calc.at (AT_CHECK_CALC): Adjust to lack of quotes
5797 in diagnostics.
5798 * tests/input.at (Torturing the Scanner): Likewise.
5799 * tests/regression.at (Token definitions, Web2c Actions): Likewise.
5800
5801 2005-04-16 Paul Eggert <eggert@cs.ucla.edu>
5802
5803 * tests/torture.at (AT_INCREASE_DATA_SIZE): Skip the test if
5804 the data size is known to be too small and we can't increase it.
5805 This works around an HP-UX 11.00 glitch reported by Andrew Benham.
5806
5807 2005-04-15 Paul Eggert <eggert@cs.ucla.edu>
5808
5809 * src/parse-gram.y: Include quotearg.h.
5810 (string_as_id): Quote $1 before using it as a key, since the
5811 lexer no longer quotes it for us.
5812 (string_content): Don't strip quotes, since lexer no longer
5813 quotes it for us.
5814 * src/scan-gram.l: Include quotearg.h.
5815 ("\""): Omit quote.
5816 ("'"<SC_ESCAPED_CHARACTER>): Quote symbol before using it as
5817 a key, since the rest of the lexer doesn't quote it.
5818 * src/symtab.c (symbol_get): Don't quote symbol; caller does it now.
5819 * tests/regression.at (Token definitions): Check for backslashes
5820 in token strings.
5821
5822 * data/yacc.c (YYSTACK_ALLOC_MAXIMUM): New macro.
5823 (YYSIZE_T): Define to unsigned long int when using an older compiler.
5824 (yyparse): Revamp code to generate long syntax error message, to
5825 make it easier to translate, and to avoid problems with arithmetic
5826 overflow. Change "virtual memory" to "memory" in diagnostic, since
5827 we don't know whether the memory is virtual.
5828
5829 2005-04-13 Paul Eggert <eggert@cs.ucla.edu>
5830
5831 * NEWS: Bison-generated C parsers now use the _ macro to
5832 translate strings.
5833 * data/yacc.c (_) [!defined _]: New macro.
5834 All English strings wrapped inside this macro.
5835 * doc/bison.texinfo (Bison Parser): Document _.
5836 * po/POTFILES.in: Include src/parse-gram.c, since it now
5837 includes translateable strings that parse-gram.y doesn't.
5838
5839 2005-04-12 Paul Eggert <eggert@cs.ucla.edu>
5840
5841 * src/symtab.c (symbol_make_alias): Call symbol_type_set,
5842 reverting the 2004-10-11 change to this function.
5843 (symbol_check_alias_consistency): Don't call symbol_type_set
5844 if the type name is already correct.
5845 * tests/input.at (Typed symbol aliases): New test, from Tim Van Holder.
5846
5847 2005-03-25 Paul Eggert <eggert@cs.ucla.edu>
5848
5849 * tests/regression.at (Token definitions): Don't use a token named
5850 c, as that generates a "#define c ..." that runs afoul of buggy
5851 stdlib.h that uses the identifier c as a member of struct
5852 drand48_data. Problem reported by Horst Wente.
5853
5854 2005-03-21 Paul Eggert <eggert@cs.ucla.edu>
5855
5856 * bootstrap: Change translation URL from
5857 http://www2.iro.umontreal.ca/~gnutra/po/maint/bison/ to
5858 http://www.iro.umontreal.ca/translation/maint/bison/ to avoid
5859 redirection glitches. Problem reported by twlevo@xs4all.nl.
5860
5861 2005-03-20 Paul Eggert <eggert@cs.ucla.edu>
5862
5863 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Don't put options
5864 after operands; POSIX says this isn't portable for the c99 command.
5865
5866 2005-03-18 Paul Eggert <eggert@cs.ucla.edu>
5867
5868 * tests/glr-regression.at (glr-regr2a.y): Try to dump core
5869 immediately if a data overrun has occurred; this may help us track
5870 down what may be a spurious failure on MacOS.
5871
5872 2005-03-17 Paul Eggert <eggert@cs.ucla.edu>
5873
5874 Respond to problems reported by twlevo@xs4all.nl.
5875
5876 * bootstrap: Use "trap - 0" rather than the unportable "trap 0".
5877
5878 * src/vcg.h: Comment fix.
5879 * src/vcg_defaults.h: Parenthesize macro bodies to make them safe.
5880 (G_CMAX): Change to -1 instead of INT_MAX.
5881
5882 * data/yacc.c (yyparse): Omit spaces before #line.
5883
5884 2005-03-15 Paul Eggert <eggert@cs.ucla.edu>
5885
5886 * src/tables.c (state_number_to_vector_number): Put it inside an
5887 "#if 0", since it's not currently used. Problem reported by
5888 Roland McGrath.
5889
5890 2005-03-06 Paul Eggert <eggert@cs.ucla.edu>
5891
5892 * src/output.c (escaped_output): Renamed from
5893 escaped_file_name_output, since we now use it for symbol tags as
5894 well. All uses changed.
5895 (symbol_destructors_output, symbol_printers_output):
5896 Escape symbol tags too.
5897 Problem reported by Matyas Forstner in
5898 <http://lists.gnu.org/archive/html/bug-bison/2005-03/msg00009.html>.
5899
5900 * src/muscle_tab.c (muscle_code_grow): Don't quote numbers; it's
5901 not needed.
5902 * src/output.c (user_actions_output, token_definitions_output,
5903 symbol_destructors_output, symbol_printers_output): Likewise.
5904 * src/reader.c (prologue_augment): Likewise.
5905 * src/scan-gram.l (handle_action_dollar, handle_action_at): Likewise.
5906
5907 * src/vcg.c (output_edge): Don't quote linestyle arg.
5908 Problem reported by twlevo@xs4all.nl.
5909
5910 2005-02-28 Paul Eggert <eggert@cs.ucla.edu>
5911
5912 * doc/bison.texinfo (Semantic Tokens): Fix scoping problem in
5913 example, reported by Derek M Jones. Also, make the example even
5914 more outrageous, to better illustrate how bad the problem is.
5915
5916 2005-02-24 Paul Eggert <eggert@cs.ucla.edu>
5917
5918 * doc/bison.texinfo (Mfcalc Symtab): Correct the prototype for
5919 putsym. Typo reported by Sebastian Piping.
5920
5921 2005-02-23 Paul Eggert <eggert@cs.ucla.edu>
5922
5923 * doc/bison.texinfo (Language and Grammar): some -> same
5924 (Epilogue): int he -> in the
5925 Typos reported by Sebastian Piping via Justin Pence.
5926
5927 2005-02-07 Paul Eggert <eggert@cs.ucla.edu>
5928
5929 * tests/glr-regression.at (Improper handling of embedded actions
5930 and dollar(-N) in GLR parsers): Renamed from "Improper handling of
5931 embedded actions and $-N in GLR parsers", work around an Autoconf bug
5932 with dollar signs in test names.
5933 * tests/input.at (Invalid dollar-n): Renamed from "Invalid \$n",
5934 for a similar reason.
5935
5936 2005-01-28 Paul Eggert <eggert@cs.ucla.edu>
5937
5938 * src/vcg.c (output_graph): G_VIEW -> normal_view in case someone
5939 wants to redefine G_VIEW.
5940
5941 2005-01-27 Paul Eggert <eggert@cs.ucla.edu>
5942
5943 * src/vcg.c (get_view_str): Remove case for normal_view.
5944 Problem reported by twlevo@xs4all.nl.
5945
5946 2005-01-24 Paul Eggert <eggert@cs.ucla.edu>
5947
5948 * configure.ac (O0CFLAGS, O0CXXFLAGS): Fix quoting bug.
5949 Problem reported by twlevo@xs4all.nl.
5950
5951 * doc/bison.texinfo: Change @dircategory from "GNU programming
5952 tools" to "Software development". Requested by Richard Stallman
5953 via Karl Berry.
5954
5955 2005-01-23 Paul Eggert <eggert@cs.ucla.edu>
5956
5957 * tests/c++.at (AT_CHECK_DOXYGEN): Don't use options after operands.
5958 Problem reported by twlevo@xs4all.nl.
5959
5960 2005-01-21 Paul Eggert <eggert@cs.ucla.edu>
5961
5962 * data/yacc.c (YYCOPY, yystpcpy, yyparse): Remove "register"
5963 keyword; it's not needed with modern compilers, and it doesn't
5964 affect correctness with older compilers. Suggested by
5965 twlevo@xs4all.nl.
5966
5967 2005-01-17 Paul Eggert <eggert@cs.ucla.edu>
5968
5969 * data/glr.c (yyuserAction): Add "default: break;" case to pacify
5970 gcc -Wswitch-default.
5971 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
5972 * data/yacc.c (yyparse): Likewise.
5973
5974 2005-01-12 Paul Eggert <eggert@cs.ucla.edu>
5975
5976 * src/system.h (OUTPUT_EXT, TAB_EXT): Define only if not defined
5977 already. Let config.h define any nonstandard values.
5978
5979 2005-01-10 Paul Eggert <eggert@cs.ucla.edu>
5980
5981 * tests/calc.at (_AT_DATA_CALC_Y): Use alarm (100), not alarm (10),
5982 for the benefit of slower hosts. Problem reported by
5983 Nelson H. F. Beebe.
5984
5985 2005-01-07 Paul Eggert <eggert@cs.ucla.edu>
5986
5987 * data/yacc.c (yyparse): Pacify non-GCC compilers about yyerrorlab
5988 being defined and not used.
5989 * data/lalr1.cc (yyparse): Likewise.
5990 Use "if (false)" rather than "if (0)".
5991
5992 2005-01-05 Paul Eggert <eggert@cs.ucla.edu>
5993
5994 * TODO: Mention that we should allow NUL bytes in tokens.
5995
5996 2005-01-02 Paul Eggert <eggert@cs.ucla.edu>
5997
5998 * src/scan-skel.l (<<EOF>>): Don't close standard output.
5999 Problem reported by Hans Aberg.
6000
6001 2005-01-01 Paul Eggert <eggert@cs.ucla.edu>
6002
6003 * src/getargs.c (version): Happy new year; update overall
6004 program copyright date from 2004 to 2005.
6005
6006 * src/scan-skel.l ("@output ".*\n): Don't close standard output.
6007 Problem reported by Hans Aberg.
6008 * tests/output.at (AT_CHECK_OUTPUT): New arg SHELLIO.
6009 (Output file names.): Add a test for the case when standard output
6010 is closed.
6011
6012 2004-12-26 Paul Eggert <eggert@cs.ucla.edu>
6013
6014 * doc/bison.texinfo (@copying): Update FDL version number to 1.2,
6015 to fix an oversight in the Bison 2.0 manual.
6016
6017 2004-12-25 Paul Eggert <eggert@cs.ucla.edu>
6018
6019 * NEWS: Version 2.0. Reformat the existing news items since
6020 1.875, so that related items are grouped together.
6021 * configure.ac (AC_INIT): Bump version to 2.0.
6022 * src/parse-gram.c, src/parse-gram.h: Regenerate with 2.0.
6023
6024 * tests/torture.at (Exploding the Stack Size with Alloca): Set
6025 YYSTACK_USE_ALLOCA to 1 if __GNUC__ or alloca are defined;
6026 otherwise, we're not testing alloca. Unfortunately there's no
6027 simple way to consult HAVE_ALLOCA here.
6028
6029 * data/lalr1.cc (yydestruct_): Pacify unused variable warning
6030 for yymsg, too.
6031
6032 * src/LR0.c (new_itemsets): Use memset rather than zeroing by
6033 hand. This avoids a warning about comparing int to size_t when
6034 GCC warnings are enabled.
6035
6036 2004-12-22 Paul Eggert <eggert@cs.ucla.edu>
6037
6038 * NEWS: Bison-generated parsers no longer default to using the
6039 alloca function (when available) to extend the parser stack, due
6040 to widespread problems in unchecked stack-overflow detection.
6041 * data/glr.c (YYMAXDEPTH): Remove undef when zero. It's the user's
6042 responsibility to set it to a positive value. This lets the user
6043 specify a value that is not a preprocessor constant.
6044 * data/yacc.c (YYMAXDEPTH): Likewise.
6045 (YYSTACK_ALLOC): Define only if YYSTACK_USE_ALLOCA is nonzero.
6046 * doc/bison.texinfo (Stack Overflow): YYMAXDEPTH no longer needs
6047 to be a compile-time constant. However, explain the constraints on it.
6048 Also, explain the constraints on YYINITDEPTH.
6049 (Table of Symbols): Explain that alloca is no longer the default.
6050 Explain the user's responsibility if they define YYSTACK_USE_ALLOCA
6051 to 1.
6052
6053 * doc/bison.texinfo (Location Default Action): Mention that n must
6054 be zero when k is zero. Suggested by Frank Heckenbach.
6055
6056 2004-12-22 Akim Demaille <akim@epita.fr>
6057
6058 * data/lalr1.cc (parser::token_number_type, parser::rhs_number_type)
6059 (parser::state_type, parser::semantic_type, parser::location_type):
6060 Private, not public.
6061 (parser::parse): Return ints, not bool.
6062 Returning a bool introduces a problem: 0 corresponds to false, and
6063 it seems weird to return false on success. Returning true changes
6064 the conventions for yyparse.
6065 Alternatively we could return void and send an exception.
6066 There is no clear consensus (yet?).
6067 (state_stack, semantic_stack, location_stack): Rename as...
6068 (state_stack_type, semantic_stack_type, location_stack_type): these.
6069 Private, not public.
6070 * tests/c++.at: New.
6071 * tests/testsuite.at, tests/Makefile.am: Adjust.
6072
6073 2004-12-21 Akim Demaille <akim@epita.fr>
6074
6075 * data/lalr1.cc (parser::parse): Return a bool instead of an int.
6076
6077 2004-12-21 Akim Demaille <akim@epita.fr>
6078
6079 Don't impose std::string for filenames.
6080
6081 * data/lalr1.cc (b4_filename_type): New.
6082 (position::filename): Use it.
6083 (parser.hh): Move the inclusion of stack.hh and location.hh below
6084 the user code, so that needed headers for the filename type can be
6085 included first.
6086 Forward declare them before the user code.
6087 * tests/Makefile.am (check-local, installcheck-local): Pass
6088 TESTSUITEFLAGS to the TESTSUITE.
6089
6090 2004-12-20 Akim Demaille <akim@epita.fr>
6091
6092 Use more STL like names: my_class instead of MyClass.
6093
6094 * data/lalr1.cc (LocationStack, LocationType, RhsNumberType)
6095 (SemanticStack, SemanticType, StateStack, StateType)
6096 (TokenNumberType, Stack, Slice, Traits, Parser::location)
6097 (Parser::value): Rename as...
6098 (location_stack, location_type, rhs_number_type, semantic_stack)
6099 (semantic_type, state_stack, state_type, token_number_type, stack)
6100 (slice, traits, parser::yylloc, parser::yylval): these.
6101
6102 * tests/calc.at, tests/regression.at, tests/actions.at: Adjust.
6103
6104 2004-12-19 Paul Eggert <eggert@cs.ucla.edu>
6105
6106 * data/glr.c (YYLLOC_DEFAULT): Use GNU spacing conventions.
6107 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
6108
6109 2004-12-17 Paul Eggert <eggert@cs.ucla.edu>
6110
6111 Remove uses of 'short int' and 'unsigned short int'. This raises
6112 some arbitrary limits. It uses more memory but nowadays that's
6113 not much of an issue.
6114
6115 This change does not affect the generated parsers; that's a different
6116 task, as some users will want to conserve memory there.
6117
6118 Ideally we should use size_t to represent all object counts, and
6119 something like ptrdiff_t to represent signed differences of object
6120 counts; but that will require more code-cleanup than I have the
6121 time to do right now.
6122
6123 * src/LR0.c (allocate_itemsets, new_itemsets, save_reductions):
6124 Use size_t, not int or short int, to count objects.
6125 * src/closure.c (nritemset, closure): Likewise.
6126 * src/closure.h (nritemset, closure): Likewise.
6127 * src/nullable.c (nullable_compute): Likewise.
6128 * src/print.c (print_core): Likewise.
6129 * src/print_graph.c (print_core): Likewise.
6130 * src/state.c (state_compare, state_hash): Likewise.
6131 * src/state.h (struct state): Likewise.
6132 * src/tables.c (default_goto, goto_actions): Likewise.
6133
6134 * src/gram.h (rule_number, rule): Use int, not short int.
6135 * src/output.c (prepare_rules): Likewise.
6136 * src/state.h (state_number, STATE_NUMBER_MAXIMUM, transitions,
6137 errs, reductions): Likewise.
6138 * src/symtab.h (symbol_number, SYMBOL_NUMBER_MAXIMUM, struct symbol):
6139 Likewise.
6140 * src/tables.c (vector_number, tally, action_number,
6141 ACTION_NUMBER_MINIMUM): Likewise.
6142 * src/output.c (muscle_insert_short_int_table): Remove.
6143
6144 2004-12-17 Akim Demaille <akim@epita.fr>
6145
6146 * data/lalr1.cc: Extensive Doxygenation.
6147 (error_): Rename as...
6148 (error): this, since it is visible to the user.
6149 Adjust callers.
6150 (Parser::message): Now an automatic variable from...
6151 (Parser::yyreport_syntax_error_): here.
6152 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust to
6153 Parser::error.
6154 * tests/input.at: Escape $.
6155
6156 2004-12-16 Paul Eggert <eggert@cs.ucla.edu>
6157
6158 * data/glr.c (b4_lhs_value, b4_rhs_value, b4_rhs-location):
6159 Parenthesize rhs to avoid obscure problems with mistakes like
6160 "foo$$bar = foo$1bar;". Problem reported by twlevo at xs4all.
6161 * data/lalr1.cc (b4_lhs_value, b4_rhs_value, b4_lhs_location,
6162 b4_rhs_location): Likewise.
6163 * data/yacc.c (b4_lhs_value, b4_rhs_value, b4_lhs_location,
6164 b4_rhs_location): Likewise.
6165
6166 2004-12-16 Akim Demaille <akim@epita.fr>
6167
6168 * data/lalr1.cc (yyreport_syntax_error_): Catch up with glr.c and
6169 yacc.c: be sure to stay within yycheck_.
6170 * tests/actions.at: Re-enable C++ tests.
6171
6172 2004-12-16 Akim Demaille <akim@epita.fr>
6173
6174 * src/print_graph.c (print_graph): Remove layoutalgorithm uses for
6175 real.
6176
6177 2004-12-16 Akim Demaille <akim@epita.fr>
6178
6179 Use #define to handle the %name-prefix.
6180
6181 * data/glr.c, data/yacc.c: Comment changes.
6182 * data/lalr1.cc (yylex): Use #define to select the name of yylex,
6183 so that one can refer to yylex in the parser file, and have it
6184 renamed, as is the case with other skeletons.
6185
6186 2004-12-16 Akim Demaille <akim@epita.fr>
6187
6188 Move lalr1.cc internals into yy*.
6189
6190 * data/lalr1.cc (semantic_stack_, location_stack_, state_stack_)
6191 (semantic_stack_, location_stack_, pact_, pact_ninf_, defact_)
6192 (pgoto_, defgoto_, table_, table_ninf_, check_, stos_, r1_, r2_)
6193 (name_, rhs_, prhs_, rline_, token_number_, eof_, last_, nnts_)
6194 (empty_, final_, terror_, errcode_, ntokens_)
6195 (user_token_number_max_, undef_token_, n_, len_, state_, nerrs_)
6196 (looka_, ilooka_, error_range_, nerrs_):
6197 Rename as...
6198 (yysemantic_stack_, yylocation_stack_, yystate_stack_)
6199 (yysemantic_stack_, yylocation_stack_, yypact_, yypact_ninf_)
6200 (yydefact_, yypgoto_, yydefgoto_, yytable_, yytable_ninf_)
6201 (yycheck_, yystos_, yyr1_, yyr2_, yyname_, yyrhs_, yyprhs_)
6202 (yyrline_, yytoken_number_, yyeof_, yylast_, yynnts_, yyempty_)
6203 (yyfinal_, yyterror_, yyerrcode_, yyntokens_)
6204 (yyuser_token_number_max_, yyundef_token_, yyn_, yylen_, yystate_)
6205 (yynerrs_, yylooka_, yyilooka_, yyerror_range_, yynerrs_):
6206 these.
6207
6208 2004-12-15 Paul Eggert <eggert@cs.ucla.edu>
6209
6210 Fix some problems reported by twlevo at xs4all.
6211 * src/symtab.c (symbol_new): Report an error if the input grammar
6212 contains too many symbols. This is better than calling abort() later.
6213 * src/vcg.h (enum layoutalgorithm): Remove. All uses removed.
6214 (struct node, struct graph):
6215 Rename member expand to stretch. All uses changed.
6216 (struct graph): Remove member layoutalgorithm. All uses removed.
6217 * src/vcg.c (get_layoutalgorithm_str): Remove. All uses removed.
6218 * src/vcg_defaults.h (G_STRETCH): Renamed from G_EXPAND.
6219 All uses changed.
6220 (N_STRETCH): Rename from N_EXPAND. All uses changed.
6221
6222 2004-12-15 Akim Demaille <akim@epita.fr>
6223
6224 * data/lalr1.cc: Normalize /** \brief ... */ to ///.
6225 Add more Doxygen comments.
6226 (symprint_, stack_print_, reduce_print_, destruct_, pop)
6227 (report_syntax_error_, translate_): Rename as...
6228 (yysymprint_, yystack_print_, yyreduce_print_, yydestruct_)
6229 (yypop_, yyreport_syntax_error_, yytranslate_): this.
6230
6231 2004-12-15 Akim Demaille <akim@epita.fr>
6232
6233 * data/lalr1.cc (lex_): Rename as...
6234 (yylex_): this.
6235 Move the trace here.
6236 Take the %name-prefix into account.
6237 Reported by Alexandre Duret-Lutz.
6238
6239 2004-12-15 Akim Demaille <akim@epita.fr>
6240
6241 Simplify the C++ parser constructor.
6242
6243 * data/lalr1.cc (debug_): Rename as...
6244 (yydebug_): so that the parser's internals are always in the yy*
6245 pseudo namespace.
6246 Adjust uses.
6247 (b4_parse_param_decl): Remove the leading comma as it is now only
6248 called as unique argument list.
6249 (Parser::Parser): Remove the constructor accepting a location and
6250 an initial debugging level.
6251 Remove from the other ctor the argument for the debugging level.
6252 (debug_level_type, debug_level, set_debug_level): New.
6253
6254 * tests/actions.at, tests/calc.at, tests/regression.at: Adjust
6255 constructor calls.
6256
6257 2004-12-15 Akim Demaille <akim@epita.fr>
6258
6259 Remove b4_root related material: failure experiment
6260 (which goal was to allow to derive from a class).
6261
6262 * data/lalr1.cc (b4_root, b4_param, b4_constructor): Remove
6263 definitions and uses.
6264
6265 2004-12-14 Paul Eggert <eggert@cs.ucla.edu>
6266
6267 * data/glr.c (struct yyGLRStack): yyerror_range now has 3 items,
6268 not 2, since it's not portable to subtract 1 from the start of an
6269 array. The new item 0 is never set or used. All uses changed.
6270
6271 (yyrecoverSyntaxError): Use YYLLOC_DEFAULT instead of assuming
6272 the default definition of YYLLOC_DEFAULT. Problem reported
6273 by Frank Heckenbach.
6274
6275 2004-12-12 Paul Eggert <eggert@cs.ucla.edu>
6276
6277 * data/glr.c (YYRHSLOC): Don't have two definitions, one for
6278 the normal case and one for the error case. Just use the
6279 first one uniformly. Problem reported by Frank Heckenbach.
6280 (YYLLOC_DEFAULT): Use the conventions of yacc.c, so we can
6281 use exactly the same macro in both places.
6282 (yyerror_range): Now of type yyGLRStackItem, not YYLTYPE,
6283 so that the normal-case YYRHSLOC works for the error case too.
6284 All uses changed.
6285 * data/yacc.c (YYRHSLOC): New macro, taken from glr.c.
6286 (YYLLOC_DEFAULT): Use the same macro as glr.c.
6287 * doc/bison.texinfo (Location Default Action): Don't claim that
6288 we have an array of locations. Use the same macro for both glr
6289 and lalr parsers. Mention YYRHSLOC. Mention what happens when
6290 the index is 0.
6291
6292 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
6293
6294 * HACKING: Update email addresses to send announcements to.
6295
6296 * configure.ac (AC_INIT): Bump version to 1.875f.
6297
6298 2004-12-10 Paul Eggert <eggert@cs.ucla.edu>
6299
6300 * NEWS: Version 1.875e.
6301 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875e.
6302
6303 * src/scan-skel.l: Include "complain.h", for "fatal".
6304
6305 * src/relation.h (relation_print, relation_digraph):
6306 Relation sizes are of type relation_node, not size_t (this is
6307 merely a doc fix, since the two types are equivalent).
6308 (relation_transpose): Relation sizes are of type relation_node,
6309 not int.
6310 * src/relation.c: Likewise.
6311 (top, infinity): Now of type relation_node, not int.
6312 (traverse, relation_transpose): Use relation_node, not int.
6313
6314 * data/glr.c (yyuserAction, yyrecoverSyntaxError): Mark args
6315 with ATTRIBUTE_UNUSED if they're not used, to avoid GCC warning.
6316 (yyparse): Remove unused local introduced in 2004-10-25 patch.
6317
6318 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): New arg
6319 specifying whether the test should be skipped. Use it tp
6320 specify that the [%defines %skeleton "lalr1.cc"] tests currently
6321 fail on some hosts, and should be skipped.
6322
6323 2004-12-08 Paul Eggert <eggert@cs.ucla.edu>
6324
6325 * src/system.h (CALLOC, MALLOC, REALLOC): Remove. All callers
6326 changed to use xcalloc, xnmalloc, xnrealloc, respectively,
6327 unless otherwise specified below.
6328
6329 * src/LR0.c (allocate_itemsets): Use xnmalloc, not xcalloc,
6330 to allocate kernel_base, kernel_items, kernel_size, since
6331 they needn't be initialized to 0.
6332 (allocate_storgae): Likewise, for shiftset, redset, shift_symbol.
6333 * src/closure.c (new_closure): Likewise, for itemset.
6334 * src/derives.c (derives_compute): Likewise, for delts, derives, q.
6335 * src/lalr.c (set_goto_map): Likewise, for temp_map.
6336 (initialize_F): Likewise, for reads, edge, reads[i], includes[i].
6337 (build_relations): Likewise for edge, states1, includes.
6338 * src/nullable.c (nullable_compute): Likewise, for squeue, relts.
6339 * src/reader.c (packgram): Likewise, for ritem, rules.
6340 * src/reduce.c (nonterminals_reduce): Likewise for nontermmap.
6341 * src/relation.c (relation_digraph): Likewise for VERTICES.
6342 (relation_transpose): Likewise for new_R, end_R.
6343 * src/symtab.c (symbols_token_translations_init): Likewise for
6344 token_translations.
6345 * src/tables.c (save_row): Likewise for froms, tos, conflict_tos.
6346 (token_actions): Likewise for yydefact, actrow, conflrow,
6347 conflict_list.
6348 (save_column): Likewise for froms[symno], tos[symno].
6349 (goto_actions): Likewise for state_count.
6350 (pack_table): Likewise for base, pos, check.
6351 (tables_generate): Likewise for width.
6352
6353 * src/LR0.c (set_states): Don't reuse kernel_size and kernel_base
6354 for initial core. Just have a separate core, so we needn't worry
6355 about whether kernel_size and kernel_base are initialized.
6356
6357 * src/LR0.c (shift_symbol, redset, shiftset, kernel_base,
6358 kernel_size, kernel_items): Remove unnecessary initialization.
6359 * src/conflicts.c (conflicts): Likewise.
6360 * src/derives.c (derives): Likewise.
6361 * src/muscle_tablc (muscle_insert): Likewise.
6362 * src/relation.c (relation_digraph): Likewise.
6363 * src/tables.c (froms, tos, conflict_tos, tally, width, actrow, order,
6364 conflrow, conflict_table, conflict_list, table, check):
6365 Likewise.
6366
6367 * src/closure.c (new_closure): Arg is of type unsigned int, not int.
6368 This is because all callers pass unsigned int.
6369 * src/closure.h (new_closure): Likewise.
6370
6371 * src/lalr.c (initialize_F): Initialize reads[i] in all cases.
6372 (build_relations): Initialize includes[i] in all cases.
6373 * src/reader.c (packgram): Always initialize rules[ruleno].prec
6374 and rules[ruleno].precsym. Initialize members in order.
6375 * src/relation.c (relation_transpose): Always initialize new_R[i]
6376 and end_R[i].
6377 * src/table.c (conflict_row): Initialize 0 at end of conflict_list.
6378
6379 * src/output.c (prepare_actions): Pass 0 instead of conflict_list[0];
6380 conflict_list[0] was always 0, but now it isn't initialized.
6381
6382 * src/table.c (table_grow): When conflict_table grew, the grown
6383 area wasn't cleared. Fix this.
6384
6385 * lib/.cvsignore: Add strdup.c, strdup.h.
6386 * m4/.cvsignore: Add strdup.m4.
6387
6388 2004-12-07 Paul Eggert <eggert@cs.ucla.edu>
6389
6390 * src/lalr.h (GOTO_NUMBER_MAXIMUM): New macro.
6391 * src/lalr.c (set_goto_map): Don't allow ngotos to equal
6392 GOTO_NUMBER_MAXIMUM, since we occasionally compute
6393 ngotos + 1 without checking for overflow.
6394 (build_relations): Use END_NODE, not -1, to denote end of edges.
6395 * src/lalr.c (set_goto_map, map_goto, initialize_F, add_loopback_edge,
6396 build_relations): Use goto_number, not int, for goto numbers.
6397 * src/tables.c (save_column, default_goto): Likewise.
6398
6399 2004-11-23 Akim Demaille <akim@epita.fr>
6400
6401 * data/lalr1.cc (YYSTYPE): Define it as is done for C, instead
6402 of #defining from yystype.
6403 Don't typedef yystype, C++ does not need it.
6404 This lets it possible to forward declare it as union.
6405
6406 2004-11-23 Paul Eggert <eggert@cs.ucla.edu>
6407
6408 * bootstrap (gnulib_modules): Add extensions.
6409 Problem reported by Jim Meyering.
6410
6411 2004-11-22 Paul Eggert <eggert@cs.ucla.edu>
6412
6413 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c,
6414 src/lalr.c, src/nullable.c, src/relation.c, src/scan-skel.l,
6415 src/system.h, src/tables.c: XFREE -> free, to accommodate
6416 recent change to gnulib xalloc.h.
6417 Problem reported by Jim Meyering.
6418
6419 2004-11-17 Akim Demaille <akim@epita.fr>
6420
6421 * data/lalr1.cc (symprint_): Use cdebug_ to avoid warnings.
6422
6423 2004-11-17 Akim Demaille <akim@epita.fr>,
6424 Alexandre Duret-Lutz <adl@gnu.org>
6425
6426 * data/lalr1.cc (Parser::yycdebug_): New, a pointer, to allow
6427 changes.
6428 (YYCDEBUG): Adjust.
6429 Use it instead of cdebug_.
6430 (Parser::debug_stream, Parser::set_debug_stream): New.
6431 (Parser::symprint_): Define cdebug_ for temporary backward
6432 compatibility.
6433 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use
6434 debug_stream ().
6435
6436 2004-11-17 Akim Demaille <akim@epita.fr>
6437
6438 * data/lalr1.cc (Parser:print_): Remove, use %printer instead.
6439 * tests/regression.at (_AT_DATA_DANCER_Y): Adjust.
6440 * tests/calc.at (_AT_DATA_CALC_Y): Ditto.
6441 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
6442
6443 2004-10-27 Paul Eggert <eggert@cs.ucla.edu>
6444
6445 * data/glr.c (yyloc_default): Remove; not used.
6446 Problem reported by Frank Heckenbach.
6447
6448 2004-10-25 Akim Demaille <akim@epita.fr>
6449
6450 * data/glr.c (YYRHSLOC): Move its definition next to its uses.
6451 Introduce another definition to address simple location arrays.
6452 (yyGLRStack): New member: yyerror_range.
6453 (yyrecoverSyntaxError, yyparse): Update it.
6454 (yyrecoverSyntaxError): Use it when shifting the error token to
6455 have an accurate range, equivalent to the one computed by both
6456 yacc.c and lalr1.cc.
6457 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Change its yylex so
6458 that column numbers start at column 0, as per GNU Coding
6459 Standards, the others tests, and the doc.
6460 (_AT_RESOLVED_GLR_OUTPUT_WITH_LOC, _AT_AMBIG_GLR_OUTPUT_WITH_LOC):
6461 Adjust to the above change (first column is 0).
6462 And adjust the location of the "<error>", now covering the whole
6463 line.
6464
6465 2004-10-22 Akim Demaille <akim@epita.fr>
6466 and Paul Eggert <eggert@cs.ucla.edu>
6467
6468 Remove some arbitrary limits on goto numbers and relations.
6469 * src/lalr.c (goto_map, ngotos, from_state, to_state): Omit
6470 initial values, since they're never used.
6471 (set_goto_map): ngotos is now unsigned, so test for overflow
6472 by seeing whether it wraps around to zero.
6473 * src/lalr.h (goto_number): Now size_t, not short int.
6474 (GOTO_NUMBER_MAXIMUM): Remove.
6475 * src/relation.c (relation_print, traverse, relation_transpose):
6476 Check for END_NODE rather than looking at sign.
6477 * src/relation.h (END_NODE): New macro.
6478 (relation_node): Now size_t, not short int.
6479
6480 2004-10-22 Paul Eggert <eggert@cs.ucla.edu>
6481
6482 * doc/bison.texinfo (Language and Grammar): In example, "int" is a
6483 keyword, not an identifier. Problem reported by Baron Schwartz in
6484 <http://lists.gnu.org/archive/html/bug-bison/2004-10/msg00017.html>.
6485
6486 2004-10-11 Akim Demaille <akim@epita.fr>
6487
6488 * src/symtab.c (symbol_check_alias_consistency): Also check
6489 type names, destructors, and printers.
6490 Reported by Alexandre Duret-Lutz.
6491 Recode the handling of associativity and precedence in terms
6492 of symbol_precedence_set.
6493 Accept no redeclaration at all, not even equal to the previous
6494 value.
6495 (redeclaration): New.
6496 Use it to factor redeclaration complaints.
6497 (symbol_make_alias): Don't set the type of the alias, let
6498 symbol_check_alias_consistency do it as for other features.
6499 * src/symtab.h (symbol): Add new member prec_location, and
6500 type_location.
6501 * src/symtab.c (symbol_precedence_set, symbol_type_set): Set them.
6502 * tests/input.at (Incompatible Aliases): New.
6503
6504 2004-10-09 Paul Eggert <eggert@cs.ucla.edu>
6505
6506 .cvsignore fixes to accommodate gnulib changes,
6507 and the practice of naming build directories "_build".
6508 * .cvsignore: Add "_*". Sort.
6509 * lib/.cvsignore: Add getopt_.h, xalloc-die.c.
6510 * m4/.cvsignore: Add "*_gl.m4".
6511
6512 2004-10-06 Akim Demaille <akim@epita.fr>
6513
6514 * src/parse-gram.y (add_param): Fix the truncation of trailing
6515 spaces.
6516
6517 2004-10-05 Akim Demaille <akim@epita.fr>
6518
6519 In Bison 1.875's yacc.c, YYLLOC_DEFAULT was called regardless
6520 whether the reducion was empty or not. This leaves room to
6521 improve the use of YYLLOC_DEFAULT in such a case.
6522 lalr1.cc is still experimental, so changing this is acceptable.
6523 And finally, there are probably not many users who changed the
6524 handling of locations in GLR, so changing is admissible too.
6525
6526 * data/glr.c, data/lalr1.cc, data/yacc.c (YYLLOC_DEFAULT): On an
6527 empty reduction, set @$ to an empty location ending the previously
6528 stacked symbol.
6529 Adjust uses to make sure the code is triggered on empty
6530 reductions.
6531 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust the
6532 expected output: empty reductions have empty locations.
6533
6534 2004-09-29 Akim Demaille <akim@epita.fr>
6535
6536 * data/lalr1.cc: Move towards a more standard C++ coding style
6537 for templates: Class < T > -> Class<T>.
6538
6539 2004-09-29 Akim Demaille <akim@epita.fr>
6540
6541 * data/lalr1.cc: Reinstall the former ctor, for sake of
6542 compatibility, but warn it will be removed.
6543 Move towards a more standard C++ coding style (i.e., type *var ->
6544 type* var).
6545
6546 2004-09-27 Paul Eggert <eggert@cs.ucla.edu>
6547
6548 * src/parse-gram.y (add_param): Rewrite to avoid strchr,
6549 since it's less likely to work if NULs are involved in the future.
6550
6551 2004-09-27 Akim Demaille <akim@epita.fr>
6552
6553 * data/yacc.c (YY_LOCATION_PRINT): Fix its default declaration.
6554
6555 2004-09-27 Akim Demaille <akim@epita.fr>
6556
6557 * data/lalr1.cc (b4_parse_param_decl_1): New.
6558 (b4_parse_param_decl): Use it to have different names between attribute
6559 and argument names.
6560 (b4_cc_constructor_call): Likewise.
6561
6562 2004-09-24 Akim Demaille <akim@epita.fr>
6563
6564 * src/parse-gram.y (add_param): Strip the leading and trailing
6565 blanks from a formal argument declaration.
6566 (YY_LOCATION_PRINT): New.
6567
6568 2004-09-24 Akim Demaille <akim@epita.fr>
6569
6570 * data/c.m4 (b4_yysymprint_generate): Move the YYINPUT invocation
6571 after the location.
6572
6573 2004-09-24 Akim Demaille <akim@epita.fr>
6574
6575 * doc/bison.texinfo (Table of Symbols): Sort.
6576
6577 2004-09-21 Akim Demaille <akim@epita.fr>
6578
6579 * data/yacc.c, data/glr.c (b4_at_dollar, b4_dollar_dollar): Remove
6580 the useless parentheses.
6581 Suggested by Paul Eggert.
6582
6583 2004-09-20 Akim Demaille <akim@epita.fr>
6584
6585 Let the initial-action act on the look-ahead, and use it for the
6586 "initial push" (corresponding to an hypothetical beginning-of-file).
6587 And let lalr1.cc honor %initial-action.
6588
6589 * doc/bison.texinfo (Initial Action Decl): Clarify, and add an
6590 example.
6591 * data/lalr1.cc (Parser::initlocation_): Remove, bad experiment.
6592 (Parser::Parser): Remove the ctor that used to initialize it.
6593 (Parser::parse): Like in the other skeletons, issue the "starting
6594 parse" message before any action.
6595 Honor %initial-action.
6596 Initialize the stacks with the lookahead.
6597 * data/yacc.c: Let $$ and @$ in %initial-action designate the
6598 look-ahead.
6599 Push them in the stacks.
6600 * tests/actions.at, tests/calc.at: Adjust the C++ ctor invocations.
6601
6602 2004-09-20 Akim Demaille <akim@epita.fr>
6603
6604 * doc/bison.texinfo (Initial Action Decl): New.
6605
6606 2004-09-20 Akim Demaille <akim@epita.fr>
6607
6608 * data/yacc.c (YY_LOCATION_PRINT): Use YYLTYPE_IS_TRIVIAL as a
6609 clearer criterion to define it.
6610 (parse): Initialize the initial location when YYLTYPE_IS_TRIVIAL.
6611 When reducing on an empty RHS, use the latest stacked location as
6612 location.
6613 yylloc is not always available.
6614 * data/glr.c: Likewise.
6615 Also, honor initial-actions.
6616
6617 2004-09-20 Akim Demaille <akim@epita.fr>
6618
6619 * data/yacc.c (YY_LOCATION_PRINT): New.
6620 Define when we know YYLTYPE's structure, i.e., when the default
6621 YYLLOC_DEFAULT is used.
6622 * data/c.m4 (b4_yysymprint_generate): Use it.
6623 * data/lalr1.cc (YYLLOC_DEFAULT): Stop relying on the initial
6624 value of the result.
6625 (error_start_): Replace with...
6626 (error_range_): this location array.
6627 This allows to replace code relying on the implementation of
6628 locations by portable code.
6629 * data/yacc.c (yylerrsp): Replace with...
6630 (yyerror_range): this.
6631 Every time a token is popped, update yyerror_range[0], to have an
6632 accurate location for the error token.
6633 * data/glr.c (YY_LOCATION_PRINT): New.
6634 (yyprocessOneStack): Fix an invocation of YY_SYMBOL_PRINT:
6635 deference a pointer.
6636 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): No longer
6637 report the location in %printers.
6638
6639 * src/scan-skel.l: Instead of abort, report error messages to ease
6640 understanding skeleton scanning failures.
6641
6642 2004-09-16 Akim Demaille <akim@epita.fr>
6643
6644 * data/lalr1.cc (Stack::Iterator, Stack::ConstIterator): Rename as...
6645 (iterator, const_iterator): these, to be more in the C++ spirit.
6646 Also, return reverse iterators so that when displaying the stack
6647 we display its bottom first.
6648 (Parser::stack_print_, Parser::reduce_print_): Match the messages
6649 from yacc.c.
6650 We should probably use vector here though.
6651
6652 2004-09-16 Akim Demaille <akim@epita.fr>
6653
6654 Have more complete shift traces.
6655
6656 * data/yacc.c, data/lalr1.c, data/glr.c: Use YY_SYMBOL_PRINT
6657 to report Shifts instead of ad hoc YYDPRINTF invocations,
6658 including for the error token.
6659 * data/lalr1.cc (symprint_): Output the location.
6660 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): In C++, don't
6661 output the location within the %printer.
6662 Activate GLR tests, at least to make sure they compile properly.
6663 They still don't pass though.
6664 * tests/calc.at: Adjust expect verbose output, since now "Entering
6665 state..." is on a different line than the "Shifting" message.
6666
6667 2004-09-08 Akim Demaille <akim@epita.fr>
6668
6669 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Move the
6670 Bison directive from the Bison file to the invocation of this
6671 macro, so that these directives are passed to
6672 AT_BISON_OPTION_PUSHDEFS to get correct help macros.
6673 Use these helping macros (e.g., AT_LOC, AT_VAL and so forth).
6674 Move the AT_SETUP/AT_CLEANUP outside, to report as test title
6675 the extra Bison directives instead of the whole series.
6676 Change the grammar so that there are recoverable errors, and
6677 unrecoverable errors. Now we can have the parser give up before
6678 consuming the whole input. As a result we now can observe that
6679 the lookahead is freed when needed.
6680 Change the parser source to parse argv[1] instead of a hard coded
6681 string.
6682 Simplify yylex, and give a value and location to EOF.
6683 Simplify some invocations of AT_CHECK_PRINTER_AND_DESTRUCTOR that
6684 passed directives already coded in the file.
6685 Add some tests to check the location of "error".
6686 For some tests, the C++ parser is correct, and not yacc.c.
6687 For other tests, they provide different, but unsatisfying, values,
6688 so keep the C++ value so that at least one parser is "correct"
6689 according to the test suite.
6690 (Actions after errors): Remove, this is subsumed by the
6691 AT_CHECK_PRINTER_AND_DESTRUCTOR series.
6692
6693 2004-09-06 Akim Demaille <akim@epita.fr>
6694
6695 * data/lalr1.cc: Adjust the indentation of the labels.
6696 (Parser::pop): New.
6697 Use it.
6698
6699 2004-09-06 Akim Demaille <akim@epita.fr>
6700
6701 * data/yacc.cc, data/glr.cc (yydestruct): Accept an additional
6702 argument, an informative message.
6703 Call YY_SYMBOL_PRINT.
6704 Adjust all callers: integrate the associated YY_SYMBOL_PRINT.
6705 * data/lalr1.cc (destruct_): Likewise.
6706 In addition, no longer depend on b4_yysymprint_generate and
6707 b4_yydestruct_generate to generate these functions, do it "by
6708 hand".
6709
6710 2004-09-03 Akim Demaille <akim@epita.fr>
6711
6712 * data/glr.c, data/lalr1.cc, data/yacc.c: When YYABORT was
6713 invoked, yydestruct the lookahead.
6714 * tests/calc.at (Calculator $1): Update the expected lengths of
6715 traces: there is an added line for the discarded lookahead.
6716 * doc/bison.texinfo (Destructor Decl): Some rewording.
6717 Define "discarded" symbols.
6718
6719 2004-09-02 Akim Demaille <akim@epita.fr>
6720
6721 * data/lalr1.cc (translate_, destruct_): No reason to be static.
6722
6723 2004-09-02 Akim Demaille <akim@epita.fr>
6724
6725 * data/glr.c, yacc.c (YYDSYMPRINT): Remove, not used.
6726 (YYDSYMPRINTF): Rename as...
6727 (YY_SYMBOL_PRINT): this.
6728 * data/lalr1.cc (YY_SYMBOL_PRINT): New, modeled after the previous
6729 two.
6730 Use it instead of direct symprint_ calls.
6731 (yybackup): Tweak the "Now at end of input" case to match yacc.c's
6732 one.
6733
6734 2004-09-02 Akim Demaille <akim@epita.fr>
6735
6736 * data/lalr1.cc (b4_yysymprint_generate): New.
6737 (symprint_): New member function, defined when YYDEBUG.
6738 Use it consistently instead of token/nterm debugging output by
6739 hand.
6740 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust
6741 %printer calls to use cdebug_ when using lalr1.cc.
6742
6743 2004-08-30 Florian Krohm <florian@edamail.fishkill.ibm.com>
6744
6745 * data/glr.c: Guard the declarations of yypstack and yypdumpstack
6746 with #ifdef YYDEBUG.
6747
6748 2004-08-26 Akim Demaille <akim@epita.fr>
6749
6750 * doc/bison.texinfo (Implementing Loops): Rename as...
6751 (Implementing Gotos/Loops): this.
6752
6753 2004-08-13 Paul Eggert <eggert@cs.ucla.edu>
6754
6755 Adjust to latest gnulib.
6756 * bootstrap (gnulib_modules): Add xalloc-die.
6757 Set LC_ALL=C so that file names sort consistently.
6758 Prefer the gnulib copies of gettext.m4, glibc21.m4,
6759 inttypes_h.m4, lib-ld.m4, lib-prefix.m4, po.m4, stdint_h.m4,
6760 uintmax_t.m4, ulonglong.m4.
6761 (intl_files_to_remove): Add gettext.m4, lib-ld.m4, lib-prefix.m4,
6762 po.m4 since we are now using _gl.m4 instead.
6763
6764 2004-08-10 Florian Krohm <florian@edamail.fishkill.ibm.com>
6765
6766 * src/scan-action.l: Remove. Scanning of semantic actions is
6767 handled in scan-gram.l.
6768
6769 2004-08-07 Florian Krohm <florian@edamail.fishkill.ibm.com>
6770
6771 * src/scan-gram.l (handle_syncline): Use uniqstr_new not xstrdup.
6772
6773 * src/location.h (struct): The file member is a uniqstr.
6774 (equal_boundaries): Use UNIQSTR_EQ for comparison.
6775
6776 2004-07-22 Paul Eggert <eggert@cs.ucla.edu>
6777
6778 Fix bug with non-%union parsers that have printers or destructors,
6779 which led to a Bison core dump. Reported by Peter Fales in
6780 <http://lists.gnu.org/archive/html/bug-bison/2004-07/msg00014.html>.
6781
6782 * data/c.m4 (b4_symbol_actions): Don't assume %union was used.
6783 * data/lalr1.cc (yystype) [defined YYSTYPE]: Define to YYSTYPE,
6784 not to our own type.
6785 * src/output.c (symbol_destructors_output, symbol_printers_output):
6786 Don't assume %union.
6787 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR,
6788 AT_CHECK_PRINTER_AND_DESTRUCTOR): New argument
6789 UNION-FLAG. All callers changed.
6790 (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't assume %union.
6791 Use type char, not unsigned int, when declaring an array of char;
6792 this lets us remove a cast.
6793 (Printers and Destructors): Add non-%union test cases.
6794
6795 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
6796
6797 * doc/bison.texinfo: Minor editorial changes, mostly to the new
6798 GLR writeups. E.g., avoid frenchspacing and the future tense,
6799 change "lookahead" to "look-ahead", and change "wrt" to "with
6800 respect to".
6801
6802 2004-06-21 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
6803
6804 * doc/bison.texinfo (Merging GLR Parses, Compiler Requirements):
6805 New sections, split off from the GLR Parsers section. Put the new
6806 Simple GLR Parser near the start of the GLR section, for clarity.
6807 Rewrite connective text.
6808
6809 2004-06-21 Frank Heckenbach <frank@g-n-u.de>
6810
6811 * doc/bison.texinfo (Simple GLR Parsers): New section.
6812
6813 2004-06-21 Paul Eggert <eggert@cs.ucla.edu>
6814
6815 * NEWS, TODO, doc/bison.texinfo:
6816 Use "look-ahead" instead of "lookahead", to be consistent.
6817 * REFERENCES: Fix incorrect reference to DeRemer and Pennello,
6818 while we're fixing "look-ahead".
6819 * src/conflicts.c (shift_set): Renamed from shiftset.
6820 (look_ahead_set): Renamed from lookaheadset.
6821 * src/print.c: Likewise.
6822 * src/getargs.c (report_args): Add "look-ahead" as the new canonical
6823 name for "lookahead".
6824 (report_types, usage): Likewise.
6825 * src/getargs.h (report_look_ahead_tokens): Renamed from
6826 report_lookaheads.
6827 * src/lalr.c (compute_look_ahead_tokens): Renamed from
6828 compute_lookaheads.
6829 (state_look_ahead_tokens_count): Renamed from state_lookaheads_count.
6830 (look_ahead_tokens_print): Renamed from lookaheads_print.
6831 * src/state.c (state_rule_look_ahead_tokens_print): Renamed from
6832 state_rule_lookaheads_print.
6833 * src/state.h: Likewise.
6834 (reductions.look_ahead_tokens): Renamed from lookaheads.
6835 * tests/torture.at (AT_DATA_LOOK_AHEAD_TOKENS_GRAMMAR): Renamed from
6836 AT_DATA_LOOKAHEADS_GRAMMAR.
6837
6838 2004-06-03 Paul Eggert <eggert@cs.ucla.edu>
6839
6840 * README: Update location of patched M4 distribution.
6841
6842 2004-05-30 Albert Chin-A-Young <china@thewrittenword.com>
6843
6844 Don't assume the C++ compiler takes the same arguments as the C compiler
6845 (trivial change).
6846 * configure.ac (O0CXXFLAGS): New var.
6847 * tests/atlocal.in (CXXFLAGS): Use it.
6848
6849 2004-05-29 Paul Eggert <eggert@cs.ucla.edu>
6850
6851 Fix some "make check" problems with C++ reported by
6852 Albert Chin-A-Young for Tru64 C++ in this thread:
6853 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00049.html
6854
6855 * m4/cxx.m4 (BISON_TEST_FOR_WORKING_CXX_COMPILER): Check for std::cerr.
6856 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
6857 Output to a .cc file for C++, not to a .c file.
6858 * tests/calc.at (AT_CHECK_CALC): Likewise.
6859 * tests/regression.at (AT_CHECK_DANCER): Likewise.
6860 * tests/local.at (AT_COMPILE_CXX): Default to OUTPUT.cc, not OUTPUT.c.
6861
6862 2004-05-28 Albert Chin-A-Young <china@thewrittenword.com>
6863
6864 * tests/calc.at, tests/actions.at: Workaround for SGI
6865 C++ compiler. (trivial change)
6866
6867 2004-05-27 Paul Eggert <eggert@cs.ucla.edu>
6868
6869 Spent a few hours checking out which prerequisite versions the
6870 current sources actually require. I went all the way back to
6871 Gettext 0.10.40, Automake 1.4, and Autoconf 2.57 and investigated
6872 a seemingly endless set of combinations of versions more recent
6873 than that. The bottom line is that the current sources require
6874 fairly recent versions of the build tools, and it'll be some work
6875 to change this.
6876 * configure.ac (AC_PREREQ): Increase from 2.58 to 2.59.
6877 (AM_INIT_AUTOMAKE): Increase from 1.7 to 1.8.
6878 (AM_GNU_GETTEXT_VERSION): Increase from 0.11.5 to 0.12.
6879 Add comments explaining why those particular versions are
6880 currently needed.
6881
6882 * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug
6883 in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in
6884 <http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00037.html>.
6885
6886 * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work
6887 (it fails with a Autoconf-without-aclocal-m4 diagnostic).
6888
6889 2004-05-26 Paul Eggert <eggert@cs.ucla.edu>
6890
6891 * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to
6892 0.11.5. Suggested by Bruno Haible.
6893 * bootstrap: Remove gettext version checking.
6894
6895 * doc/bison.texinfo (Decl Summary): Also mention that %union
6896 can depend on prerequisite types. Problem reported by Tim
6897 Van Holder.
6898
6899 2004-05-25 Paul Eggert <eggert@cs.ucla.edu>
6900
6901 * README: Mention GNU m4 1.4 bugs and Akim's patched version.
6902 * README-alpha: Don't tell people not to package this.
6903
6904 * bootstrap: Don't assume $(...) works; use `...` instead.
6905 Problem reported by Paul Hilfinger. Also, diagnose non-GNU
6906 gettext better.
6907
6908 * doc/bison.texinfo (Decl Summary, Bison Options): Clarify what's
6909 put into the -d output file, and mention what to do if YYSTYPE is
6910 defined as a macro.
6911
6912 2004-05-24 Paul Eggert <eggert@cs.ucla.edu>
6913
6914 Undo change made earlier today: it caused autopoint to not bring
6915 in ABOUT-NLS. Ouch. Instead, substitute our own diagnostic for
6916 autopoint's.
6917
6918 * bootstrap: Check that gettext version matches what's in
6919 configure.ac. Warn users to ignore robots.txt ERROR 404.
6920 * bootstrap: Undo today's earlier change (logged below).
6921 * configure.ac (AM_GNU_GETTEXT_VERSION): Likewise.
6922
6923 The gettext version checking is causing more trouble than it's
6924 curing; remove it. Problem reported by Paul Hilfinger.
6925
6926 * bootstrap: Issue a warning that one can expect a message
6927 'AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION'.
6928 * configure.ac (AM_GNU_GETTEXT_VERSION): Remove.
6929
6930 2004-05-23 Paul Eggert <eggert@cs.ucla.edu>
6931
6932 Ensure that the C++ compiler used for testing actually works on a
6933 simple test program; if not, skip the C++-related tests. Problem
6934 reported by Vin Shelton in:
6935 http://lists.gnu.org/archive/html/bug-bison/2004-05/msg00026.html
6936
6937 * m4/cxx.m4: New file.
6938 * configure.ac (BISON_TEST_FOR_WORKING_CXX_COMPILER): Add.
6939 * tests/atlocal.in (BISON_CXX_WORKS): Add.
6940 * tests/local.at (AT_COMPILE_CXX): Use it.
6941
6942 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
6943
6944 * data/glr.c (yylloc): Output this macro even if locations are not
6945 being generated, as the GLR parser needs it even in that case.
6946 Problem reported by Troy A. Johnson
6947 <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=195946>.
6948
6949 * configure.ac (AC_INIT): Update to 1.875e.
6950
6951 2004-05-21 Paul Eggert <eggert@cs.ucla.edu>
6952
6953 * NEWS: Version 1.875d.
6954 * configure.ac (AC_INIT): Likewise.
6955 * src/parse-gram.c, src/parse-gram.h: Regenerate with 1.875d.
6956
6957 * configure.ac (--enable-gcc-warnings): Do not enable -Wshadow,
6958 -Wmissing-prototypes, or -Wstrict-prototypes for C++. The current
6959 lalr1.cc runs afoul of the first, and the last two are no longer
6960 supported by GCC 3.4.0.
6961 * README: Mention GNU m4 1.4 or later; mention m4 patches.
6962 * HACKING: Use ./bootstrap, not "make update" to import foreign files.
6963
6964 2004-05-06 Paul Eggert <eggert@cs.ucla.edu>
6965
6966 * src/muscle_tab.c (hash_muscle): Accept and return size_t, not
6967 unsigned int, for compatibility with latest gnulib hash module.
6968 * src/state.c (state_hash, state_hasher): Likewise.
6969 * src/symtab.c (hash_symbol, hash_symbol_hasher): Likewise.
6970 * src/uniqstr.c (hash_uniqstr): Likewise.
6971
6972 2004-05-03 Paul Eggert <eggert@cs.ucla.edu>
6973
6974 * NEWS: Unescaped newlines are no longer allowed in char & strings.
6975
6976 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER,
6977 SC_CHARACTER,SC_STRING>): Reject unescaped newlines in
6978 character and string literals.
6979 (unexpected_end): New function.
6980 (unexpected_eof): Use it.
6981 (unexpected_newline): New function.
6982 (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>): Coalesce duplicate
6983 actions.
6984
6985 * NEWS: Document %expect-rr.
6986
6987 * bootstrap (--gnulib-srcdir=*, --cvs-user=*):
6988 Fix typo by replacing $1 with $option.
6989 Remove more 'intl'-related files.
6990 Don't DEFUN AM_INTL_SUBDIR twice.
6991
6992 * lib/.cvsignore: Add strndup.h. Remove memchr.c, memcmp.c,
6993 memrchr.c, strcasecmp.c, strchr.c, strrchr.c, strspn.c, strtol.c,
6994 strtoul.c.
6995 * m4/.cvsignore: Add exitfail.m4, extensions.m4, gnulib.m4,
6996 hard-locale.m4, mbstate_t.m4, strerror_r.m4, strndup.m4,
6997 xstrndup.m4. Remove glibc21.m4, intdiv0.m4, inttypes-pri.m4,
6998 inttypes.m4, inttypes_h.m4, isc-posix.m4, lcmessage.m4,
6999 stdint_h.m4, uintmax_t.m4, ulonglong.m4.
7000 * src/.cvsignore: Add *.output.
7001
7002 * src/parse-gram.y: Put copyright notice inside %{ %} so it
7003 gets copied to the output file.
7004
7005 2004-04-28 Paul Eggert <eggert@twinsun.com>
7006
7007 Get files from the gnulib and po repositories, instead of relying
7008 on them being in our CVS. Upgrade to latest versions of gnulib
7009 and Automake.
7010
7011 * Makefile.am (SUBDIRS): Remove m4; Automake now does m4.
7012 * bootstrap: Bootstrap from gnulib and po repositories.
7013 Much of this code was stolen from GNU diff and GNU tar's bootstrap.
7014 * README-cvs: Document these changes. Remove version numbers from
7015 mentions of build tools, since they change so often. Mention Flex.
7016
7017 * configure.ac (AC_CONFIG_MACRO_DIR): Add, with m4 as arg.
7018 (gl_USE_SYSTEM_EXTENSIONS): Add.
7019 (AC_GNU_SOURCE, AC_AIX, AC_MINIX):
7020 Remove; no longer needed, as gl_USE_SYSTEM_EXTENSIONS
7021 does this for us.
7022 (AC_ISC_POSIX): Remove; we no longer support this
7023 ancient OS, as it gets in the way of latest Autoconf & gnulib.
7024 (AC_HEADER_STDC): Remove: we now assume C89 or better.
7025 (AC_CHECK_HEADERS_ONCE): Use instead of AC_CHECK_HEADERS.
7026 Do not check for C89 headers, except for locale.h which is used
7027 by the Yacc library and must port to K&R hosts.
7028 (AC_CHECK_FUNCS_ONCE): Use instead of AC_CHECK_FUNCS.
7029 Do not check for C89 functions, except for setlocale which is
7030 used by the Yacc library.
7031 (AC_CHECK_DECLS, AC_REPLACE_FUNCS): Remove; no longer needed.
7032 (gl_DIRNAME, gl_ERROR, gl_FUNC_ALLOCA, gl_FUNC_MEMCHR,
7033 gl_FUNC_MEMRCHR, gl_FUNC_STPCPY, gl_FUNC_STRNLEN, gl_FUNC_STRTOL,
7034 gl_GETOPT, gl_HASH, gl_MBSWIDTH, gl_OBSTACK, gl_QUOTE,
7035 gl_QUOTEARG, gl_XALLOC, jm_FUNC_GLIBC_UNLOCKED_IO, jm_FUNC_MALLOC,
7036 AM_GNU_GETTEXT): Remove; now done by:
7037 (GNULIB_AUTOCONF_SNIPPET): Add. "bootstrap" builds this for us.
7038 (AC_CONFIG_FILES): Remove m4/Makefile, as Automake now does this
7039 for us.
7040
7041 * lib/Makefile.am: Include gnulib.mk, built for us by "bootstrap".
7042 (BUILT_SOURCES, EXTRA_DIST, MOSTLYCLEANFILES):
7043 Define to empty, as gnulib.mk will do the rest for us.
7044 ($(libbison_a_OBJECTS), stdbool.h): Remove, as gnulib.mk does this
7045 for us.
7046 (libbison_a_SOURCES): Define to $(lib_SOURCES) now.
7047 (lib_SOURCES): New symbol, containing only the non-gnulib libs.
7048
7049 * src/files.c: Include gnulib's xstrndup.h.
7050
7051 * src/system.h (MALLOC): Use xnmalloc, for better overflow checking.
7052 (REALLOC): Use xnrealloc, for likewise.
7053 (xstrndup, stpcpy): Remove decls, as gnulib does this for us now.
7054 (strnlen, memrchr): Remove decls; functions no longer used.
7055 Include <stpcpy.h>.
7056
7057 * config/depcomp, config/install-sh, lib/alloca.c, lib/argmatch.c,
7058 lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
7059 lib/error.c, lib/error.h, lib/getopt.c, lib/getopt.h,
7060 lib/getopt1.c, lib/gettext.h, lib/hash.c, lib/hash.h,
7061 lib/malloc.c, lib/mbswidth.c, lib/mbswidth.h, lib/memchr.c,
7062 lib/memcmp.c, lib/memrchr.c, lib/obstack.c, lib/obstack.h,
7063 lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h,
7064 lib/realloc.c, lib/stdbool_.h, lib/stpcpy.c, lib/strcasecmp.c,
7065 lib/strchr.c, lib/strncasecmp.c, lib/strnlen.c, lib/strrchr.c,
7066 lib/strspn.c, lib/strtol.c, lib/strtoul.c, lib/unlocked-io.h,
7067 lib/xalloc.h, lib/xmalloc.c, lib/xstrdup.c, lib/xstrndup.c,
7068 m4/Makefile.am, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
7069 m4/error.m4, m4/getopt.m4, m4/hash.m4, m4/malloc.m4,
7070 m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4, m4/memcmp.m4,
7071 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/prereq.m4,
7072 m4/quote.m4, m4/quotearg.m4, m4/realloc.m4, m4/stdbool.m4,
7073 m4/stpcpy.m4, m4/strnlen.m4, m4/strtol.m4, m4/strtoul.m4,
7074 m4/unlocked-io.m4, m4/xalloc.m4, po/LINGUAS, po/Makefile.in.in,
7075 po/Makevars, po/da.po, po/de.po, po/es.po, po/et.po, po/fr.po,
7076 po/hr.po, po/id.po, po/it.po, po/ja.po, po/ms.po, po/nl.po,
7077 po/pt_BR.po, po/ro.po, po/ru.po, po/sv.po, po/tr.po:
7078 Remove, as these files are now generated automatically
7079 by bootstrap or automake.
7080
7081 * po/ChangeLog: Remove: all but one entry was a duplicate
7082 of this file, and I moved that 2000-11-02 entry here.
7083
7084 * config/.cvsignore: Add Makefile, depcomp, install-sh.
7085 * lib/.cvsignore: Add alloca.c, alloca.h, alloca_.h, argmatch.c,
7086 argmatch.h, basename.c, dirname.c, dirname.h, error.c, error.h,
7087 exit.h, exitfail.c, exitfail.h, getopt.c, getopt.h, getopt1.c,
7088 getopt_int.h, gettext.h, gnulib.mk, hard-locale.c, hard-locale.h,
7089 hash.c, hash.h, malloc.c, mbswidth.c, mbswidth.h, memchr.c,
7090 memcmp.c, memrchr.c, obstack.c, obstack.h, quote.c, quote.h,
7091 quotearg.c, quotearg.h, realloc.c, stdbool_.h, stpcpy.c, stpcpy.h,
7092 strcasecmp.c, strchr.c, stripslash.c, strncasecmp.c, strndup.c,
7093 strnlen.c, strrchr.c, strspn.c, strtol.c, strtoul.c,
7094 unlocked-io.h, xalloc.h, xmalloc.c, xstrdup.c, xstrndup.c,
7095 xstrndup.h.
7096 * m4/.cvsignore: Remove Makefile, Makefile.in. Add alloca.m4,
7097 dirname.m4, dos.m4, error.m4, getopt.m4, hash.m4, mbrtowc.m4,
7098 mbswidth.m4, obstack.m4, onceonly.m4, quote.m4, quotearg.m4,
7099 stdbool.m4, stpcpy.m4, strnlen.m4, unlocked-io.m4, xalloc.m4.
7100 * po/.cvsignore: Add *.po, LINGUAS, Makefile.in.in, Makevars.
7101 * src/.cvsignore: Remove *_.c.
7102
7103
7104 * Makefile.maint (GZIP_ENV): Don't use --rsyncable if gzip doesn't
7105 support it. (The latest stable gzip doesn't.)
7106
7107 2004-04-27 Paul Eggert <eggert@twinsun.com>
7108
7109 * data/lalr1.cc (Parser::stos_) [! YYDEBUG]: Define even in this
7110 case, as stos_ is now used by destructors due to the 2004-02-09
7111 change.
7112
7113 Remove more K&R C support.
7114 * lib/libiberty.y (PARAMS): Remove. All uses removed.
7115 * lib/subpipe.c (errno): Remove decl.
7116 Include <stdlib.h> unconditionally.
7117 (EXIT_FAILURE): Remove macro.
7118 * src/complain.c (vfprintf, strerror): Remove.
7119 * src/system.h: Include limits.h, stdlib.h, string.h, locale.h
7120 unconditionally.
7121 (EXIT_FAILURE, EXIT_SUCCESS, setlocale): Remove defns.
7122 Use latest Autoconf recommendations for including inttypes.h, stdint.h.
7123 (strchr, strspn, memchr): Remove decls.
7124 * tests/calc.at (_AT_DATA_CALC_Y): Include stdlib.h, string.h
7125 unconditionally. Do not declare perror.
7126 * tests/conflicts.at (%nonassoc and eof): Include stdlib.h
7127 unconditionally.
7128
7129 * src/complain.c (_): Remove useless defn, as system.h defines this.
7130
7131 * lib/bitset.h (__INT_TO_PTR): Remove; workaround no longer needed
7132 with latest obstack.h.
7133 * lib/ebitset.c (ebitset_elt_alloc): Don't bother to cast args
7134 to procedure types, as obstack.h now does that for us.
7135 * lib/lbitset.c (lbitset_elt_alloc): Likewise.
7136
7137 * lib/subpipe.h [HAVE_SYS_TYPES_H]: Include <sys/types.h>,
7138 so that this include file can stand alone.
7139 * lib/subpipe.c: Do not include <sys/types.h>, as subpipe.h
7140 does this now. Include subpipe.h first after config.h, to
7141 test whether it can stand alone.
7142
7143 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Don't
7144 declare yyerror when using lalr.cc, as GCC 3.4.0 warns about the
7145 unused declaration.
7146
7147 * tests/synclines.at (%union synch line): Put a dummy member in
7148 the union, because empty unions aren't allowed in C. Caught
7149 by GCC 3.4.0.
7150
7151 2004-04-13 Jim Meyering <jim@meyering.net>
7152
7153 * src/conflicts.c (conflicts_print): Correct format string typo:
7154 use `%%' to produce literal `%'. (trivial change)
7155
7156 2004-03-30 Paul Eggert <eggert@twinsun.com>
7157
7158 * src/getargs.c (version): Update copyright year to 2004.
7159
7160 * data/c.m4 (b4_int_type): Use 'short int' rather than
7161 'short', and similarly for 'long', 'unsigned', etc.
7162 * data/glr.c (YYTRANSLATE, yyconfl, yySymbol, yyItemNum,
7163 yygetLRActions, yyprocessOneStack, yyrecoverSyntaxError,
7164 yy_yypstack, yydumpstack): Likewise.
7165 * data/lalr1.cc (user_token_number_max_, user_token_number_max_,
7166 translate_, seq_, [], pop, Slice, range_, operator+, operator+=):
7167 Likewise.
7168 * data/yacc.c (b4_int_type, yyss, YYSTACK_BYTES, yysigned_char,
7169 yy_stack_print, yyparse): Likewise.
7170 * doc/bison.texinfo (Prologue, Multiple Types): Likewise.
7171 * lib/bbitset.h (bitset_word, BITSET_WORD_BITS): Likewise.
7172 * lib/bitset.c (bitset_print): Likewise.
7173 * lib/bitset_stats.c (bitste_log_histogram_print): Likewise.
7174 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
7175 * lib/bitsetv.c (bitsetv_dump): Likewise.
7176 * lib/ebitset.c (EBITSET_ELT_BITS, ebitset_elt_alloc): Likewise.
7177 * lib/lbitset.c (LBITSET_ELT_BITS, lbitset_elt_alloc, debug_lbitset):
7178 Likewise.
7179 * src/LR0.c (allocate_itemsets): Likewise.
7180 * src/gram.h (rule_number, rule): Likewise.
7181 * src/lalr.h (goto_number): Likewise.
7182 * src/nullable.c (nullable_compute): Likewise.
7183 * src/output.c (prepare_rules): Likewise.
7184 * src/relation.c (relation_print, relation_digraph): Likewise.
7185 * src/relation.h (relation_node): Likewise.
7186 * src/state.h (state_number, transitions, errs, reductions,
7187 struct state): Likewise.
7188 * src/symtab.h (symbol_number, struct symbol): Likewise.
7189 * src/tables.c (vector_number, tally, action_number,
7190 default_goto, goto_actions): Likewise.
7191 * tests/existing.at (GNU Cim Grammar): Likewise.
7192 * tests/regression.at (Web2c Actions): Likewise.
7193
7194 * src/output.c (muscle_insert_short_int_table): Renamed from
7195 muscle_insert_short_table. All uses changed.
7196
7197 2004-03-25 Paul Hilfinger <hilfingr@tully.CS.Berkeley.EDU>
7198
7199 * src/parse-gram.y: Define PERCENT_EXPECT_RR.
7200 (declaration): Replace expected_conflicts with expected_sr_conflicts.
7201 Add %expect-rr rule.
7202
7203 * src/scan-gram.l: Recognize %expect-rr.
7204
7205 * src/conflicts.h (expected_sr_conflicts): Rename from
7206 expected_conflicts.
7207 (expected_rr_conflicts): Declare.
7208
7209 * src/conflicts.c (expected_sr_conflicts): Rename from
7210 expected_conflicts.
7211 (expected_rr_conflicts): Define.
7212 (conflicts_print): Check r/r conflicts against expected_rr_conflicts
7213 for GLR parsers.
7214 Use expected_sr_conflicts in place of expected_conflicts.
7215 Warn if expected_rr_conflicts used in non-GLR parser.
7216
7217 * doc/bison.texinfo: Add documentation for %expect-rr.
7218
7219 2004-03-08 Paul Eggert <eggert@gnu.org>
7220
7221 Add support for hex token numbers. Suggested by Odd Arild Olsen in
7222 <http://lists.gnu.org/archive/html/bison-patches/2004-03/msg00000.html>.
7223
7224 * NEWS: Document hexadecimal tokens, no NUL bytes, %destructor
7225 in lalr1.cc.
7226 * doc/bison.texinfo (Token Decl): Add hexadecimal token numbers.
7227 * src/scan-gram.l (scan_integer): New function.
7228 ({int}): Use it.
7229 (0[xX][0-9abcdefABCDEF]+): New pattern, to support hex numbers.
7230 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>, \\x[0-9abcdefABCDEF]+,
7231 handle_action_dollar, handle_action_at, convert_ucn_to_byte):
7232 Say "long int", not "long", for uniformity with GNU style.
7233
7234 2004-02-25 Paul Eggert <eggert@twinsun.com>
7235
7236 * tests/local.at (AT_COMPILE, AT_COMPILE_CXX): Ignore stdout from
7237 compilers. This fixes a problem with Intel's C++ compiler being
7238 chatty, reported by Guido Trentalancia in
7239 <http://lists.gnu.org/archive/html/bug-bison/2004-02/msg00030.html>.
7240
7241 2004-02-09 Alexandre Duret-Lutz <adl@gnu.org>
7242
7243 Support %destructor and merge error locations in lalr1.cc.
7244
7245 * data/lalr1.cc (b4_cxx_destruct_def): New macro.
7246 (Parser::stos_): Define unconditionally.
7247 (Parser::destruct_): New method. Generate its body with
7248 b4_yydestruct_generate.
7249 (Parser::error_start_): New attribute.
7250 (Parser::parse) <yyerrlab, yyerrlab1>: Call destruct_ on erroneous
7251 token which are discarded.
7252 (Parser::parse) <yyerrlab, yyerrorlab, yyerrlab1>: Update
7253 error_start_ when erroneous token are discarded.
7254 (Parser::parse) <yyerrlab1>: Compute the location of the error
7255 token so that it covers all the discarded tokens.
7256 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Adjust so
7257 it can be called with `%skeleton "lalr1.cc"', and do that.
7258
7259 2004-02-02 Paul Eggert <eggert@twinsun.com>
7260
7261 * src/Makefile.am (AM_CPPFLAGS): New macro. It mentions
7262 $(top_srcdir)/lib and ../lib. This fixes a bug reported
7263 by Paul Hilfinger; the old INCLUDES value didn't mention ../lib.
7264 There's no need to mention top_builddir since Automake does that
7265 for us.
7266 (INCLUDES): Remove, as Automake says it's obsolescent.
7267 Contents migrated into AM_CPPFLAGS as described above.
7268 * lib/Makefile.am (INCLUDES): Remove; obsolescent.
7269
7270 2004-01-14 Paul Hilfinger <hilfingr@CS.Berkeley.EDU>
7271
7272 * data/glr.c (yytokenName): Bullet-proof against YYEMPTY token.
7273 (yyreportSyntaxError): Handle case where lookahead token is
7274 YYEMPTY.
7275
7276 2004-01-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7277
7278 * data/glr.c: Put casts on uses of YYREALLOC and YYMALLOC so that
7279 resulting parsers are compilable with C++.
7280
7281 2003-12-23 Paul Eggert <eggert@twinsun.com>
7282
7283 * config/depcomp, config/install-sh: Sync with Automake 1.8.
7284 * src/output.c (output_skeleton): Rename local var.
7285 * tests/input.at (Torturing the Scanner): Don't use \x0 or \0 in
7286 Bison tokens, as this runs afoul of the 2003-10-07 change that
7287 disallowed NUL bytes in character constants or string literals.
7288
7289 * tests/local.at: Require Autoconf 2.59's Autotest.
7290 * tests/testsuite.at: Don't include local.at, since we now assume
7291 Autoconf 2.59 or later. Autoconf 2.59 had some problems with
7292 including it.
7293 * tests/Makefile.am ($(TESTSUITE)): Remove warning about ignoring
7294 multiple inclusion warnings.
7295
7296 2003-12-02 Akim Demaille <akim@epita.fr>
7297
7298 * doc/bison.texinfo (How Can I Reset the Parser): More about start
7299 conditions.
7300 From Bruno Haible.
7301
7302 2003-11-18 Alexandre Duret-Lutz <adl@gnu.org>
7303
7304 * doc/bison.texinfo (Bison Options): Escape `@' in `$@'.
7305
7306 2003-10-07 Paul Eggert <eggert@twinsun.com>
7307
7308 * tests/Makefile.am (clean-local): Don't run 'testsuite --clean'
7309 if testsuite doesn't exist.
7310
7311 * doc/bison.texinfo (Symbols): NUL bytes are not allowed in string
7312 literals, unfortunately.
7313 * src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
7314 Complain about NUL bytes in character constants or string literals.
7315
7316 2003-10-05 Paul Eggert <eggert@twinsun.com>
7317
7318 * NEWS: Don't document %no-default-prec, as it's still
7319 too experimental.
7320 * doc/bison.texinfo: Document %no-default-prec only if
7321 the defaultprec flag is set. Normally it's not.
7322
7323 2003-10-04 Paul Eggert <eggert@twinsun.com>
7324
7325 * data/glr.c (b4_rhs_value, b4_rhs_location): Yield a
7326 non-modifiable lvalue, instead of a modifiable one.
7327 * doc/bison.texinfo (Actions): Document that $$ can
7328 be assigned to. Do not claim that $$ and $N are
7329 array element references: user code should not rely on this.
7330
7331 2003-10-01 Paul Eggert <eggert@twinsun.com>
7332
7333 * src/parse-gram.h (PERCENT_NO_DEFAULT_PREC): New token.
7334 (grammar_declaration): Use it.
7335 * src/scan-gram.l: New token %no-default-prec.
7336 * tests/conflicts.at: Revamp tests to use %no-default-prec.
7337 * NEWS, doc/bison.texinfo: Document the above.
7338
7339 2003-10-01 Akim Demaille <akim@epita.fr>
7340
7341 VCG no longer supports long_straight_phase.
7342
7343 * src/vcg.c, src/vcg.h: Remove the handling of long_straight_phase.
7344 * src/print_graph.c (print_graph): Adjust.
7345
7346 2003-09-30 Frank Heckenbach <frank@g-n-u.de>
7347 and Paul Eggert <eggert@twinsun.com>
7348
7349 * doc/bison.texinfo (Decl Summary, Contextual Precedence,
7350 Table of Symbols): Document %default-prec.
7351 * src/parse-gram.y (PERCENT_DEFAULT_PREC): New token.
7352 (grammar_declaration): Set default_prec on %default-prec.
7353 * src/scan-gram.l (%default-prec): New token.
7354 * src/reader.h (default_prec): New flag.
7355 * src/reader.c: Likewise.
7356 (packgram): Handle it.
7357 * tests/conflicts.at (%default-prec without %prec,
7358 %default-prec with %prec, %default-prec 1): New tests.
7359
7360 2003-09-30 Paul Eggert <eggert@twinsun.com>
7361
7362 * tests/testsuite.at: Include local.at, not input.at, fixing
7363 a typo in the 2003-08-25 patch.
7364
7365 2003-08-27 Akim Demaille <akim@epita.fr>
7366
7367 * data/lalr1.cc (yyparse) [__GNUC__]: "Use" yyerrorlab to pacify
7368 GCC warnings.
7369
7370 2003-08-26 Akim Demaille <akim@epita.fr>
7371
7372 * config/announce-gen (print_changelog_deltas): Neutralize "<#" as
7373 "<\#" to avoid magic from Gnus when posting parts of this script.
7374
7375 2003-08-26 Akim Demaille <akim@epita.fr>
7376
7377 * data/lalr1.cc (Parser::report_syntax_error_): New, extracted from
7378 (Parser::parse): here.
7379 Adjust: nerrs and errstatus is now replaced by...
7380 (Parser::nerrs_, Parser::errstatus_): New.
7381
7382 2003-08-25 Akim Demaille <akim@epita.fr>
7383
7384 * config/announce-gen, Makefile.cfg: New.
7385 * Makefile.am: Adjust.
7386 * GNUmakefile, Makefile.maint: Update from CVS Autoconf, but
7387 keeping local WGET and WGETFLAGS modifications from Paul Eggert.
7388
7389 2003-08-25 Akim Demaille <akim@epita.fr>
7390
7391 When reducing initial empty rules, Bison parser read an initial
7392 location that is not defined. This results in garbage, and that
7393 affects Bison's own parser. Therefore we need (i) to extend Bison
7394 to support a means to initialize this location, and (ii) to use
7395 this CVS Bison to fix CVS Bison's parser.
7396
7397 * src/reader.h, reader.c (epilogue_augment): Remove, replace
7398 with...
7399 * src/muscle_tab.h, src/muscle_tab.c (muscle_code_grow): this.
7400 * src/parse-gram.y: Adjust.
7401 (%initial-action): New.
7402 (%error-verbose): Since we require CVS Bison, there is no reason
7403 not to use it.
7404 * src/scan-gram.l: Adjust.
7405 * src/Makefile.am (YACC): New, to make sure we use our own parser.
7406 * data/yacc.c (yyparse): Use b4_initial_action.
7407
7408 2003-08-25 Akim Demaille <akim@epita.fr>
7409
7410 * doc/bison.texinfo: Don't promote stdout for error messages.
7411
7412 2003-08-25 Akim Demaille <akim@epita.fr>
7413
7414 * data/lalr1.cc (Parser::reduce_print_): Remove unused yyi.
7415 From Alexandre Duret-Lutz.
7416
7417 2003-08-25 Akim Demaille <akim@epita.fr>
7418
7419 Version 1.875c.
7420
7421 2003-08-25 Akim Demaille <akim@epita.fr>
7422
7423 * data/lalr1.cc (Parser::stack_print_, YY_STACK_PRINT): New.
7424 Use them.
7425
7426 2003-08-25 Akim Demaille <akim@epita.fr>
7427
7428 * data/lalr1.cc (Parser::reduce_print_): New.
7429 Use it.
7430
7431 2003-08-25 Akim Demaille <akim@epita.fr>
7432
7433 Have lalr1.cc catch with Paul Eggert's patch to fix the infinite
7434 error recovery loops. This patch is based on
7435 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00000.html>.
7436 Also, augment the similarity between lalr1.cc and yacc.c.
7437 Note: the locations of error recovery rules are not correct yet.
7438
7439 * data/lalr1.cc: Comment changes to augment the similarity between
7440 lalr1.cc and yacc.c.
7441 (YYERROR): Goto to yyerrorlab, not yyerrlab1.
7442 (yyerrlab1): Remove, but where it used to be (now the bottom part of
7443 yyerrlab), when hitting EOF, pop the whole stack here instead of
7444 merely falling thru the default error handling mechanism.
7445 (yyerrorlab): New label, with the old contents of YYERROR,
7446 plus the following change: pop the stack of rhs corresponding
7447 to the production that invoked YYERROR. That is how Yacc
7448 behaves (required by POSIX).
7449 * tests/calc.at (AT_CHECK_CALC_LALR1_CC): No longer expected to
7450 fail.
7451
7452 2003-08-25 Akim Demaille <akim@epita.fr>
7453
7454 Tune local.at so that people can "autom4te -l autotest calc.at -o
7455 calc" for instance, to extract a sub test suite.
7456
7457 * tests/testsuite.at: Move the initialization, Autotest version
7458 requirement, and AT_TESTED invocation into...
7459 * tests/local.at: here.
7460 * tests/testsuite.at: Include it for compatibility with Autoconf
7461 2.57.
7462 * tests/Makefile.am ($(TESTSUITE)): Report that the warning should
7463 be ignore.
7464
7465 2003-08-04 Paul Eggert <eggert@twinsun.com>
7466
7467 Rework code slightly to avoid gcc -Wtraditional warnings.
7468 * data/glr.c (yyuserMerge): Return void, not YYSTYPE.
7469 The returned value is now stored in *YY0. All callers changed.
7470 * src/output.c (merge_output): Adjust to the above change.
7471
7472 2003-07-26 Paul Eggert <eggert@twinsun.com>
7473
7474 * data/glr.c (YYASSERT): New macro.
7475 (yyfillin, yydoAction, yyglrReduce, yysplitStack,
7476 yyresolveStates, yyprocessOneStack):
7477 Use `YYASSERT (FOO);' rather than `if (! (FOO)) abort ();'.
7478 Derived from a suggestion by Frank Heckenbach.
7479
7480 2003-07-25 Paul Eggert <eggert@twinsun.com>
7481
7482 * data/glr.c (yyglrReduce): Don't use C89 string concatenation,
7483 for portability to K&R C (after ansi2knr, presumably). See
7484 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>
7485 by Frank Heckenbach, though I have omitted the structure-initialization
7486 part of his glr-knr.diff patch since I recall that the Portable
7487 C Compiler didn't require that change.
7488
7489 Let the user specify how to allocate and free memory.
7490 Derived from a suggestion by Frank Heckenbach in
7491 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00041.html>.
7492 * data/glr.c (YYFREE, YYMALLOC, YYREALLOC): New macros.
7493 All uses of free, malloc, realloc changed to use these macros,
7494 and unnecessary casts removed.
7495 * data/yacc.c (YYFREE, YYMALLOC): Likewise.
7496
7497 2003-07-06 Matthias Mann <MatthiasMann@gmx.de>
7498
7499 * data/lalr1.cc (operator<<(std::ostream&, const Position&)):
7500 use s.empty() rather than s == "" to test for empty string; see
7501 <http://lists.gnu.org/archive/html/bison-patches/2003-07/msg00003.html>
7502 (trivial change)
7503
7504 2003-06-25 Akim Demaille <akim@epita.fr>
7505
7506 * config/depcomp, config/install-sh: Update from masters.
7507
7508 2003-06-20 Paul Eggert <eggert@twinsun.com>
7509
7510 * data/glr.c (YYLLOC_DEFAULT): Parenthesize arguments as needed,
7511 and return properly parenthesized result.
7512 * data/lalar1.cc (YYLLOC_DEFAULT): Likewise.
7513 * data/yacc.c (YYLLOC_DEFAULT): Likewise.
7514 Remove unnecessary parentheses from uses.
7515 * doc/bison.texinfo (Location Default Action): Describe the
7516 conventions for parentheses.
7517
7518 2003-06-19 Paul Eggert <eggert@twinsun.com>
7519
7520 * data/glr.c (yyremoveDeletes, yy_reduce_print, yyglrReduce,
7521 yyreportTree): Do not assume that size_t is the same width as int,
7522 when printing sizes. Print sizes using an unsigned format.
7523 Problem reported by Frank Heckenbach in
7524 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00035.html>.
7525
7526 Port to Forte Developer 7 C compiler.
7527 * data/glr.c (struct YYLTYPE): If locations are not being used,
7528 declare a single dummy member, as empty structs do not conform
7529 to the C standard.
7530 (YYERROR, YYBACKUP): Do not use "do { ...; return foo; } while (0)";
7531 the Forte Developer 7 C compiler complains that end-of-loop
7532 code is not reached.
7533
7534 2003-06-17 Paul Eggert <eggert@twinsun.com>
7535
7536 * lib/libiberty.h (PARAMS): Spell argument as Args, not as X, to
7537 avoid warnings from picky compilers about redefinition of PARAMS.
7538
7539 2003-06-17 Paul Eggert <eggert@twinsun.com>
7540
7541 Version 1.875b.
7542
7543 * NEWS: Document 1.875b.
7544
7545 * lib/bbitset.h: Do not include config.h; that's the includer's job.
7546 Do not include <sys/types.h>; shouldn't be needed on a C89 host.
7547 * lib/bitset.h (bitset_compatible_p): Indent as per GNU standard.
7548 Don't use 'index' in comments, as it's a builtin fn on some hosts.
7549 * lib/bitset_stats.c: Include gettext.h unconditionally, as
7550 per recent gettext manual's suggestion.
7551 * lib/ebitset.c (ebitset_resize, ebitset_unused_clear):
7552 Use prototypes, not old-style definitions.
7553 * lib/lbitset.c (lbitset_unused_clear): Likewise.
7554 * lib/vbitset.c (vbitset_resize, vbitset_ones, vbitset_zero,
7555 vbitset_empty_p, vbitset_copy1, vbitset_not, vbitset_equal_p,
7556 vbitset_subset_p, vbitset_disjoint_p, vbitset_and, vbitset_and_cmp,
7557 vbitset_andn, vbitset_andn_cmp, vbitset_or, vbitset_or_cmp,
7558 vbitset_xor, vbitset_xor_cmp, vbitset_and_or, vbitset_and_or_cmp,
7559 vbitset_andn_or, vbitset_andn_or_cmp, vbitset_or_and,
7560 vbitset_or_and_cmp, vbitset_copy): Likewise.
7561
7562 * lib/libiberty.h: Do not include config.h; that's the includer's job.
7563 Do not include <stdlib.h>.
7564 (PARAMS): Define unconditionally for C89.
7565 (ATTRIBUTE_NORETURN): Remove.
7566 (ATTRIBUTE_UNUSED): Define unconditionally.
7567
7568 Upgrade to 2003-06-08 libbitset, submitted by Michael Hayes in:
7569 <http://lists.gnu.org/archive/html/bison-patches/2003-06/msg00005.html>
7570 * lib/Makefile.am (bitsets_sources): Add vbitset.c, vbitset.h.
7571 * lib/vbitset.c, lib/vbitset.h: New files.
7572 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
7573 lib/bitset_stats.c, lib/ebitset.c, lib/lbitset.c: Import
7574 from libbitset.
7575
7576 * doc/bison.texinfo (How Can I Reset the Parser): Renamed from
7577 `How Can I Reset @code{yyparse}', since texinfo does not allow
7578 arbitrary @ in node names.
7579
7580 * m4/Makefile.am (EXTRA_DIST): Add the following files, which
7581 shouldn't be needed according to the gettext 0.12.1 documentation
7582 but which seem to be needed anyway: codeset.m4 glibc21.m4
7583 intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 isc-posix.m4
7584 lcmessage.m4 nls.m4 po.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4.
7585 * po/Makefile.in.in: Upgrade to gettext 0.12.1 version.
7586
7587 * lib/.cvsignore: Add stdbool.h.
7588 * m4/.cvsignore: Add nls.m4, po.m4.
7589
7590 Upgrade to CVS gnulib.
7591 * stdbool_.h: File renamed from stdbool.h.in.
7592 * configure.ac (AM_STDBOOL_H): Invoke this instead of
7593 AC_HEADER_STDBOOL.
7594 (AM_GNU_GETTEXT): Put brackets around args, as latest manual suggests.
7595 (AM_GNU_GETTEXT_VERSION): Update to 0.12.1.
7596 * lib/Makefile.am (EXTRA_DIST): Add stdbool_.h.
7597 (MOSTLYCLEANFILES): New var.
7598 ($(libbison_a_OBJECTS)): Depend on $(STDBOOL_H).
7599 (stdbool.h): New rule.
7600 * lib/dirname.c, lib/dirname.h, lib/hash.c, lib/hash.h,
7601 lib/malloc.c, lib/obstack.h, lib/quote.c, lib/realloc.c,
7602 lib/strcasecmp.c, lib/xalloc.h, m4/alloca.m4, m4/onceonly.m4,
7603 m4/quote.m4: Upgrade to today's gnulib.
7604
7605 * tests/calc.at (AT_CHECK_CALC): New option EXPECTED-TO-FAIL.
7606 (AT_CHECK_CALC_LALR1_CC): Use it, since the C++ LALR parser fails
7607 the tests right now.
7608 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Ensure yylex and
7609 yyerror are declared before use; C99 requires this.
7610
7611 2003-06-09 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
7612
7613 * data/glr.c (YYERROR): Update definition to reset yyerrState to 0
7614 first.
7615 (yyrecoverSyntaxError): Correct the logic for setting and testing
7616 yyerrState.
7617 Correct comment on handling EOF.
7618 Allow states with only a default reduction, rather than failing
7619 (I can't quite reconstruct why these were not allowed before).
7620
7621 Fixes to avoid problem that $-N rules in GLR parsers can cause
7622 buffer overruns, corrupting state.
7623
7624 * src/output.c (prepare_rules): Output max_left_semantic_context
7625 definition.
7626 * src/reader.h (max_left_semantic_context): New variable declaration.
7627 * src/scan-gram.l (max_left_semantic_context): Define.
7628 (handle_action_dollar): Update max_left_semantic_context.
7629 * data/glr.c (YYMAXLEFT): New definition.
7630 (yydoAction): Increase size of yyrhsVals by YYMAXLEFT.
7631 (yyresolveAction): Ditto.
7632
7633 Fixes to problems with location handling in GLR parsers reported by
7634 Frank Heckenbach (2003/06/05).
7635
7636 * data/glr.c (YYLTYPE): Make trivial if locations not used.
7637 (YYRHSLOC): Add parentheses, and define only if locations used.
7638 (YYLLOC_DEFAULT): Add parentheses, and give trivial definition if
7639 locations not used.
7640 (yyuserAction): Use YYLLOC_DEFAULT to set *yylocp.
7641 (yydoAction): Remove redundant initialization of *yyvalp and *yylocp.
7642
7643 * tests/cxx-type.at: Exercise location information; update tests
7644 to differentiate output with and without locations.
7645 Remove forward declarations of yylex and yyerror---caused errors
7646 because default YYLTYPE not yet defined.
7647 Change semantic actions to compute strings, rather than printing
7648 them directly (to test proper passing of semantics values). Change
7649 output to prefix notation and update test data and expected results.
7650 (yylex): Track locations.
7651 (stmtMerge): Return value rather than printing, and include arguments
7652 in value.
7653
7654 2003-06-03 Paul Eggert <eggert@twinsun.com>
7655
7656 Avoid warnings generated by GCC 2.95.4 when Bison is
7657 configured with --enable-gcc-warnings.
7658 * data/lalr1.cc (yy::]b4_parser_class_name[::parse,
7659 yy::]b4_parser_class_name[::translate_,
7660 yy::Stack::operator[] (unsigned),
7661 yy::Stack::operator[] (unsigned) const,
7662 yy::Slice::operator[] (unsigned),
7663 yy::Slice::operator[] (unsigned) const):
7664 Rename local vars to avoid warnings.
7665 * tests/glr-regression.at (Improper handling of embedded actions
7666 and $-N in GLR parsers): Remove unused local variable from yylex.
7667 * tests/regression.at (_AT_DATA_DANCER_Y): Declare yylex to take
7668 (void) as arg when not pure, since we now assume C89 when building
7669 Bison. Pacify GCC by using parameter.
7670
7671 2003-06-02 Paul Eggert <eggert@twinsun.com>
7672
7673 * data/lalr1.cc (yy::Position::lines, yy::Position::columns,
7674 yy::Location::lines, yy::Location::columns): Rename arguments
7675 to avoid shadowing; this removes a warning generated by GCC 3.3.
7676
7677 2003-06-01 Paul Eggert <eggert@twinsun.com>
7678
7679 Don't pass C-only warning optins (e.g., -Wmissing-declarations)
7680 to g++, as GCC 3.3 complains if you do it.
7681 * configure.ac (WARNING_CXXFLAGS): New subst. Set it to
7682 everything that WARNING_CFLAGS has, except omit warnings
7683 not suitable for C++.
7684 (AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]).
7685 * tests/atlocal.in (CXXFLAGS): New var.
7686 * tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS.
7687
7688 Fix a GLR parser bug I reported in February; see
7689 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>.
7690 The problem was that GLR parsers did not conform to the C standard,
7691 because actions like { $1 = $2 + $3; } expanded to expressions
7692 that invoked YYFILL in separate subexpressions, and YYFILL assigned
7693 to a local variable. The C standard says that expressions
7694 like (var = f ()) + (var = f ()) have undefined behavior.
7695 Another problem was that GCC sometimes issues warnings that
7696 yyfill and its parameters are unused.
7697
7698 * data/glr.c (yyfillin): Renamed from the old yyfill. Mark
7699 as possibly unused.
7700 (yyfill): New function.
7701 (YYFILL): Use it.
7702 (yyuserAction): Change type of yynormal to bool, so that it matches
7703 the new yyfill signature. Mark it as possibly unused.
7704
7705
7706 Follow up on a bug I reported in February, where a Bison-generated
7707 parser can loop. Provide a test case and a fix for yacc.c. I
7708 don't have a fix for lalr1.cc or for glr.c, unfortunately.
7709 The original bug report is in:
7710 <http://lists.gnu.org/archive/html/bison-patches/2003-02/msg00044.html>
7711
7712 * data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the
7713 macro's size was becoming unwieldy.
7714 (yyerrlab): Do not discard an empty lookahead symbol, as this
7715 might destroy garbage.
7716 (yyerrorlab): New label, with the old contents of YYERROR,
7717 plus the following change: pop the stack of rhs corresponding
7718 to the production that invoked YYERROR. That is how Yacc
7719 behaves, and POSIX requires this behavior.
7720 (yyerrlab1): Use YYPOPSTACK instead of its definiens.
7721 * tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available.
7722 Define 'alarm' to do nothing if unistd.h is not available.
7723 Add a new rule "exp: '-' error;" to test the above change to
7724 data/yacc.c. Use 'alarm' to abort any test taking longer than
7725 10 seconds, as it's probably looping.
7726 (AT_CHECK_CALC): Test recovery from error in new grammar rule.
7727 Also, the new yacc.c generates two fewer diagnostics for an
7728 existing test.
7729
7730 2003-05-24 Paul Eggert <eggert@twinsun.com>
7731
7732 * data/glr.c (YYSTACKEXPANDABLE): Do not evaluate
7733 YYSTYPE_IS_TRIVIAL or YYSTYPE_IS_TRIVIAL unless they are defined.
7734 This fixes a problem reported by John Bowman when the Compaq/HP
7735 Alpha cxx compiler happy (e.g. using cxx -D__USE_STD_IOSTREAM
7736 -ansi -Wall -gall).
7737 * data/yacc.c (union yyalloc): Likewise.
7738 (YYCOPY): Do not evaluate __GNUC__ unless it is defined.
7739
7740 Switch from 'int' to 'bool' where that makes sense.
7741
7742 * lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p,
7743 abitset_subset_p, abitset_disjoint_p, abitset_and_cmp,
7744 abitset_andn_cmp, abitset_or_cmp, abitset_xor_cmp, abitset_and_or,
7745 abitset_and_or_cmp, abitset_andn_or_cmp, abitset_or_and_cmp):
7746 Return or accept bool, not int. All callers changed.
7747 * lib/bbitset.h: (bitset_toggle_, bitset_copy_, bitset_and_or_cmp_,
7748 bitset_andn_or_cmp_, bitset_or_and_cmp_): Likewise.
7749 * lib/bitset.c (bitset_only_set_p, bitset_print, bitset_toggle_,
7750 bitset_copy_, bitset_op4_cmp, bitset_and_or_cmp_, bitset_andn_or_cmp_,
7751 bitset_or_and_cmp_): Likewise.
7752 * lib/bitset.h (bitset_test, bitset_only_set_p): Likewise.
7753 * lib/bitset_stats.c (bitset_stats_print, bitset_stats_toggle,
7754 bitset_stats_test, bitset_stats_empty_p, bitset_stats_disjoint_p,
7755 bitset_stats_equal_p, bitset_stats_subset_p, bitset_stats_and_cmp,
7756 bitset_stats_andn_cmp, bitset_stats_or_cmp, bitset_stats_xor_cmp,
7757 bitset_stats_and_or_cmp, bitset_stats_andn_or_cmp,
7758 bitset_stats_or_and_cmp): Likewise.
7759 * lib/ebitset.c (ebitset_elt_zero_p, ebitset_equal_p, ebitset_copy_cmp,
7760 ebitset_test, ebitset_empty_p, ebitset_subset_p, ebitset_disjoint_p,
7761 ebitset_op3_cmp, ebitset_and_cmp, ebitset_andn_cmp, ebitset_or_cmp,
7762 ebitset_xor_cmp): Likewise.
7763 * lib/lbitset.c (lbitset_elt_zero_p, lbitset_equal_p, lbitset_copy_cmp,
7764 lbitset_test, lbitset_empty_p, lbitset_subset_p, lbitset_disjoint_p,
7765 lbitset_op3_cmp, lbitset_and_cmp, lbitset_andn_cmp, lbitset_or_cmp,
7766 lbitset_xor_cmp): Likewise.
7767 * lib/bbitset.h: Include <stdbool.h>.
7768 (struct bitset_vtable): The following members now return bool, not
7769 int: toggle, test, empty_p, disjoint_p, equal_p, subset_p,
7770 and_cmp, andn_cmp, or_cmp, xor_cmp, and_or_cmp, andn_or_cmp,
7771 or_and_cmp).
7772 * src/conflicts.c (count_rr_conflicts): Likewise.
7773 * lib/bitset_stats.h (bitset_stats_enabled): Now bool, not int.
7774 All uses changed.
7775 * lib/ebitset.c (ebitset_obstack_init): Likewise.
7776 * lib/lbitset.c (lbitset_obstack_init): Likewise.
7777 * src/getargs.c (debug_flag, defines_flag, locations_flag,
7778 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
7779 graph_flag): Likewise.
7780 * src/getargs.h (debug_flag, defines_flag, locations_flag,
7781 no_lines_flag, no_parser_flag, token_table_flag, yacc_flag,
7782 graph_flag): Likewise.
7783 * src/output.c (error_verbose): Likewise.
7784 * src/output.h (error_verbose): Likewise.
7785 * src/reader.c (start_flag, typed): Likewise.
7786 * src/reader.h (typed): Likewise.
7787 * src/getargs.c (LOCATIONS_OPTION): New constant.
7788 (long_options, getargs): Use it.
7789 * src/lalr.c (build_relations): Use bool, not int.
7790 * src/nullable.c (nullable_compute): Likewise.
7791 * src/print.c (print_reductions): Likewise.
7792 * src/tables.c (action_row, pack_vector): Likewise.
7793 * src/muscle_tab.h (MUSCLE_INSERT_BOOL): New macro.
7794 * src/output.c (prepare): Use it.
7795 * src/output.c (token_definitions_output,
7796 symbol_destructors_output, symbol_destructors_output): Use string,
7797 not boolean integer, to keep track of whether to output separator.
7798 * src/print_graph.c (print_core): Likewise.
7799 * src/state.c (state_rule_lookaheads_print): Likewise.
7800
7801 * config/install-sh: Sync from automake 1.7.5.
7802
7803 2003-05-14 Paul Eggert <eggert@twinsun.com>
7804
7805 * src/parse-gram.y (rules_or_grammar_declaration): Require a
7806 semicolon after a grammar declaration, in the interest of possible
7807 future changes to the Bison input language.
7808 Do not allow a stray semicolon at the start of the grammar.
7809 (rhses.1): Allow one or more semicolons after any rule, including
7810 just before "|" as required by POSIX.
7811 * tests/input.at (Torturing the Scanner): Add tests for ";|" in a
7812 grammar.
7813
7814 2003-05-14 Alexandre Duret-Lutz <adl@gnu.org>
7815
7816 %parse-param support for lalr1.cc.
7817
7818 * data/lalr1.cc (b4_parse_param_decl, b4_parse_param_cons,
7819 b4_cc_constructor_calls, b4_cc_constructor_call,
7820 b4_parse_param_vars, b4_cc_var_decls, b4_cc_var_decl): New m4
7821 definitions.
7822 (yy::b4_parser_class_name::b4_parser_class_name): Take extra
7823 parse-param arguments.
7824 (yy::b4_parser_class_name): Declare instance variables to
7825 hold parse-param arguments.
7826 * tests/calc.at: s/value/semantic_value/ because value clashes
7827 with a member of yy::b4_parser_class_name. Adjust C++ code
7828 to handle %parse-param. Enable %parse-param test in C++.
7829
7830 2003-05-12 Paul Eggert <eggert@twinsun.com>
7831
7832 * doc/bison.texinfo (How Can I Reset @code{yyparse}): Reword the
7833 English a bit. Fix fclose typo. Change "const char" to "char
7834 const", and use ANSI C rather than K&R for "main". Suggest
7835 YY_FLUSH_BUFFER over yyrestart (as that is what Flex recommends)
7836 and suggest yy_switch_to_buffer.
7837
7838 2003-05-05 Paul Eggert <eggert@twinsun.com>
7839
7840 * lib/bitset.h (__INT_TO_PTR): Define to a value that presumes
7841 C89. This avoids a diagnostic on compilers that define __STDC__
7842 to 0, fixing a problem with Tru64 cc reported by Martin Mokrejs in
7843 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
7844
7845 2003-05-03 Paul Eggert <eggert@twinsun.com>
7846
7847 * lib/bitset.h (BITSET_FOR_EACH, BITSET_FOR_EACH_REVERSE):
7848 Do not overrun array bounds.
7849 This should fix a bug reported today by Olatunji Oluwabukunmi in
7850 <http://lists.gnu.org/archive/html/bug-bison/2003-05/msg00004.html>.
7851
7852 2003-04-29 Akim Demaille <akim@epita.fr>
7853
7854 * src/gram.h, src/gram.c (pure_parser, glr_parser): Move to...
7855 * src/getargs.c, src/getargs.h: here, as bool, not int.
7856 (nondeterministic_parser): New.
7857 * src/parse-gram.y, src/scan-gram.l: Support
7858 %nondeterministic-parser.
7859 * src/output.c (prepare): Use nondeterministic_parser instead
7860 of glr_parser where appropriate.
7861 * src/tables.c (conflict_row, action_row, save_row)
7862 (token_actions, token_actions, pack_vector): Ditto.
7863
7864 2003-04-29 Akim Demaille <akim@epita.fr>
7865
7866 * doc/bison.texinfo (C++ Parsers, Implementing Loops): New.
7867
7868 2003-04-29 Akim Demaille <akim@epita.fr>
7869
7870 * tests/calc.at: Also test yacc.c and glr.c (but not lalr1.cc yet)
7871 with %pure-parser and %locations to exercise the patch from Yakov
7872 Markovitch below.
7873
7874 2003-04-28 Tim Van Holder <tim.van.holder@pandora.be>
7875
7876 * data/yacc.c: (b4_lex_param): Corrected for the case where
7877 %lex-param is provided and %pure-parser isn't.
7878
7879 2003-04-27 Paul Eggert <eggert@twinsun.com>
7880
7881 Avoid gcc -Wundef warnings reported by Gerald Pfeifer in
7882 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00044.html>.
7883 * data/yacc.c (YYSTACK_ALLOC): Don't evaluate YYSTACK_USE_ALLOCA
7884 if it is not defined.
7885 (YYMAXDEPTH): Don't evaluate YYMAXDEPTH if it is not defined.
7886
7887 2003-04-26 Paul Eggert <eggert@twinsun.com>
7888
7889 * data/lalr1.cc (yy::Parser::pact_ninf_, yy::Parser::table_ninf_):
7890 Declare to be of type suitable for the ninf value itself, not of
7891 type suitable for the corresponding table, since the latter might
7892 be unsigned but the ninf value might be negative. This fixes a
7893 bug reported by Alexandre Duret-Lutz in
7894 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00017.html>.
7895
7896 * configure.ac (AC_FUNC_ERROR_AT_LINE): Remove, since gl_ERROR
7897 invokes it. We shouldn't invoke it twice because it will attempt
7898 to put error.o in the archive twice. This fixes a glitch reported
7899 by Martin Mokrejs in
7900 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00041.html>.
7901
7902 2003-04-21 Paul Eggert <eggert@twinsun.com>
7903
7904 * m4/error.m4: Update from Bruno Haible's 2003-04-14 patch
7905 to gnulib.
7906
7907 2003-04-21 Yakov Markovitch <Markovitch@iso.ru>
7908
7909 * data/glr.c (yyexpandGLRStack) [!YYSTACKEXPANDABLE]:
7910 Fix obvious typo that results in uncompilable GLR parsers
7911 when both %pure-parser and %locations are used. (trivial change)
7912
7913 2003-04-17 Paul Eggert <eggert@twinsun.com>
7914
7915 * src/scan-gram.l: Add %option nounput, since we no longer use unput.
7916 (unexpected_eof): Renamed from unexpected_end_of_file, for brevity.
7917 Do not insert the expected token via unput, as this runs afoul
7918 of a POSIX-compatibility bug in flex 2.5.31.
7919 All uses changed to BEGIN the parent state,
7920 since we no longer insert the expected token via unput.
7921 * tests/regression.at (Invalid inputs): Remove cascaded diagnostic
7922 that is no longer emitted after the above change.
7923
7924 * src/conflicts.c (set_conflicts): Resolve all conflicts, not just
7925 the first one. This change is from Paul Hilfinger, and it fixes
7926 regression reported by Werner Lemberg in
7927 <http://lists.gnu.org/archive/html/bug-bison/2003-04/msg00026.html>.
7928
7929 (resolve_sr_conflict): Don't invoke state_errs_set
7930 unless one or more tokens have been explicitly made errors.
7931 Otherwise, the above change causes Bison to abort.
7932
7933 * tests/existing.at (GNU pic Grammar): New test case, taken from
7934 Lemberg's email.
7935
7936 2003-03-31 Akim Demaille <akim@epita.fr>
7937
7938 * doc/Makefile.am (AM_MAKEINFOFLAGS): Don't split the info file.
7939
7940 2003-03-31 Akim Demaille <akim@epita.fr>
7941
7942 * src/output.c (prepare_symbols): Avoid trailing spaces in the
7943 output.
7944
7945 2003-03-31 Akim Demaille <akim@epita.fr>
7946
7947 * doc/bison.texinfo (Strings are Destroyed): s/losses/loses/.
7948 From Paul Hilfinger.
7949
7950 2003-03-29 Akim Demaille <akim@epita.fr>
7951
7952 * m4/error.m4: Do not put under dynamic conditions some code which
7953 expansion is under static control.
7954
7955 2003-03-29 Akim Demaille <akim@epita.fr>
7956
7957 * doc/bison.texinfo (How Can I Reset @code{yyparse}): New.
7958
7959 2003-03-29 Akim Demaille <akim@epita.fr>
7960
7961 * doc/bison.texinfo (Strings are Destroyed): New.
7962
7963 2003-03-13 Paul Eggert <eggert@twinsun.com>
7964
7965 * .cvsignore: Add configure.lineno.
7966 * src/.cvsignore: Add yacc.
7967 * tests/.cvsignore: Add testsuite.log.
7968 * doc/fdl.texi: Sync with latest FSF version.
7969
7970 2003-03-12 Paul Eggert <eggert@twinsun.com>
7971
7972 * scan-gram.l (YY_USER_INIT): Initialize code_start, too.
7973 (<INITIAL><<EOF>>, <SC_PRE_CODE><<EOF>>): Set *loc to the scanner
7974 cursor, instead of leaving it undefined. This fixes a bug
7975 reported by Tim Van Holder in
7976 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00023.html>.
7977 * tests/input.at (Torturing the Scanner): Test the scanner on
7978 an empty input file, which was Tim Van Holder's test case.
7979
7980 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): When checking whether
7981 <sys/resource.h> can be included, include sys/time.h and
7982 sys/times.h first, if available. This works around the SunOS
7983 4.1.4 porting bug reported by Bruce Becker in
7984 <http://lists.gnu.org/archive/html/bug-bison/2003-03/msg00018.html>.
7985
7986 * m4/subpipe.m4 (BISON_PREREQ_SUBPIPE): Don't
7987 AC_CHECK_HEADERS([sys/wait.h]), as this interferes with
7988 AC_HEADER_SYS_WAIT.
7989
7990 Merge changes from gnulib. This was prompted because the CVS
7991 snapshot didn't build on Solaris 7 due to strnlen problems.
7992
7993 These changes need to be merged back into gnulib:
7994 * lib/hash.c: Include <stdbool.h> unconditionally.
7995 * m4/onceonly.m4 (m4_quote): New macro.
7996 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
7997 Quote AC_FOREACH variable-expansions properly.
7998 The 2003-01-03 obstack.h change also needs merging.
7999 {end of changes requiring merging}
8000
8001 * lib/stdbool.h.in, m4/alloca.m4, m4/dirname.m4, m4/dos.m4,
8002 m4/getopt.m4, m4/hash.m4, m4/malloc.m4, m4/memchr.m4,
8003 m4/memrchr.m4, m4/obstack.m4, m4/onceonly.m4, m4/quote.m4,
8004 m4/quotearg.m4, m4/realloc.m4, m4/stpcpy.m4, m4/strnlen.m4,
8005 m4/strtol.m4, m4/strtoul.m4, m4/unlocked-io.m4, m4/xalloc.m4:
8006 New files, imported from gnulib.
8007 * m4/Makefile.am (EXTRA_DIST): Add the new m4/*.m4 files mentioned
8008 above.
8009
8010 * lib/mbswidth.c, m4/error.m4, m4/mbrtowc.m4, m4/mbswidth.m4,
8011 m4/memcmp.m4, m4/prereq.m4, m4/stdbool.m4: Update to current
8012 gnulib sources.
8013
8014 * configure.ac (gl_DIRNAME, gl_GETOPT, gl_HASH, gl_QUOTE, gl_XALLOC):
8015 Add.
8016 (gl_ERROR): New, replacing jm_PREREQ_ERROR.
8017 (gl_FUNC_ALLOCA): New, replacing AC_FUNC_ALLOCA.
8018 (gl_FUNC_STPCPY): New, replacing AC_REPLACE_FUNCS(stpcpy).
8019 (gl_FUNC_STRNLEN): New, replacing AC_FUNC_STRNLEN.
8020 (gl_MBSWIDTH): New, replacing jm_PREREQ_MBSWIDTH.
8021 (gl_OBSTACK): New, replacing AC_FUNC_OBSTACK.
8022 (gl_QUOTEARG): New, replacing jm_PREREQ_QUOTEARG.
8023 (jm_FUNC_GLIBC_UNLOCKED_IO, gl_FUNC_STPCPY, gl_FUNC_STRTOL): New.
8024 (jm_FUNC_MALLOC): New, replacing AC_FUNC_MALLOC.
8025 (jm_FUNC_REALLOC): New, replacing AC_FUNC_REALLOC.
8026 (jm_PREREQ_ARGMATCH): Remove.
8027 (AC_REPLACE_FUNCS): Remove memchr, memrchr, stpcpy, strtol, strtoul.
8028 * lib/Makefile.am (libbison_a_SOURCES): Add argmatch.c, argmatch.h.
8029
8030 * src/system.h: Include <stdbool.h> unconditionally.
8031
8032 * lib/bbitset.h: Include <limits.h> unconditionally. We have been
8033 assuming at least C89 in the bitset code for some time now.
8034
8035 2003-03-03 Akim Demaille <akim@epita.fr>
8036
8037 * ro.po: New.
8038
8039 2003-03-02 Akim Demaille <akim@epita.fr>
8040
8041 * doc/bison.texinfo (Table of Symbols): Reactivate the
8042 documentation for %lex-param, and %parse-param.
8043
8044 2003-03-02 Akim Demaille <akim@epita.fr>
8045
8046 * data/yacc.c, data/glr.c, data/lal1.cc: Use similar code to
8047 generate verbose error messages.
8048 Use the number of tokens as an upper bound in yytname, as it
8049 cannot be a non terminal.
8050
8051 2003-03-02 Akim Demaille <akim@epita.fr>
8052
8053 * tests/regression.at (_AT_DATA_DANCER_Y): Fix the expected error
8054 message.
8055
8056 2003-03-02 Akim Demaille <akim@epita.fr>
8057
8058 * tests/regression.at (_AT_DATA_DANCER_Y, AT_CHECK_DANCER): New.
8059 Use them to exercise yycheck overrun.
8060 Based on Andrew Suffield's grammar.
8061
8062 2003-03-02 Akim Demaille <akim@epita.fr>
8063
8064 Create tests/local.at for Bison generic testing macros.
8065
8066 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Move to...
8067 * tests/local.at (AT_BISON_OPTION_PUSHDEFS, AT_BISON_OPTION_POPDEFS):
8068 This new file.
8069 * tests/calc.at (AT_CHECK_CALC): Adjust.
8070 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR)
8071 (AT_COMPILE, AT_COMPILE_CXX, AT_PARSER_CHECK): Move to...
8072 * tests/local.at: here.
8073 (AT_COMPILE_CXX): Tags the tests using it as c++.
8074 Ignore the test if CXX is not functional.
8075
8076 2003-03-01 Paul Eggert <eggert@twinsun.com>
8077
8078 * src/scan-gram.l (code_start): Initialize it to scanner_cursor,
8079 not loc->end, since loc->end might contain garbage and this leads
8080 to undefined behavior on some platforms.
8081 (id_loc, token_start): Use (IF_LINTed) initial values that do not
8082 depend on *loc, so that the reader doesn't give the the false
8083 impression that *loc is initialized.
8084 (<INITIAL>"%%"): Do not bother setting code_start, since its value
8085 does not survive the return.
8086
8087 2003-03-01 Akim Demaille <akim@epita.fr>
8088
8089 * src/scan-gram.l (code_start): Always initialize it when entering
8090 into yylex, as SC_EPILOGUE is activated *before* the corresponding
8091 yylex invocation. An alternative would be making it static, but
8092 then it starts with the second %%'s beginning, instead of its end.
8093
8094 2003-02-28 Paul Eggert <eggert@twinsun.com>
8095
8096 * lib/mbswidth.c: Include <wchar.h> before "mbswidth.h", to work
8097 around a UnixWare 7.1.1 porting bug reported by John Hughes in
8098 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00030.html>.
8099
8100 2003-02-26 Paul Eggert <eggert@twinsun.com>
8101
8102 * README: Mention compiler bug in Sun Forte Developer 6 update 2.
8103 Remove Sequent/Pyramid discussion (nobody uses them any more).
8104 Merge VMS and MS-DOS discussion; these ports may well be dead
8105 but let's keep mentioning them for now. Put <> around email
8106 addresses. Add copyright notice.
8107
8108 2003-02-24 Paul Eggert <eggert@twinsun.com>
8109
8110 * data/glr.c (yy_reduce_print): yylineno -> yylno,
8111 to avoid collision with flex use of yylineno.
8112 Problem reported by Bruce Lilly in
8113 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00016.html>.
8114 * data/lalr1.cc (yy::]b4_parser_class_name[::parse): Likewise.
8115 * data/yacc.c (yy_reduce_print): Likewise.
8116
8117 * config/depcomp: Sync with Automake 1.7.3.
8118
8119 2003-02-21 Akim Demaille <akim@epita.fr>
8120
8121 * data/lalr1.cc: Use temporary variables instead of casts to
8122 change integer types.
8123 Suggested by Paul Eggert.
8124
8125 2003-02-21 Akim Demaille <akim@epita.fr>
8126
8127 * doc/bison.texinfo: Use "location" consistently to refer to @n,
8128 to avoid confusions with lalr1.cc's notion of Position.
8129 Suggested by Paul Eggert.
8130
8131 2003-02-20 Akim Demaille <akim@epita.fr>
8132
8133 * data/lalr1.cc (position.hh): Make sure "columns" never pushes
8134 before initial_columns.
8135 (location.hh): Use consistent variable names when defining the
8136 operator<<.
8137 Use "last" so that we subtract from Positions, not from unsigned.
8138
8139 2003-02-20 Akim Demaille <akim@epita.fr>
8140
8141 * data/lalr1.cc (position.hh): New subfile, including the extended
8142 and Doxygen'ed documentation of class Position.
8143 (location.hh): Use it.
8144 Document a` la Doxygen.
8145 With the help of Benoit Perrot.
8146
8147 2003-02-20 Akim Demaille <akim@epita.fr>
8148
8149 * tests/calc.at (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): Define
8150 AT_YACC_IF.
8151 Redefine AT_YYERROR_SEES_LOC_IF using it.
8152 (_AT_DATA_CALC_Y): Don't declare yyerror when lalr1.cc, as it is
8153 not defined.
8154 Don't use the location in yy::Parser::error_ and
8155 yy::Parser::print_ when not %locations.
8156 Activate more lalr1.cc tests.
8157
8158 2003-02-19 Akim Demaille <akim@epita.fr>
8159
8160 * data/lalr1.cc: When displaying a line number, be sure to make it
8161 an int.
8162
8163 2003-02-19 Akim Demaille <akim@epita.fr>
8164
8165 * data/lalr1.cc (b4_stack_depth_init, yy::Parser::initdepth_):
8166 Remove, useless.
8167 (YYABORT, YYACCEPT, YYERROR): New.
8168 * tests/calc.at: Renable the lalr1.cc test.
8169
8170 2003-02-19 Akim Demaille <akim@epita.fr>
8171
8172 * tests/calc.at (AT_CHECK_CALC): Check different scenarios of
8173 error recovery, mixing with/without pops and discarding of the
8174 lookahead.
8175 Exercise YYERROR.
8176 Disable the lalr1.cc tests as currently it doesn't support YYERROR.
8177
8178 2003-02-17 Paul Eggert <eggert@twinsun.com>
8179
8180 * tests/atlocal.in (LDFLAGS, LIBS): New vars.
8181 * tests/testsuite.at (AT_COMPILE): Use them.
8182 This fixes the testsuite problem reported by Robert Lentz in
8183 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00011.html>.
8184
8185 2003-02-12 Paul Eggert <eggert@twinsun.com>
8186
8187 * data/yacc.c (yyerrlab) [YYERROR_VERBOSE]:
8188 Avoid subscript error in yycheck. Bug reported by Andrew Suffield in
8189 <http://lists.gnu.org/archive/html/bug-bison/2003-02/msg00003.html>.
8190 * data/glr.c (yyreportSyntaxError) [YYERROR_VERBOSE]: Likewise.
8191 Check for malloc failure, for consistency with yacc.c.
8192 (yytname_size): Remove, for consistency with yacc.c.
8193
8194 The bug still remains in data/lalr1.cc, as I didn't have time
8195 to fix it there.
8196
8197 2003-02-06 Akim Demaille <akim@epita.fr>
8198
8199 * configure.ac (GXX): Rename as...
8200 (CXX): this, to keep the original Autoconf semantics.
8201 Require 2.57.
8202 * data/lalr1.cc: Fix b4_copyright invocations.
8203 If YYDEBUG is not defined, don't depend upon name_ being defined.
8204 (location.hh): Include string and iostream.
8205 (Position::filename): New member.
8206 (Position::Position ()): New.
8207 (operator<< (Position)): New.
8208 (operator- (Position, int)): New.
8209 (Location::first, Location::last): Rename as...
8210 (Location::begin, Location::end): these, to mock the conventional
8211 iterator names.
8212 (operator<< (Location)): New.
8213 * tests/atlocal.in (CXX): New.
8214 * tests/testsuite.at (AT_COMPILE_CXX): New.
8215 * tests/calc.at (_AT_DATA_CALC_Y): Adjust yyerror to report the
8216 locations in a more synthetic way.
8217 (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF is positive if
8218 lalr1.cc is used.
8219 Adjust the C locations to match those from Emacs: first column is
8220 column 0.
8221 Change all the expected results.
8222 Conform to the GCS: simplify the locations when applicable.
8223 (LOC, VAL, YYLLOC_FORMAL, YYLLOC_ARG, USE_YYLLOC, LEX_FORMALS)
8224 (LEX_ARGS, USE_LEX_ARGS, LEX_PRE_FORMALS, LEX_PRE_ARGS): Replace
8225 these CPP macros with the m4 macros new defined by...
8226 (AT_CHECK_PUSHDEFS): this, i.e.:
8227 (AT_LALR1_CC_IF, AT_PURE_LEX_IF, AT_LOC, AT_VAL, AT_LEX_FORMALS)
8228 (AT_LEX_ARGS, AT_USE_LEX_ARGS, AT_LEX_PRE_FORMALS, AT_LEX_PRE_ARGS)
8229 New macros.
8230 (AT_CHECK_POPDEFS): Undefine them.
8231 (AT_CHECK_CALC_LALR1_CC): New.
8232 Use it for the first lalr1.cc test.
8233
8234 2003-02-04 Akim Demaille <akim@epita.fr>
8235
8236 * data/lalr1.cc (YYLLOC_DEFAULT): Fix its definition: be based on
8237 Location as is defined.
8238
8239 2003-02-04 Akim Demaille <akim@epita.fr>
8240
8241 * data/lalr1.cc: If YYDEBUG is not defined, don't depend upon
8242 name_ being defined.
8243
8244 2003-02-03 Paul Eggert <eggert@twinsun.com>
8245
8246 * src/gram.h (start_symbol): Remove unused decl.
8247
8248 Use more-consistent naming conventions for local vars.
8249
8250 * src/derives.c (derives_compute): Change type of local var from
8251 int to rule_number.
8252 * src/gram.c (grammar_rules_partial_print): Likewise.
8253 * src/print.c (print_core): Likewise.
8254 * src/reduce.c (reduce_grammar_tables): Likewise.
8255
8256 * src/gram.c (grammar_dump): Change name of item_number *
8257 local var from r to rp.
8258 * src/nullable.c (nullable_compute): Likewise.
8259
8260 * src/gram.h (ISTOKEN, ISVAR): Use i, not s, for int var.
8261
8262 * src/gram.h (symbol_number_as_item_number): Use sym, not s,
8263 for symbol or symbol_number var.
8264 * src/reader.c (grammar_start_symbol_set): Likewise.
8265 * src/reader.h (grammar_start_symbol_set, grammar_symbol_append):
8266 Likewise.
8267 * src/state.c (transitions_to): Likewise.
8268 * src/state.h: Likewise.
8269 * src/tables.c (symbol_number_to_vector_number): Likewise.
8270
8271 * src/muscle_tab.h (MUSCLE_OBSTACK_SGROW): Use p, not s, for
8272 char * var.
8273
8274 * src/parse-gram.y (lloc_default): Use loc, not r, for YYLTYPE
8275 var.
8276
8277 * src/scan-gram.l (no_cr_read): Use bytes_read, not s, for size
8278 var.
8279
8280 * src/system.h (xstrndup, strchr, strspn, strnlen, memchr, memrchr):
8281 Use str, not s, for char * var. Use ch, not c, for character var.
8282 Use size for size var.
8283
8284 * src/uniqstr.c (uniqstr_new, uniqstr_assert): Use str, not s, for
8285 char * var.
8286 (uniqstr_print, uniqst_print_processor): Use ustr, not s, for
8287 uniqstr var.
8288 * src/uniqstr.h: Likewise.
8289
8290 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
8291 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
8292 get_node_alignment_str, get_arrow_mode_str, get_crossing_type_str,
8293 get_view_str, get_linestyle_str, get_arrowstyle_str): Rename
8294 param to have same name as that of enum, so that we don't use
8295 "s" to stand for a non-state.
8296
8297 2003-02-02 Akim Demaille <akim@epita.fr>
8298
8299 * src/scan-skel.l: Scan more than one inert character per yylex
8300 invocation.
8301
8302 2003-02-01 Paul Eggert <eggert@twinsun.com>
8303
8304 Version 1.875a.
8305
8306 * po/LINGUAS: Add ms.
8307
8308 2003-01-30 Akim Demaille <akim@epita.fr>
8309
8310 * doc/Makefile.am (CLEANFILES): Add bison.fns for distcheck.
8311
8312 2003-01-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
8313
8314 * tests/cxx-type.at: Correct apparent typo in Bison input: $$ instead
8315 of $1.
8316
8317 Changes in response to error report by S. Eken: GLR mode does not
8318 handle negative $ indices or $ indices in embedded rules correctly.
8319 See <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00076.html>.
8320
8321 * data/glr.c (b4_rhs_value): Change to use YYFILL macro.
8322 (b4_rhs_location): Ditto.
8323 (yyfill): New function to copy from stack tree into array
8324 incrementally.
8325 (yyuserAction): Modify to allow incremental move of semantic values
8326 to rhs array when in GLR mode.
8327 Define YYFILL to use in user-defined actions to fill semantic array
8328 as needed.
8329 Remove dummy use of yystack, as there is now a guaranteed use.
8330 (yydoAction): Modify to allow incremental move of semantic values
8331 to rhs array when in GLR mode.
8332 (yyresolveAction): Ditto.
8333 (yyglrShiftDefer): Update comment.
8334 (yyresolveStates): Use X == NULL for pointers, not !X.
8335 (yyglrReduce): Ditto.
8336 (yydoAction): Ditto
8337
8338 * tests/glr-regr1.at: Rename to ...
8339 * tests/glr-regression.at: Add new regression test for the problems
8340 described above (adapted from S. Eken).
8341 Update copyright notice.
8342 * tests/testsuite.at: Rename glr-regr1.at to glr-regression.at.
8343 * tests/Makefile.am: Ditto.
8344
8345 2003-01-28 Paul Eggert <eggert@twinsun.com>
8346
8347 * data/lalr1.cc: Do not use @output_header_name@ unless
8348 b4_defines_flag is set. This fixes two bugs reported by
8349 Tim Van Holder in
8350 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00071.html>
8351 and <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00073.html>.
8352
8353 2003-01-21 Paul Eggert <eggert@twinsun.com>
8354
8355 * data/yacc.c (YYERROR): Move code from yyerrlab1 to here, so that
8356 we don't need to worry about yyerrlab1 being reported as an
8357 "unused label" by non-GCC C compilers. The downside is that if
8358 locations are used then a couple of statements are duplicated each
8359 time YYERROR is invoked, but the upside is that the warnings
8360 should vanish.
8361 (yyerrlab1): Move code to YERROR.
8362 (yyerrlab2): Remove. Change uses back to yyerrlab1.
8363 This reverts some of the 2002-12-27 change.
8364
8365 2003-01-17 Paul Eggert <eggert@twinsun.com>
8366
8367 * src/output.c (symbol_printers_output): Fix typo that led
8368 to core dump. Problem reported by Antonio Rus in
8369 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00058.html>.
8370
8371 2003-01-13 Akim Demaille <akim@epita.fr>,
8372 Quoc Peyrot <chojin@lrde.epita.fr>,
8373 Robert Anisko <anisko_r@lrde.epita.fr>
8374
8375 * data/lalr1.cc (parse::yyerrlab1): When popping the stack, stop
8376 when the stacks contain one element, as the loop would otherwise
8377 free the last state, and then use the top state (the one we just
8378 popped). This means that the initial elements will not be freed
8379 explicitly, as is the case in yacc.c; it is not a problem, as
8380 these elements have fake values.
8381
8382 2003-01-11 Paul Eggert <eggert@twinsun.com>
8383
8384 * NEWS: %expect-violations are now just warnings, reverting
8385 to Bison 1.30 and 1.75 behavior. This fixes the GCC 3.2
8386 bootstrapping problem reported by Matthias Klose; see
8387 <http://lists.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
8388 * src/conflicts.c (conflicts_print): Likewise.
8389 * tests/conflicts.at (%expect not enough, %expect too much,
8390 %expect with reduce conflicts): Likewise.
8391 * doc/bison.texinfo (Expect Decl): Document this. Also mention
8392 that the warning is enabled if the number of conflicts changes
8393 (not necessarily increases).
8394
8395 * src/getargs.c (version): Update copyright year.
8396
8397 2003-01-09 Akim Demaille <akim@epita.fr>
8398
8399 * src/Makefile.am, lib/Makefile.am: Use $(VAR) instead of @VAR@.
8400
8401 2003-01-08 Paul Eggert <eggert@twinsun.com>
8402
8403 * Makefile.maint (WGETFLAGS):
8404 New macro, containing "-C off" to disable proxy caches.
8405 All uses of $(WGET) changed to $(WGET) $(WGETFLAGS).
8406 (rel-check): Use $(WGET) instead of wget.
8407
8408 2003-01-06 Paul Eggert <eggert@twinsun.com>
8409
8410 * doc/bison.texinfo (Generalized LR Parsing): Add a reference to
8411 the GLR paper of Scott, Johnstone and Hussain.
8412
8413 2003-01-04 Paul Eggert <eggert@twinsun.com>
8414
8415 * configure.ac (AC_ARG_ENABLE): Add --disable-yacc.
8416 (YACC_SCRIPT, YACC_LIBRARY): New vars to AC_SUBST.
8417 * lib/Makefile.am (lib_LIBRARIES): liby.a -> @YACC_LIBRARY@.
8418 (EXTRA_LIBRARIES): New var, for liby.a.
8419 * src/Makefile.am (bin_SCRIPTS): yacc -> @YACC_SCRIPT@.
8420 (EXTRA_SCRIPTS): New var, for yacc.
8421
8422 * data/yacc.c (yyerrlab1): Omit attribute if __cplusplus is defined,
8423 since GNU C++ (as of 3.2.1) does not allow attributes on labels.
8424 Problem reported by Nelson H. F. Beebe.
8425
8426 2003-01-03 Paul Eggert <eggert@twinsun.com>
8427
8428 * lib/obstack.h (__INT_TO_PTR) [__STDC__]: Cast result to
8429 (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
8430 when compiling Bison 1.875's `bitset bset = obstack_alloc
8431 (bobstack, bytes);'. Problem reported by Nelson H. F. Beebe.
8432
8433 * src/scan-skel.l (QPUTS): Omit redundant `;' from macro definition.
8434 ([^@\n]): Renamed from [^@\n]+ so that the token buffer does not
8435 grow to a huge size with typical invocation.
8436
8437 * lib/hash.c (_Bool, bool, false, true, __bool_true_false_are_defined):
8438 Use the pattern recommended by Autoconf 2.57, except also protect
8439 against double-definition.
8440 * src/system.h: Likewise.
8441 Portability issues reported by Nelson H. F. Beebe.
8442
8443 * data/glr.c (yybool): Renamed from bool, to avoid collisions in C.
8444 All uses changed. Provide a definition in both C and C++.
8445 (yytrue, yyfalse): Define even if defined (__cplusplus).
8446
8447 * lib/bitset_stats.c (bitset_stats_list): Remove unused var.
8448 Reported by Nelson H. F. Beebe.
8449
8450 * src/scan-skel.l ("@oline@"): Output lineno+1, not lineno.
8451
8452 2003-01-02 Paul Eggert <eggert@twinsun.com>
8453
8454 * data/yacc.c (yyerrlab1): Append `;' after attribute, to
8455 pacify the buggy "smart preprocessor" in MacOS 10.2.3.
8456 Bug reported by Nelson H. F. Beebe.
8457
8458 2003-01-01 Paul Eggert <eggert@twinsun.com>
8459
8460 * Version 1.875.
8461
8462 2002-12-30 Paul Eggert <eggert@twinsun.com>
8463
8464 * src/scan-gram.l (<INITIAL,SC_AFTER_IDENTIFIER,SC_PRE_CODE>","):
8465 Moved here from...
8466 (<INITIAL>","): Here. This causes stray "," to be treated
8467 more uniformly.
8468
8469 * src/scan-gram.l (<SC_BRACED_CODE>"}"): Output ";" before the
8470 last brace in braced code when not in Yacc mode, for compatibility
8471 with Bison 1.35. This resurrects the 2001-12-15 patch to
8472 src/reader.c.
8473
8474 * src/reader.h (YYDECL): Use YYSTYPE, not its deprecated alias
8475 yystype. This follows up the 2002-12-24 YYSTYPE bug fix.
8476
8477 2002-12-28 Paul Eggert <eggert@twinsun.com>
8478
8479 * src/symtab.c (symbol_make_alias): Set type of SYMVAL to be
8480 that of SYM's type. This fixes Debian bug 168069, reported by
8481 Thomas Olsson.
8482
8483 2002-12-28 Paul Eggert <eggert@twinsun.com>
8484
8485 Version 1.75f.
8486
8487 Switch back to the Yacc style of conflict reports, undoing some
8488 of the 2002-07-30 change.
8489 * doc/bison.texinfo (Understanding): Use Yacc style for
8490 conflict reports. Also, use new way of locating rules.
8491 * src/conflicts.c (conflict_report):
8492 Renamed from conflict_report_yacc, removing the old
8493 'conflict_report'. Translate the entire conflict report at once,
8494 so that we don't assume that "," has the same interpretation in
8495 all languages.
8496 (conflicts_output): Use Yacc-style conflict report for each state,
8497 instead of our more-complicated style.
8498 (conflicts_print): Use Yacc-style conflict report, except print
8499 the input file name when not emulating Yacc.
8500 * tests/conflicts.at (Unresolved SR Conflicts, Defaulted
8501 Conflicted Reduction, %expect not enough, %expect too much,
8502 %expect with reduce conflicts): Switch to Yacc-style conflict reports.
8503 * tests/existing.at (GNU Cim Grammar): Likewise.
8504 * tests/glr-regr1.at (Badly Collapsed GLR States): Likewise.
8505
8506 * src/complain.c (warn_at, warn, complain_at, complain, fatal_at,
8507 fatal): Don't invoke fflush; it's not needed and it might even be
8508 harmful for stdout, as stdout might not be open.
8509 * src/reduce.c (reduce_print): Likewise.
8510
8511 2002-12-27 Paul Eggert <eggert@twinsun.com>
8512
8513 Fix a bug where error locations were not being recorded correctly.
8514 This problem was originally reported by Paul Hilfinger in
8515 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00086.html>.
8516
8517 * data/yacc.c (yyparse): New local var yylerrsp, to record the
8518 top of the location stack's error locations.
8519 (yyerrlab): Set it. When discarding a token, push its location
8520 onto yylerrsp so that we don't lose track of the error's end.
8521 (yyerrlab1): Now is only the target of YYERROR, so that we can
8522 properly record the location of the action that failed. For GCC
8523 2.93 and later, insert an __attribute__ ((__unused__)) to avoid
8524 GCC warning about yyerrlab1 being unused if YYERROR is unused.
8525 (yyerrlab2): New label, which yyerrlab now falls through to.
8526 Compute the error's location by applying YYLLOC_DEFAULT to
8527 the locations of all the symbols that went into the error.
8528 * doc/bison.texinfo (Location Default Action): Mention that
8529 YYLLOC_DEFAULT is also invoked for syntax errors.
8530 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR):
8531 Error locations include the locations of all the tokens that were
8532 discarded, not just the last token.
8533
8534 2002-12-26 Paul Eggert <eggert@twinsun.com>
8535
8536 * src/files.c: Include quote.h.
8537 (compute_output_file_names): Warn if we detect conflicting
8538 outputs to the same file. This should catch the misunderstanding
8539 exemplified by Debian Bug 165349, reported by Bruce Stephens..
8540
8541 * src/conflicts.c (conflicts_print): If the user specifies
8542 "%expect N", report an error if there are any reduce/reduce
8543 conflicts. This is what the manual says should happen.
8544 This fixes Debian bug 130890, reported by Anthony DeRobertis.
8545 * tests/conflicts.at (%expect with reduce conflicts): New test.
8546
8547 Don't use m4_include on relative file names, as it doesn't work as
8548 desired if there happens to be a file with that name under ".".
8549
8550 * m4sugar/version.m4: Remove; it was included but it wasn't used.
8551 * data/Makefile.am (dist_m4sugar_DATA): Remove m4sugar/version.m4.
8552 * data/m4sugar/m4sugar.m4: Don't include m4sugar/version.m4.
8553 * data/glr.c, data/lalr1.cc, data/yacc.c: Don't include c.m4.
8554 * src/output.c (output_skeleton): Use full path names when
8555 specifying a file to include; don't rely on include path, as
8556 it's unreliable when the working file contains a file with
8557 that name.
8558
8559 2002-12-25 Paul Eggert <eggert@twinsun.com>
8560
8561 Remove obsolete references to bison.simple and bison.hairy.
8562 Problem mentioned by Aubin Mahe in
8563 <http://lists.gnu.org/archive/html/help-bison/2002-12/msg00010.html>.
8564 * data/glr.c: Comment fix.
8565 * doc/bison.1: Remove references. Also, mention "yacc".
8566
8567 * src/getargs.c (getargs) [MSDOS]: Don't assume optarg != NULL
8568 with -g option.
8569
8570 * src/parse-gram.y (declaration): Use enum "report_states" rather
8571 than its numeric value 1.
8572
8573 * src/scan-skel.l ("@output ".*\n): Close any old yyout before
8574 opening a new one. This fixes Debian bug 165349, reported by
8575 Bruce Stephens.
8576
8577 2002-12-24 Paul Eggert <eggert@twinsun.com>
8578
8579 Version 1.75e.
8580
8581 * Makefile.maint (cvs-update): Don't assume that the shell
8582 supports $(...), as Solaris sh doesn't.
8583
8584 * src/parse-gram.y (lloc_default): Remove test for empty
8585 nonterminals at the end, since it didn't change the result.
8586
8587 2002-12-24 Paul Eggert <eggert@twinsun.com>
8588
8589 If the user does not define YYSTYPE as a macro, Bison now declares it
8590 using typedef instead of defining it as a macro. POSIX requires this.
8591 For consistency, YYLTYPE is also declared instead of defined.
8592
8593 %union directives can now have a tag before the `{', e.g., the
8594 directive `%union foo {...}' now generates the C code
8595 `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.
8596 The default union tag is `YYSTYPE', for compatibility with Solaris 9
8597 Yacc. For consistency, YYLTYPE's struct tag is now `YYLTYPE'
8598 instead of `yyltype'.
8599
8600 `yystype' and `yyltype' are now obsolescent macros instead of being
8601 typedefs or tags; they are no longer documented and will be
8602 withdrawn in a future release.
8603
8604 * data/glr.c (b4_location_type): Remove.
8605 (YYSTYPE): Renamed from yystype.
8606 (YYSTYPE_IS_DECLARED): New macro, used to prevent double-typedef.
8607 (struct YYLTYPE): Renamed from struct yyltype.
8608 (YYLTYPE): Renamed from yyltype.
8609 (yyltype, yystype): New (and obsolescent) macros,
8610 for backward compatibility.
8611 * data/yacc.c: Likewise.
8612
8613 * data/yacc.c (YYSTYPE): Declare as union YYSTYPE if the user
8614 does not specify a union tag. This is for compatibility with
8615 Solaris 9 yacc.
8616
8617 * src/parse-gram.y (add_param): 2nd arg is now char * not char
8618 const *, since it is now modified by stripping surrounding { }.
8619 (current_braced_code): Remove.
8620 (PERCENT_DESTRUCTOR, PERCENT_PRINTER, PERCENT_UNION,
8621 PERCENT_LEX_PARAM, PERCENT_PARSE_PARAM): Change names to include
8622 trailing " {...}". Now of type <chars>.
8623 (grammar_declaration): Adjust to bundled tokens.
8624 (code_content): Remove; stripping is now done by add_param.
8625 (print_token_value): Print contents of bundled tokens.
8626 (token_name): New function.
8627
8628 * src/reader.h (braced_code, current_braced_code): Remove.
8629 (token_name): New decl.
8630
8631 * src/scan-gram.l (handle_dollar, handle_at): Now takes int
8632 token_type, not braced_code code_kind. All uses changed.
8633 (SC_PRE_CODE): New state, for scanning after a keyword that
8634 has (or usually has) an immediately-following braced code.
8635 (token_type): New local var, to keep track of which token type
8636 to return when scanning braced code.
8637 (<INITIAL>"%destructor", <INITIAL>"%lex-param",
8638 <INITIAL>"%parse-param", <INITIAL>"%printer",
8639 <INITIAL>"%union"): Set token type and BEGIN SC_PRE_CODE
8640 instead of returning a token type immediately.
8641 (<INITIAL>"{"): Set token type.
8642 (<SC_BRACED_CODE>"}"): Use it.
8643 (handle_action_dollar, handle_action_at): Now returns bool
8644 indicating success. Fail if ! current_rule; this prevents a core dump.
8645 (handle_symbol_code_dollar, handle_symbol_code_at):
8646 Remove; merge body into caller.
8647 (handle_dollar, handle_at): Complain in invalid contexts.
8648
8649 * NEWS, doc/bison.texinfo: Document the above.
8650 * NEWS: Fix years and program names in copyright notice.
8651
8652 2002-12-17 Paul Eggert <eggert@twinsun.com>
8653
8654 * NEWS, doc/bison.texinfo (Parser Function, Pure Calling, Error
8655 Reporting, Table of Symbols): Omit mentions of %lex-param and
8656 %parse-param from the documentation for now.
8657
8658 2002-12-15 Paul Eggert <eggert@twinsun.com>
8659
8660 Undo most of the 2002-11-12 yychar -> yytoken patch, as it broke
8661 GCC 3.2.1 (which depends on yychar == YYEMPTY when there is no
8662 lookahead symbol, and which sets yychar in parser actions) and it
8663 disagreed with the Bison documentation. Bug
8664 reported by Andrew Walrond.
8665
8666 * data/yacc.c (YYTRANSLATE): Don't check for negative argument,
8667 as the caller now does that.
8668 (yyclearin, YYBACKUP, yyparse): Use yychar, not yytoken.
8669 (YYEMPTY): Parenthesize right hand side, since others use it.
8670 (yyparse): Don't assume that our generated code is the only code
8671 that sets yychar.
8672
8673 2002-12-13 Paul Eggert <eggert@twinsun.com>
8674
8675 Version 1.75d.
8676
8677 POSIX requires a "yacc" command.
8678 * src/Makefile.am (bin_SCRIPTS): New macro, for yacc.
8679 (MOSTLYCLEANFILES): Add yacc.
8680 (yacc): New rule.
8681 * doc/bison.texinfo (Invocation, Bison Options): Mention yacc
8682 as an alias for bison y.
8683
8684 * po/LINGUAS: Add da.
8685
8686 * src/getargs.c (__GNU_LIBRARY__) [lint]: Define to work around
8687 problem with latest <getopt.h>.
8688 (HACK_FOR___GNU_LIBRARY___PROTOTYPE): New macro.
8689
8690 * doc/fdl.texi: Upgrade to 1.2.
8691 * lib/alloca.c, lib/error.c, lib/getopt.c, lib/getopt.h
8692 lib/getopt1.c, lib/gettext.h, lib/memrchr.c, lib/obstack.c,
8693 lib/obstack.h, lib/strnlen.c, lib/unlocked-io.h: Sync with
8694 gnulib.
8695 * config/install-sh: Sync with autotools.
8696
8697 Fix a bad interaction with flex 2.5.23 reported by Bruce Lilly in
8698 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
8699 * data/yacc.c (YYLTYPE, struct yyltype): Do not define unless
8700 locations are requested.
8701 (union yyalloc): Do not depend on YYLTYPE_IS_TRIVIAL unless
8702 locations are requested.
8703
8704 2002-12-12 Paul Eggert <eggert@twinsun.com>
8705
8706 Remove unportable casts and storage allocation tricks.
8707 While we're at it, remove almost all casts, since they
8708 usually aren't needed and are a sign of trouble.
8709
8710 * configure.ac (AC_CHECK_TYPES): Check for uintptr_t.
8711
8712 * src/derives.c (derives_compute): Do not subtract NTOKENS from
8713 the pointer DSET returned by malloc; this isn't portable.
8714 Instead, always use DSET[i - NTOKENS] rather than DSET[i].
8715 Similarly for DERIVES.
8716 * src/lalr.c (set_goto_map): Likewise, for GOTO_MAP and TEMP_MAP.
8717 * src/nullable.c (nullable_compute): Likewise, for RSETS and NULLABLE.
8718 * src/reduce.c (reduce_grammar_tables): Likewise, for nontermmap
8719
8720 * src/derives.c (derives_compute): Do not bother invoking
8721 int_of_rule_number, since rule numbers are integers.
8722
8723 * src/files.c (concat2, tr, compute_base_name): Use xmalloc (N)
8724 rather than XMALLOC (char, N).
8725
8726 * src/files.c (filename_split): Rewrite to avoid cast.
8727
8728 * src/gram.h (symbol_number_as_item_number,
8729 item_number_as_symbol_number, rule_number_as_item_number,
8730 item_number_as_rule_number):
8731 Now inline functions rather than macros, to avoid casts.
8732 * src/state.h (state_number_as_int): Likewise.
8733 * src/tables.c (state_number_to_vector_number,
8734 symbol_number_to_vector_number): Likewise.
8735
8736 * src/gram.h (int_of_rule_number): Remove; no longer used.
8737
8738 * src/lalr.c (add_lookback_edge): Use malloc rather than calloc,
8739 since the resulting storage is always stored into.
8740
8741 * src/main.c (alloca) [C_ALLOCA]: Add decl here, the only place
8742 where it's needed.
8743
8744 * src/muscle_tab.c (muscle_m4_output):
8745 Now inline. Return bool, not int.
8746 * src/state.c (state_compare): Likewise.
8747 * src/symtab.c (symbol_check_defined,
8748 symbol_check_alias_consistency, symbol_pack, symbol_translation,
8749 hash_compare_symbol, hash_symbol):
8750 Likewise.
8751 * src/uniqstr.c (uniqstr_print): Likewise.
8752 * src/muscle_tab.c (muscle_m4_output_processor):
8753 New function, to avoid casts.
8754 * src/state.c (state_comparator, stage_hasher): Likewise.
8755 * src/symtab.c (symbol_check_defined_processor,
8756 symbol_check_alias_consistency_processor, symbol_pack_processor,
8757 symbol_translation_processor, hash_symbol_comparator,
8758 hash_symbol_hasher): Likewise.
8759 * src/uniqstr.c (uniqstr_print_processor): Likewise.
8760 * src/muscle_tab.c (muscles_m4_output):
8761 Use new functions instead of casting old functions unportably.
8762 * src/state.c (state_hash_new): Likewise.
8763 * src/symtab.c (symbols_new, symbols_do, symbols_check_defined,
8764 symbols_token_translations_init):
8765 Likewise.
8766 * src/uniqstr.c (uniqstrs_new, hash_initialize, uniqstrs_do): Likewise.
8767
8768 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): Use long local
8769 var instead of casting to long, to avoid casts.
8770 (prepare_states): Use MALLOC rather than alloca, so that we don't
8771 have to worry about alloca.
8772 * src/state.c (state_hash_lookup): Likewise.
8773
8774 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>"'"): Use unsigned char
8775 local var instead of casting to unsigned char, to avoid casts.
8776
8777 * src/state.c (TRANSITIONS_ALLOC, ERRS_ALLOC, REDUCTIONS_ALLOC,
8778 STATE_ALLOC): Remove.
8779 (transitions_new, errs_new, reductions_new, state_new): Use malloc
8780 rather than calloc, and use offsetof to avoid allocating slightly
8781 too much storage.
8782 (state_new): Initialize all members.
8783
8784 * src/state.c (state_hash): Use unsigned accumulator, not signed.
8785
8786 * src/symtab.c (symbol_free): Remove; unused.
8787 (symbol_get): Remove cast in lhs of assignment.
8788 (symbols_do): Now static. Accept generic arguments, not
8789 hashing-related ones.
8790
8791 * src/symtab.h: (NUMBER_UNDEFINED): Remove unnecessary cast.
8792 (symbol_processor): Remove.
8793 (symbols_do): Remove decl; now static.
8794
8795 * src/system.h (alloca): Remove; decl no longer needed.
8796 (<stddef.h>): Include, for offsetof.
8797 (<inttypes.>, <stdint.h>): Include if available.
8798 (uintptr_t): New type, if system lacks it.
8799 (CALLOC, MALLOC, REALLOC): New macros.
8800 All uses of XCALLOC, XMALLOC, and XREALLOC changed to use these
8801 new macros.
8802
8803 * src/tables.c (table_size): Now int, to pacify GCC.
8804 (table_grow, table_ninf_remap): Use signed table size.
8805 (save_row): Don't bother initializing locals when not needed.
8806 (default_goto, goto_actions, pack_vector): Remove unnecessary casts.
8807 * src/uniqstr.c (hash_compare_uniqstr): Likewise.
8808
8809 * src/vcg.h: Correct misspellings.
8810
8811 * src/vcg_defaults.h (G_CMAX): Now INT_MAX.
8812
8813
8814 * src/getargs.c (getargs): Don't assume EOF == -1.
8815
8816 2002-12-09 Paul Eggert <eggert@twinsun.com>
8817
8818 Change identifier spellings to avoid collisions with names
8819 that are reserved by POSIX.
8820
8821 Don't use names ending in _t, since POSIX reserves them.
8822 For consistency, remove _e and _s endings -- they're weren't
8823 needed to remove ambiguity. All uses changed.
8824 * src/uniqstr.h (uniqstr): Renamed from uniqstr_t, which in
8825 turn was just renamed from struniq_t.
8826 * src/uniqstr.c (uniqstr_processor): Renamed from struniq_processor,
8827 which in turn was just renamed from struniq_processor_t.
8828 (hash_compare_uniqstr): Renamed from hash_compare_struniq, which
8829 in turn was renamed from hash_compare_struniq_t.
8830 * src/LR0.c (struct state_list): Renamed from struct state_list_s.
8831 (state_list): Renamed from state_list_t.
8832 * src/assoc.h (assoc): Renamed from assoc_t.
8833 * src/conflicts.c (enum conflict_resolution): Renamed from
8834 enum conflict_resolution_e.
8835 * src/derives.c (struct rule_list): Renamed from struct rule_list_s.
8836 (rule_list): Renamed from rule_list_t.
8837 * src/getargs.h (enum trace): Renamed from enum trace_e.
8838 (enum report): Renamed from enum report_e.
8839 * src/gram.h (item_number): Renamed from item_number_t.
8840 (rule_number): Renamed from rule_number_t.
8841 (struct rule_s): Remove the "rule_s" part; not used.
8842 (rule): Renamed from rule_t.
8843 (rule_filter): Renamed from rule_filter_t.
8844 * src/lalr.c (struct goto_list): Renamed from struct goto_list_s.
8845 (goto_list): Renamed from goto_list_t.
8846 * src/lalr.h (goto_number): Renamed from goto_number_t.
8847 * src/location.h (location): Renamed from location_t.
8848 * src/muscle_tab.c (muscle_entry): Renamed from muscle_entry_t,
8849 and moved here from:
8850 * src/muscle_tab.h (muscle_entry_t): here.
8851 * src/nullable.c (struct rule_list): Renamed from struct rule_list_s.
8852 (rule_list): Renamed from rule_list_t.
8853 * src/print_graph.c (static_graph): Renamed from graph.
8854 * src/reader.h (braced_code): Renamed from braced_code_t.
8855 Remove brace_code_e tag.
8856 * src/relation.h (relation_node): Renamed from relation_node_t.
8857 (relation_nodes): Renamed from relation_nodes_t.
8858 (relation): Renamed from relation_t.
8859 * src/state.h (state_number): Renamed from state_number_t.
8860 (struct state): Renamed from struct state_s.
8861 (state): Renamed from state_t.
8862 (transitions): Renamed from transitions_t. Unused (and
8863 misspelled) transtion_s tag removed.
8864 (errs): Renamed from errs_t. Unused errs_s tag removed.
8865 (reductions): Renamed from reductions_t. Unused tag
8866 reductions_s removed.
8867 * src/symlist.h (symbol_list): Renamed from symbol_list_t.
8868 (struct symbol_list): Renamed from struct symbol_list_s.
8869 * src/symtab.h (symbol_number): Renamed from symbol_number_t.
8870 (struct symbol): Renamed from struct symbol_s.
8871 (symbol): Renamed from symbol_t.
8872 * src/tables.c (vector_number): Renamed from vector_number_t.
8873 (action_number): Renamed from action_t.
8874 * src/tables.h (base_number): Renamed from base_t.
8875 * src/vcg.h (enum color): Renamed from enum color_e.
8876 (enum textmode): Renamed from enum textmode_e.
8877 (enum shape): Renamed from enum shape_e.
8878 (struct colorentry): Renamed from struct colorentry_s.
8879 (struct classname): Renamed from struct classname_s.
8880 (struct infoname): Renamed from struct infoname_s.
8881 (enum layoutalgorithm): Renamed from enum layoutalgorithm_e.
8882 (enum decision): Renamed from enum decision_e.
8883 (enum orientation): Renamed from enum orientation_e.
8884 (enum alignment): Renamed from enum alignment_e.
8885 (enum arrow_mode): Renamed from enum arrow_mode_e.
8886 (enum crossing_type): Renamed from enum crossing_type_e.
8887 (enum view): Renamed from enum view_e.
8888 (struct node): Renamed from struct node_s.
8889 (node): Renamed from node_t.
8890 (enum linestyle): Renamed from enum linestyle_e.
8891 (enum arrowstyle): Renamed from enum arrowstyle_e.
8892 (struct edge): Renamed from struct edge.
8893 (edge): Renamed from edge_t.
8894 (struct graph): Renamed from struct graph_s.
8895 (graph): Renamed from graph_t.
8896 * tests/calc.at (_AT_DATA_CALC_Y, Simple LALR Calculator):
8897 Rename value_t -> value.
8898 * tests/input.at (Torturing the Scanner): Rename value_t -> value,
8899 value_t_as_yystype -> value_as_yystype.
8900
8901 Don't include <errno.h> in the mainstream code, since it
8902 reserves E[A-Z0-9]* and we want to use symbols like 'EQUALS'.
8903 * lib/get-errno.c, lib/get-errno.h: New files.
8904 * lib/Makefile.am (libbison_a_SOURCES): Add get-errno.h,
8905 get-errno.c.
8906 * src/files.c (xfopen, xfclose): Use get_errno instead of errno.
8907 * src/output.c (output_skeleton): Likewise.
8908 * src/scan-gram.l (<INITIAL>{int}): Use set_errno and get_errno
8909 instead of errno.
8910 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>\\x[0-9abcdefABCDEF]+):
8911 Likewise.
8912 (handle_action_dollar, handle_action_at): Likewise.
8913 * src/system.h: Do not include <errno.h>.
8914 (TAB_EXT): Renamed from EXT_TAB.
8915 (OUTPUT_EXT): Renamed from EXT_OUTPUT.
8916
8917 Avoid str[a-z]*, since <string.h> reserves that name space.
8918 Change all instances of "struniq" in names to "uniqstr", and
8919 likewise for "STRUNIQ" and "UNIQSTR".
8920 * src/uniqstr.c: Renamed from src/struniq.c.
8921 * src/uniqstr.h: Renamed from src/struniq.h.
8922 * src/Makefile.am (bison_SOURCES): Adjust to these renamings.
8923 * src/files.c (strsuffix): Remove; unused.
8924 (concat2): Renamed from stringappend. Now static.
8925 * src/files.h (strsuffix, stringappend): Remove; unused.
8926 * src/parse-gram.y (<chars>): Renamed from <string>.
8927 (<uniqstr>): Renamed from <struniq>.
8928 * src/scan-gram.l (obstack_for_string): Renamed from string_obstack.
8929 * src/vcg.h (struct node_s.expand): Renamed from struct node_s.stretch.
8930 (struct graph_s.expand): Renamed from struct graph_s.stretch.
8931 * src/vcg_defaults.h (G_EXPAND): Renamed from G_STRETCH.
8932 (G_LONG_STRAIGHT_PHASE): Renamed from G_STRAIGHT_PHASE.
8933 (N_EXPAND): Renamed from N_STRETCH.
8934
8935 Avoid *_MAX and *_MIN, since <limits.h> reserves that name space.
8936 * data/yacc.c (YYSTACK_GAP_MAXIMUM): Renamed from YYSTACK_GAP_MAX.
8937 * src/gram.h (ITEM_NUMBER_MAX, ITEM_NUMBER_MIN, RULE_NUMBER_MAX):
8938 Remove; unused.
8939 * src/lalr.h (GOTO_NUMBER_MAXIMUM): Renamed from GOTO_NUMBER_MAX.
8940 * src/state.h (STATE_NUMBER_MAXIMUM): Renamed from STATE_NUMBER_MAX.
8941 * src/symtab.h (SYMBOL_NUMBER_MAXIMUM): Renamed from SYMBOL_NUMBER_MAX.
8942 * src/tables.c (VECTOR_NUMBER_MAX, VECTOR_NUMBER_MIN): Remove; unused.
8943 (BASE_MAXIMUM): Renamed from BASE_MAX.
8944 (BASE_MINIMUM): Renamed from BASE_MIN.
8945 (ACTION_MAX): Remove; unused.
8946 (ACTION_NUMBER_MINIMUM): Renamed from ACTION_MIN.
8947 Unnecessary casts removed from above defines.
8948
8949
8950 Fix misspelling in names.
8951 * src/vcg.h (enum_alignment_e): Renamed from enum_alignement_e.
8952 * src/vcg_defaults.h (G_NODE_ALIGNMENT): Renamed from
8953 G_NODE_ALIGNEMENT.
8954
8955
8956 * lib/timevar.c (timevar_report): Renamed from time_report,
8957 for consistency with other names.
8958 * lib/timevar.h (timevar_report): New decl.
8959 * src/system.h (time_report): Remove; decl is now in lib/timevar.h.
8960
8961
8962 Sort include-file uses.
8963
8964 Reorder all include files under src to be in the order "system.h".
8965 then the ../lib include files in angle brackets (alphabetized),
8966 then the . include files in double-quotes (alphabetized). Fix
8967 dependency breakages encountered in this process, as follows:
8968 * src/closure.h, src/derives.h, src/state.h: Include "gram.h".
8969 * src/complain.c: Don't include stdlib.h, string.h _LIBC stuff.
8970 * src/state.h: Include "symtab.h".
8971
8972 2002-12-08 Paul Eggert <eggert@twinsun.com>
8973
8974 * data/glr.c, data/lalr1.cc, data/yacc.c: Do not use __file__,
8975 since this causes problems when __file__ contains character
8976 sequences like "@" that are treated specially by src/scan-skel.l.
8977 Instead, just use the file's basename. This fixes the bug
8978 reported by Martin Mokrejs in
8979 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00007.html>.
8980
8981 2002-12-06 Paul Eggert <eggert@twinsun.com>
8982
8983 Add support for rules that do not have trailing semicolons, as
8984 POSIX requires. Improve the quality of locations in Bison
8985 diagnostics.
8986
8987 * src/location.c: Include <quotearg.h>.
8988 (empty_location): Now const.
8989 (location_print): New function. Follow the recommendation of the
8990 GNU Coding Standards for locations that span file boundaries.
8991 * src/location.h: Do not include <quotearg.h>; no longer needed.
8992 (boundary): New type.
8993 (location_t): Use it. This allows locations to span file boundaries.
8994 All member uses changed: file -> start.file or end.file (as needed),
8995 first_line -> start.line, first_column -> start.column,
8996 last_line -> end.line, last_column -> end.column.
8997 (equal_boundaries): New function.
8998 (LOCATION_RESET, LOCATION_STEP): Remove.
8999 (LOCATION_PRINT): Remove. All callers changed to use location_print.
9000 (empty_location): Now const.
9001 (location_print): New decl.
9002 * src/parse-gram.y (lloc_default): New function, which handles
9003 empty locations more accurately.
9004 (YYLLOC_DEFAULT): Use it.
9005 (%token COLON): Remove.
9006 (%token ID_COLON): New token.
9007 (rules): Use it.
9008 (declarations, rules): Remove trailing semicolon.
9009 (declaration, rules_or_grammar_declaration):
9010 Allow empty (";") declaration.
9011 (symbol_def): Remove empty actions; no longer needed.
9012 (rules_or_grammar_declaration): Remove trailing semicolon.
9013 (semi_colon.opt): Remove.
9014 * src/reader.h: Include location.h.
9015 (scanner_cursor): New decl.
9016 * src/reduce.c (nonterminals_reduce): Use warn_at rather than
9017 rolling our own.
9018 * src/scan-gram.l (YY_USER_INIT): Initialize scanner_cursor instead
9019 of *loc.
9020 (STEP): Remove. No longer needed, now that adjust_location does
9021 the work. All uses removed.
9022 (scanner_cursor): New var.
9023 (adjust_location): Renamed from extend_location. It now sets
9024 *loc and adjusts the scanner cursor. All uses changed.
9025 Don't bother testing for CR.
9026 (handle_syncline): Remove location arg; now updates scanner cursor.
9027 All callers changed.
9028 (unexpected_end_of_file): Now accepts start boundary of token or
9029 comment, not location. All callers changed. Update scanner cursor,
9030 not the location.
9031 (SC_AFTER_IDENTIFIER): New state.
9032 (context_state): Renamed from c_context. All uses changed.
9033 (id_loc, code_start, token_start): New local vars.
9034 (<INITIAL,SC_AFTER_IDENTIFIER>): New initial context. Move all
9035 processing of Yacc white space and equivalents here.
9036 (<INITIAL>{id}): Save id_loc. Begin state SC_AFTER_IDENTIFIER
9037 instead of returning ID immediately, since we need to search for
9038 a subsequent colon.
9039 (<INITIAL>"'", "\""): Save token_start.
9040 (<INITIAL>"%{", "{", "%%"): Save code_start.
9041 (<SC_AFTER_IDENTIFIER>): New state, looking for a colon.
9042 (<SC_YACC_COMMENT>, <SC_COMMENT>, <SC_LINE_COMMENT>):
9043 BEGIN context_state at end, not INITIAL.
9044 (<SC_ESCAPED_STRING>"\"", <SC_ESCAPED_CHARACTER>"'",
9045 <SC_BRACED_CODE>"}", <SC_PROLOGUE>"%}", <SC_EPILOGUE><<EOF>>):
9046 Return correct token start.
9047 (<SC_BRACED_CODE,SC_PROLOGUE,SC_EPILOGUE>): Save start boundary when
9048 the start of a character, string or multiline comment is found.
9049 * tests/conflicts.at (S/R in initial, Defaulted Conflicted
9050 Reduction): Adjust reported locations to match the more-precise
9051 results now expected.
9052 * tests/input.at (Invalid $n, Invalid @n, Type Clashes): Likewise.
9053 * tests/reduce.at (Useless Rules, Reduced Automaton,
9054 Underivable Rules): Likewise.
9055 * tests/regression.at (Invalid inputs): No longer `expecting ";"
9056 or "|"' now that so many other tokens are allowed by the new grammar.
9057
9058 * src/complain.h (current_file): Remove duplicate decl;
9059 current_file is now owned by files.h.
9060 * src/complain.c, src/scan-gram.l: Include files.h.
9061
9062 2002-12-06 Paul Eggert <eggert@twinsun.com>
9063
9064 * data/glr.c (yy_reduce_print): Don't assume that yyrline[yyrule]
9065 promotes to int; it might be unsigned int.
9066 * data/yacc.c (yy_reduce_print): Likewise.
9067
9068 * doc/bison.texinfo (Table of Symbols): YYERROR_VERBOSE should
9069 be #defined in the prologue, not in the Bison declarations.
9070 This fixes Debian Bug 102878, reported by Shaul Karl.
9071
9072 2002-12-02 Paul Eggert <eggert@twinsun.com>
9073
9074 * configure.ac (AC_REPLACE_FUNCS): Add strtoul.
9075 * lib/strtoul.c: New file, from gnulib.
9076 This fixes a porting bug reported by Peter Klein in
9077 <http://lists.gnu.org/archive/html/bug-bison/2002-12/msg00000.html>.
9078
9079 2002-11-30 Paul Eggert <eggert@twinsun.com>
9080
9081 * src/scan-gram.l (no_cr_read, extend_location): Move to epilogue,
9082 and put only a forward declaration in the prologue. This is for
9083 consistency with the other scanner helper functions.
9084
9085 Type clashes now generate warnings, not errors, since it
9086 appears that POSIX may allow some grammars with type clashes.
9087 * src/reader.c (grammar_current_rule_check): Warn about
9088 type clashes instead of complaining.
9089 * tests/input.at (Type Clashes): Expect warnings, not complaints.
9090
9091 Add Yacc library, since POSIX requires it.
9092 * doc/bison.texinfo (Yacc Library): New node. Regenerate top menu.
9093 * lib/Makefile.am (lib_LIBRARIES, liby_a_SOURCES): New macros.
9094 * lib/main.c, lib/yyerror.c: New files.
9095
9096 gram_error can be static; it need not be extern.
9097 * src/reader.h (gram_error): Remove decl.
9098 * src/parse-gram.y (gram_error): Now static. Add static decl.
9099 (print_token_value): Omit parameter names from forward decl,
9100 for consistency.
9101
9102 2002-11-29 Paul Eggert <eggert@twinsun.com>
9103
9104 * doc/bison.texinfo: Emphasize that yylex and yyerror must
9105 be declared before being used. E.g., one should typically
9106 declare them in the prologue. Use GNU coding style in examples.
9107 Put "const" consistently after the type it modifies. Mention
9108 that C99 supports "inline". Mention that yyerror traditionally
9109 returns "int".
9110
9111 %parse-param and %lex-param now take just one argument, the
9112 declaration; the argument name is deduced from the declaration.
9113
9114 * doc/bison.texinfo (Parser Function, Pure Calling, Error
9115 Reporting, Table of Symbols): Document this.
9116 * src/parse-gram.y (add_param): New function.
9117 (COMMA): Remove.
9118 (declaration): Implement new rule for %parse-param and %lex-param.
9119 * src/scan-gram.l: "," now elicits a warning, rather than being
9120 a token; this is more compatible with byacc.
9121 * tests/calc.at (Simple LALR Calculator): Adopt new convention.
9122
9123 2002-11-27 Paul Eggert <eggert@twinsun.com>
9124
9125 Rename identifiers to avoid real and potential collisions.
9126
9127 * data/c.m4 (b4_yysymprint_generate): yyout -> yyoutput,
9128 to avoid collision with lex macro described by Bruce Lilly in
9129 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00114.html>.
9130 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise.
9131 * doc/bison.texinfo (Prologue, Tracing): yyprint -> print_token_value.
9132 * src/parse-gram.y (print_token_value): Renamed from yyprint.
9133 All uses changed.
9134 (YYPARSE_PARAM, YYLEX_PARAM, yycontrol): Remove. All uses changed.
9135 The name "yycontrol" violates the name space rules, and this stuff
9136 wasn't being used anyway.
9137 (input): Remove action; this stuff wasn't being used.
9138 (gram_error): Rename local variable yylloc -> loc.
9139 * src/reader.h (struct gram_control_s, gram_control_t): Remove.
9140 (YY_DECL): Don't use "yy" at start of local variables.
9141 All uses changed, e.g., yylloc -> loc.
9142 * src/scan-gram.l (STEP): Renamed from YY_STEP. All uses changed.
9143 (STRING_GROW): Renamed from YY_OBS_GROW. All uses changed.
9144 (STRING_FINISH): Renamed from YY_OBS_FINISH. All uses changed.
9145 (STRING_FREE): Renamed from YY_OBS_FREE. All uses changed.
9146
9147 * src/parse-gram.y (gram_error): loc is now const *.
9148 * src/reader.h (gram_error): Likewise.
9149
9150 2002-11-24 Paul Eggert <eggert@twinsun.com>
9151
9152 Version 1.75c.
9153
9154 * tests/actions.at (Actions after errors): Use an output format
9155 more similar to that of the Printers and Destructors test.
9156 Test the position of the ';' token too.
9157 (Printers and Destructors): Likewise.
9158 (Printers and Destructors: %glr-parser): Remove for now, to avoid
9159 unnecessarily alarming people when the test fails.
9160
9161 * data/yacc.c (yyerrlab1): Move this label down, so that the
9162 parser does not discard the lookahead token if the user code
9163 invokes YYERROR. This change is required for POSIX conformance.
9164
9165 * lib/error.c: Sync with gnulib.
9166
9167 2002-11-22 Paul Eggert <eggert@twinsun.com>
9168
9169 * lib/quotearg.c, lib/quotearg.h: Sync with gnulib.
9170 * lib/mbswidth.c, lib/mbswidth.h: Likewise.
9171 * lib/xmalloc.c: Likewise.
9172
9173 2002-11-20 Paul Eggert <eggert@twinsun.com>
9174
9175 * lib/argmatch.c, lib/argmatch.h: Sync with gnulib.
9176
9177 2002-11-20 Paul Eggert <eggert@twinsun.com>
9178
9179 Avoid use of <assert.h>, as the GNU Coding Standards hint that one
9180 should use `if (! x) abort ();' rather than `assert (x);', and
9181 anyway it's one less thing to worry about configuring.
9182
9183 * data/glr.c, lib/hash.c, src/system.h: Do not include <assert.h>.
9184 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Likewise,
9185 and replace all instances of assert with abort.
9186 * tests/calc.at (_AT_DATA_CALC_Y): Likewise.
9187 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): Likewise.
9188
9189 * data/glr.c (yydoAction, yyglrReduce, yysplitStack, yyresolveStates,
9190 yyresolveAction, yyprocessOneStack): Use abort rather than assert.
9191 * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
9192 hash_find_entry, hash_rehash, hash_insert): Likewise.
9193 * src/conflicts.c (resolve_sr_conflict): Likewise.
9194 * src/lalr.c (set_goto_map, map_goto): Likewise.
9195 * src/nullable.c (nullable_compute): Likewise.
9196 * src/output.c (prepare_rules, token_definitions_output): Likewise.
9197 * src/reader.c (packgram, reader): Likewise.
9198 * src/state.c (state_new, state_free, state_transitions_set,
9199 state_reduction_find): Likewise.
9200 * src/symtab.c (symbol_user_token_number_set, symbol_make_alias,
9201 symbol_pack): Likewise.
9202 * src/tables.c (conflict_row, pack_vector): Likewise.
9203 * src/vcg.c (get_color_str, get_textmode_str, get_shape_str,
9204 get_layoutalgorithm_str, get_decision_str, get_orientation_str,
9205 get_node_alignement_str, get_arrow_mode_str, get_crossing_type_str,
9206 get_view_str, get_linestyle_str, get_arrowstyle_str): Likewise.
9207
9208 * lib/argmatch.h (ARRAY_CARDINALITY): Do not bother to #undef.
9209 (ARGMATCH_CONSTRAINT): New macro.
9210 (ARGMATCH_ASSERT): Use it.
9211
9212 * src/system.h (verify): New macro.
9213 * src/getargs.c (trace_argmatch, report_argmatch): Use verify
9214 rather than assert.
9215 * src/tables.c (tables_generate): Likewise.
9216
9217 * src/struniq.c (struniq_assert): Now returns void, and aborts
9218 if the assertion is false.
9219 (struniq_assert_p): Remove.
9220 * src/struniq.h: Likewise.
9221
9222 2002-11-18 Paul Eggert <eggert@twinsun.com>
9223
9224 * data/glr.c (yygetLRActions): Replace `yyindex' with
9225 `yytable[yyindex]' to fix typo introduced in my 2002-11-09 patch.
9226 This fixes the regression with Sun ONE Studio 7 cc that I reported in
9227 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00077.html>.
9228
9229 2002-11-18 Akim Demaille <akim@epita.fr>
9230
9231 * doc/bison.texinfo (Tracing): `yyprint' shouldn't prepend a
9232 space.
9233 From Tim Van Holder.
9234
9235 2002-11-17 Paul Eggert <eggert@twinsun.com>
9236
9237 Pacify Sun ONE Studio 7 lint. Also, rename "ParseError"
9238 to "SyntaxError" for consistency with my 2002-11-15 change.
9239
9240 * data/glr.c (YYDPRINTF, YYDSYMPRINT, YYDSYMPRINTF) [!YYDEBUG]: Do
9241 not define to {}, since this breaks the common use of `YYDPRINTF
9242 ((...));' if a single statement is desired (e.g. before `else').
9243 Work around GCC warnings by surrounding corresponding calls with
9244 {} if needed.
9245 (yyhasResolvedValue): Remove unused function.
9246 (yymergeOptionSets, yyresolvStack): Use `continue;' for empty
9247 loop body.
9248 (yyreportSyntaxError): Renamed from yyreportParseError.
9249 (yyrecoverSyntaxError): Renamed from yyrecoverParseError.
9250 All uses changed.
9251 * tests/calc.at (_AT_DATA_CALC_Y): Make vars static instead of
9252 extern when possible. Remove unused initializations.
9253
9254 2002-11-16 Akim Demaille <akim@epita.fr>
9255
9256 Augment the similarity between GLR and LALR traces.
9257
9258 * data/yacc.c (yy_stack_print, YY_STACK_PRINT, yy_reduce_print)
9259 (YY_REDUCE_PRINT): New.
9260 (yyparse): Use them.
9261 * data/glr.c (yy_reduce_print): Use YYFPRINTF, no need for
9262 YYDPRINT here.
9263 (yyglrReduce, yyrecoverParseError, yyparse): Don't report the
9264 state reached after the reduction/recovery, since...
9265 (yyparse, yyprocessOneStack): Report the state we are entering in.
9266
9267 2002-11-16 Akim Demaille <akim@epita.fr>
9268
9269 * src/getargs.h, src/getargs.c (trace_e, trace_args, trace_types):
9270 Add support for --trace=skeleton.
9271 * src/scan-skel.l: %option debug.
9272 Scan strings of non-@ or \n instead of character by character.
9273 (scan_skel): Handle trace_skeleton.
9274 (QPUTS): New.
9275 (@output_parser_name@, @output_header_name@): ``Restore'' their
9276 support (used to be M4 macros).
9277 * data/yacc.c: Quote larger chunks, a la glr.c.
9278 * data/lalr1.cc: Likewise.
9279 The header guards are no longer available, so use some other
9280 string than `YYLSP_NEEDED'.
9281
9282 2002-11-16 Akim Demaille <akim@epita.fr>
9283
9284 Make the ``Printers and Destructors'' test more verbose, taking
9285 `yacc.c''s behavior as (possibly wrong) reference.
9286
9287 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Use printf
9288 instead of fprint on stdout.
9289 Set and report the last_line of the symbols.
9290 Consistently display values and locations.
9291
9292 2002-11-16 Paul Eggert <eggert@twinsun.com>
9293
9294 * data/yacc.c: Avoid over-quoting of __line__ and __file__.
9295
9296 2002-11-15 Paul Eggert <eggert@twinsun.com>
9297
9298 * tests/actions.at (Actions after errors): New test case.
9299
9300 * data/glr.c, data/lalr1.cc, data/yacc.cc, doc/bison.texinfo,
9301 src/conflicts.c, src/parse-gram.y, src/tables.c, src/tables.h,
9302 tests/action.at, tests/calc.at, tests/conflicts.at,
9303 tests/cxx-type.at, tests/regression.at:
9304 "parse error" -> "syntax error" for POSIX compatibility.
9305 "parsing stack overflow..." -> "parser stack overflow" so
9306 that code matches Bison documentation.
9307
9308 2002-11-15 Akim Demaille <akim@epita.fr>
9309
9310 * src/parse-gram.y (declaration): Have %parse-param and %lex-param
9311 take two BRACED_CODE, not two string_content.
9312 Free the scanner's obstack when we are done.
9313 (code_content): New.
9314 * tests/calc.at: Adjust.
9315 * doc/bison.texinfo: Adjust.
9316 Also, make sure to include the `,' for these declarations.
9317
9318 2002-11-15 Tim Van Holder <tim.van.holder@pandora.be>
9319
9320 * m4/prereq.m4: Removed the commented jm_PREREQ_HASH
9321 definition; avoids potential autoreconf problems.
9322
9323 2002-11-15 Akim Demaille <akim@epita.fr>
9324
9325 Always check the value returned by yyparse.
9326
9327 * tests/calc.at (_AT_DATA_CALC_Y): Have `main' exit with the value
9328 returned by yyparse.
9329 (_AT_CHECK_CALC_ERROR): Take the expected exit value as argument.
9330 Adjust calls.
9331 * tests/glr-regr1.at (glr-regr1.y): Have `main' exit with the value
9332 returned by yyparse.
9333
9334 2002-11-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9335
9336 * data/glr.c (yyFail): Always set yyerrflag. Corrects regression
9337 on input.at test.
9338
9339 2002-11-14 Paul Eggert <eggert@twinsun.com>
9340
9341 * src/output.c (output_skeleton): Call xfopen instead of
9342 duplicating xfopen's body.
9343
9344 Fix bugs reported by Nelson H. F. Beebe in
9345 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00078.html>.
9346
9347 * tests/headers.at (AT_TEST_CPP_GUARD_H): Don't assume that
9348 "$CC -E foo.h" is allowed, as this doesn't work with the Portland
9349 Group compiler. Instead, use "$CC -E bar.c". Include the .h
9350 file twice in the grammar, as an extra check.
9351
9352 * tests/input.at (Torturing the Scanner): Surround the
9353 backslash-newline tests with "#if 0", to make it less likely that
9354 we'll run into compiler bugs. Bring back solitary \ inside
9355 comment, but add a closing comment to work around HP C bug. Don't
9356 test backslash-newline in C character constant.
9357
9358 2002-11-14 Akim Demaille <akim@epita.fr>
9359
9360 * tests/synclines.at (AT_SYNCLINES_COMPILE): Ignore the exit
9361 status of the compiler.
9362 Calling `exit 1' is no longer needed.
9363 Reported by Nelson H. F. Beebe.
9364
9365 2002-11-14 Akim Demaille <akim@epita.fr>
9366
9367 * tests/atlocal.in (CPPFLAGS): We have config.h.
9368 * tests/testsuite.at (AT_DATA_GRAMMAR_PROLOGUE, AT_DATA_GRAMMAR):
9369 New.
9370 * tests/actions.at, tests/calc.at, tests/conflicts.at,
9371 * tests/cxx-type.at, tests/glr-regr1.at, tests/headers.at,
9372 * tests/regression.at, tests/torture.at: Use them for all the
9373 grammars that are to be compiled.
9374 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Rename as...
9375 * tests/cxx-type.at (_AT_TEST_GLR_CXXTYPES): this.
9376 * doc/bison.texinfo (GLR Parsers): Document `inline'.
9377
9378 2002-11-14 Akim Demaille <akim@epita.fr>
9379
9380 * doc/bison.texinfo: Various formatting changes (alignments in
9381 samples, additional @group/@end group, GCS in samples.
9382 Use @deffn instead of simple @table to define the directives,
9383 macros, variables etc.
9384
9385 2002-11-13 Paul Eggert <eggert@twinsun.com>
9386
9387 Fix some bugs reported by Albert Chin-A-Young in
9388 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00066.html>.
9389
9390 * tests/input.at (Torturing the Scanner): Don't invoke "cc a.c b.c
9391 -o c"; the HP C compiler chatters during compilation.
9392 Instead, invoke "cc -c a.c -o a.o; cc -c b.c -o b.o; cc a.o b.o -o c".
9393 * tests/headers.at (export YYLTYPE): Likewise.
9394
9395 * tests/input.at (Torturing the Scanner): Remove lines containing
9396 solitary backslashes, as they tickle a bug in the HP C compiler.
9397
9398 * tests/glr-regr1.at (Badly Collapsed GLR States): Avoid //
9399 comments, since they're not portable. Use GNU coding style.
9400
9401 2002-11-13 Akim Demaille <akim@epita.fr>
9402
9403 * data/yacc.c: Leave bigger chunks of quoted text.
9404 (YYDSYMPRINTF): New.
9405 Use it to report symbol activities.
9406 * data/glr.c (YYDSYMPRINTF): New.
9407 Use it.
9408
9409 2002-11-12 Paul Eggert <eggert@twinsun.com>
9410
9411 Version 1.75b.
9412
9413 * data/glr.c (yydoAction): Return YYRESULTTAG, not int.
9414 (yyglrReduce): Return yyok, not 0.
9415 This should avoid the enumerated-type warnings reported
9416 by Nelson H. F. Beebe in
9417 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00057.html>.
9418
9419 * lib/bbitset.h (BITSET_INLINE): Remove.
9420 * lib/bitset.h [! BITSET_INLINE]: Remove.
9421 (bitset_set, bitset_reset, bitset_test): Rename local vars
9422 to avoid shadowing warnings by GCC.
9423
9424 * data/glr.c (inline): Remove #define. It's the user's
9425 responsibility to #define it away, just like 'const'.
9426 This fixes one of the bugs reported by Nelson H. F. Beebe in
9427 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00058.html>.
9428
9429 * Makefile.maint (po-check): Scan .l and .y files instead of the
9430 .c and the .h files that they generate. This fixes the bug
9431 reported by Tim Van Holder in:
9432 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00062.html>
9433 Look for N_ as well as for _. Try to avoid matching #define for
9434 N_ and _.
9435 * po/POTFILES.in: Remove src/parse-gram.c, src/scan-gram.c,
9436 src/system.h. Add src/parse-gram.y, src/scan-gram.l.
9437 * src/scan-gram.l: Revamp regular expressions so that " and '
9438 do not confuse xgettext.
9439
9440 * src/struniq.h (struniq_new): Do not declare the return type
9441 to be 'const'; this violates the C standard.
9442 * src/struniq.c (struniq_new): Likewise.
9443
9444 2002-11-12 Albert Chin-A-Young <china@thewrittenword.com>
9445
9446 * src/Makefile.am (LDADD): Link $(LIBINTL) last to avoid the
9447 duplicate definition of optind on Tru64 UNIX 4.0D with the Compaq
9448 linker.
9449
9450 2002-11-12 Akim Demaille <akim@epita.fr>
9451
9452 * Makefile.maint: Sync with Autoconf:
9453 (local_updates): New.
9454
9455 2002-11-12 Akim Demaille <akim@epita.fr>
9456
9457 * po/POTFILES.in (src/lalr.c, src/state.c): Remove
9458
9459 2002-11-12 Akim Demaille <akim@epita.fr>
9460
9461 * tests/actions.at (_AT_CHECK_PRINTER_AND_DESTRUCTOR): Display the
9462 locations.
9463
9464 2002-11-12 Akim Demaille <akim@epita.fr>
9465
9466 * data/c.m4 (b4_yysymprint_generate): Pass *yyvaluep to YYPRINT,
9467 not yyvalue.
9468
9469 2002-11-12 Akim Demaille <akim@epita.fr>
9470
9471 * tests/actions.at (AT_CHECK_PRINTER_AND_DESTRUCTOR): New.
9472 Use it to test the GLR parser.
9473
9474 2002-11-12 Akim Demaille <akim@epita.fr>
9475
9476 * tests/regression.at (input.y): s/YYEOF/MYEOF/, as the skeleton
9477 defines it.
9478 * data/glr.c (yystos): New.
9479 (b4_yysymprint_generate, b4_yydestruct_generate): Invoke.
9480 (YYDSYMPRINT): New.
9481 (yyval): Don't define it, it is handled via M4.
9482 (yyrecoverParseError): Free verbosely the discarded symbols.
9483 * data/yacc.c (yysymprint): Remove, rather...
9484 (b4_yysymprint_generate): invoke.
9485 * data/c.m4 (b4_yysymprint_generate): New.
9486 Accept pointers as arguments, as opposed to the version from
9487 yacc.c.
9488 (b4_yydestruct_generate): Likewise.
9489 * tests/cations.at (Printers and Destructors): Use Bison directives
9490 instead of CPP macros.
9491 Don't rely on internal details.
9492
9493 2002-11-12 Akim Demaille <akim@epita.fr>
9494
9495 * data/c.m4 (b4_yydestruct_generate, b4_symbol_actions): New.
9496 * data/yacc.c: Rename yychar1 as yytoken, as in glr.c.
9497 Don't work on yychar (i.e., do set it to YYEMPTY, don't match
9498 it against YYEMPTY and so forth), work on yytoken (i.e., set
9499 it to YYEMPTY etc.).
9500 (yydestruct): Replace with a b4_yydestruct_generate invocation.
9501 (b4_symbol_actions): Remove.
9502 * data/glr.c (YYTRANSLATE): As for yacc.c, if negative, it stands
9503 for 0, end-of-input.
9504
9505 2002-11-12 Akim Demaille <akim@epita.fr>
9506
9507 * doc/bison.texinfo (Destructor Decl): New.
9508
9509 2002-11-12 Akim Demaille <akim@epita.fr>
9510
9511 * src/tables.c (tables_generate): Use free for pointers that
9512 cannot be NULL, not XFREE.
9513 (pack_vector): Use assert, not fatal, for bound violations.
9514 * src/state.c (state_new): Likewise.
9515 * src/reader.c (reader): Likewise.
9516 * src/lalr.c (set_goto_map): Likewise.
9517 * src/location.h (LOCATION_PRINT): If first_line is 0, just issue
9518 the file name.
9519
9520 2002-11-12 Akim Demaille <akim@epita.fr>
9521
9522 * src/scan-gram.l, src/reader.h (scanner_last_string_free):
9523 Restore.
9524 * src/scan-gram.l (last_string): Is global to the file, not to
9525 yylex.
9526 * src/parse-gram.y (input): Don't append the epilogue here,
9527 (epilogue.opt): do it here, and free the scanner's obstack.
9528 * src/reader.c (epilogue_set): Rename as...
9529 (epilogue_augment): this.
9530 * data/c.m4 (b4_epilogue): Defaults to empty.
9531
9532 2002-11-12 Akim Demaille <akim@epita.fr>
9533
9534 * src/getargs.c (long_options): Remove duplicates.
9535 * src/vmsgetargs.c, src/build.com, src/bison.cld, src/vmshlp.mar:
9536 Remove.
9537 * doc/bison.rnh: Remove.
9538 * doc/bison.texinfo (VMS Invocation): Remove.
9539
9540 2002-11-12 Akim Demaille <akim@epita.fr>
9541
9542 * src/struniq.h, src/struniq.c (struniq_t): Is const.
9543 (STRUNIQ_EQ, struniq_assert, struniq_assert_p): New.
9544
9545 Use struniq for symbols.
9546
9547 * src/symtab.h (symbol_t): The tag member is a struniq.
9548 (symbol_type_set): Adjust.
9549 * src/symtab.c (symbol_new): Takes a struniq.
9550 (symbol_free): Don't free the tag member.
9551 (hash_compare_symbol_t, hash_symbol_t): Rename as...
9552 (hash_compare_symbol, hash_symbol): these.
9553 Use the fact that tags as struniqs.
9554 (symbol_get): Use struniq_new.
9555 * src/symlist.h, src/symlist.c (symbol_list_n_type_name_get):
9556 Returns a strniq.
9557 * src/reader.h (merger_list, grammar_currentmerge_set): The name
9558 and type members are struniqs.
9559 * src/reader.c (get_merge_function)
9560 (grammar_current_rule_merge_set): Adjust.
9561 (TYPE, current_type): Are struniq.
9562
9563 Use struniq for file names.
9564
9565 * src/files.h, src/files.c (infile): Split into...
9566 (grammar_file, current_file): these.
9567 * src/scan-gram.c (YY_USER_INIT, handle_syncline): Adjust.
9568 * src/reduce.c (reduce_print): Likewise.
9569 * src/getargs.c (getargs): Likewise.
9570 * src/complain.h, src/complain.c: Likewise.
9571 * src/main.c (main): Call struniqs_new early enough to use it for
9572 file names.
9573 Don't free the input file name.
9574
9575 2002-11-12 Akim Demaille <akim@epita.fr>
9576
9577 * src/symtab.c (symbol_free): Remove dead deactivated code:
9578 type_name are properly removed.
9579 Don't use XFREE to free items that cannot be NULL.
9580 * src/struniq.h, src/struniq.c: New.
9581 * src/main.c (main): Initialize/free struniqs.
9582 * src/parse-gram.y (%union): Add astruniq member.
9583 (yyprint): Adjust.
9584 * src/scan-gram.l (<{tag}>): Return a struniq.
9585 Free the obstack bit that used to store it.
9586 * src/symtab.h (symbol_t): The 'type_name' member is a struniq.
9587
9588 2002-11-11 Paul Eggert <eggert@twinsun.com>
9589
9590 Revamp to fix many (but not all) of the C- and M4-related quoting
9591 problems. Among other things, this fixes the Bison bug reported
9592 by Jan Hubicka when processing the Bash grammar; see:
9593 <http://lists.gnu.org/archive/html/bison-patches/2002-11/msg00039.html>
9594
9595 Use new @ escapes consistently. Represent brackets with @{ and @}
9596 rather than @<:@ and @:>@, since this works a bit better with dumb
9597 editors like vi. Represent @ with @@, since @ is now consistently
9598 an escape. Use @oline@ and @ofile@ rather than __oline__ and
9599 __ofile__, to avoid unexpected expansions. Similarly, use @output
9600 rather than #output.
9601
9602 * data/c.m4 (b4_copyright): Omit file name from comment, since
9603 the file name could contain "*/".
9604 (b4_synclines_flag): Don't quote the 2nd argument; it should already
9605 be quoted. All uses changed.
9606
9607 * data/glr.c: Use new @ escapes consistently.
9608 (b4_input_suffix, b4_output_parser_suffix, b4_output_parser_name,
9609 b4_output_header_suffix, b4_output_header_name, b4_header_guard):
9610 Remove, since they couldn't handle arbitrary characters in file
9611 names.
9612 * data/lalr1.cc: Likewise.
9613 * data/yacc.c: Likewise.
9614
9615 * src/files.c (output_infix): Remove; all uses removed.
9616 * src/files.h: Likewise.
9617
9618 * data/glr.c: Remove use of "#ifdef b4_header_guard", since it
9619 mishandled funny characters in file names, and anyway it isn't
9620 needed any more.
9621 * data/yacc.c: Likewise.
9622 * data/lalr1.cc: Use YYSLP_NEEDED instead of b4_header_guard.
9623
9624 * data/glr.c (YYSTYPE_IS_TRIVIAL): Define when the .h file would.
9625 * data/yacc.c: Likewise.
9626
9627 * src/muscle_tab.c: Include quotearg.h, since we need to quote C
9628 strings now.
9629 (muscle_init): Quote filename as a C string.
9630 * src/muscle_tab.h (MUSCLE_GROW_STRING_PAIR): Remove; unused.
9631 (MUSCLE_OBSTACK_SGROW, MUSCLE_INSERT_C_STRING): New macros.
9632 * src/output.c (escaped_file_name_output): New function.
9633 (prepare_symbols): Quote tokens for M4.
9634 (prepare): Don't insert output_infix, output_prefix,
9635 output_parser_name, output_header_name; this is now down by scan-skel.
9636 Insert skeleton as a C string.
9637
9638 * src/output.c (user_actions_output, symbol_destructors_output,
9639 symbol_printers_output): Quote filenames for C and M4.
9640 * src/reader.c (prologue_augment, epilogue_set): Likewise.
9641
9642 * src/scan-gram.l (<SC_CHARACTER>): Don't worry about any backslash
9643 escapes other than \\ and \'; this simplifies the code.
9644 (<SC_STRING>): Likewise, for \\ and \".
9645 (<SC_COMMENT,SC_LINE_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,
9646 SC_PROLOGUE,SC_EPILOGUE>): Escape $ and @, too.
9647 Use new escapes @{ and @} for [ and ].
9648
9649 * src/scan-skel.l (yylineno, yyoutname): Remove static vars, replacing
9650 them with auto vars.
9651 Switch to new escape scheme, where @ is the escape character uniformly.
9652 Abort if a stray escape character is found. Avoid unbounded input
9653 buffer when parsing non-escaped text.
9654
9655 * tests/input.at (Torturing the Scanner): Add tests that @oline@,
9656 __oline__, #output, $@, and @{ do not have unintended meanings.
9657
9658 2002-11-09 Paul Eggert <eggert@twinsun.com>
9659
9660 Fix the test failure due to GCC warnings described in
9661 <http://lists.gnu.org/archive/html/bug-bison/2002-11/msg00000.html>.
9662 * data/glr.c (yyis_pact_ninf, yyis_table_ninf): New macros, which
9663 evaluate to 0 if it's impossible for NINF to be in the respective
9664 table.
9665 (yygetLRActions, yyrecoverParseError): Use them.
9666
9667 * src/scan-gram.l (unexpected_end_of_file): Fix bug: columns were
9668 counted in the token inserted at end of file. Now takes
9669 location_t *, not location_t, so that the location can be
9670 adjusted. All uses changed.
9671
9672 * tests/regression.at (Invalid inputs): Adjust wording in
9673 diagnostic to match the new behavior.
9674
9675 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR,
9676 AT_DATA_HORIZONTAL_GRAMMAR, AT_DATA_LOOKAHEADS_GRAMMAR,
9677 AT_DATA_STACK_TORTURE): Replace `assert (x);' with `if (! (x))
9678 abort ();'. This reduces the runtime of the "Many lookaheads"
9679 test from 27.6 to 2.7 minutes on a 440 MHz Ultrasparc III running
9680 GCC 3.2.
9681
9682 2002-11-07 Paul Eggert <eggert@twinsun.com>
9683
9684 * src/parse-gram.y (CHARACTER): Remove unused token.
9685 All uses removed.
9686
9687 * src/scan-gram.l: Remove stack option. We no longer use the
9688 stack, since the stack was never deeper than 1; instead, use the
9689 new auto var c_context to record the stacked value.
9690
9691 Remove nounput option. At an unexpected end of file, we now unput
9692 the minimal input necessary to end cleanly; this simplifies the
9693 code.
9694
9695 Avoid unbounded token sizes where this is easy.
9696
9697 (unexpected_end_of_file): New function.
9698 Use it to systematize the error message on unexpected EOF.
9699 (last-string): Now auto, not static.
9700 (YY_OBS_FREE): Remove unnecessary do while (0) wrapper.
9701 (scanner_last_string_free): Remove; not used.
9702 (percent_percent_count): Move decl to just before use.
9703 (SC_ESCAPED_CHARACTER): Return ID at unexpected end of file,
9704 not the (never otherwised-used) CHARACTER.
9705
9706 2002-11-07 Akim Demaille <akim@epita.fr>
9707
9708 Let yyerror always receive the msg as last argument, so that
9709 yyerror can be variadic.
9710
9711 * data/yacc.c (b4_yyerror_args): New.
9712 Use it when calling yyerror.
9713 * data/glr.c (b4_yyerror_args, b4_lyyerror_args): New.
9714 Use it when calling yyerror.
9715 * doc/bison.texinfo (Error Reporting): Adjust.
9716 * tests/calc.at (_AT_DATA_CALC_Y): Adjust.
9717 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Adjust.
9718
9719 2002-11-06 Akim Demaille <akim@epita.fr>
9720
9721 #line should have quoted strings.
9722 Ideally, this should be done by m4_quotearg.
9723
9724 * src/scan-skel.l: Include quotearg.h.
9725 Quote __ofile__.
9726 * src/output.c (symbol_printers_output)
9727 (symbol_destructors_output): Quote the file name.
9728
9729 2002-11-06 Akim Demaille <akim@epita.fr>
9730
9731 * tests/regression.at (Invalid inputs): Adjust to the recent
9732 messages.
9733
9734 2002-11-06 Akim Demaille <akim@epita.fr>
9735
9736 Restore --no-lines.
9737 Reported by Jim Kent.
9738
9739 * data/c.m4 (b4_syncline): New.
9740 * data/glr.c, data/yacc.c, data/lalr1.cc: Use it.
9741 * src/reader.c (prologue_augment, epilogue_set): Use b4_syncline.
9742 * src/output.c (user_actions_output): Likewise.
9743 (prepare): Define 'b4_synclines_flag'.
9744 * src/muscle_tab.c (muscle_init): Don't define b4_linef.
9745
9746 2002-11-06 Akim Demaille <akim@epita.fr>
9747
9748 * src/main.c (main): Free `infile'.
9749 * src/scan-gram.l (handle_syncline): New.
9750 Recognize `#line'.
9751 * src/output.c (user_actions_output, symbol_destructors_output)
9752 (symbol_printers_output): Use the location's file name, not
9753 infile.
9754 * src/reader.c (prologue_augment, epilogue_set): Likewise.
9755
9756 2002-11-05 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9757
9758 * src/tables.c (matching_state): Don't allow states to match if
9759 either has GLR conflict entries.
9760
9761 2002-11-05 Paul Eggert <eggert@twinsun.com>
9762
9763 * src/scan-gram.l: Use more accurate diagnostics, e.g.
9764 "integer out of range" rather than "invalid value".
9765 * tests/input.at (Invalid $n, Invalid @n): Change expected wording
9766 accordingly.
9767
9768 Scan <% and %> digraphs in C code as POSIX 1003.1-2001 requires.
9769 Also, remove one static variable in the scanner.
9770
9771 * src/scan-gram.l (braces_level): Now auto, not static.
9772 Initialize to zero if the compiler is being picky.
9773 (INITIAL): Clear braces_level instead of incrementing it.
9774 (SC_BRACED_CODE): Treat <% and %> as { and } when inside C code,
9775 as POSIX 1003.1-2001 requires.
9776 * src/system.h (IF_LINT): New macro, taken from coreutils.
9777 * configure.ac: Define "lint" if --enable-gcc-warnings.
9778
9779 2002-11-05 Akim Demaille <akim@epita.fr>
9780
9781 * src/scan-gram.l: When it starts with `%', complain about the
9782 whole directive, not just that `invalid character: %'.
9783
9784 2002-11-04 Akim Demaille <akim@epita.fr>
9785
9786 * Makefile.maint: Update from Autoconf.
9787 (update, cvs-update, po-update, do-po-update): New.
9788
9789 2002-11-04 Akim Demaille <akim@epita.fr>
9790
9791 * tests/glr-regr1.at (Badly Collapsed GLR States): Prototype yylex
9792 and yyerror.
9793 Have yyerror `use' its arguments.
9794 * tests/calc.at (AT_CHECK_PUSHDEFS): AT_YYERROR_SEES_LOC_IF
9795 returns true when location & yacc & pure & parse-param.
9796 (_AT_DATA_CALC_Y): Let yyerror ``use'' its arguments.
9797
9798 2002-11-04 Akim Demaille <akim@epita.fr>
9799
9800 * src/location.h (LOCATION_PRINT): Use quotearg slot 3 to avoid
9801 clashes.
9802 * src/scan-gram.l: Use [\'] instead of ['] to pacify
9803 font-lock-mode.
9804 Use complain_at.
9805 Use quote, not quote_n since LOCATION_PRINT no longer uses the
9806 slot 0.
9807
9808 2002-11-03 Paul Eggert <eggert@twinsun.com>
9809
9810 * src/reader.c (get_merge_function, grammar_current_rule_check):
9811 Use consistent diagnostics for reporting type name clashes.
9812 Quote the types with <>, for consistency with Yacc.
9813 * tests/input.at (Type Clashes): Adjust to diagnostic changes.
9814
9815 2002-11-03 Akim Demaille <akim@epita.fr>
9816
9817 * data/c.m4 (b4_identification, b4_user_args, b4_parse_param):
9818 New.
9819 * data/yacc.m4 (b4_pure_args, b4_Pure_args): New.
9820 (b4_parse_param): Remove.
9821 Use b4_identification.
9822 Propagate b4_pure_args where needed to pass them to yyerror.
9823 * data/glr.m4 (b4_parse_param): Remove.
9824 (b4_user_formals, b4_pure_args, b4_pure_formals, b4_lpure_args)
9825 (b4_lpure_formals): New.
9826 Use b4_identification.
9827 (YY_USER_FORMALS, YY_USER_ARGS): Remove, replaced by
9828 b4_user_formals and b4_user_args.
9829 (yyexpandGLRStack, yyFail, yyaddDeferredAction, yyglrShiftDefer)
9830 (yyreportAmbiguity): When using a pure parser, also need
9831 the location, and the parse-params.
9832 Adjust callers.
9833 (yyuserAction, yyglrShift, yyreportParseError, yyrecoverParseError):
9834 When using a pure parser, also need the parse-params.
9835 Adjust callers.
9836 * tests/calc.at: Test pure (%pure-parser) and absolutely pure
9837 (%pure-parser + %parse-param) LALR and GLR parsers.
9838 (AT_CHECK_PUSHDEFS, AT_CHECK_POPDEFS): New, define AT_PARAM_IF,
9839 AT_LOCATION_IF, AT_PURE_IF, AT_GLR_IF, AAT_PURE_AND_LOC_IF,
9840 AT_GLR_OR_PARAM_IF, AT_YYERROR_ARG_LOC_IF, AT_YYERROR_SEES_LOC_IF.
9841 (_AT_DATA_CALC_Y): Equip for purity of yyerror.
9842 (_AT_CHECK_CALC_ERROR): Use AT_YYERROR_SEES_LOC_IF.
9843 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Equip for yyerror purity.
9844 * doc/bison.texinfo: Untabify the whole file.
9845 (Parser Function): Document %parse-param, deprecate YYPARSE_PARAM.
9846 (Pure Calling): Document %lex-param, deprecate YYLEX_PARAM.
9847 (Error Reporting): Adjust to these new directives.
9848 Document %error-verbose, deprecate YYERROR_VERBOSE.
9849
9850 2002-11-03 Akim Demaille <akim@epita.fr>
9851
9852 * tests/calc.at: Change all the AT_CHECK_CALC_LALR and
9853 AT_CHECK_CALC_GLR invocations to use % directives, instead of
9854 command line options.
9855 * tests/cxx-type.at: Formatting changes.
9856
9857 2002-11-03 Paul Eggert <eggert@twinsun.com>
9858
9859 * src/scan-gram.l: Revamp to fix POSIX incompatibilities,
9860 to count columns correctly, and to check for invalid inputs.
9861
9862 Use mbsnwidth to count columns correctly. Account for tabs, too.
9863 Include mbswidth.h.
9864 (YY_USER_ACTION): Invoke extend_location rather than LOCATION_COLUMNS.
9865 (extend_location): New function.
9866 (YY_LINES): Remove.
9867
9868 Handle CRLF in C code rather than in Lex code.
9869 (YY_INPUT): New macro.
9870 (no_cr_read): New function.
9871
9872 Scan UCNs, even though we don't fully handle them yet.
9873 (convert_ucn_to_byte): New function.
9874
9875 Handle backslash-newline correctly in C code.
9876 (SC_LINE_COMMENT, SC_YACC_COMMENT): New states.
9877 (eols, blanks): Remove. YY_USER_ACTION now counts newlines etc.;
9878 all uses changed.
9879 (tag, splice): New EREs. Do not allow NUL or newline in tags.
9880 Use {splice} wherever C allows backslash-newline.
9881 YY_STEP after space, newline, vertical-tab.
9882 ("/*"): BEGIN SC_YACC_COMMENT, not yy_push_state (SC_COMMENT).
9883
9884 (letter, id): Don't assume ASCII; e.g., spell out a-z.
9885
9886 ({int}, handle_action_dollar, handle_action_at): Check for integer
9887 overflow.
9888
9889 (YY_STEP): Omit trailing semicolon, so that it's more like C.
9890
9891 (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>): Allow \0 and \00
9892 as well as \000. Check for UCHAR_MAX, not 255.
9893 Allow \x with an arbitrary positive number of digits, as in C.
9894 Check for overflow here.
9895 Allow \? and UCNs, for compatibility with C.
9896
9897 (handle_symbol_code_dollar): Use quote_n slot 1 to avoid collision
9898 with quote slot used by complain_at.
9899
9900 * tests/input.at: Add tests for backslash-newline, m4 quotes
9901 in symbols, long literals, and funny escapes in strings.
9902
9903 * configure.ac (jm_PREREQ_MBSWIDTH): Add.
9904 * lib/Makefile.am (libbison_a_SOURCES): Add mbswidth.h, mbswidth.c.
9905 * lib/mbswidth.h, lib/mbswidth.c: New files, from GNU gettext.
9906 * m4/Makefile.am (EXTRA_DIST): Add mbswidth.m4.
9907 * m4/mbswidth.m4: New file, from GNU coreutils.
9908
9909 * doc/bison.texinfo (Grammar Outline): Document // comments.
9910 (Symbols): Document that trigraphs have no special meaning in Bison,
9911 nor is backslash-newline allowed.
9912 (Actions): Document that trigraphs have no special meaning.
9913
9914 * src/location.h (LOCATION_COLUMNS, LOCATION_LINES): Remove;
9915 no longer used.
9916
9917 2002-11-02 Paul Eggert <eggert@twinsun.com>
9918
9919 * src/reader.c: Don't include quote.h; not needed.
9920 (get_merge_function): Reword warning to be consistent with
9921 type clash diagnostic in grammar_current_rule_check.
9922
9923 * lib/quotearg.c (quotearg_buffer_restyled): Fix off-by-two
9924 bug in trigraph handling.
9925
9926 * src/output.c (prepare_symbols): When printing token names,
9927 escape "[" as "@<:@" and likewise for "]".
9928
9929 * src/system.h (errno): Remove declaration, as we are now
9930 assuming C89 or better, and C89 guarantees errno.
9931
9932 2002-10-30 Paul Eggert <eggert@twinsun.com>
9933
9934 * lib/bitset_stats.c (bitset_stats_read, bitset_stats_write):
9935 Check for close failures.
9936 * src/files.h (xfclose): Return void, not int, since it always
9937 returned zero.
9938 * src/files.c (xfclose): Likewise. Report I/O error if ferror
9939 indicates one.
9940 * src/output.c (output_skeleton): Use xfclose rather than fclose
9941 and ferror. xfclose now checks ferror.
9942
9943 * data/glr.c (YYLEFTMOST_STATE): Remove.
9944 (yyreportTree): Use a stack-based leftmost state. This avoids
9945 our continuing battles with bogus warnings about initializers.
9946
9947 2002-10-30 Akim Demaille <akim@epita.fr>
9948
9949 * src/system.h: Don't use #ifdef/#ifndef on HAVE_ values, only
9950 #if.
9951
9952 2002-10-29 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
9953
9954 * tests/glr-regr1.at: New test for reported regressions.
9955 * tests/testsuite.at: Add glr-regr1.at test.
9956 * tests/Makefile.am: Add glr-regr1.at test.
9957
9958 2002-10-24 Paul Eggert <eggert@twinsun.com>
9959
9960 Version 1.75a.
9961
9962 * tests/calc.at (_AT_DATA_CALC_Y): Remove unused strcat declaration.
9963 * tests/cxx-type.at (_AT_TEST_GLR_CALC): Include stdlib.h, since
9964 we use malloc. Don't assume 'A' through 'Z' are contiguous.
9965 Don't assume strdup exists; POSIX says its an XSI extension.
9966 Check for buffer overflow on input.
9967
9968 2002-10-24 Akim Demaille <akim@epita.fr>
9969
9970 * src/output.c (output_skeleton): Don't disable M4sugar comments
9971 too soon: it results in comments being expanded.
9972 * data/yacc.c, data/glr.c, data/lalr1.cc: Do it right before the
9973 first output.
9974
9975 2002-10-24 Akim Demaille <akim@epita.fr>
9976
9977 * data/yacc.c (m4_int_type): New.
9978 * data/c.m4 (m4_int_type): Don't use yysigned_char, but `signed
9979 char' as only yacc.c wants K&R portability.
9980 * data/glr.c (yysigned_char): Remove.
9981 * data/lalr1.cc: Rename the trailing b4_name as b4_parser_class_name.
9982 Reported by Quoc Peyrot.
9983
9984 2002-10-23 Paul Eggert <eggert@twinsun.com>
9985
9986 * src/main.c (main): With --trace=time, report times even if a
9987 non-fatal error occurs. Formerly, the times were reported in some
9988 such cases but not in others.
9989 * src/reader.c (reader): Just return if a complaint has been issued,
9990 instead of exiting, so that 'main' can report times.
9991
9992 2002-10-22 Akim Demaille <akim@epita.fr>
9993
9994 * src/system.h: Include sys/types.
9995 Reported by Bert Deknuydt.
9996
9997 2002-10-23 Paul Eggert <eggert@twinsun.com>
9998
9999 * configure.ac (AC_PROG_LEX): Use instead of AM_PROG_LEX.
10000 Suggested by Art Haas.
10001
10002 2002-10-22 Paul Eggert <eggert@twinsun.com>
10003
10004 * src/complain.c (exit) [! (STDC_HEADERS || _LIBC)]: Remove exit
10005 decl; not needed any more.
10006 * src/main.c (main): Use return to exit, undoing yesterday's change.
10007 The last OS that we could find where this wouldn't work is
10008 SunOS 3.5, and that's too old to worry about now.
10009
10010 * data/glr.c (struct yyltype): Define members even when not
10011 doing locations. This is more consistent with yacc.c, and it
10012 works around the following bug reports:
10013 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00106.html
10014 http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00111.html
10015
10016 * doc/bison.texinfo: Minor spelling and typographical fixes. Use
10017 @acronym consistently. Standardize on "Yacc" instead of "YACC",
10018 "Algol" instead of "ALGOL". Give a bit more history about BNF.
10019
10020 2002-10-22 Akim Demaille <akim@epita.fr>
10021
10022 * data/README: New.
10023
10024 2002-10-21 Paul Eggert <eggert@twinsun.com>
10025
10026 Be consistent about 'bool'; the old code used an enum in one
10027 module and an int in another, and this violates the C standard.
10028 * m4/stdbool.m4: New file, from coreutils 4.5.3.
10029 * configure.ac (AC_HEADER_STDBOOL): Add.
10030 * m4/Makefile.am (EXTRA_DIST): Add stdbool.m4.
10031 * src/muscle_tab.c (hash_compare_muscles): (a ? FALSE : TRUE) -> (! a)
10032 * src/symtab.c (hash_compare_symbol_t): Likewise.
10033 * src/system.h (bool, false, true): Use a definition consistent
10034 with ../lib/hash.c. All uses changed.
10035
10036 * src/complain.c (warning_issued): Renamed from warn_message_count,
10037 so that we needn't worry about integer overflow (!).
10038 Now of type bool. All uses changed.
10039 (complaint_issued): Renamed from complain_message_count; likewise.
10040
10041 * src/main.c (main): Use exit to exit with failure.
10042
10043 * src/complain.c (fatal_at, fatal): Use EXIT_FAILURE and EXIT_SUCCESS
10044 rather than 1 and 0.
10045 * src/main.c (main): Likewise.
10046 * src/getargs.c (getargs): Likewise.
10047 * src/reader.c (reader): Likewise.
10048
10049 * src/getarg.c (getargs): Remove duplicate code for
10050 "Try `bison --help'".
10051
10052 * src/files.c (xfopen, xfclose): Use EXIT_FAILURE rather than 2.
10053 What was that "2" for?
10054
10055 * src/complain.h (fatal, fatal_at): Add __attribute__((__noreturn__)).
10056 * src/getargs.c (usage): Likewise.
10057
10058 * src/getargs.c (getargs): When there are too few operands, report
10059 the last one. When there are too many, report the first extra
10060 one. This is how diffutils does it.
10061
10062 2002-10-20 Paul Eggert <eggert@twinsun.com>
10063
10064 Remove K&R vestiges.
10065 * configure.ac (AC_C_CONST, AM_C_PROTOTYPES): Remove.
10066 * src/complain.c (VA_START): Remove. Assume prototypes.
10067 (vfprintf) [! (HAVE_VPRINTF || defined vfprintf)]: New macro.
10068 (private_strerror, warn_at, warn, complain_at, complain, fatal_at,
10069 fatal): Assume prototypes.
10070 * src/complain.h: Assume prototypes.
10071 * src/system.h (PARAMS): Remove.
10072 Include <limits.h> unconditionally, since it's guaranteeed even
10073 for a freestanding C89 compiler.
10074 (SHRT_MIN, SHRT_MAX): Remove, since C89 guarantees them.
10075 * src/vmsgetargs.c (getargs, cli_present, cli_get_value): Prototype.
10076
10077 2002-10-20 Akim Demaille <akim@epita.fr>
10078
10079 * src/muscle_tab.c (muscle_grow): Remove trailing debugging code.
10080 * data/glr.c (YY_USER_FORMALS, YY_USER_ARGS): New.
10081 (yyuserAction, yydoAction, yyglrReduce, yyresolveValue)
10082 (yyresolveStates, yyresolveAction, yyresolveStack)
10083 (yyprocessOneStack): Use them.
10084 (yy_reduce_print): New.
10085 * tests/calc.at (_AT_DATA_CALC_Y): Exercise %parse-param.
10086
10087 2002-10-20 Akim Demaille <akim@epita.fr>
10088
10089 * data/c.m4 (b4_c_ansi_args): Recognize functions with no
10090 arguments and output `void'.
10091 (b4_c_function): Rename as...
10092 (b4_c_function_def): this.
10093 (b4_c_function_decl, b4_c_ansi_function_def)
10094 (b4_c_ansi_function_decl): New.
10095 Change the interpretation of the arguments: before `int, foo', now
10096 `int foo, foo'.
10097 * data/yacc.c (yyparse): Prototype and define thanks to these.
10098 Adjust b4_c_function_def uses.
10099 * data/glr.c (yyparse): Likewise, but ANSI only.
10100
10101 2002-10-20 Akim Demaille <akim@epita.fr>
10102
10103 * src/output.c (prepare): Move the definition of `tokens_number',
10104 `nterms_number', `undef_token_number', `user_token_number_max'
10105 to...
10106 (prepare_tokens): Here.
10107 (prepare_tokens): Rename as...
10108 (prepare_symbols): this.
10109 (prepare): Move the definition of `rules_number' to...
10110 (prepare_rules): here.
10111 (prepare): Move the definition of `last', `final_state_number',
10112 `states_number' to...
10113 (prepare_states): here.
10114 * data/yacc.c, data/lalr1.cc, data/glr.c: Normalize `>' into `<'.
10115
10116 2002-10-20 Akim Demaille <akim@epita.fr>
10117
10118 * src/tables.h, src/tables.c, src/output.c: Comment changes.
10119
10120 2002-10-20 Akim Demaille <akim@epita.fr>
10121
10122 * data/yacc.c, data/yacc.c (b4_location_if, b4_pure_if): Move to...
10123 * data/c.m4: here.
10124
10125 2002-10-20 Akim Demaille <akim@epita.fr>
10126
10127 * src/output.c (prepare): Use MUSCLE_INSERT_STRING.
10128 * src/muscle_tab.c (muscle_pair_list_grow): Rename `val as
10129 `pair'.
10130 (muscle_init): Move the `b4_ltype', `b4_maxdepth', `b4_initdepth',
10131 `name' to...
10132 * data/glr.c, data/lalr1.cc, data/yacc.c (b4_location_type)
10133 (b4_stack_depth_init, b4_stack_depth_max, b4_parser_class_name):
10134 These.
10135
10136 2002-10-19 Paul Eggert <eggert@twinsun.com>
10137
10138 Do not create a temporary file, as that involves security and
10139 cleanup headaches. Instead, use a pair of pipes.
10140 Derived from a suggestion by Florian Krohm.
10141 * lib/subpipe.c, lib/subpipe.h, m4/subpipe.m4: New files.
10142 * lib/mkstemp.c, lib/readpipe.c, lib/tempname.c, m4/mkstemp.m4: Remove.
10143 * configure.ac (UTILS_FUNC_MKSTEMP, jm_PREREQ_TEMPNAME): Remove.
10144 (BISON_PREREQ_SUBPIPE): Add.
10145 * lib/Makefile.am (libbison_a_SOURCES): Remove readpipe.c.
10146 Add subpipe.h, subpipe.c.
10147 * m4/Makefile.am (EXTRA_DIST): Remove mkstemp.m4. Add subpipe.m4.
10148 * po/POTFILES.in: Add lib/subpipe.c.
10149 * src/output.c: Include "subpipe.h".
10150 (m4_invoke): Remove decl.
10151 (scan_skel): New decl.
10152 (output_skeleton): Use pipe rather than temporary file for m4 input.
10153 Check that m4sugar.m4 is readable, to avoid deadlock.
10154 Check for pipe I/O error.
10155 * src/scan-skel.l (readpipe): Remove decl.
10156 (scan_skel): New function, to be used in place of m4_invoke.
10157 Read from stream rather than file.
10158
10159 * lib/timevar.c (TICKS_TO_MSEC, CLOCKS_TO_MSEC): Do not cast to
10160 float, as this generates a warning on Solaris 8 + GCC 3.2 with
10161 --enable-gcc-warnings. Instead, divide into 1.0 rather than 1;
10162 this generates a more-accurate value anyway.
10163
10164 * lib/timevar.c (timervar_accumulate): Rename locals to
10165 avoid confusion with similarly-named more-global.
10166 * src/muscle_tab.c (muscle_pair_list_grow): Likewise.
10167
10168 * src/output.c (prepare): Use xstrdup to convert char const *
10169 to char *, to avoid GCC warning.
10170
10171 2002-10-19 Akim Demaille <akim@epita.fr>
10172
10173 * tests/calc.at (_AT_DATA_CALC_Y): Define VAL, LOC, LEX_FORMALS,
10174 LEX_PRE_FORMALS, LEX_ARGS, LEX_PRE_ARGS, USE_LEX_ARGS.
10175 Use them to have `calc.y' ready for %pure-parser.
10176 * data/yacc.c (YYLEX): Pass a yylex return type to
10177 b4_c_function_call.
10178
10179 2002-10-19 Akim Demaille <akim@epita.fr>
10180
10181 Prototype support of %lex-param and %parse-param.
10182
10183 * src/parse-gram.y: Add the definition of the %lex-param and
10184 %parse-param tokens, plus their rules.
10185 Drop the `_' version of %glr-parser.
10186 Add the "," token.
10187 * src/scan-gram.l (INITIAL): Scan them.
10188 * src/muscle_tab.c: Comment changes.
10189 (muscle_insert, muscle_find): Rename `pair' as `probe'.
10190 * src/muscle_tab.h (MUSCLE_INSERT_PREFIX): Remove unused.
10191 (muscle_entry_s): The `value' member is no longer const.
10192 Adjust all dependencies.
10193 * src/muscle_tab.c (muscle_init): Adjust: use
10194 MUSCLE_INSERT_STRING.
10195 Initialize the obstack earlier.
10196 * src/muscle_tab.h, src/muscle_tab.c (muscle_grow)
10197 (muscle_pair_list_grow): New.
10198 * data/c.m4 (b4_c_function_call, b4_c_args): New.
10199 * data/yacc.c (YYLEX): Use b4_c_function_call to honor %lex-param.
10200 * tests/calc.at: Use %locations, not --locations.
10201 (AT_CHECK_CALC_GLR): Use %glr-parser, not %glr_parser.
10202
10203 2002-10-19 Akim Demaille <akim@epita.fr>
10204
10205 * src/getargs.c (usage): Take status as argument and exit
10206 accordingly.
10207 Report the traditional `Try ... --help' message when status != 0.
10208 (usage, version): Don't take a FILE * as arg, it is pointless.
10209 (getargs): When there is an incorrect number of arguments, make it
10210 an error, and report it GNUlically thanks to `usage ()'.
10211
10212 2002-10-18 Paul Eggert <eggert@twinsun.com>
10213
10214 * data/glr.c (yyreportParseError): Don't assume that sprintf
10215 yields the length of the printed string, as this is not true
10216 on SunOS 4.1.4. Reported by Peter Klein.
10217
10218 * tests/calc.at (_AT_DATA_CALC_Y): #undef memcmp and realloc.
10219 * tests/conflicts.at (%nonassoc and eof): Likewise.
10220 Fixes SunOS 4.1.4 test failure reported by Peter Klein.
10221
10222 2002-10-17 Akim Demaille <akim@epita.fr>
10223
10224 * src/getargs.h (trace_e): Add trace_scan, and trace_parse.
10225 * src/getargs.c (trace_types, trace_args): Adjust.
10226 * src/reader.c (grammar_current_rule_prec_set)
10227 (grammar_current_rule_dprec_set, grammar_current_rule_merge_set):
10228 Standardize error messages.
10229 And s/@prec/%prec/!
10230 (reader): Use trace_flag to enable scanner/parser debugging,
10231 instead of an adhoc scheme.
10232 * src/scan-gram.l: Remove trailing debugging code.
10233
10234 2002-10-16 Paul Eggert <eggert@twinsun.com>
10235
10236 * src/muscle_tab.h (MUSCLE_TAB_H_): Was misspelled as
10237 MUSCLE_TAB_H.
10238
10239 * NEWS: Officially drop support for building Bison with K&R C,
10240 since it didn't work anyway and it's not worth worrying about.
10241 * Makefile.maint (wget_files): Remove ansi2knr.c.
10242 (ansi2knr.c-url_prefix): Remove.
10243 * lib/.cvsignore: Remove ansi2knr, ansi2knr.*.
10244 * lib/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10245 * src/Makefile.am (AUTOMAKE_OPTIONS): Remove.
10246
10247 2002-10-15 Paul Eggert <eggert@twinsun.com>
10248
10249 Stop using the "enum_" trick for K&R-style function definitions;
10250 it confused me, and I was the author! Instead, assume that people
10251 who want to use K&R C compilers (when using these modules in GCC,
10252 perhaps?) will run ansi2knr.
10253
10254 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): Remove.
10255 All uses of "enum_" changed to "enum ".
10256 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
10257 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
10258
10259 * lib/abitset.c (abitset_and, abitset_and_cmp, abitset_and_or,
10260 abitset_and_or_cmp, abitset_andn, abitset_andn_cmp,
10261 abitset_andn_or, abitset_andn_or_cmp, abitset_bytes, abitset_copy,
10262 abitset_copy1, abitset_disjoint_p, abitset_empty_p,
10263 abitset_equal_p, abitset_init, abitset_list, abitset_list_reverse,
10264 abitset_not, abitset_ones, abitset_or, abitset_or_and,
10265 abitset_or_and_cmp, abitset_or_cmp, abitset_reset, abitset_set,
10266 abitset_size, abitset_small_list, abitset_subset_p, abitset_test,
10267 abitset_unused_clear, abitset_xor, abitset_xor_cmp, abitset_zero):
10268 Use function prototypes; this removes the need for declaring
10269 static functions simply to provide their prototypes.
10270 * lib/bitset.c (bitset_alloc, bitset_and_or_, bitset_and_or_cmp_,
10271 bitset_andn_or_, bitset_andn_or_cmp_, bitset_bytes, bitset_copy_,
10272 bitset_count_, bitset_create, bitset_dump, bitset_first,
10273 bitset_free, bitset_init, bitset_last, bitset_next,
10274 bitset_obstack_alloc, bitset_obstack_free, bitset_only_set_p,
10275 bitset_op4_cmp, bitset_or_and_, bitset_or_and_cmp_, bitset_prev,
10276 bitset_print, bitset_release_memory, bitset_toggle_,
10277 bitset_type_choose, bitset_type_get, bitset_type_name_get,
10278 debug_bitset): Likewise.
10279 * lib/bitset.h (bitset_set, bitset_reset, bitset_test): Likewise.
10280 * lib/bitset_stats.c (bitset_log_histogram_print,
10281 bitset_percent_histogram_print, bitset_stats_and,
10282 bitset_stats_and_cmp, bitset_stats_and_or,
10283 bitset_stats_and_or_cmp, bitset_stats_andn, bitset_stats_andn_cmp,
10284 bitset_stats_andn_or, bitset_stats_andn_or_cmp, bitset_stats_copy,
10285 bitset_stats_count, bitset_stats_disable, bitset_stats_disjoint_p,
10286 bitset_stats_dump, bitset_stats_empty_p, bitset_stats_enable,
10287 bitset_stats_equal_p, bitset_stats_free, bitset_stats_init,
10288 bitset_stats_list, bitset_stats_list_reverse, bitset_stats_not,
10289 bitset_stats_ones, bitset_stats_or, bitset_stats_or_and,
10290 bitset_stats_or_and_cmp, bitset_stats_or_cmp, bitset_stats_print,
10291 bitset_stats_print_1, bitset_stats_read, bitset_stats_reset,
10292 bitset_stats_set, bitset_stats_size, bitset_stats_subset_p,
10293 bitset_stats_test, bitset_stats_toggle, bitset_stats_type_get,
10294 bitset_stats_write, bitset_stats_xor, bitset_stats_xor_cmp,
10295 bitset_stats_zero): Likewise.
10296 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
10297 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
10298 bitsetv_dump, debug_bitsetv): Likewise.
10299 * lib/ebitset.c (ebitset_and, ebitset_and_cmp, ebitset_andn,
10300 ebitset_andn_cmp, ebitset_bytes, ebitset_copy, ebitset_copy_,
10301 ebitset_copy_cmp, ebitset_disjoint_p, ebitset_elt_add,
10302 ebitset_elt_alloc, ebitset_elt_calloc, ebitset_elt_find,
10303 ebitset_elt_free, ebitset_elt_last, ebitset_elt_remove,
10304 ebitset_elt_zero_p, ebitset_elts_grow, ebitset_empty_p,
10305 ebitset_equal_p, ebitset_free, ebitset_init, ebitset_list,
10306 ebitset_list_reverse, ebitset_not, ebitset_ones, ebitset_op3_cmp,
10307 ebitset_or, ebitset_or_cmp, ebitset_release_memory, ebitset_reset,
10308 ebitset_set, ebitset_size, ebitset_subset_p, ebitset_test,
10309 ebitset_weed, ebitset_xor, ebitset_xor_cmp, ebitset_zero):
10310 Likewise.
10311 * lib/lbitset.c (debug_lbitset, lbitset_and, lbitset_and_cmp,
10312 lbitset_andn, lbitset_andn_cmp, lbitset_bytes, lbitset_copy,
10313 lbitset_copy_cmp, lbitset_disjoint_p, lbitset_elt_alloc,
10314 lbitset_elt_calloc, lbitset_elt_find, lbitset_elt_free,
10315 lbitset_elt_link, lbitset_elt_unlink, lbitset_elt_zero_p,
10316 lbitset_empty_p, lbitset_equal_p, lbitset_free, lbitset_init,
10317 lbitset_list, lbitset_list_reverse, lbitset_not, lbitset_ones,
10318 lbitset_op3_cmp, lbitset_or, lbitset_or_cmp, lbitset_prune,
10319 lbitset_release_memory, lbitset_reset, lbitset_set, lbitset_size,
10320 lbitset_subset_p, lbitset_test, lbitset_weed, lbitset_xor,
10321 lbitset_xor_cmp, lbitset_zero): Likewise.
10322
10323 2002-10-14 Akim Demaille <akim@epita.fr>
10324
10325 Version 1.75.
10326
10327 2002-10-14 Akim Demaille <akim@epita.fr>
10328
10329 * tests/Makefile.am (maintainer-check-posix): New.
10330
10331 2002-10-14 Akim Demaille <akim@epita.fr>
10332
10333 * data/glr.c [YYDEBUG] (YYLEFTMOST_STATE): Initialize the yyloc
10334 member.
10335
10336 2002-10-14 Akim Demaille <akim@epita.fr>
10337
10338 * src/tables.c (table_ninf_remap): base -> tab.
10339 Reported by Matt Rosing.
10340
10341 2002-10-14 Paul Eggert <eggert@twinsun.com>
10342
10343 * tests/action.at, tests/calc.at, tests/conflicts.at,
10344 tests/cxx-type.at, tests/headers.at, tests/input.at,
10345 tests/regression.at, tests/synclines.at, tests/torture.at:
10346 Say "bison -o foo.c foo.y", not "bison foo.y -o foo.c",
10347 so that the tests still work even if POSIXLY_CORRECT is set.
10348 * doc/bison.texinfo (Rpcalc Compile, Invocation): Likewise.
10349
10350 * data/c.m4 (b4_int_type): Use yysigned_char instead of signed char,
10351 for portability to K&R hosts. Fix typo: signed char is guaranteed
10352 only to 127, not to 128.
10353 * data/glr.c (yysigned_char): New type.
10354 * data/yacc.c (yysigned_char): Likewise.
10355 * tests/regression.at (Web2c Actions): signed char -> yysigned_char.
10356
10357 2002-10-13 Paul Eggert <eggert@twinsun.com>
10358
10359 * data/yacc.c (yyparse): Rewrite to avoid "comparison is always
10360 true due to limited range of data type" warning from GCC.
10361
10362 * data/c.m4 (b4_token_defines): Protect against double-inclusion
10363 by wrapping enum yytokentype's definition inside #ifndef
10364 YYTOKENTYPE. This undoes a bug I introduced on 2002-10-12.
10365
10366 2002-10-13 Akim Demaille <akim@epita.fr>
10367
10368 * data/glr.c (yyglrShiftDefer, yyaddDeferredAction, yydoAction):
10369 Un yy- yyrhs to avoid the name clash with the global YYRHS.
10370
10371 2002-10-13 Akim Demaille <akim@epita.fr>
10372
10373 * Makefile.maint: Update from Autoconf 2.54.
10374 * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Remove, shipped with 2.54.
10375
10376 2002-10-13 Akim Demaille <akim@epita.fr>
10377
10378 * src/print.c (print_state): Separate the list of solved conflicts
10379 from the other items.
10380 * tests/conflicts.at (Resolved SR Conflicts): Adjust.
10381
10382 2002-10-13 Akim Demaille <akim@epita.fr>
10383
10384 Let nondeterministic skeletons be usable with deterministic
10385 tables.
10386
10387 With the patch, GAWK compiled by GCC without -O2 passes its test
10388 suite using a GLR parser driven by LALR tables. It fails with -O2
10389 because `struct stat' gives two different answers on my machine:
10390 88 (definition of an auto var) and later 96 (memset on this var).
10391 Hence the stack is badly corrumpted. The headers inclusion is to
10392 blame: if I move the awk.h inclusion before GLR's system header
10393 inclusion, the two struct stat have the same size.
10394
10395 * src/tables.c (pack_table): Always create conflict_table.
10396 (token_actions): Always create conflict_list.
10397 * data/glr.c (YYFLAG): Remove, unused.
10398
10399 2002-10-13 Akim Demaille <akim@epita.fr>
10400
10401 * configure.ac (AC_GNU_SOURCE): Use it instead of hand written code.
10402 (O0FLAGS): New.
10403 (VALGRIND, GXX): New.
10404 * tests/atlocal.in (CFLAGS): Use O0FLAGS.
10405 * tests/bison.in: Run $PREBISON a pre-command.
10406 * tests/Makefile.am (maintainer-check, maintainer-check-valgrind)
10407 (maintainer-check-g++): New.
10408 * Makefile.am (maintainer-check): New.
10409
10410 2002-10-13 Akim Demaille <akim@epita.fr>
10411
10412 * data/glr.c: Formatting changes.
10413 Tweak some trace messages to match yacc.c's.
10414
10415 2002-10-13 Akim Demaille <akim@epita.fr>
10416
10417 GLR parsers sometimes raise parse errors instead of performing the
10418 default reduction.
10419 Reported by Charles-Henry de Boysson.
10420
10421 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Don't
10422 check the length of the traces when %glr.
10423 (_AT_CHECK_CALC_ERROR): Also skip `^Stack' lines, coming from
10424 GLR's traces.
10425 (AT_CHECK_CALC_LALR, AT_CHECK_CALC_GLR): New.
10426 Test GLR parsers.
10427 * data/glr.c (YYLEFTMOST_STATE): Fix its value.
10428 (yyltype): Remove the yy prefix from the member names.
10429 (yytable): Complete its comment.
10430 (yygetLRActions): Map error action number from YYTABLE from
10431 YYTABLE_NINF to 0.
10432 (yyisErrorAction): No longer compare YYACTION to YYPACT_NINF
10433 (which was a bug: it should have been YYTABEL_NINF, and yet it was
10434 not satisfying as we could compare an YYACTION computed from
10435 YYDEFACT to YYTABLE_NINF although they are unrelated): 0 is the
10436 only value for error actions.
10437 (yyreportParseError): In verbose parse error messages, don't issue
10438 `error' in the list of expected tokens.
10439 * data/yacc.c (yyparse) <yybackup>: Rewrite the decoding of the
10440 next action to perform to match glr.c's decoding.
10441 (yytable): Complete its comment.
10442
10443 2002-10-13 Paul Eggert <eggert@twinsun.com>
10444
10445 Fix problem reported by Henrik Grubbstroem in
10446 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00098.html>:
10447 "nonterm: { $$ = 123; } { $$ = $1; };" was wrongly rejected,
10448 because the Bison parser reads the second action before reducing
10449 the first one.
10450 * src/scan-gram.l (rule_length): New static var.
10451 Use it to keep track of the rule length in the scanner, since
10452 we can't expect the parser to be in lock-step sync with the scanner.
10453 (handle_action_dollar, handle_action_at): Use this var.
10454 * tests/actions.at (Exotic Dollars): Test for the problem.
10455
10456 2002-10-12 Paul Eggert <eggert@twinsun.com>
10457
10458 * lib/timevar.c [! IN_GCC && HAVE_SYS_TIME_H]: Include <sys/time.h>.
10459 * m4/timevar.m4 (BISON_PREREQ_TIMEVAR): Check for <sys/time.h>.
10460 Include <sys/time.h> when checking for clock_t and struct tms.
10461 Use same include order as source.
10462 This is for the SunOS 4.1.4 porting bug reported by Peter Klein in
10463 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00016.html>.
10464
10465 * lib/timevar.c: Update copyright date and clarify comments.
10466 (get_time) [IN_GCC]: Keep the GCC version for reference.
10467
10468 * lib/timevar.c, lib/timevar.h, lib/timevar.def: Import
10469 GCC version as of today, then merge Bison's changes.
10470 Change "GCC" to "Bison" in copyright notice. timevar.def's
10471 author is Akim, so change that too.
10472
10473 * src/reader.c (grammar_current_rule_check):
10474 Don't worry about the default action if $$ is untyped.
10475 Prevents bogus warnings reported by Jim Gifford in
10476 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00015.html>.
10477
10478 * data/c.m4 (b4_token_enum): Do not define YYTOKENTYPE.
10479 * data/glr.c, data/lalr1.cc, data/yacc.c:
10480 Output token definitions before the first part of user declarations.
10481 Fixes compatibility problem reported by Jim Gifford for kbd in
10482 <http://lists.gnu.org/archive/html/bug-bison/2002-10/msg00014.html>.
10483
10484 2002-10-11 Paul Eggert <eggert@twinsun.com>
10485
10486 * data/yacc.c (yyreport_parse_error): Remove, putting its body into...
10487 (yyparse): here. This undoes some of the 2002-07-25 change.
10488 Compatibility problem reported by Ralf S. Engelschall with
10489 OSSP cfg <http://www.ossp.org/pkg/lib/cfg/>.
10490
10491 2002-10-11 Akim Demaille <akim@epita.fr>
10492
10493 * tests/regression.at Characters Escapes): New.
10494 * src/scan-gram.l (SC_ESCAPED_CHARACTER): Accept \' in strings and
10495 characters.
10496 Reported by Jan Nieuwenhuizen.
10497
10498 2002-10-11 Akim Demaille <akim@epita.fr>
10499
10500 * po/id.po: New.
10501
10502 2002-10-10 Paul Eggert <eggert@twinsun.com>
10503
10504 Portability fixes for bitsets; this also avoids several GCC
10505 warnings.
10506
10507 * lib/abitset.c: Include <stddef.h>, for offsetof.
10508 * lib/lbitset.c: Likewise.
10509
10510 * lib/abitset.c (abitset_bytes): Return a size that is aligned
10511 properly for vectors of objects. Do not assume that adding a
10512 header size to a multiple of a word size yields a value that is
10513 properly aligned for the whole union.
10514 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10515
10516 * lib/bitset_stats.c (bitset_stats_bytes): Adjust to new,
10517 unique names for structures.
10518 * lib/ebitset.c (ebitset_bytes): Likewise.
10519 * lib/lbitset.c (lbitset_bytes): Likewise.
10520
10521 * lib/abitset.c (abitset_ones, abitset_zero, abitset_empty_p,
10522 abitset_copy1, abitset_not, abitset_equal_p, abitset_subset_p,
10523 abitset_disjoint_p, abitset_and, abitset_and_cmp, abitset_andn,
10524 abitset_andn_cmp, abitset_or, abitset_or_cmp, abitset_xor,
10525 abitset_xor_cmp, abitset_and_or, abitset_and_or_cmp,
10526 abitset_andn_or, abitset_andn_or_cmp, abitset_or_and,
10527 abitset_or_and_cmp, abitset_copy): Supply prototype decls,
10528 to improve the type-checking that GCC can do.
10529 * lib/bitset.c (bitset_op4_cmp): Likewise.
10530 * lib/bitset_stats.c (bitset_stats_count,
10531 bitset_stats_empty_p, bitset_stats_ones, bitset_stats_zero,
10532 bitset_stats_copy, bitset_stats_disjoint_p,
10533 bitset_stats_equal_p, bitset_stats_not, bitset_stats_subset_p,
10534 bitset_stats_and, bitset_stats_and_cmp, bitset_stats_andn,
10535 bitset_stats_andn_cmp, bitset_stats_or, bitset_stats_or_cmp,
10536 bitset_stats_xor, bitset_stats_xor_cmp, bitset_stats_and_or,
10537 bitset_stats_and_or_cmp, bitset_stats_andn_or,
10538 bitset_stats_andn_or_cmp, bitset_stats_or_and,
10539 bitset_stats_or_and_cmp): Likewise.
10540 * lib/lbitset.c (lbitset_and, lbitset_and_cmp, lbitset_andn,
10541 lbitset_andn_cmp, lbitset_or, lbitset_or_cmp, lbitset_xor,
10542 lbitset_xor_cmp, lbitset_empty_p, lbitset_ones, lbitset_not,
10543 lbitset_subset_p, lbitset_disjoint_p, debug_lbitset): Likewise.
10544
10545 * lib/abitset.h: Include bitset.h, not bbitset.h.
10546 * lib/ebitset.h: Likewise.
10547 * lib/lbitset.h: Likewise.
10548
10549 * lib/bbitset.h: (enum_bitset_ops, enum_bitset_type): New types.
10550 All instances of parameters of type enum bitset_opts are now of
10551 type enum_bitset_opts, to conform to the C Standard, and similarly
10552 for enum_bitset_type.
10553 * lib/ebitset.c (enum_ebitset_find_mode): Likewise.
10554 * lib/lbitset.c (enum_lbitset_find_mode): Likewise.
10555
10556 Do not use "struct bitset_struct" to mean different things in
10557 different modules. Not only is this confusing, it violates
10558 the C Standard, which requires that structure types in different
10559 modules must be compatible if one is to be passed to the other.
10560 * lib/bbitset.h (bitset): Now points to a union, not to a struct.
10561 All instances of "struct bitset_struct *" replaced with "bitset".
10562 * lib/bitset.h (struct bitset_struct): Remove, replacing with....
10563 (union bitset_union, struct abitset_struct, struct ebitset_struct,
10564 struct lbitset_struct, struct bitset_stats_struct): New types.
10565 All uses of struct bitset_struct changed to union bitset_union,
10566 etc.
10567 * lib/abitset.c (struct abitset_struct, abitset,
10568 struct bitset_struct): Remove.
10569 * lib/bitset_stats.c (struct bitset_stats_struct, bitset_stats,
10570 struct bitset_struct): Remove.
10571 * lib/ebitset.c (struct ebitset_struct, ebitset, struct
10572 bitset_struct): Remove.
10573 * lib/lbitset.c (struct lbitset_struct, lbitset, bitset_struct):
10574 Likewise.
10575
10576 Do not call a function of type T using a call that assumes the
10577 function is of a different type U. Standard C requires that a
10578 function must be called with a type that is compatible with its
10579 definition.
10580 * lib/bbitset.h (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
10581 New decls.
10582 * lib/bitset.c (bitset_and_or_, bitset_andn_or_, bitset_or_and_):
10583 New functions.
10584 * lib/ebitset.c (PFV): Remove.
10585 * lib/lbitset.c (PFV): Likewise.
10586 * lib/ebitset.c (ebitset_and, ebitset_andn, ebitset_or,
10587 ebitset_xor, ebitset_copy, ebitset_ones, ebitset_empty_p): New
10588 decls.
10589 (ebitset_and, ebitset_andn, ebitset_or, ebitset_xor): New functions.
10590 (ebitset_vtable): Use them.
10591 * lib/lbitset.c (lbitset_and, lbitset_andn, lbitset_or,
10592 lbitset_xor): New functions.
10593 (lbitset_vtable): Use them.
10594
10595 * lib/bitset.h (bitset_next, bitset_prev, bitset_only_set_p):
10596 Declare.
10597
10598 * lib/bitsetv.c (bitsetv_alloc): Add a cast to (void *) to avoid a
10599 GCC warning.
10600 * lib/lbitset.c (LBITSET_CURRENT1): Likewise.
10601 Use offsetof, for simplicity.
10602
10603 2002-10-06 Paul Eggert <eggert@twinsun.com>
10604
10605 * lib/bitset.h (bitset_reset): Do not assume that bitset_word is
10606 the same width as int. This reapplies a hunk of the 2002-08-12 patch
10607 <http://lists.gnu.org/archive/html/bison-patches/2002-08/msg00007.html>,
10608 which was inadvertently undone by the 2002-09-30 patch.
10609 * lib/lbitset.c (debug_lbitset): Do not assume that bitset_word is
10610 the same width as int.
10611
10612 2002-10-04 Paul Eggert <eggert@twinsun.com>
10613
10614 Version 1.50.
10615
10616 * configure.ac (AC_INIT), NEWS: Increment version number.
10617
10618 * doc/bison.texinfo: Minor spelling, grammar, and white space
10619 fixes.
10620 (Symbols): Mention that any negative value returned from yylex
10621 signifies end-of-input. Warn about negative chars. Mention
10622 the portable Standard C character set.
10623
10624 The GNU coding standard says CFLAGS and YFLAGS are reserved
10625 for the installer to set.
10626 * lib/Makefile.am (AM_CFLAGS): Renamed from CFLAGS.
10627 * src/Makefile.am (AM_CFLAGS): Likewise.
10628 (AM_YFLAGS): Renamed from YFLAGS.
10629
10630 Fix some MAX and MIN problems.
10631 * src/gram.h (ITEM_NUMBER_MIN): MIN_MAX -> INT_MIN.
10632 * src/lalr.h (GOTO_NUMBER_MAX): INT_MAX -> SHRT_MAX.
10633 * src/symtab.h (SYMBOL_NUMBER_MAX): New macro.
10634 * src/reader.c (reader): Use it.
10635
10636 * tests/regression.at (Braces parsing): Use grep, not fgrep, as
10637 POSIX 1003.1-2001 has removed fgrep.
10638
10639 2002-10-04 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
10640
10641 * lib/bbitset.h (BITSET_WINDEX_MAX): Redefine so that it cannot be
10642 interpreted as signed.
10643 * lib/ebitset.c (ebitset_list): Fix bug.
10644
10645 2002-10-01 Paul Eggert <eggert@twinsun.com>
10646
10647 More fixes for 64-bit hosts and large bitsets.
10648
10649 * lib/abitset.c (struct abitset_struct.n_bits, abitset_small_list,
10650 abitset_size, abitset_list, abitset_list_reverse, abitset_list):
10651 Use bitset_bindex, not int or unsigned int or size_t, to count bits.
10652 * lib/bbitset.h (struct bitset_vtable.size, struct bitset_vtable.count,
10653 struct bitset_vtable.list, struct bitset_vtable.list_reverse,
10654 bitset_count_, bitset_next, bitset_prev, bitset_first, bitset_last,
10655 bitset_count_): Likewise.
10656 * lib/bitset.h (bitset_iterator.num, bitset_iterator.i,
10657 bitset_first, bitset_last): Likewise.
10658 * lib/bitset_stats.c (bitset_stats_size, bitset_stats_list,
10659 bitset_stats_list_reverse, bitset_stats_size,
10660 bitset_stats_count, bitset_stats_list, bitset_stat_list_reverse):
10661 Likewise.
10662 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10663 * lib/bitsetv.c (bitsetv_alloc, bitsetv_create, bitsetv_free,
10664 bitsetv_zero, bitsetv_ones, bitsetv_transitive_closure,
10665 bitsetv_reflexive_transitive_closure): Likewise.
10666 * lib/bitsetv.h (bitsetv_alloc, bitsetv_create): Likewise.
10667 * lib/ebitset.c (ebitset_size, ebitset_list, ebitset_list_reverse):
10668 Likewise.
10669 * lib/lbitset.c (lbitset_size, lbitset_list, lbitset_list_merge):
10670 Likewise.
10671
10672 * lib/abitset.c (abitset_ones, abitset_zero, abitset_bytes):
10673 Use size_t, not unsigned int, to count bytes.
10674 * lib/abitset.h (abitset_bytes): Likewise.
10675 * lib/bitset.c (bitset_bytes, bitset_alloc, bitset_obstack_alloc):
10676 Likewise.
10677 * lib/bitset.h (bitset_bytes): Likewise.
10678 * lib/bitset_stats.c (bitset_stats_bytes, bitset_stats_init): Likewise.
10679 * lib/bitset_stats.h (bitset_stats_bytes): Likewise.
10680 * lib/bitsetv.c (bitsetv_alloc): Likewise.
10681 * lib/ebitset.c (ebitset_bytes): Likewise.
10682 * lib/ebitset.h (ebitset_bytes): Likewise.
10683 * lib/lbitset.c (lbitset_bytes): Likewise.
10684 * lib/lbitset.h (lbitset_bytes): Likewise.
10685
10686 * lib/abitset.c (abitset_empty_p, abitset_not, abitset_equal_p,
10687 abitset_subset_p, abitset_disjoint_p, abitset_and,
10688 abitset_and_cmp, abitset_andn, abitset_andn_cmp, abitset_or,
10689 abitset_or_cmp, abitset_xor, abitset_xor_cmp, abitset_and_or,
10690 abitset_and_or_cmp, abitset_andn_or, abitset_andn_or_cmp,
10691 abitset_or_and, abitset_or_and_cmp):
10692 Use bitset_windex instead of unsigned int.
10693 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
10694 * lib/ebitset.c (struct ebitset_struct.size, ebitset_elts_grow,
10695 ebitset_elt_add, ebitset_elt_remove, ebitset_weed,
10696 ebitset_elt_find, ebitset_list_reverse, ebitset_list, ebitset_init):
10697 Likewise.
10698 * lib/lbitset.c (lbitset_ones, lbitset_not): Likewise.
10699
10700 * lib/bitset.c (bitset_print):
10701 Use proper printf formats for widths of integer types.
10702 * lib/bitset_stats.c (bitset_percent_histogram_print,
10703 bitset_log_histogram_print, bitset_stats_print_1): Likewise.
10704 * lib/bitsetv-print.c (bitsetv_matrix_dump): Likewise.
10705 * lib/bitsetv.c (bitsetv_dump, debug_bitsetv): Likewise.
10706 * lib/lbitset.c (lbitset_bytes): Likewise.
10707
10708 * lib/bbitset.h (BITSET_BINDEX_MAX, BITSET_WINDEX_MAX,
10709 BITSET_SIZE_MAX): New macros.
10710 (BITSET_INDEX_MAX): Remove. It wasn't right, since it assumed that
10711 sizeof (bitset_word) == sizeof (bitset_windex). All uses changed
10712 to BITSET_WINDEX_MAX.
10713
10714 * lib/bitset.c (bitset_next, bitset_prev, bitset_first,
10715 bitset_last): Return BITSET_BINDEX_MAX (not -1) for no value,
10716 since we now return the bitset_bindex type (not int).
10717
10718 * lib/bitsetv.c (bitsetv_alloc): Check for arithmetic overflow
10719 when computing sizes.
10720 * lib/ebitset.c (ebitset_elts_grow): Likewise.
10721
10722 * lib/lbitset.c (lbitset_elt_find): Simplify windex calculation
10723 and avoid cast to unsigned.
10724
10725 2002-09-30 Akim Demaille <akim@epita.fr>
10726
10727 * lib/abitset.c, lib/bbitset.h, lib/bitset.c, lib/bitset.h,
10728 * lib/bitset_stats.c, lib/bitsetv.c, lib/ebitset.c, lib/lbitset.c:
10729 Updates from Michael Hayes.
10730
10731 2002-09-30 Art Haas <ahaas@neosoft.com>
10732
10733 * configure.ac: Update AC_OUTPUT and AM_CONFIG_HEADER
10734 invocations.
10735 * tests/cxx-type.at (declarator): Don't rely on NDEBUG being not
10736 defined.
10737
10738 2002-09-27 Akim Demaille <akim@epita.fr>
10739
10740 Version 1.49c.
10741
10742 2002-09-27 Akim Demaille <akim@epita.fr>
10743
10744 * configure.ac (AM_INIT_AUTOMAKE): We _need_ 1.7.
10745 (Because of AC_LIBSOURCE).
10746
10747 2002-09-27 Akim Demaille <akim@epita.fr>
10748
10749 Playing with Autoscan.
10750
10751 * configure.ac: Remove the old LIBOBJ tweaks.
10752 (AC_REPLACE_FUNCS): Add strrchr and strtol.
10753 * lib/strrchr.c: New.
10754 * lib/strtol.c: New, from the Coreutils 4.5.1.
10755
10756 2002-09-27 Akim Demaille <akim@epita.fr>
10757
10758 Playing with Autoscan.
10759
10760 * m4/prereq.m4 (jm_PREREQ_ARGMATCH, jm_FUNC_ARGMATCH): New.
10761 * lib/Makefile.am (libbison_a_SOURCES): No longer include
10762 argmatch.c and argmatch.h, since they are AC_LIBSOURCE'd.
10763 * lib/strcasecmp.c, lib/strncasecmp.c, lib/memcmp.c: New, from the
10764 Coreutils 4.5.1.
10765
10766 2002-09-24 Akim Demaille <akim@epita.fr>
10767
10768 * doc/bison.texinfo (Stack Overflow): xref to Recursion.
10769 (Frequently Asked Questions, Parser Stack Overflow): New.
10770
10771 2002-09-13 Akim Demaille <akim@epita.fr>
10772
10773 Playing with autoscan.
10774
10775 * src/reader.c (get_merge_function): Use xstrdup, not strdup.
10776 * src/files.c (skeleton_find): Remove, unused.
10777 * m4/memcmp.m4: New, from the Coreutils 4.5.1.
10778 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Run jm_FUNC_MEMCMP.
10779
10780 2002-09-13 Akim Demaille <akim@epita.fr>
10781
10782 * configure.ac (AM_INIT_AUTOMAKE): Require Automake 1.6.3.
10783 * Makefile.am (AUTOMAKE_OPTIONS): Don't.
10784
10785 2002-09-13 Akim Demaille <akim@epita.fr>
10786
10787 * configure.ac: Require 2.54.
10788 s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/.
10789 s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/.
10790 * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4:
10791 Remove, provided by Autoconf macros.
10792
10793 2002-09-12 Akim Demaille <akim@epita.fr>
10794
10795 * m4/prereq.m4: Update, from Coreutils 4.5.1.
10796
10797 2002-09-12 Akim Demaille <akim@epita.fr>
10798
10799 * m4/prereq.m4: Update, from Fileutils 4.1.5.
10800 * configure.ac (jm_PREREQ_TEMPNAME): Invoke it.
10801 Reported by Martin Mokrejs.
10802
10803 2002-09-10 Akim Demaille <akim@epita.fr>
10804
10805 * src/parse-gram.y: Associate a human readable string to each
10806 token type.
10807 * tests/regression.at (Invalid inputs): Adjust.
10808
10809 2002-09-10 Gary V. Vaughan <gary@gnu.org>
10810
10811 * tests/Makefile.am ($(srcdir)/package.m4): Bison now ships
10812 with an Autoconf-2.5x style configure.ac.
10813
10814 2002-09-06 Paul Eggert <eggert@twinsun.com>
10815
10816 * doc/bison.texinfo (Conditions): Make explicit that the GPL
10817 exception applies only to yacc.c. This is a modification of a
10818 patch originally suggested by Akim Demaille.
10819
10820 2002-09-06 Akim Demaille <akim@epita.fr>
10821
10822 * data/c.m4 (b4_copyright): Move the GPL exception comment from
10823 here to...
10824 * data/yacc.c: here.
10825
10826 * data/lalr1.cc (struct yyltype): Don't define it, since we use
10827 LocationType.
10828 (b4_ltype): Default to yy::Location from location.hh.
10829
10830 2002-09-04 Jim Meyering <jim@meyering.net>
10831
10832 * data/yacc.c: Guard the declaration of yytoknum also with
10833 `#ifdef YYPRINT', so it is declared only when used.
10834
10835 2002-09-04 Akim Demaille <akim@epita.fr>
10836
10837 * configure.in: Rename as...
10838 * configure.ac: this.
10839 Bump to 1.49c.
10840
10841 2002-09-04 Akim Demaille <akim@epita.fr>
10842
10843 * src/assoc.c, src/closure.c, src/gram.c, src/injections.c,
10844 * src/lalr.c, src/LR0.c, src/relation.c, src/tables.c: Don't
10845 translate maintainer only messages.
10846
10847 2002-08-12 Paul Eggert <eggert@twinsun.com>
10848
10849 Version 1.49b.
10850
10851 * Makefile.am (SUBDIRS): Remove intl.
10852 (DISTCLEANFILES): Remove.
10853 * NEWS: Mention that GNU M4 is now required. Clarify what is
10854 meant by "larger grammars". Mention the pt_BR translation.
10855 * configure.in (AC_CHECK_DECLS): Add getenv, getopt.
10856 (AM_GNU_GETTEXT_VERSION): New macro, replacing GETTEXT_VERSION var.
10857 Bump version from 0.11.2 to 0.11.5.
10858 (BISON_PREREQ_STAGE): Remove.
10859 (AM_GNU_GETTEXT): Use external gettext.
10860 (AC_OUTPUT): Remove intl/Makefile.
10861
10862 * config/depcomp, config/install-sh: Sync with Automake 1.6.3.
10863
10864 * data/glr.c: Include string.h, for strlen.
10865 (yyreportParseError): Use size_t for yysize.
10866 (yy_yypstack): No longer nested inside yypstates, as nested
10867 functions are not portable. Do not assume size_t is the
10868 same width as int.
10869 (yypstates): Do not assume that ptrdiff_t is the same width
10870 as int, and similarly for yyposn and YYINDEX.
10871
10872 * data/yacc.c: Fix comment about `$$ = $1': it can copy garbage.
10873
10874 * lib/Makefile.am (INCLUDES): Do not include from the intl
10875 directory, which has been removed.
10876 * src/Makefile.am (INCLUDES): Likewise.
10877
10878 * lib/Makefile.am (libbison_a_SOURCES): Add unlocked-io.h.
10879 (bitsets_sources, additional_bitsets_sources, timevars_sources):
10880 New vars.
10881
10882 * lib/Makefile.am (libbison_a_SOURCES): Avoid +=, a GNU make extension.
10883 * tests/Makefile.am (EXTRA_DIST): Likewise.
10884
10885 * lib/abitset.c (abitset_reverse_list, ebitset_reverse_list):
10886 Do not assume that bitset_windex is the same width as unsigned.
10887
10888 * lib/abitset.c (abitset_unused_clear): Do not assume that
10889 bitset_word is the same width as int.
10890 * lib/bbitset.h (BITSET_INDEX_MAX, BITSET_MSB): Likewise.
10891 * lib/bitset.h (bitset_set, bitset_reset): Likewise.
10892 * lib/bitset_stats.c (bitset_stats_set, bitset_stats_reset): Likewise.
10893 * lib/ebitset.c (ebitset_set, ebitset_reset): Likewise.
10894 * lib/lbitset.c (lbitset_set, lbitset_reset): Likewise.
10895
10896 * lib/abitset.c (abitset_op1): Use -1, not ~0, as memset arg (for
10897 portability to one's complement hosts!).
10898 * lib/ebitset.c (ebitset_op1): Likewise.
10899 * lib/lbitset.c (lbitset_op1): Likewise.
10900
10901 * lib/argmatch.c, lib/quotearg.c, quotearg.h: Sync with GNU tar.
10902 * lib/argmatch.h, lib/basename.c, lib/dirname.c, lib/dirname.h,
10903 lib/hash.c, lib/hash.h, lib/strnlen.c, lib/xmalloc.c:
10904 Sync with fileutils.
10905 * lib/error.c, lib/getopt.c, lib/getopt.h, lib/getopt1.c,
10906 lib/gettext.h: Sync with diffutils.
10907
10908 * lib/memrchr.c, lib/mkstemp.c, lib/strchr.c, lib/strnlen.c,
10909 lib/strspn.c, lib/tempname.c: Use GPL, not LGPL.
10910
10911 * lib/obstack.c, lib/obstack.h: Sync with fileutils, except use
10912 PROTOTYPES to check for prototypes, and "defined __STDC__" to
10913 check for void *.
10914
10915 * lib/bbitset.h (BITSET_WORD_BITS): Now of type unsigned, not
10916 size_t; the old version tried to do this but casted improperly.
10917 (bitset_bindex, bitset_windex): Now size_t, not unsigned long.
10918 (bitset_test): Now returns int, not unsigned long.
10919
10920 * lib/bitset_stats.c: Include "gettext.h".
10921 (_): New macro.
10922 (bitset_stats_set, bitset_stats_reset, bitset_stats_test): Don't
10923 name locals "index", as it generates unnecessary warnings on some
10924 hosts that have an "index" function.
10925
10926 * lib/bitset_stats.c (bitset_stats_print_1, bitset_stats_print,
10927 bitset_stats_read, bitset_stats_write): Wrap strings in _() if
10928 they need translation.
10929 * src/LR0.c (state_list_append, new_itemsets, get_state,
10930 append_states, generate_states): Likewise.
10931 * src/assoc.c (assoc_to_string): Likewise.
10932 * src/closure.c (print_closure, set_firsts, closure): Likewise.
10933 * src/gram.c (grammar_dump): Likewise.
10934 * src/injections.c (injections_compute): Likewise.
10935 * src/lalr.c (lookaheads_print): Likewise.
10936 * src/relation.c (relation_transpose): Likewise.
10937 * src/scan-gram.l: Likewise.
10938 * src/tables.c (table_grow, pack_vector): Likewise.
10939
10940 * m4/Makefile.am (EXTRA_DIST): Remove codeset.m4,
10941 glibc21.m4, isc-posix.m4 lcmessage.m4, stage.m4.
10942 * m4/malloc.m4, m4/realloc.m4: Sync with diffutils.
10943 * m4/mbstate_t.m4: Sync with fileutils.
10944 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): AC_MBSTATE_T -> AC_TYPE_MBSTATE_T.
10945
10946 * po/LINGUAS: Add pt_BR.
10947 * po/POTFILES.in: Add src/assoc.c, src/closure.c, src/gram.c,
10948 src/main.c, src/relation.c, src/state.c, lib/bitset_stats.c,
10949 lib/timevar.c.
10950 Use src/parse-gram.y instead of src/parse-gram.c, as the gettext
10951 manual recommends.
10952 Similarly, use src/scan-gram.l instead of src/scan-gram.c.
10953
10954 * src/complain.c (strerror_r): Remove decl; not needed.
10955 (strerror): Use same pattern as ../lib/error.c.
10956
10957 * src/files.c, src/files.h (compute_header_macro): Remove; unused.
10958
10959 * src/gram.c (grammar_dump): Do not assume ptrdiff_t fits in int.
10960
10961 * src/main.c (main): Cast result of bindtextdomain and textdomain
10962 to void, to avoid a GCC warning when --disable-nls is in effect.
10963
10964 * src/scan-gram.l: Use strings rather than escapes when possible,
10965 to minimize the number of warnings from xgettext.
10966 (handle_action_dollar, handle_action_at): Don't use isdigit,
10967 as it mishandles negative chars and it may not work as expected
10968 outside the C locale.
10969
10970 * src/symtab.c (symbol_get): Don't cast LHS of an assignment;
10971 this is a GCC extension and is not portable to other compilers.
10972
10973 * src/system.h (alloca): Use same pattern as ../lib/error.c.
10974 Do not include <ctype.h>; no longer needed.
10975 Do not include <malloc.h>; no longer needed (and generates
10976 warnings on OpenBSD 3.0).
10977
10978 * tests/cxx-type.at (yylex): Do not pass signed char to isupper;
10979 it's not portable.
10980
10981 * tests/regression.at: Do not use 'cc -c input.c -o input';
10982 Sun C rejects this. Instead, use 'cc -c input.c -o input.o'.
10983
10984 * tests/synclines.at (AC_SYNCLINES_COMPILE): Accept any nonzero
10985 exit status as failure, not just exit status 1. Sun C exits
10986 with status 2 sometimes.
10987
10988 * tests/torture.at (AT_INCREASE_DATA_SIZE): New macro.
10989 Use it for the two large tests.
10990
10991 2002-08-02 Akim Demaille <akim@epita.fr>
10992
10993 * src/conflicts.c (conflicts_output): Don't output rules never
10994 reduced here, since anyway that computation doesn't work.
10995 * src/gram.h, src/gram.h (rule_filter_t, rule_useful_p)
10996 (rule_useless_p, rule_never_reduced_p): New.
10997 (grammar_rules_partial_print): Use a filter instead of a range.
10998 Display the title only if needed.
10999 (grammar_rules_print): Adjust.
11000 (grammar_rules_never_reduced_report): New.
11001 * src/tables.c (action_row): Move the computation of rules never
11002 reduced to...
11003 (token_actions): here.
11004 * src/main.c (main): Make the parser before making the report, so
11005 that rules never reduced are computed.
11006 Call grammar_rules_never_reduced_report.
11007 * src/print.c (print_results): Report rules never reduced.
11008 * tests/conflicts.at, tests/reduce.at: Adjust.
11009
11010 2002-08-01 Akim Demaille <akim@epita.fr>
11011
11012 Instead of attaching lookaheads and duplicating the rules being
11013 reduced by a state, attach the lookaheads to the reductions.
11014
11015 * src/state.h (state_t): Remove the `lookaheads',
11016 `lookaheads_rule' member.
11017 (reductions_t): Add a `lookaheads' member.
11018 Use a regular array for the `rules'.
11019 * src/state.c (reductions_new): Initialize the lookaheads member
11020 to 0.
11021 (state_rule_lookaheads_print): Adjust.
11022 * src/state.h, src/state.c (state_reductions_find): New.
11023 * src/conflicts.c (resolve_sr_conflict, set_conflicts)
11024 (count_rr_conflicts): Adjust.
11025 * src/lalr.c (LArule): Remove.
11026 (add_lookback_edge): Adjust.
11027 (state_lookaheads_count): New.
11028 (states_lookaheads_initialize): Merge into...
11029 (initialize_LA): this.
11030 (lalr_free): Adjust.
11031 * src/main.c (main): Don't free nullable and derives too early: it
11032 is used by --verbose.
11033 * src/print.c, src/print_graph.c, src/tables.c: Adjust.
11034
11035 2002-08-01 Akim Demaille <akim@epita.fr>
11036
11037 * src/derives.h, src/derives.c (derives): A `rule_t***' instead of
11038 `rule_number_t**'.
11039 (set_derives, free_derives): Rename as...
11040 (derives_compute, derives_free): this.
11041 Adjust all dependencies.
11042 * src/nullable.c (set_nullable, free_nullable): Rename as...
11043 (nullable_compute, nullable_free): these.
11044 (rule_list_t): Store rule_t *, not rule_number_t.
11045 * src/state.c (state_rule_lookaheads_print): Directly compare rule
11046 pointers, instead of their numbers.
11047 * src/main.c (main): Call nullable_free, and derives_free earlier,
11048 as they were lo longer used.
11049
11050 2002-08-01 Akim Demaille <akim@epita.fr>
11051
11052 * lib/timevar.c (get_time): Include children time.
11053 * src/lalr.h (LA, LArule): Don't export them: used with the
11054 state_t.
11055 * src/lalr.c (LA, LArule): Static.
11056 * src/lalr.h, src/lalr.c (lalr_free): New.
11057 * src/main.c (main): Call it.
11058 * src/tables.c (pack_vector): Check whether loc is >= to the
11059 table_size, not >.
11060 (pack_tables): Don't free froms, tos, conflict_tos, and pos...
11061 (tables_generate): do it, since that's also it which allocates
11062 them.
11063 Don't free LA and LArule, main does.
11064
11065 2002-07-31 Akim Demaille <akim@epita.fr>
11066
11067 Separate parser tables computation and output.
11068
11069 * src/output.c (nvectors, base_t, base, base_ninf, conflict_table)
11070 (conflict_list, conflict_list_cnt, table, check, table_ninf)
11071 (yydefgoto, yydefact, high): Move to...
11072 * src/tables.h, src/tables.c: here.
11073 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
11074 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
11075 (symbol_number_to_vector_number, nvectors, BASE_MAX, BASE_MIN)
11076 (froms, tos, conflict_tos, tally, width, action_t, ACTION_MAX)
11077 (ACTION_MIN, actrow, order, nentries, pos, conflrow)
11078 (conflict_list_free, table_size, lowzero, table_grow, conflict_row)
11079 (action_row, save_row, token_actions, save_column, default_goto)
11080 (goto_actions, sort_actions, matching_state, pack_vector)
11081 (table_ninf_remap, pack_table, prepare_actions): Move to...
11082 * src/tables.c: here.
11083 * src/tables.h, src/tables.c(tables_generate, tables_free): New.
11084 * src/output.c (token_actions, output_base, output_conflicts)
11085 (output_check): Merge into...
11086 (prepare_actions): this.
11087 (actions_output): Rename as...
11088 (user_actions_output): this.
11089 * src/main.c (main): Call tables_generate and tables_free.
11090
11091 2002-07-31 Akim Demaille <akim@epita.fr>
11092
11093 Steal GCC's --time-report support.
11094
11095 * lib/timevar.c, lib/timevar.h, lib/timevar.def: New,
11096 stolen/adjusted from GCC.
11097 * m4/stage.m4: Remove time related checks.
11098 * m4/timevar.m4: New.
11099 * configure.in: Adjust.
11100 * src/system.h: Adjust to using timevar.h.
11101 * src/getargs.h, src/getargs.c: Support trace_time for
11102 --trace=time.
11103 * src/main.c (stage): Remove.
11104 (main): Replace `stage' invocations with timevar calls.
11105 * src/output.c: Insert pertinent timevar calls.
11106
11107 2002-07-31 Akim Demaille <akim@epita.fr>
11108
11109 Let --trace have arguments.
11110
11111 * src/getargs.h (enum trace_e): New.
11112 * src/getargs.c (trace_args, trace_types, trace_argmatch): New.
11113 (long_options, short_options): --trace/-T takes an optional
11114 argument.
11115 Change all the uses of trace_flag to reflect the new flags.
11116 * tests/sets.at (Firsts, Nullable, Broken Closure): Use --trace=sets.
11117
11118 Strengthen `stage' portability.
11119
11120 * m4/stage.m4 (BISON_PREREQ_STAGE): New.
11121 * configure.in: Use it.
11122 Don't check for malloc.h and sys/times.h.
11123 * src/system.h: Include them when appropriate.
11124 * src/main.c (stage): Compile only when mallinfo, struct mallinfo,
11125 times and struct tms are available.
11126
11127 2002-07-30 Akim Demaille <akim@epita.fr>
11128
11129 In verbose parse error message, don't report `error' as an
11130 expected token.
11131 * tests/actions.at (Printers and Destructors): Adjust.
11132 * tests/calc.at (Calculator $1): Adjust.
11133 * data/yacc.c, data/glr.c, data/lalr1.c: When making the verbose
11134 error message, do not report the parser accepts the error token in
11135 that state.
11136
11137 2002-07-30 Akim Demaille <akim@epita.fr>
11138
11139 Normalize conflict related messages.
11140
11141 * src/complain.h, src/complain.c (warn, complain): New.
11142 * src/conflicts.c (conflicts_print): Use them.
11143 (conflict_report_yacc): New, extracted from...
11144 (conflicts_print): here.
11145 * tests/conflicts.at, tests/existing.at: Adjust.
11146
11147 2002-07-30 Akim Demaille <akim@epita.fr>
11148
11149 Report rules which are never reduced by the parser: those hidden
11150 by conflicts.
11151
11152 * src/LR0.c (save_reductions): Don't make the final state too
11153 different: save its reduction (accept) instead of having a state
11154 without any action (no shift or goto, no reduce).
11155 Note: the final state is now a ``regular'' state, i.e., the
11156 parsers now contain `reduce 0' as default reduction.
11157 Nevertheless, since they decide to `accept' when yystate =
11158 final_state, they still will not reduce rule 0.
11159 * src/print.c (print_actions, print_reduction): Adjust.
11160 * src/output.c (action_row): Track reduced rules.
11161 (token_actions): Report rules never reduced.
11162 * tests/conflicts.at, tests/regression.at: Adjust.
11163
11164 2002-07-30 Akim Demaille <akim@epita.fr>
11165
11166 `stage' was accidently included in a previous patch.
11167 Initiate its autoconfiscation.
11168
11169 * configure.in: Look for malloc.h and sys/times.h.
11170 * src/main.c (stage): Adjust.
11171 Report only when trace_flag.
11172
11173 2002-07-29 Akim Demaille <akim@epita.fr>
11174
11175 * src/state.h, src/state.c (transitions_t): Holds state_t*'s, not
11176 state_number_t.
11177 (errs_t): symbol_t*, not symbol_number_t.
11178 (reductions_t): rule_t*, not rule_number_t.
11179 (FOR_EACH_SHIFT): New.
11180 * src/LR0.c, src/conflicts.c, src/lalr.c, src/output.c
11181 * src/print.c, src/print_graph.c: Adjust.
11182
11183 2002-07-29 Akim Demaille <akim@epita.fr>
11184
11185 Use $accept and $end, as BYacc and BTYacc do, instead of $axiom and $.
11186
11187 * src/symtab.h, src/symtab.c (eoftoken, axiom): Rename as...
11188 (endtoken, accept): these.
11189 * src/reader.c (reader): Set endtoken's default tag to "$end".
11190 Set undeftoken's tag to "$undefined" instead of "$undefined.".
11191 * doc/bison.texinfo (Table of Symbols): Mention $accept and $end.
11192 Adjust.
11193
11194 2002-07-29 Akim Demaille <akim@epita.fr>
11195
11196 * src/reduce.c (reduce_grammar): When the language is empty,
11197 complain about the start symbol, not the axiom.
11198 Use its location.
11199 * tests/reduce.at (Empty Language): New.
11200
11201 2002-07-26 Akim Demaille <akim@epita.fr>
11202
11203 * src/reader.h, src/reader.c (gram_error): ... can't get
11204 yycontrol without making too strong assumptions on the parser
11205 itself.
11206 * src/output.c (prepare_tokens): Use the real 0th value of
11207 token_translations instead of `0'.
11208 * src/parse-gram.y (yyerror): Don't rely on yycontrol being
11209 visible here.
11210 * data/yacc.c (yyreport_parse_error): Rename yylocation as yylloc
11211 for the time being: %locations ought to provide it to yyerror.
11212
11213 2002-07-25 Akim Demaille <akim@epita.fr>
11214
11215 * src/output.c (prepare_tokens): Go up to ntokens, not ntokens + 1.
11216 * doc/bison.texinfo (Decl Summary): s/$illegal/$undefined./.
11217 * tests/regression.at (Web2c Actions): Adjust.
11218
11219 2002-07-25 Akim Demaille <akim@epita.fr>
11220
11221 Stop storing rules from 1 to nrules + 1.
11222
11223 * src/LR0.c, src/closure.c, src/derives.c, src/gram.c, src/lalr.c
11224 * src/nullable.c, src/output.c, src/print.c, src/reader.c
11225 * src/reduce.c: Allocate and free from &rules[0], not &rules[1].
11226 Iterate from 0 to nrules.
11227 Use rule_number_as_item_number and item_number_as_rule_number.
11228 Adjust to `derive' now containing possibly 0.
11229 * src/gram.h (rule_number_as_item_number, item_number_as_rule_number):
11230 Handle the `- 1' part in rule numbers from/to item numbers.
11231 * src/conflicts.c (log_resolution): Fix the message which reversed
11232 shift and reduce.
11233 * src/output.c (action_row): Initialize default_rule to -1.
11234 (token_actions): Adjust.
11235 * tests/sets.at (Nullable, Firsts): Fix the previously bogus
11236 expected output.
11237 * tests/conflicts.at (Resolved SR Conflicts): Likewise.
11238
11239 2002-07-25 Akim Demaille <akim@epita.fr>
11240
11241 * data/c.m4 (b4_c_function, b4_c_ansi_args, b4_c_ansi_arg)
11242 (b4_c_knr_arg_names, b4_c_knr_arg_name, b4_c_knr_arg_decls)
11243 (b4_c_knr_arg_decl): New.
11244 * data/yacc.c: Use it to define yysymprint, yydestruct, and
11245 yyreport_parse_error.
11246
11247 2002-07-25 Akim Demaille <akim@epita.fr>
11248
11249 * data/yacc.c (yyreport_parse_error): New, extracted from...
11250 (yyparse): here.
11251 (yydestruct, yysymprint): Move above yyparse.
11252 Be K&R compliant.
11253
11254 2002-07-25 Akim Demaille <akim@epita.fr>
11255
11256 * data/c.m4 (b4_ints_in, b4_int_type, b4_int_type_for): New,
11257 replace...
11258 (b4_sint_type, b4_uint_type): these.
11259 * data/yacc.c, data/glr.c, data/lalr1.cc: Use b4_int_type_for.
11260 * tests/regression.at (Web2c Actions): Adjust.
11261
11262 2002-07-25 Akim Demaille <akim@epita.fr>
11263
11264 * src/gram.h (TIEM_NUMBER_MAX): New.
11265 (item_number_of_rule_number, rule_number_of_item_number): Rename
11266 as...
11267 (rule_number_as_item_number, item_number_as_rule_number): these.
11268 Adjust dependencies.
11269 * src/output.c (vector_number_t, VECTOR_NUMBER_MAX)
11270 (VECTOR_NUMBER_MIN, state_number_to_vector_number)
11271 (symbol_number_to_vector_number): New.
11272 (order): Of vector_number_t* type.
11273 (base_t, BASE_MAX, BASE_MIN): New.
11274 (froms, tos, width, pos, check): Of base_t type.
11275 (action_number_t, ACTION_MIN, ACTION_MAX): New.
11276 (actrow): Of action_number_t type.
11277 (conflrow): Of unsigned int type.
11278 (table_ninf, base_ninf): New.
11279 (GENERATE_MUSCLE_INSERT_TABLE): Also output the `*_min' value.
11280 (muscle_insert_int_table, muscle_insert_base_table)
11281 (muscle_insert_rule_number_table): New.
11282 (prepare_tokens): Output `toknum' as int_table.
11283 (action_row): Returns a rule_number_t.
11284 Use ACTION_MIN, not SHRT_MIN.
11285 (token_actions): yydefact is rule_number_t*.
11286 (table_ninf_remap): New.
11287 (pack_table): Use it for `base' and `table'.
11288 * data/yacc.c, data/glr.c, data/lalr1.cc (YYFLAG): Remove,
11289 replaced with...
11290 (YYPACT_NINF, YYTABLE_NINF): these.
11291 (yypact, yytable): Compute their types instead of hard-coded
11292 `short'.
11293 * tests/regression.at (Web2c Actions): Adjust.
11294
11295 2002-07-19 Akim Demaille <akim@epita.fr>
11296
11297 * src/scan-gram.l (id): Can start with an underscore.
11298
11299 2002-07-16 Akim Demaille <akim@epita.fr>
11300
11301 * src/assoc.c, src/asssoc.h (assoc_t, assoc_to_string): New.
11302 Adjust all former `associativity' dependencies.
11303 * src/symtab.c (symbol_new): Default associativity is `undef', not
11304 `right'.
11305 (symbol_check_alias_consistence): Adjust.
11306
11307 2002-07-09 Akim Demaille <akim@epita.fr>
11308
11309 * doc/bison.texinfo: Properly set the ``header'' part.
11310 Use @dircategory ``GNU programming tools'' as per Texinfo's
11311 documentation.
11312 Use @copying.
11313
11314 2002-07-09 Akim Demaille <akim@epita.fr>
11315
11316 * lib/quotearg.h: Protect against multiple inclusions.
11317 * src/location.h (location_t): Add a `file' member.
11318 (LOCATION_RESET, LOCATION_PRINT): Adjust.
11319 * src/complain.c (warn_at, complain_at, fatal_at): Drop
11320 `error_one_per_line' support.
11321
11322 2002-07-09 Akim Demaille <akim@epita.fr>
11323
11324 * src/complain.h, src/complain.c (warn, complain): Remove, unused.
11325 * src/reader.c (lineno): Remove.
11326 Adjust all dependencies.
11327 (get_merge_function): Take a location and use complain_at.
11328 * src/symtab.h, src/symtab.c (symbol_make_alias): Likewise.
11329 * tests/regression.at (Invalid inputs, Mixing %token styles):
11330 Adjust.
11331
11332 2002-07-09 Akim Demaille <akim@epita.fr>
11333
11334 * src/parse-gram.y (rules_or_grammar_declaration): Add an error
11335 recovery rule, and forbid extensions when --yacc.
11336 (gram_error): Use complain_at.
11337 * src/reader.c (reader): Exit if there were parse errors.
11338
11339 2002-07-09 Akim Demaille <akim@epita.fr>
11340
11341 * tests/synclines.at (AT_SYNCLINES_COMPILE): New.
11342 (AT_TEST_SYNCLINE): Adjust to unusual GCC outputs.
11343 Reported by R Blake <blakers@mac.com>.
11344
11345 2002-07-09 Akim Demaille <akim@epita.fr>
11346
11347 * data/yacc.c: Output the copyright notive in the header.
11348
11349 2002-07-03 Akim Demaille <akim@epita.fr>
11350
11351 * src/output.c (froms, tos): Are state_number_t.
11352 (save_column): sp, sp1, and sp2 are state_number_t.
11353 (prepare): Rename `final' as `final_state_number', `nnts' as
11354 `nterms_number', `nrules' as `rules_number', `nstates' as
11355 `states_number', and `ntokens' as `tokens_number'. Remove `nsym',
11356 unused.
11357 * data/yacc.c, data/glr.c, data/lalr1.cc: Adjust.
11358 * data/lalr1.cc (nsym_): Remove, unused.
11359
11360 2002-07-03 Akim Demaille <akim@epita.fr>
11361
11362 * src/lalr.h, src/lalr.c (goto_number_t): New.
11363 * src/lalr.c (goto_list_t): New.
11364 Propagate them.
11365 * src/nullable.c (rule_list_t): New.
11366 Propagate.
11367 * src/types.h: Remove.
11368
11369 2002-07-03 Akim Demaille <akim@epita.fr>
11370
11371 * src/closure.c (print_fderives): Use rule_rhs_print.
11372 * src/derives.c (print_derives): Use rule_rhs_print.
11373 (rule_list_t): New, replaces `shorts'.
11374 (set_derives): Add comments.
11375 * tests/sets.at (Nullable, Firsts): Adjust.
11376
11377 2002-07-03 Akim Demaille <akim@epita.fr>
11378
11379 * src/output.c (prepare_actions): Free `tally' and `width'.
11380 (prepare_actions): Allocate and free `order'.
11381 * src/symtab.c (symbols_free): Free `symbols'.
11382 * src/scan-gram.l (scanner_free): Clear Flex's scanners memory.
11383 * src/output.c (m4_invoke): Move to...
11384 * src/scan-skel.l: here.
11385 (<<EOF>>): Close yyout, and free its name.
11386
11387 2002-07-03 Akim Demaille <akim@epita.fr>
11388
11389 Fix some memory leaks, and fix a bug: state 0 was examined twice.
11390
11391 * src/LR0.c (new_state): Merge into...
11392 (state_list_append): this.
11393 (new_states): Merge into...
11394 (generate_states): here.
11395 (set_states): Don't ensure a proper `errs' state member here, do it...
11396 * src/conflicts.c (conflicts_solve): here.
11397 * src/state.h, src/state.c: Comment changes.
11398 (state_t): Rename member `shifts' as `transitions'.
11399 Adjust all dependencies.
11400 (errs_new): For consistency, also take the values as argument.
11401 (errs_dup): Remove.
11402 (state_errs_set): New.
11403 (state_reductions_set, state_transitions_set): Assert that no
11404 previous value was assigned.
11405 (state_free): New.
11406 (states_free): Use it.
11407 * src/conflicts.c (resolve_sr_conflict): Don't use an `errs_t' as
11408 temporary storage: use `errs' and `nerrs' as elsewhere.
11409 (set_conflicts): Allocate and free this `errs'.
11410
11411 2002-07-02 Akim Demaille <akim@epita.fr>
11412
11413 * lib/libiberty.h: New.
11414 * lib: Update the bitset implementation from upstream.
11415 * src/closure.c, src/lalr.c, src/output.c, src/print_graph.c,
11416 * src/state.c: Use BITSET_FOR_EACH, not BITSET_EXECUTE.
11417 * src/main.c: Adjust bitset stats calls.
11418
11419 2002-07-01 Paul Eggert <eggert@twinsun.com>
11420
11421 * src/scan-gram.l (<SC_ESCAPED_CHARACTER>): Convert to unsigned
11422 char, so that negative chars don't collide with $.
11423
11424 2002-06-30 Akim Demaille <akim@epita.fr>
11425
11426 Have the GLR tests be `warning' checked, and fix the warnings.
11427
11428 * data/glr.c (YYFPRINTF): Always define it, not only when YYDEBUG
11429 (yyuserAction, yyreportAmbiguity): `Use' all the arguments.
11430 (yyremoveDeletes): `yyi' and `yyj' are size_t.
11431 Use YYFPRINTF when under if (YYDEBUG) to avoid empty `if' bodies.
11432 (yyaddDeferredAction): static.
11433 (yyglrReduce): yyi, yyk, amd yyposn are size_t.
11434 (yyreportParseError): yyprefix is const.
11435 yytokenp is used only when verbose.
11436 (yy__GNUC__): Replace with __GNUC__.
11437 (yypdumpstack): yyi is size_t.
11438 (yypreference): Un-yy local variables and arguments, to avoid
11439 clashes with `yyr1'. Anyway, we are not in the user name space.
11440 (yytname_size): be an int, as is compared with ints.
11441 * tests/testsuite.at (AT_COMPILE, AT_PARSER_CHECK): New.
11442 Use them.
11443 * tests/cxx-gram.at: Use quotation to protect $1.
11444 Use AT_COMPILE to enable warnings hunts.
11445 Prototype yylex and yyerror.
11446 `Use' argc.
11447 Include `string.h', not `strings.h'.
11448 Produce and prototype stmtMerge only when used.
11449 yylex takes a location.
11450
11451 2002-06-30 Akim Demaille <akim@epita.fr>
11452
11453 We spend a lot of time in quotearg, in particular when --verbose.
11454
11455 * src/symtab.c (symbol_get): Store a quoted version of the key.
11456 (symbol_tag_get, symbol_tag_get_n, symbol_tag_print): Remove.
11457 Adjust all callers.
11458
11459 2002-06-30 Akim Demaille <akim@epita.fr>
11460
11461 * src/state.h (reductions_t): Rename member `nreds' as num.
11462 (errs_t): Rename members `nerrs' and `errs' as `num' and `symbols'.
11463 * src/state.c (ERRS_ALLOC, REDUCTIONS_ALLOC): Use the correct types.
11464
11465 2002-06-30 Akim Demaille <akim@epita.fr>
11466
11467 * src/state.h, src/state.c (shift_t, SHIFT_SYMBOL, SHIFT_IS_SHIFT)
11468 (SHIFT_IS_GOTO, SHIFT_IS_ERROR, SHIFT_DISABLE, SHIFT_IS_DISABLED)
11469 (shifts_to): Rename as...
11470 (transition_t, TRANSITION_SYMBOL, TRANSITION_IS_TRANSITION)
11471 (TRANSITION_IS_GOTO, TRANSITION_IS_ERROR, TRANSITION_DISABLE)
11472 (TRANSITION_IS_DISABLED, transitions_to): these.
11473
11474 2002-06-30 Akim Demaille <akim@epita.fr>
11475
11476 * src/print.c (print_shifts, print_gotos): Merge into...
11477 (print_transitions): this.
11478 (print_transitions, print_errs, print_reductions): Align the
11479 lookaheads columns.
11480 (print_core, print_transitions, print_errs, print_state,
11481 print_grammar): Output empty lines separator before, not after.
11482 (state_default_rule_compute): Rename as...
11483 (state_default_rule): this.
11484 * tests/conflicts.at (Defaulted Conflicted Reduction),
11485 (Unresolved SR Conflicts, Resolved SR Conflicts): Adjust.
11486 * tests/regression.at (Rule Line Numbers, Web2c Report): Adjust.
11487
11488 2002-06-30 Akim Demaille <akim@epita.fr>
11489
11490 Display items as we display rules.
11491
11492 * src/gram.h, src/gram.c (rule_lhs_print): New.
11493 * src/gram.c (grammar_rules_partial_print): Use it.
11494 * src/print.c (print_core): Likewise.
11495 * tests/conflicts.at (Defaulted Conflicted Reduction),
11496 (Unresolved SR Conflicts): Adjust.
11497 (Unresolved SR Conflicts): Adjust and rename as...
11498 (Resolved SR Conflicts): this, as was meant.
11499 * tests/regression.at (Web2c Report): Adjust.
11500
11501 2002-06-30 Akim Demaille <akim@epita.fr>
11502
11503 * src/print.c (state_default_rule_compute): New, extracted from...
11504 (print_reductions): here.
11505 Pessimize, but clarify the code.
11506 * tests/conflicts.at (Defaulted Conflicted Reduction): New.
11507
11508 2002-06-30 Akim Demaille <akim@epita.fr>
11509
11510 * src/output.c (action_row): Let default_rule be always a rule
11511 number.
11512
11513 2002-06-30 Akim Demaille <akim@epita.fr>
11514
11515 * src/closure.c (print_firsts, print_fderives, closure):
11516 Use BITSET_EXECUTE.
11517 * src/lalr.c (lookaheads_print): Likewise.
11518 * src/state.c (state_rule_lookaheads_print): Likewise.
11519 * src/print_graph.c (print_core): Likewise.
11520 * src/print.c (print_reductions): Likewise.
11521 * src/output.c (action_row): Likewise.
11522 Use SHIFT_IS_DISABLED, SHIFT_IS_SHIFT and SHIFT_SYMBOL.
11523
11524 2002-06-30 Akim Demaille <akim@epita.fr>
11525
11526 * src/print_graph.c: Use report_flag.
11527
11528 2002-06-30 Akim Demaille <akim@epita.fr>
11529
11530 * src/lalr.c (traverse, digraph, matrix_print, transpose): Move
11531 to...
11532 * src/relation.h, src/relation.c (traverse, relation_digraph)
11533 (relation_print, relation_transpose): New.
11534
11535 2002-06-30 Akim Demaille <akim@epita.fr>
11536
11537 * src/state.h, src/state.c (shifts_to): New.
11538 * src/lalr.c (build_relations): Use it.
11539
11540 2002-06-30 Akim Demaille <akim@epita.fr>
11541
11542 * src/gram.h (rule_number_t, RULE_NUMBER_MAX, int_of_rule_number)
11543 (item_number_of_rule_number, rule_number_of_item_number): New.
11544 * src/LR0.c, src/closure.c, src/derives.c, src/derives.h,
11545 * src/gram.c, src/lalr.c, src/nullable.c, src/output.c, src/print.c,
11546 * src/print_graph.c, src/reader.c, src/reduce.c, src/reduce.h:
11547 Propagate their use.
11548 Much remains to be done, in particular wrt `shorts' from types.h.
11549
11550 2002-06-30 Akim Demaille <akim@epita.fr>
11551
11552 * src/symtab.c (symbol_new): Initialize the `printer' member.
11553
11554 2002-06-30 Akim Demaille <akim@epita.fr>
11555
11556 * src/LR0.c (save_reductions): Remove, replaced by...
11557 * src/state.h, src/state.c (state_reductions_set): New.
11558 (reductions, errs): Rename as...
11559 (reductions_t, errs_t): these.
11560 Adjust all dependencies.
11561
11562 2002-06-30 Akim Demaille <akim@epita.fr>
11563
11564 * src/LR0.c (state_list_t, state_list_append): New.
11565 (first_state, last_state): Now symbol_list_t.
11566 (this_state): Remove.
11567 (new_itemsets, append_states, save_reductions): Take a state_t as
11568 argument.
11569 (set_states, generate_states): Adjust.
11570 (save_shifts): Remove, replaced by...
11571 * src/state.h, src/state.c (state_shifts_set): New.
11572 (shifts): Rename as...
11573 (shifts_t): this.
11574 Adjust all dependencies.
11575 * src/state.h (state_t): Remove the `next' member.
11576
11577 2002-06-30 Akim Demaille <akim@epita.fr>
11578
11579 * src/vcg.c (quote): Use slot 2, since we often pass symbol tag
11580 escaped in slot 0.
11581
11582 2002-06-30 Akim Demaille <akim@epita.fr>
11583
11584 Use hash.h for the state hash table.
11585
11586 * src/LR0.c (STATE_HASH_SIZE, state_hash): Remove.
11587 (allocate_storage): Use state_hash_new.
11588 (free_storage): Use state_hash_free.
11589 (new_state, get_state): Adjust.
11590 * src/lalr.h, src/lalr.c (states): Move to...
11591 * src/states.h (state_t): Remove the `link' member, no longer
11592 used.
11593 * src/states.h, src/states.c: here.
11594 (state_hash_new, state_hash_free, state_hash_lookup)
11595 (state_hash_insert, states_free): New.
11596 * src/states.c (state_table, state_compare, state_hash): New.
11597 * src/output.c (output_actions): Do not free states now, since we
11598 still need to know the final_state number in `prepare', called
11599 afterwards. Do it...
11600 * src/main.c (main): here: call states_free after `output'.
11601
11602 2002-06-30 Akim Demaille <akim@epita.fr>
11603
11604 * src/state.h, src/state.c (state_new): New, extracted from...
11605 * src/LR0.c (new_state): here.
11606 * src/state.h (STATE_ALLOC): Move to...
11607 * src/state.c: here.
11608 * src/LR0.h, src/LR0.c (nstates, final_state): Move to...
11609 * src/state.h, src/state.c: here.
11610
11611 2002-06-30 Akim Demaille <akim@epita.fr>
11612
11613 * src/reader.c (gensym): Rename as...
11614 * src/symtab.h, src/symtab.c (dummy_symbol_get): this.
11615 (getsym): Rename as...
11616 (symbol_get): this.
11617
11618 2002-06-30 Akim Demaille <akim@epita.fr>
11619
11620 * src/state.h (state_number_t, STATE_NUMBER_MAX): New.
11621 * src/LR0.c, src/LR0.h, src/conflicts.c, src/lalr.c, src/lalr.h,
11622 * src/output.c, src/print.c, src/print_graph.c: Propagate.
11623 * src/LR0.h, src/LR0.h (final_state): Is a state_t*.
11624
11625 2002-06-30 Akim Demaille <akim@epita.fr>
11626
11627 Make the test suite pass with warnings checked.
11628
11629 * tests/actions.at (Printers and Destructors): Improve.
11630 Avoid unsigned vs. signed issues.
11631 * tests/calc.at: Don't exercise the scanner here, do it...
11632 * tests/input.at (Torturing the Scanner): here.
11633
11634 2002-06-28 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11635
11636 * data/glr.c: Correct typo in Emacs-mode directive. Slightly
11637 reorganize first lines parallel to yacc.c.
11638
11639 2002-06-28 Akim Demaille <akim@epita.fr>
11640
11641 * data/c.m4 (b4_copyright, b4_sint_type, b4_uint_type, b4_token_define)
11642 (b4_token_enum, b4_token_defines): New, factored from...
11643 * data/lalr1.cc, data/yacc.c, glr.c: here.
11644
11645 2002-06-28 Akim Demaille <akim@epita.fr>
11646
11647 * data/yacc.c (yydestruct, yysymprint): Pacify GCC warnings for
11648 unused variables.
11649 * src/output.c (merger_output): static.
11650
11651 2002-06-28 Akim Demaille <akim@epita.fr>
11652
11653 * src/reader.h: s/grammer_current_rule_merge_set/grammar_.../.
11654 * src/conflicts.c (conflicts_total_count): `i' is unsigned, to
11655 pacify GCC.
11656 * src/output.c (save_row): Initialize all the variables to pacify GCC.
11657
11658 2002-06-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11659
11660 Accumulated changelog for new GLR parsing features.
11661
11662 * src/conflicts.c (count_total_conflicts): Change name to
11663 conflicts_total_count.
11664 * src/conflicts.h: Ditto.
11665 * src/output.c (token_actions): Use the new name.
11666 (output_conflicts): Change conflp => conflict_list_heads, and
11667 confl => conflict_list for better readability.
11668 * data/glr.c: Use the new names.
11669 * NEWS: Add self to GLR announcement.
11670
11671 * src/reader.c (free_merger_functions): Cleanup: XFREE->free.
11672
11673 * doc/bison.texinfo (GLR Parsers): Make corrections suggested by
11674 Akim Demaille.
11675
11676 * data/bison.glr: Change name to glr.c
11677 * data/glr.c: Renamed from bison.glr.
11678 * data/Makefile.am: Add glr.c
11679
11680 * src/getargs.c:
11681
11682 * src/symlist.h: Add dprec and merger fields to symbol_list_s.
11683 * src/symlist.c (symbol_list_new): Initialize dprec and merger fields.
11684
11685 Originally 2002-06-16 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11686
11687 * data/bison.glr: Be sure to restore the
11688 current #line when returning to the skeleton contents after having
11689 exposed the input file's #line.
11690
11691 Originally 2002-06-13 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11692
11693 * data/bison.glr: Bring up to date with changes to bison.simple.
11694
11695 Originally 2002-06-03 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11696
11697 * data/bison.glr: Correct definitions that use b4_prefix.
11698 Various reformatting.
11699 (GLRStack): Make yychar (in YYPURE case) and yytokenp as part of stack.
11700 (yyreportParseError, yyrecoverParseError, yyprocessOneStack): remove
11701 yytokenp argument; now part of stack.
11702 (yychar): Define to behave as documented.
11703 (yyclearin): Ditto.
11704
11705 Originally 2002-05-14 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
11706
11707 * src/reader.h: Add declaration for free_merger_functions.
11708
11709 * src/reader.c (merge_functions): New variable.
11710 (get_merge_function): New function.
11711 (free_merger_functions): New function.
11712 (readgram): Check for %prec that is not followed by a symbol.
11713 Handle %dprec and %merge declarations.
11714 (packgram): Initialize dprec and merger fields in rules array.
11715
11716 * src/output.c (conflict_tos, conflrow, conflict_table, conflict_list,
11717 conflict_list_cnt, conflict_list_free): New variables.
11718 (table_grow): Also grow conflict_table.
11719 (prepare_rules): Output dprec and merger tables.
11720 (conflict_row): New function.
11721 (action_row): Output conflict lists for GLR parser. Don't use
11722 default reduction in conflicted states for GLR parser so that there
11723 are spaces for the conflict lists.
11724 (save_row): Also save conflict information.
11725 (token_actions): Allocate conflict list.
11726 (merger_output): New function.
11727 (pack_vector): Pack conflict table, too.
11728 (output_conflicts): New function to output yyconflp and yyconfl.
11729 (output_check): Allocate conflict_tos.
11730 (output_actions): Output conflict tables, also.
11731 (output_skeleton): Output b4_mergers definition.
11732 (prepare): Output b4_max_rhs_length definition.
11733 Use 'bison.glr' as default skeleton for GLR parsers.
11734
11735 * src/gram.c (glr_parser): New flag.
11736 (grammar_free): Call free_merger_functions.
11737
11738 * src/conflicts.c (count_rr_conflicts): Augment to optionally count
11739 all pairs of conflicting reductions, rather than just all tokens
11740 causing conflicts. Needed to size conflict tables.
11741 (conflicts_output): Modify call to count_rr_conflicts for new
11742 interface.
11743 (conflicts_print): Ditto.
11744 (count_total_conflicts): New function.
11745
11746 * src/reader.h (merger_list): New type.
11747 (merge_functions): New variable.
11748
11749 * src/lex.h (tok_dprec, tok_merge): New token types.
11750
11751 * src/gram.h (rule_s): Add dprec and merger fields.
11752 (glr_parser): New flag.
11753
11754 * src/conflicts.h (count_total_conflicts): New function.
11755
11756 * src/options.c (option_table): Add %dprec, %merge, and %glr-parser.
11757
11758 * doc/bison.texinfo (Generalized LR Parsing): New section.
11759 (GLR Parsers): New section.
11760 (Language and Grammar): Mention GLR parsing.
11761 (Table of Symbols): Add %dprec, %glr-parser, %merge, GLR
11762 Correct typo ("tge" -> "the").
11763
11764 * data/bison.glr: New skeleton for GLR parsing.
11765
11766 * tests/cxx-gram.at: New tests for GLR parsing.
11767
11768 * tests/testsuite.at: Include cxx-gram.at.
11769
11770 * tests/Makefile.am: Add cxx-gram.at.
11771
11772 * src/parse-gram.y:
11773
11774 * src/scan-gram.l: Add %dprec, %glr-parser, %merge.
11775
11776 * src/parse-gram.y: Grammar for %dprec, %merge, %glr-parser.
11777
11778 2002-06-27 Akim Demaille <akim@epita.fr>
11779
11780 * src/options.h, src/options.c: Remove.
11781 * src/getargs.c (short_options, long_options): New.
11782
11783 2002-06-27 Akim Demaille <akim@epita.fr>
11784
11785 * data/bison.simple, data/bison.c++: Rename as...
11786 * data/yacc.c, data/lalr1.cc: these.
11787 * doc/bison.texinfo (Environment Variables): Remove.
11788
11789 2002-06-25 Raja R Harinath <harinath@cs.umn.edu>
11790
11791 * src/getargs.c (report_argmatch): Initialize strtok().
11792
11793 2002-06-20 Akim Demaille <akim@epita.fr>
11794
11795 * data/bison.simple (b4_symbol_actions): New, replaces...
11796 (b4_symbol_destructor, b4_symbol_printer): these.
11797 (yysymprint): Be sure to call YYPRINT only for tokens, and using
11798 user token numbers.
11799
11800 2002-06-20 Akim Demaille <akim@epita.fr>
11801
11802 * data/bison.simple (yydestructor): Rename as...
11803 (yydestruct): this.
11804
11805 2002-06-20 Akim Demaille <akim@epita.fr>
11806
11807 * src/symtab.h, src/symtab.c (symbol_type_set)
11808 (symbol_destructor_set, symbol_precedence_set): The location is
11809 the last argument.
11810 Adjust all callers.
11811
11812 2002-06-20 Akim Demaille <akim@epita.fr>
11813
11814 * src/parse-gram.y (YYPRINT, yyprint): Don't mess with the parser
11815 internals.
11816 * src/reader.h, src/reader.c (grammar_current_rule_prec_set):
11817 Takes a location.
11818 * src/symtab.h, src/symtab.c (symbol_class_set)
11819 (symbol_user_token_number_set): Likewise.
11820 Adjust all callers.
11821 Promote complain_at.
11822 * tests/input.at (Type Clashes): Adjust.
11823
11824 2002-06-20 Akim Demaille <akim@epita.fr>
11825
11826 * data/bison.simple (YYLEX): Fix the declaration when
11827 %pure-parser.
11828
11829 2002-06-20 Akim Demaille <akim@epita.fr>
11830
11831 * data/bison.simple (yysymprint): Don't print the token number,
11832 just its name.
11833 * tests/actions.at (Destructors): Rename as...
11834 (Printers and Destructors): this.
11835 Also exercise %printer.
11836
11837 2002-06-20 Akim Demaille <akim@epita.fr>
11838
11839 * data/bison.simple (YYDSYMPRINT): New.
11840 Use it to remove many of the #if YYDEBUG/if (yydebug).
11841
11842 2002-06-20 Akim Demaille <akim@epita.fr>
11843
11844 * src/symtab.h, src/symtab.c (symbol_t): printer and
11845 printer_location are new members.
11846 (symbol_printer_set): New.
11847 * src/parse-gram.y (PERCENT_PRINTER): New token.
11848 Handle its associated rule.
11849 * src/scan-gram.l: Adjust.
11850 (handle_destructor_at, handle_destructor_dollar): Rename as...
11851 (handle_symbol_code_at, handle_symbol_code_dollar): these.
11852 * src/output.c (symbol_printers_output): New.
11853 (output_skeleton): Call it.
11854 * data/bison.simple (yysymprint): New. Cannot be named yyprint
11855 since there are already many grammar files with a user `yyprint'.
11856 Replace the calls to YYPRINT to calls to yysymprint.
11857 * tests/calc.at: Adjust.
11858 * tests/torture.at (AT_DATA_STACK_TORTURE): Remove YYPRINT: it was
11859 taking advantage of parser very internal details (stack size!).
11860
11861 2002-06-20 Akim Demaille <akim@epita.fr>
11862
11863 * src/scan-gram.l: Complete the scanner with the missing patterns
11864 to pacify Flex.
11865 Use `quote' and `symbol_tag_get' where appropriate.
11866
11867 2002-06-19 Akim Demaille <akim@epita.fr>
11868
11869 * tests/actions.at (Destructors): Augment to test locations.
11870 * data/bison.simple (yydestructor): Pass it the current location
11871 if locations are enabled.
11872 Prototype only when __STDC__ or C++.
11873 Change the argument names to move into the yy name space: there is
11874 user code here.
11875
11876 2002-06-19 Akim Demaille <akim@epita.fr>
11877
11878 * data/bison.simple (b4_pure_if): New.
11879 Use it instead of #ifdef YYPURE.
11880
11881 2002-06-19 Akim Demaille <akim@epita.fr>
11882
11883 * data/bison.simple (b4_location_if): New.
11884 Use it instead of #ifdef YYLSP_NEEDED.
11885
11886 2002-06-19 Akim Demaille <akim@epita.fr>
11887
11888 Prepare @$ in %destructor, but currently don't bind it in the
11889 skeleton, as %location use is not cleaned up yet.
11890
11891 * src/scan-gram.l (handle_dollar, handle_destructor_at)
11892 (handle_action_at): New.
11893 (handle_at, handle_action_dollar, handle_destructor_dollar): Take
11894 a braced_code_t and a location as additional arguments.
11895 (handle_destructor_dollar): Instead of requiring `b4_eval', just
11896 unquote one when outputting `b4_dollar_dollar'.
11897 Adjust callers.
11898 * data/bison.simple (b4_eval): Remove.
11899 (b4_symbol_destructor): Adjust.
11900 * tests/input.at (Invalid @n): Adjust.
11901
11902 2002-06-19 Zack Weinberg <zack@codesourcery.com>
11903
11904 * doc/bison.texinfo: Document ability to have multiple
11905 prologue sections.
11906
11907 2002-06-18 Akim Demaille <akim@epita.fr>
11908
11909 * src/files.c (compute_base_names): When computing the output file
11910 names from the input file name, strip the directory part.
11911
11912 2002-06-18 Akim Demaille <akim@epita.fr>
11913
11914 * data/bison.simple.new: Comment changes.
11915 Reported by Andreas Schwab.
11916
11917 2002-06-18 Matt Kraai <kraai@alumni.cmu.edu>
11918
11919 * data/bison.simple (yyoverflowlab): #ifndef yyoverflow, so that
11920 there are no `label `yyoverflowlab' defined but not used' warnings
11921 when yyoverflow is defined.
11922
11923 2002-06-18 Akim Demaille <akim@epita.fr>
11924
11925 * src/symtab.h, src/symtab.c (symbol_t): destructor_location is a
11926 new member.
11927 (symbol_destructor_set): Adjust.
11928 * src/output.c (symbol_destructors_output): Output the destructor
11929 locations.
11930 Output the symbol name.
11931 * data/bison.simple (b4_symbol_destructor): Adjust.
11932
11933 2002-06-18 Cris Bailiff <c.bailiff@awayweb.com>
11934 and Akim Demaille <akim@epita.fr>
11935
11936 * data/bison.simple.new (yyerrlab1): Be sure to pop and destroy
11937 what's left on the stack when the error recovery hits EOF.
11938 * tests/actions.at (Destructors): Complete to exercise this case.
11939
11940 2002-06-17 Akim Demaille <akim@epita.fr>
11941
11942 * data/m4sugar/m4sugar.m4 (m4_map): Recognize when the list of
11943 arguments is really empty, not only equal to `[]'.
11944 * src/symtab.h, src/symtab.c (symbol_t): `destructor' is a new
11945 member.
11946 (symbol_destructor_set): New.
11947 * src/output.c (symbol_destructors_output): New.
11948 * src/reader.h (brace_code_t, current_braced_code): New.
11949 * src/scan-gram.l (BRACED_CODE): Use it to branch on...
11950 (handle_dollar): Rename as...
11951 (handle_action_dollar): this.
11952 (handle_destructor_dollar): New.
11953 * src/parse-gram.y (PERCENT_DESTRUCTOR): New.
11954 (grammar_declaration): Use it.
11955 * data/bison.simple (yystos): Is always defined.
11956 (yydestructor): New.
11957 * tests/actions.at (Destructors): New.
11958 * tests/calc.at (_AT_CHECK_CALC_ERROR): Don't rely on egrep.
11959
11960 2002-06-17 Akim Demaille <akim@epita.fr>
11961
11962 * src/symlist.h, src/symlist.c (symbol_list_length): New.
11963 * src/scan-gram.l (handle_dollar, handle_at): Compute the
11964 rule_length only when needed.
11965 * src/output.c (actions_output, token_definitions_output): Output
11966 the full M4 block.
11967 * src/symtab.c: Don't access directly to the symbol tag, use
11968 symbol_tag_get.
11969 * src/parse-gram.y: Use symbol_list_free.
11970
11971 2002-06-17 Akim Demaille <akim@epita.fr>
11972
11973 * src/reader.h, src/reader.c (symbol_list, symbol_list_new)
11974 (symbol_list_prepend, get_type_name): Move to...
11975 * src/symlist.h, src/symlist.c (symbol_list_t, symbol_list_new)
11976 (symbol_list_prepend, symbol_list_n_type_name_get): here.
11977 Adjust all callers.
11978 (symbol_list_free): New.
11979 * src/scan-gram.l (handle_dollar): Takes a location.
11980 * tests/input.at (Invalid $n): Adjust.
11981
11982 2002-06-17 Akim Demaille <akim@epita.fr>
11983
11984 * src/reader.h, src/reader.c (symbol_list_new): Export it.
11985 (symbol_list_prepend): New.
11986 * src/parse-gram.y (%union): `list' is a new member.
11987 (symbols.1): New, replaces...
11988 (terms_to_prec.1, nterms_to_type.1): these.
11989 * src/symtab.h, src/symtab.c (symbol_type_set, symbol_precedence_set)
11990 Take a location as additional argument.
11991 Adjust all callers.
11992
11993 2002-06-15 Akim Demaille <akim@epita.fr>
11994
11995 * src/parse-gram.y: Move %token in the declaration section so that
11996 we don't depend upon CVS Bison.
11997
11998 2002-06-15 Akim Demaille <akim@epita.fr>
11999
12000 * src/state.h, src/state.c (state_rule_lookaheads_print): New.
12001 * src/print.c (print_core): Use it.
12002
12003 2002-06-15 Akim Demaille <akim@epita.fr>
12004
12005 * src/conflicts.c (log_resolution): Accept the rule involved in
12006 the sr conflicts instead of the lookahead number that points to
12007 that rule.
12008 (flush_reduce): Accept the current lookahead vector as argument,
12009 instead of the index in LA.
12010 (resolve_sr_conflict): Accept the current number of lookahead
12011 bitset to consider for the STATE, instead of the index in LA.
12012 (set_conflicts): Adjust.
12013 * src/lalr.c, src/lalr.h, src/state.h: Comment changes.
12014
12015 2002-06-15 Akim Demaille <akim@epita.fr>
12016
12017 * src/state.h (state_t): Replace the `lookaheadsp' member, a
12018 short, with `lookaheads' (bitsetv), `lookaheads_rule' (rule_t**).
12019 Adjust all dependencies.
12020 * src/lalr.c (initialize_lookaheads): Split into...
12021 (states_lookaheads_count, states_lookaheads_initialize): these.
12022 (lalr): Adjust.
12023
12024 2002-06-15 Akim Demaille <akim@epita.fr>
12025
12026 * src/gram.h, src/gram.c (grammar_rules_partial_print): New, eved
12027 out of...
12028 (grammar_rules_print): here.
12029 * src/reduce.c (reduce_output): Use it.
12030 * tests/reduce.at (Useless Rules, Reduced Automaton)
12031 (Underivable Rules): Adjust.
12032
12033 2002-06-15 Akim Demaille <akim@epita.fr>
12034
12035 Copy BYacc's nice way to report the grammar.
12036
12037 * src/gram.h, src/gram.c (grammar_rhs_print, grammar_rules_print):
12038 New.
12039 Don't print the rules' location, it is confusing and useless.
12040 (rule_print): Use grammar_rhs_print.
12041 * src/print.c (print_grammar): Use grammar_rules_print.
12042
12043 2002-06-15 Akim Demaille <akim@epita.fr>
12044
12045 Complete and rationalize `useless thing' warnings.
12046
12047 * src/symtab.h, src/symtab.c (symbol_tag_get, symbol_tag_get_n)
12048 (symbol_tag_print): New.
12049 Use them everywhere in place of accessing directly the tag member.
12050 * src/gram.h, src/gram.c (rule_print): New.
12051 Use it where a rule used to be printed `by hand'.
12052 * src/reduce.c (nonterminals_reduce): Report the use nonterminals.
12053 (reduce_grammar_tables): Report the useless rules.
12054 (reduce_print): Useless things are a warning, not an error.
12055 Report it as such.
12056 * tests/reduce.at (Useless Nonterminals, Useless Rules):
12057 (Reduced Automaton, Underivable Rules): Adjust.
12058 * tests/regression.at (Web2c Report, Web2c Report): Adjust.
12059 * tests/conflicts.at (Unresolved SR Conflicts)
12060 (Solved SR Conflicts): Adjust.
12061
12062 2002-06-15 Akim Demaille <akim@epita.fr>
12063
12064 Let symbols have a location.
12065
12066 * src/symtab.h, src/symtab.c (symbol_t): Location is a new member.
12067 (getsym): Adjust.
12068 Adjust all callers.
12069 * src/complain.h, src/complain.c (complain_at, fatal_at, warn_at):
12070 Use location_t, not int.
12071 * src/symtab.c (symbol_check_defined): Take advantage of the
12072 location.
12073 * tests/regression.at (Invalid inputs): Adjust.
12074
12075 2002-06-15 Akim Demaille <akim@epita.fr>
12076
12077 * src/parse-gram.y (YYLLOC_DEFAULT, current_lhs_location): New.
12078 (input): Don't try to initialize yylloc here, do it in the
12079 scanner.
12080 * src/scan-gram.l (YY_USER_INIT): Initialize yylloc.
12081 * src/gram.h (rule_t): Change line and action_line into location
12082 and action_location, of location_t type.
12083 Adjust all dependencies.
12084 * src/location.h, src/location.c (empty_location): New.
12085 * src/reader.h, src/reader.c (grammar_start_symbol_set)
12086 (grammar_symbol_append, grammar_rule_begin, grammar_rule_end)
12087 (grammar_current_rule_symbol_append)
12088 (grammar_current_rule_action_append): Expect a location as argument.
12089 * src/reader.c (grammar_midrule_action): Adjust to attach an
12090 action's location as dummy symbol location.
12091 * src/symtab.h, src/symtab.c (startsymbol_location): New.
12092 * tests/regression.at (Web2c Report, Rule Line Numbers): Adjust
12093 the line numbers.
12094
12095 2002-06-14 Akim Demaille <akim@epita.fr>
12096
12097 Grammar declarations may be found in the grammar section.
12098
12099 * src/parse-gram.y (rules_or_grammar_declaration): New.
12100 (declarations): Each declaration may end with a semicolon, not
12101 just...
12102 (grammar_declaration): `"%union"'.
12103 (grammar): Branch to rules_or_grammar_declaration.
12104
12105 2002-06-14 Akim Demaille <akim@epita.fr>
12106
12107 * src/main.c (main): Invoke scanner_free.
12108
12109 2002-06-14 Akim Demaille <akim@epita.fr>
12110
12111 * src/output.c (m4_invoke): Extracted from...
12112 (output_skeleton): here.
12113 Free tempfile.
12114
12115 2002-06-14 Akim Demaille <akim@epita.fr>
12116
12117 * src/parse-gram.y (directives, directive, gram)
12118 (grammar_directives, precedence_directives, precedence_directive):
12119 Rename as...
12120 (declarations, declaration, grammar, grammar_declaration)
12121 (precedence_declaration, precedence_declarator): these.
12122 (symbol_declaration): New.
12123
12124 2002-06-14 Akim Demaille <akim@epita.fr>
12125
12126 * src/files.c (action_obstack): Remove, unused.
12127 (output_obstack): Remove it, and all its dependencies, as it is no
12128 longer needed.
12129 * src/reader.c (epilogue_set): Build the epilogue in the
12130 muscle_obstack.
12131 * src/output.h, src/output.c (muscle_obstack): Move to...
12132 * src/muscle_tab.h, src/muscle_tab.h: here.
12133 (muscle_init): Initialize muscle_obstack.
12134 (muscle_free): New.
12135 * src/main.c (main): Call it.
12136
12137 2002-06-14 Akim Demaille <akim@epita.fr>
12138
12139 * src/location.h: New, extracted from...
12140 * src/reader.h: here.
12141 * src/Makefile.am (noinst_HEADERS): Merge into
12142 (bison_SOURCES): this.
12143 Add location.h.
12144 * src/parse-gram.y: Use location_t instead of Bison's.
12145 * src/reader.h, src/reader.c (prologue_augment, epilogue_set):
12146 Use location_t instead of ints.
12147
12148 2002-06-14 Akim Demaille <akim@epita.fr>
12149
12150 * data/bison.simple, data/bison.c++: Be sure to restore the
12151 current #line when returning to the skeleton contents after having
12152 exposed the input file's #line.
12153
12154 2002-06-12 Akim Demaille <akim@epita.fr>
12155
12156 * src/scan-gram.l (SC_BRACED_CODE): Don't use `<.*>', it is too
12157 eager.
12158 * tests/actions.at (Exotic Dollars): New.
12159
12160 2002-06-12 Akim Demaille <akim@epita.fr>
12161
12162 * src/scan-gram.l (SC_PROLOGUE): Don't eat characters amongst
12163 ['"/] too eagerly.
12164 * tests/input.at (Torturing the Scanner): New.
12165
12166 2002-06-11 Akim Demaille <akim@epita.fr>
12167
12168 * src/scan-gram.l (YY_OBS_INIT): Remove, replace with...
12169 [SC_COMMENT,SC_STRING,SC_CHARACTER,SC_BRACED_CODE,SC_PROLOGUE]
12170 [SC_EPILOGUE]: Output the quadrigraphs only when not in a comment.
12171 * src/reader.h, src/scan-gram.l (scanner_initialize): this.
12172 * src/reader.c (reader): Use it.
12173
12174 2002-06-11 Akim Demaille <akim@epita.fr>
12175
12176 * src/scan-gram.l (YY_OBS_FINISH): Don't set yylval.
12177 Adjust all callers.
12178 (scanner_last_string_free): New.
12179
12180 2002-06-11 Akim Demaille <akim@epita.fr>
12181
12182 * src/scan-gram.l (YY_INIT, YY_GROW, YY_FINISH): Rename as...
12183 (YY_OBS_INIT, YY_OBS_GROW, YY_OBS_FINISH): these.
12184 (last_string, YY_OBS_FREE): New.
12185 Use them when returning an ID.
12186
12187 2002-06-11 Akim Demaille <akim@epita.fr>
12188
12189 Have Bison grammars parsed by a Bison grammar.
12190
12191 * src/reader.c, src/reader.h (prologue_augment): New.
12192 * src/reader.c (copy_definition): Remove.
12193
12194 * src/reader.h, src/reader.c (gram_start_symbol_set, prologue_augment)
12195 (grammar_symbol_append, grammar_rule_begin, grammar_midrule_action)
12196 (grammar_current_rule_prec_set, grammar_current_rule_check)
12197 (grammar_current_rule_symbol_append)
12198 (grammar_current_rule_action_append): Export.
12199 * src/parse-gram.y (symbol_list_new, symbol_list_symbol_append_
12200 (symbol_list_action_append): Remove.
12201 Hook the routines from reader.
12202 * src/scan-gram.l: In INITIAL, characters and strings are tokens.
12203 * src/system.h (ATTRIBUTE_NORETURN, ATTRIBUTE_UNUSED): Now.
12204
12205 * src/reader.c (read_declarations): Remove, unused.
12206
12207 * src/parse-gram.y: Handle the epilogue.
12208 * src/reader.h, src/reader.c (gram_start_symbol_set): Rename as...
12209 (grammar_start_symbol_set): this.
12210 * src/scan-gram.l: Be sure to ``use'' yycontrol to keep GCC quiet.
12211 * src/reader.c (readgram): Remove, unused.
12212 (reader): Adjust to insert eoftoken and axiom where appropriate.
12213
12214 * src/reader.c (copy_dollar): Replace with...
12215 * src/scan-gram.h (handle_dollar): this.
12216 * src/parse-gram.y: Remove `%thong'.
12217
12218 * src/reader.c (copy_at): Replace with...
12219 * src/scan-gram.h (handle_at): this.
12220
12221 * src/complain.h, src/complain.c (warn_at, complain_at, fatal_at):
12222 New.
12223
12224 * src/scan-gram.l (YY_LINES): Keep lineno synchronized for the
12225 time being.
12226
12227 * src/reader.h, src/reader.c (grammar_rule_end): New.
12228
12229 * src/parse.y (current_type, current_class): New.
12230 Implement `%nterm', `%token' support.
12231 Merge `%term' into `%token'.
12232 (string_as_id): New.
12233 * src/symtab.h, src/symtab.c (symbol_make_alias): Don't pass the
12234 type name.
12235
12236 * src/parse-gram.y: Be sure to handle properly the beginning of
12237 rules.
12238
12239 * src/parse-gram.y: Handle %type.
12240 * src/reader.c (grammar_rule_end): Call grammar_current_rule_check.
12241
12242 * src/parse-gram.y: More directives support.
12243 * src/options.c: No longer handle source directives.
12244
12245 * src/parse-gram.y: Fix %output.
12246
12247 * src/parse-gram.y: Handle %union.
12248 Use the prologue locations.
12249 * src/reader.c (parse_union_decl): Remove.
12250
12251 * src/reader.h, src/reader.c (epilogue_set): New.
12252 * src/parse-gram.y: Use it.
12253
12254 * data/bison.simple, data/bison.c++: b4_stype is now either not
12255 defined, then default to int, or to the contents of %union,
12256 without `union' itself.
12257 Adjust.
12258 * src/muscle_tab.c (muscle_init): Don't predefine `stype'.
12259
12260 * src/output.c (actions_output): Don't output braces, as they are
12261 already handled by the scanner.
12262
12263 * src/scan-gram.l (SC_CHARACTER): Set the user_token_number of
12264 characters to themselves.
12265
12266 * tests/reduce.at (Reduced Automaton): End the grammars with %% so
12267 that the epilogue has a proper #line.
12268
12269 * src/parse-gram.y: Handle precedence/associativity.
12270
12271 * src/symtab.c (symbol_precedence_set): Requires the symbol to be
12272 a terminal.
12273 * src/scan-gram.l (SC_BRACED_CODE): Catch strings and characters.
12274 * tests/calc.at: Do not use `%token "foo"' as it makes not sense
12275 at all to define terminals that cannot be emitted.
12276
12277 * src/scan-gram.l: Escape M4 characters.
12278
12279 * src/scan-gram.l: Working properly with escapes in user
12280 strings/characters.
12281
12282 * tests/torture.at (AT_DATA_TRIANGULAR_GRAMMAR)
12283 (AT_DATA_HORIZONTAL_GRAMMAR): Respect the `%token ID NUM STRING'
12284 grammar.
12285 Use more modest sizes, as for the time being the parser does not
12286 release memory, and therefore the process swallows a huge amount
12287 of memory.
12288
12289 * tests/torture.at (AT_DATA_LOOKAHEADS_GRAMMAR): Adjust to the
12290 stricter %token grammar.
12291
12292 * src/symtab.h (associativity): Add `undef_assoc'.
12293 (symbol_precedence_set): Do nothing when passed an undef_assoc.
12294 * src/symtab.c (symbol_check_alias_consistence): Adjust.
12295
12296 * tests/regression.at (Invalid %directive): Remove, as it is now
12297 meaningless.
12298 (Invalid inputs): Adjust to the new error messages.
12299 (Token definitions): The new grammar doesn't allow too many
12300 eccentricities.
12301
12302 * src/lex.h, src/lex.c: Remove.
12303 * src/reader.c (lastprec, skip_to_char, read_signed_integer)
12304 (copy_character, copy_string2, copy_string, copy_identifier)
12305 (copy_comment, parse_token_decl, parse_type_decl, parse_assoc_decl)
12306 (parse_muscle_decl, parse_dquoted_param, parse_skel_decl)
12307 (parse_action): Remove.
12308 * po/POTFILES.in: Adjust.
12309
12310 2002-06-11 Akim Demaille <akim@epita.fr>
12311
12312 * src/reader.c (parse_action): Don't store directly into the
12313 rule's action member: return the action as a string.
12314 Don't require `rule_length' as an argument: compute it.
12315 (grammar_current_rule_symbol_append)
12316 (grammar_current_rule_action_append): New, eved out from
12317 (readgram): here.
12318 Remove `action_flag', `rulelength', unused now.
12319
12320 2002-06-11 Akim Demaille <akim@epita.fr>
12321
12322 * src/reader.c (grammar_current_rule_prec_set).
12323 (grammar_current_rule_check): New, eved out from...
12324 (readgram): here.
12325 Remove `xaction', `first_rhs': useless.
12326 * tests/input.at (Type clashes): New.
12327 * tests/existing.at (GNU Cim Grammar): Adjust.
12328
12329 2002-06-11 Akim Demaille <akim@epita.fr>
12330
12331 * src/reader.c (grammar_midrule_action): New, Eved out from
12332 (readgram): here.
12333
12334 2002-06-11 Akim Demaille <akim@epita.fr>
12335
12336 * src/reader.c (grammar_rule_begin, previous_rule, current_rule):
12337 New.
12338 (readgram): Use them as replacement of inlined code, crule and
12339 crule1.
12340
12341 2002-06-11 Akim Demaille <akim@epita.fr>
12342
12343 * src/reader.c (grammar_end, grammar_symbol_append): New.
12344 (readgram): Use them.
12345 Make the use of `p' as local as possible.
12346
12347 2002-06-10 Akim Demaille <akim@epita.fr>
12348
12349 GCJ's parser requires the tokens to be defined before the prologue.
12350
12351 * data/bison.simple: Output the token definition before the user's
12352 prologue.
12353 * tests/regression.at (Braces parsing, Duplicate string)
12354 (Mixing %token styles): Check the output from bison.
12355 (Early token definitions): New.
12356
12357 2002-06-10 Akim Demaille <akim@epita.fr>
12358
12359 * src/symtab.c (symbol_user_token_number_set): Don't complain when
12360 assigning twice the same user number to a token, so that we can
12361 use it in...
12362 * src/lex.c (lex): here.
12363 Also use `symbol_class_set' instead of hand written code.
12364 * src/reader.c (parse_assoc_decl): Likewise.
12365
12366 2002-06-10 Akim Demaille <akim@epita.fr>
12367
12368 * src/symtab.c, src/symtab.c (symbol_class_set)
12369 (symbol_user_token_number_set): New.
12370 * src/reader.c (parse_token_decl): Use them.
12371 Use a switch instead of ifs.
12372 Use a single argument.
12373
12374 2002-06-10 Akim Demaille <akim@epita.fr>
12375
12376 Remove `%thong' support as it is undocumented, unused, duplicates
12377 `%token's job, and creates useless e-mail traffic with people who
12378 want to know what it is, why it is undocumented, unused, and
12379 duplicates `%token's job.
12380
12381 * src/reader.c (parse_thong_decl): Remove.
12382 * src/options.c (option_table): Remove "thong".
12383 * src/lex.h (tok_thong): Remove.
12384
12385 2002-06-10 Akim Demaille <akim@epita.fr>
12386
12387 * src/symtab.c, src/symtab.c (symbol_type_set)
12388 (symbol_precedence_set): New.
12389 * src/reader.c (parse_type_decl, parse_assoc_decl): Use them.
12390 (value_components_used): Remove, unused.
12391
12392 2002-06-09 Akim Demaille <akim@epita.fr>
12393
12394 Move symbols handling code out of the reader.
12395
12396 * src/reader.h, src/reader.c (errtoken, undeftoken, eoftoken)
12397 (axiom): Move to...
12398 * src/symtab.h, src/symtab.c: here.
12399
12400 * src/gram.c (start_symbol): Remove: use startsymbol->number.
12401 * src/reader.c (startval): Rename as...
12402 * src/symtab.h, src/symtab.c (startsymbol): this.
12403 * src/reader.c: Adjust.
12404
12405 * src/reader.c (symbol_check_defined, symbol_make_alias)
12406 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
12407 (token_translations_init)
12408 Move to...
12409 * src/symtab.c: here.
12410 * src/reader.c (packsymbols): Move to...
12411 * src/symtab.h, src/symtab.c (symbols_pack): here.
12412 * src/symtab.h, src/symtab.c (symbol_make_alias): Takes SYMVAL as
12413 argument.
12414
12415 2002-06-03 Akim Demaille <akim@epita.fr>
12416
12417 * src/muscle_tab.c (muscle_insert, muscle_find): Declarations,
12418 then statements.
12419
12420 2002-06-03 Akim Demaille <akim@epita.fr>
12421
12422 * src/muscle_tab.c (muscle_find, muscle_insert): Don't initialize
12423 structs with non literals.
12424 * src/scan-skel.l: never-interactive.
12425 * src/conflicts.c (enum conflict_resolution_e): No trailing
12426 comma.
12427 * src/getargs.c (usage): Split long literal strings.
12428 Reported by Hans Aberg.
12429
12430 2002-05-28 Akim Demaille <akim@epita.fr>
12431
12432 * data/bison.c++: Use C++ ostreams.
12433 (cdebug_): New member.
12434
12435 2002-05-28 Akim Demaille <akim@epita.fr>
12436
12437 * src/output.c (output_skeleton): Be sure to allocate enough room
12438 for `/' _and_ for `\0' in full_skeleton.
12439
12440 2002-05-28 Akim Demaille <akim@epita.fr>
12441
12442 * data/bison.c++: Catch up with bison.simple:
12443 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12444 and Paul Eggert <eggert@twinsun.com>: `error' handing.
12445 2002-05-26 Akim Demaille <akim@epita.fr>: stos_, token_number_,
12446 and popping traces.
12447
12448 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12449
12450 * src/output.c (output_skeleton): Put an explicit path in front of
12451 the skeleton file name, rather than relying on the -I directory,
12452 to partially alleviate effects of having a skeleton file lying around
12453 in the current directory.
12454
12455 2002-05-27 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12456
12457 * src/conflicts.c (log_resolution): Correct typo:
12458 obstack_printf should be obstack_fgrow1.
12459
12460 2002-05-26 Akim Demaille <akim@epita.fr>
12461
12462 * src/state.h (state_t): `solved_conflicts' is a new member.
12463 * src/LR0.c (new_state): Set it to 0.
12464 * src/conflicts.h, src/conflicts.c (print_conflicts)
12465 (free_conflicts, solve_conflicts): Rename as...
12466 (conflicts_print, conflicts_free, conflicts_solve): these.
12467 Adjust callers.
12468 * src/conflicts.c (enum conflict_resolution_e)
12469 (solved_conflicts_obstack): New, used by...
12470 (log_resolution): this.
12471 Adjust to attach the conflict resolution to each state.
12472 Complete the description with the precedence/associativity
12473 information.
12474 (resolve_sr_conflict): Adjust.
12475 * src/print.c (print_state): Output its solved_conflicts.
12476 * tests/conflicts.at (Unresolved SR Conflicts)
12477 (Solved SR Conflicts): Exercise --report=all.
12478
12479 2002-05-26 Akim Demaille <akim@epita.fr>
12480
12481 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
12482 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
12483 * src/reader.c, src/reduce.c, src/state.h, src/symtab.h
12484 (token_number_t, item_number_as_token_number)
12485 (token_number_as_item_number, muscle_insert_token_number_table):
12486 Rename as...
12487 (symbol_number_t, item_number_as_symbol_number)
12488 (symbol_number_as_item_number, muscle_insert_symbol_number_table):
12489 these, since it is more appropriate.
12490
12491 2002-05-26 Akim Demaille <akim@epita.fr>
12492
12493 * tests/calc.at (AT_CHECK_CALC): Adjust: there are now additional
12494 `Error:' lines.
12495 * data/bison.simple (yystos) [YYDEBUG]: New.
12496 (yyparse) [YYDEBUG]: Display the symbols which are popped during
12497 error recovery.
12498 * tests/regression.at (Web2c Actions): Adjust: yystos is output now.
12499
12500 2002-05-25 Akim Demaille <akim@epita.fr>
12501
12502 * doc/bison.texinfo (Debugging): Split into...
12503 (Tracing): this new section, its former contents, and...
12504 (Understanding): this new section.
12505 * src/getargs.h, src/getargs.c (verbose_flag): Remove, replaced
12506 by...
12507 (report_flag): this.
12508 Adjust all dependencies.
12509 (report_args, report_types, report_argmatch): New.
12510 (usage, getargs): Report/support -r, --report.
12511 * src/options.h
12512 (struct option_table_struct): Rename as..,
12513 (struct option_table_s): this.
12514 Rename the `set_flag' member to `flag' to match with getopt_long's
12515 struct.
12516 * src/options.c (option_table): Split verbose into an entry for
12517 %verbose, and another for --verbose.
12518 Support --report/-r, so remove -r from the obsolete --raw.
12519 * src/print.c: Attach full item sets and lookaheads reports to
12520 report_flag instead of trace_flag.
12521 * lib/argmatch.h, lib/argmatch.c: New, from Fileutils 4.1.
12522
12523 2002-05-24 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12524 and Paul Eggert <eggert@twinsun.com>
12525
12526 * data/bison.simple (yyparse): Correct error handling to conform to
12527 POSIX and yacc. Specifically, after syntax error is discovered,
12528 do not reduce further before shifting the error token.
12529 Clean up the code a bit by removing the labels yyerrdefault,
12530 yyerrhandle, yyerrpop.
12531 * NEWS: Document the above.
12532
12533 2002-05-20 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12534
12535 * data/bison.simple (yyr1): Don't use yy_token_number_type as element
12536 type; it isn't always big enough, since it doesn't necessarily
12537 include non-terminals.
12538 (yytranslate): Expand definition of yy_token_number_type, so that
12539 the latter can be removed.
12540 (yy_token_number_type): Remove, only one use.
12541 * data/bison.c++ (r1_): Parallel change to yyr1 in bison.simple---
12542 don't use TokenNumberType as element type.
12543
12544 * tests/regression.at: Modify expected output to agree with change
12545 to yyr1 and yytranslate.
12546
12547 2002-05-13 Florian Krohm <florian@edamail.fishkill.ibm.com>
12548
12549 * src/reader.c (parse_action): Use copy_character instead of
12550 obstack_1grow.
12551
12552 2002-05-13 Akim Demaille <akim@epita.fr>
12553
12554 * tests/regression.at (Token definitions): Prototype yylex and
12555 yyerror.
12556
12557 2002-05-12 Paul Hilfinger <Hilfinger@CS.Berkeley.EDU>
12558
12559 * src/scan-skel.l: Correct off-by-one error in handling of __oline__.
12560 * data/bison.simple (b4_sint_type, b4_uint_type): Correct to reflect
12561 32-bit arithmetic.
12562 * data/bison.c++ (b4_sint_type, b4_uint_type): Ditto.
12563
12564 2002-05-07 Akim Demaille <akim@epita.fr>
12565
12566 * tests/synclines.at: Be sure to prototype yylex and yyerror to
12567 avoid GCC warnings.
12568
12569 2002-05-07 Akim Demaille <akim@epita.fr>
12570
12571 Kill GCC warnings.
12572
12573 * src/reduce.c (nonterminals_reduce): Don't loop over RITEM: loop
12574 over the RHS of each rule.
12575 * src/gram.h, src/gram.c (nritems): Is `unsigned int', not int.
12576 * src/state.h (state_t): Member `nitems' is unsigned short.
12577 * src/LR0.c (get_state): Adjust.
12578 * src/reader.c (packgram): Likewise.
12579 * src/output.c (GENERATE_MUSCLE_INSERT_TABLE): `max' is of type
12580 `Type'.
12581 (muscle_insert_int_table): Remove, unused.
12582 (prepare_rules): Remove `max'.
12583
12584 2002-05-06 Akim Demaille <akim@epita.fr>
12585
12586 * src/closure.c (print_firsts): Display of the symbol tags.
12587 (bitmatrix_print): Move to...
12588 * lib/bitsetv-print.h, lib/bitsetv-print.c (bitsetv_matrix_dump):
12589 here.
12590 * tests/sets.at (Nullable, Broken Closure, Firsts): Adjust.
12591
12592 2002-05-06 Akim Demaille <akim@epita.fr>
12593
12594 * src/muscle_tab.c (muscle_m4_output): Must return TRUE for
12595 hash_do_for_each.
12596
12597 2002-05-06 Akim Demaille <akim@epita.fr>
12598
12599 * src/LR0.c (new_state, get_state): Instead of using the global
12600 `kernel_size' and `kernel_base', have two new arguments:
12601 `core_size' and `core'.
12602 Adjust callers.
12603
12604 2002-05-06 Akim Demaille <akim@epita.fr>
12605
12606 * src/reader.c (packgram): No longer end `ritem' with a 0
12607 sentinel: it is not used.
12608
12609 2002-05-05 Akim Demaille <akim@epita.fr>
12610
12611 New experimental feature: display the lookaheads in the report and
12612 graph.
12613
12614 * src/print (print_core): When --trace-flag, display the rules
12615 lookaheads.
12616 * src/print_graph.c (print_core): Likewise.
12617 Swap the arguments.
12618 Adjust caller.
12619
12620 2002-05-05 Akim Demaille <akim@epita.fr>
12621
12622 * tests/torture.at (Many lookaheads): New test.
12623
12624 2002-05-05 Akim Demaille <akim@epita.fr>
12625
12626 * src/output.c (GENERATE_OUTPUT_TABLE): Replace with...
12627 (GENERATE_MUSCLE_INSERT_TABLE): this.
12628 (output_int_table, output_unsigned_int_table, output_short_table)
12629 (output_token_number_table, output_item_number_table): Replace with...
12630 (muscle_insert_int_table, muscle_insert_unsigned_int_table)
12631 (muscle_insert_short_table, muscle_insert_token_number_table)
12632 (muscle_insert_item_number_table): these.
12633 Adjust all callers.
12634 (prepare_tokens): Don't free `translations', since...
12635 * src/reader.h, src/reader.c (grammar_free): do it.
12636 Move to...
12637 * src/gram.h, src/gram.c (grammar_free): here.
12638 * data/bison.simple, data/bison.c++: b4_token_number_max is now
12639 b4_translate_max.
12640
12641 2002-05-05 Akim Demaille <akim@epita.fr>
12642
12643 * src/output.c (output_unsigned_int_table): New.
12644 (prepare_rules): `i' is unsigned.
12645 `prhs', `rline', `r2' are unsigned int.
12646 Rename muscle `rhs_number_max' as `rhs_max'.
12647 Output muscles `prhs_max', `rline_max', and `r2_max'.
12648 Free rline and r1.
12649 * data/bison.simple, data/bison.c++: Adjust to use these muscles
12650 to compute types instead of constant types.
12651 * tests/regression.at (Web2c Actions): Adjust.
12652
12653 2002-05-04 Akim Demaille <akim@epita.fr>
12654
12655 * src/symtab.h (SALIAS, SUNDEF): Rename as...
12656 (USER_NUMBER_ALIAS, USER_NUMBER_UNDEFINED): these.
12657 Adjust dependencies.
12658 * src/output.c (token_definitions_output): Be sure not to output a
12659 `#define 'a'' when fed with `%token 'a' "a"'.
12660 * tests/regression.at (Token definitions): New.
12661
12662 2002-05-03 Paul Eggert <eggert@twinsun.com>
12663
12664 * data/bison.simple (b4_token_defines): Also define YYTOKENTYPE
12665 for K&R C.
12666
12667 2002-05-03 gettextize <bug-gnu-gettext@gnu.org>
12668
12669 * Makefile.am (SUBDIRS): Remove intl.
12670 (EXTRA_DIST): Add config/config.rpath.
12671
12672 2002-05-03 Akim Demaille <akim@epita.fr>
12673
12674 * data/bison.simple (m4_if): Don't output empty enums.
12675 And actually, output valid enum definitions :(.
12676
12677 2002-05-03 Akim Demaille <akim@epita.fr>
12678
12679 * configure.bat: Remove, completely obsolete.
12680 * Makefile.am (EXTRA_DIST): Adjust.
12681 Don't distribute config.rpath...
12682 * config/Makefile.am (EXTRA_DIST): Do it.
12683
12684 2002-05-03 Akim Demaille <akim@epita.fr>
12685
12686 * configure.in (GETTEXT_VERSION): New.
12687 Suggested by Bruno Haible for the forthcoming Gettext 0.10.3.
12688
12689 2002-05-03 Akim Demaille <akim@epita.fr>
12690
12691 * data/bison.simple (b4_token_enum): New.
12692 (b4_token_defines): Use it to output tokens both as #define and
12693 enums.
12694 Suggested by Paul Eggert.
12695 * src/output.c (token_definitions_output): Don't output spurious
12696 white spaces.
12697
12698 2002-05-03 Akim Demaille <akim@epita.fr>
12699
12700 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
12701
12702 2002-05-02 Robert Anisko <robert@lrde.epita.fr>
12703
12704 * data/bison.c++: Adapt expansion of $s and @s to the C++ parser.
12705 Update the stack class, give a try to deque as the default container.
12706
12707 2002-05-02 Akim Demaille <akim@epita.fr>
12708
12709 * data/bison.simple (yyparse): Do not implement @$ = @1.
12710 (YYLLOC_DEFAULT): Adjust to do it.
12711 * doc/bison.texinfo (Location Default Action): Fix.
12712
12713 2002-05-02 Akim Demaille <akim@epita.fr>
12714
12715 * src/reader.c (parse_braces): Merge into...
12716 (parse_action): this.
12717
12718 2002-05-02 Akim Demaille <akim@epita.fr>
12719
12720 * configure.in (ALL_LINGUAS): Remove.
12721 * po/LINGUAS, hr.po: New.
12722
12723 2002-05-02 Akim Demaille <akim@epita.fr>
12724
12725 Remove the so called hairy (semantic) parsers.
12726
12727 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove.
12728 * src/gram.h, src/gram.c (semantic_parser): Remove.
12729 (rule_t): Remove the guard and guard_line members.
12730 * src/lex.h (token_t): remove tok_guard.
12731 * src/options.c (option_table): Remove %guard and %semantic_parser
12732 support.
12733 * src/output.c, src/output.h (guards_output): Remove.
12734 (prepare): Adjust.
12735 (token_definitions_output): Don't output the `T'
12736 tokens (???).
12737 (output_skeleton): Don't output the guards.
12738 * src/files.c, src/files.c (attrsfile): Remove.
12739 * src/reader.c (symbol_list): Remove the guard and guard_line
12740 members.
12741 Adjust dependencies.
12742 (parse_guard): Remove.
12743 * data/bison.hairy: Remove.
12744 * doc/bison.texinfo (Environment Variables): Remove occurrences of
12745 BISON_HAIRY.
12746
12747 2002-05-02 Akim Demaille <akim@epita.fr>
12748
12749 * src/reader.c (copy_at, copy_dollarm parse_braces, parse_action)
12750 (parse_guard): Rename the formal argument `stack_offset' as
12751 `rule_length', which is more readable.
12752 Adjust callers.
12753 (copy_at, copy_dollar): Instead of outputting the hard coded
12754 values of $$, $n and so forth, output invocation to b4_lhs_value,
12755 b4_lhs_location, b4_rhs_value, and b4_rhs_location.
12756 Note: this patch partially drops `semantic-parser' support: it
12757 always does `rule_length - n', where semantic parsers ought to
12758 always use `-n'.
12759 * data/bison.simple, data/bison.c++ (b4_lhs_value)
12760 (b4_lhs_location, b4_rhs_value, and b4_rhs_location: New.
12761
12762 2002-05-02 Akim Demaille <akim@epita.fr>
12763
12764 * configure.in (AC_INIT): Bump to 1.49b.
12765 (AM_INIT_AUTOMAKE): Short invocation.
12766
12767 2002-05-02 Akim Demaille <akim@epita.fr>
12768
12769 Version 1.49a.
12770
12771 2002-05-01 Akim Demaille <akim@epita.fr>
12772
12773 * src/skeleton.h: Remove.
12774
12775 2002-05-01 Akim Demaille <akim@epita.fr>
12776
12777 * src/skeleton.h: Fix the #endif.
12778 Reported by Magnus Fromreide.
12779
12780 2002-04-26 Paul Eggert <eggert@twinsun.com>
12781
12782 * data/bison.simple (YYSTYPE_IS_TRIVIAL, YYLTYPE_IS_TRIVIAL):
12783 Define if we define YYSTYPE and YYLTYPE, respectively.
12784 (YYCOPY): Fix [] quoting problem in the non-GCC case.
12785
12786 2002-04-25 Robert Anisko <robert@lrde.epita.fr>
12787
12788 * src/scan-skel.l: Postprocess quadrigraphs.
12789
12790 * src/reader.c (copy_character): New function, used to output
12791 single characters while replacing `[' and `]' with quadrigraphs, to
12792 avoid troubles with M4 quotes.
12793 (copy_comment): Output characters with copy_character.
12794 (read_additionnal_code): Likewise.
12795 (copy_string2): Likewise.
12796 (copy_definition): Likewise.
12797
12798 * tests/calc.at: Exercise M4 quoting.
12799
12800 2002-04-25 Akim Demaille <akim@epita.fr>
12801
12802 * tests/sets.at (AT_EXTRACT_SETS): Sed portability issue: no space
12803 between `!' and the command.
12804 Reported by Paul Eggert.
12805
12806 2002-04-24 Robert Anisko <robert@lrde.epita.fr>
12807
12808 * tests/calc.at: Exercise prologue splitting.
12809
12810 * data/bison.simple, data/bison.c++: Use `b4_pre_prologue' and
12811 `b4_post_prologue' instead of `b4_prologue'.
12812
12813 * src/output.c (prepare): Add the `pre_prologue' and `post_prologue'
12814 muscles.
12815 (output): Free pre_prologue_obstack and post_prologue_obstack.
12816 * src/files.h, src/files.c (attrs_obstack): Remove.
12817 (pre_prologue_obstack, post_prologue_obstack): New.
12818 * src/reader.c (copy_definition): Add a parameter to specify the
12819 obstack to fill, instead of using attrs_obstack unconditionally.
12820 (read_declarations): Pass pre_prologue_obstack to copy_definition if
12821 `%union' has not yet been seen, pass post_prologue_obstack otherwise.
12822
12823 2002-04-23 Paul Eggert <eggert@twinsun.com>
12824
12825 * data/bison.simple: Remove unnecessary commentary and white
12826 space differences from 1_29-branch.
12827 Depend on YYERROR_VERBOSE, not defined (YYERROR_VERBOSE).
12828
12829 (union yyalloc, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYCOPY,
12830 YYSTACK_RELOCATE): Do not define if yyoverflow is defined, or
12831 if this is a C++ parser and YYSTYPE or YYLTYPE has nontrivial
12832 constructors or destructors.
12833
12834 (yyparse) [! defined YYSTACK_RELOCATE]: Do not relocate the stack.
12835
12836 2002-04-23 Akim Demaille <akim@epita.fr>
12837
12838 * tests/sets.at (AT_EXTRACT_SETS): Don't use 8 char long sed labels.
12839 * tests/synclines.at (AT_TEST_SYNCLINE): Be robust to GCC's
12840 location with columns.
12841 * tests/conflicts.at (%nonassoc and eof): Don't use `error.h'.
12842 All reported by Paul Eggert.
12843
12844 2002-04-22 Akim Demaille <akim@epita.fr>
12845
12846 * src/reduce.c (dump_grammar): Move to...
12847 * src/gram.h, src/gram.c (grammar_dump): here.
12848 Be sure to separate long item numbers.
12849 Don't read the members of a rule's prec if its nil.
12850
12851 2002-04-22 Akim Demaille <akim@epita.fr>
12852
12853 * src/output.c (table_size, table_grow): New.
12854 (MAXTABLE): Remove, replace uses with table_size.
12855 (pack_vector): Instead of dying when the table is too big, grow it.
12856
12857 2002-04-22 Akim Demaille <akim@epita.fr>
12858
12859 * data/bison.simple (yyr1): Its type is that of a token number.
12860 * data/bison.c++ (r1_): Likewise.
12861 * tests/regression.at (Web2c Actions): Adjust.
12862
12863 2002-04-22 Akim Demaille <akim@epita.fr>
12864
12865 * src/reader.c (token_translations_init): 256 is now the default
12866 value for the error token, i.e., it will be assigned another
12867 number if the user assigned 256 to one of her tokens.
12868 (reader): Don't force 256 to error.
12869 * doc/bison.texinfo (Symbols): Adjust.
12870 * tests/torture.at (AT_DATA_HORIZONTAL_GRAMMAR)
12871 (AT_DATA_TRIANGULAR_GRAMMAR): Number the tokens as 1, 2, 3
12872 etc. instead of 10, 20, 30 (which was used to `jump' over error
12873 (256) and undefined (2)).
12874
12875 2002-04-22 Akim Demaille <akim@epita.fr>
12876
12877 Propagate more token_number_t.
12878
12879 * src/gram.h (token_number_as_item_number)
12880 (item_number_as_token_number): New.
12881 * src/output.c (GENERATE_OUTPUT_TABLE): New.
12882 Use it to create output_item_number_table and
12883 output_token_number_table.
12884 * src/LR0.c, src/derives.c, src/gram.c, src/gram.h, src/lalr.c,
12885 * src/lex.c, src/nullable.c, src/output.c, src/print.c,
12886 * src/print_graph.c, src/reader.c, src/reduce.c, src/state.h,
12887 * src/symtab.c, src/symtab.h: Use token_number_t instead of shorts.
12888
12889 2002-04-22 Akim Demaille <akim@epita.fr>
12890
12891 * src/output.h, src/output.c (get_lines_number): Remove.
12892
12893 2002-04-19 Akim Demaille <akim@epita.fr>
12894
12895 * doc/bison.texinfo (Actions): Make clear that `|' is not the same
12896 as Lex/Flex'.
12897 (Debugging): More details about enabling the debugging features.
12898 (Table of Symbols): Describe $$, $n, @$, and @n.
12899 Suggested by Tim Josling.
12900
12901 2002-04-19 Akim Demaille <akim@epita.fr>
12902
12903 * doc/bison.texinfo: Remove the uses of the obsolete @refill.
12904
12905 2002-04-10 Akim Demaille <akim@epita.fr>
12906
12907 * src/system.h: Rely on HAVE_LIMITS_H.
12908 Suggested by Paul Eggert.
12909
12910 2002-04-09 Akim Demaille <akim@epita.fr>
12911
12912 * tests/calc.at (_AT_CHECK_CALC_ERROR): Receive as argument the
12913 full stderr, and strip it according to the bison options, instead
12914 of composing the error message from different bits.
12915 This makes it easier to check for several error messages.
12916 Adjust all the invocations.
12917 Add an invocation exercising the error token.
12918 Add an invocation demonstrating a stupid error message.
12919 (_AT_DATA_CALC_Y): Follow the GCS: initial column is 1, not 0.
12920 Adjust the tests.
12921 Error message are for stderr, not stdout.
12922
12923 2002-04-09 Akim Demaille <akim@epita.fr>
12924
12925 * src/gram.h, src/gram.c (error_token_number): Remove, use
12926 errtoken->number.
12927 * src/reader.c (reader): Don't specify the user token number (2)
12928 for $undefined, as it uselessly prevents using it.
12929 * src/gram.h (token_number_t): Move to...
12930 * src/symtab.h: here.
12931 (state_t.number): Is a token_number_t.
12932 * src/print.c, src/reader.c: Use undeftoken->number instead of
12933 hard coded 2.
12934 (Even though this 2 is not the same as above: the number of the
12935 undeftoken remains being 2, it is its user token number which
12936 might not be 2).
12937 * src/output.c (prepare_tokens): Rename the `maxtok' muscle with
12938 `user_token_number_max'.
12939 Output `undef_token_number'.
12940 * data/bison.simple, data/bison.c++: Use them.
12941 Be sure to map invalid yylex return values to
12942 `undef_token_number'. This saves us from gratuitous SEGV.
12943
12944 * tests/conflicts.at (Solved SR Conflicts)
12945 (Unresolved SR Conflicts): Adjust.
12946 * tests/regression.at (Web2c Actions): Adjust.
12947
12948 2002-04-08 Akim Demaille <akim@epita.fr>
12949
12950 * data/bison.c++: s/b4_item_number_max/b4_rhs_number_max/.
12951 Adding #line.
12952 Remove the duplicate `typedefs'.
12953 (RhsNumberType): Fix the declaration and various other typos.
12954 Use __ofile__.
12955 * data/bison.simple: Use __ofile__.
12956 * src/scan-skel.l: Handle __ofile__.
12957
12958 2002-04-08 Akim Demaille <akim@epita.fr>
12959
12960 * src/gram.h (item_number_t): New, the type of item numbers in
12961 RITEM. Note that it must be able to code symbol numbers as
12962 positive number, and the negation of rule numbers as negative
12963 numbers.
12964 Adjust all dependencies (pretty many).
12965 * src/reduce.c (rule): Remove this `short *' pointer: use
12966 item_number_t.
12967 * src/system.h (MINSHORT, MAXSHORT): Remove.
12968 Include `limits.h'.
12969 Adjust dependencies to using SHRT_MAX and SHRT_MIN.
12970 (shortcpy): Remove.
12971 (MAXTABLE): Move to...
12972 * src/output.c (MAXTABLE): here.
12973 (prepare_rules): Use output_int_table to output rhs.
12974 * data/bison.simple, data/bison.c++: Adjust.
12975 * tests/torture.at (Big triangle): Move the limit from 254 to
12976 500.
12977 * tests/regression.at (Web2c Actions): Ajust.
12978
12979 Trying with bigger grammars shows various phenomena: at 3000 (28Mb
12980 of grammar file) bison is killed by my system, at 2000 (12Mb) bison
12981 passes, but produces negative #line number, once fixed, GCC is
12982 killed while compiling 14Mb, at 1500 (6.7 Mb of grammar, 8.2Mb of
12983 C), it passes.
12984 * src/state.h (state_h): Code input lines on ints, not shorts.
12985
12986 2002-04-08 Akim Demaille <akim@epita.fr>
12987
12988 * src/reduce.c (reduce_grammar): First reduce the nonterminals,
12989 and then the grammar.
12990
12991 2002-04-08 Akim Demaille <akim@epita.fr>
12992
12993 * src/system.h: No longer using strndup.
12994
12995 2002-04-07 Akim Demaille <akim@epita.fr>
12996
12997 * src/muscle_tab.h (MUSCLE_INSERT_LONG_INT): New.
12998 * src/output.c (output_table_data): Return the longest number.
12999 (prepare_tokens): Output `token_number_max').
13000 * data/bison.simple, data/bison.c++ (b4_sint_type, b4_uint_type):
13001 New.
13002 Use them to define yy_token_number_type/TokenNumberType.
13003 Use this type for yytranslate.
13004 * tests/torture.at (Big triangle): Push the limit from 124 to
13005 253.
13006 * tests/regression.at (Web2c Actions): Adjust.
13007
13008 2002-04-07 Akim Demaille <akim@epita.fr>
13009
13010 * tests/torture.at (Big triangle): New.
13011 (GNU AWK Grammar, GNU Cim Grammar): Move to...
13012 * tests/existing.at: here.
13013
13014 2002-04-07 Akim Demaille <akim@epita.fr>
13015
13016 * src/gram.h, src/gram.c (nitems): Remove, it is an alias of
13017 nritems.
13018 Adjust dependencies.
13019
13020 2002-04-07 Akim Demaille <akim@epita.fr>
13021
13022 * src/reader.c: Normalize increments to prefix form.
13023
13024 2002-04-07 Akim Demaille <akim@epita.fr>
13025
13026 * src/reader.c, symtab.c: Remove debugging code.
13027
13028 2002-04-07 Akim Demaille <akim@epita.fr>
13029
13030 Rename all the `bucket's as `symbol_t'.
13031
13032 * src/gram.c, src/gram.h, src/lex.c, src/lex.h, src/output.c,
13033 * src/reader.c, src/reader.h, src/reduce.c, src/state.h,
13034 * src/symtab.c, src/symtab.h (bucket): Rename as...
13035 (symbol_t): this.
13036 (symbol_list_new, bucket_check_defined, bucket_make_alias)
13037 (bucket_check_alias_consistence, bucket_pack, bucket_translation)
13038 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
13039 (buckets_new, buckets_free, buckets_do): Rename as...
13040 (symbol_list_new, symbol_check_defined, symbol_make_alias)
13041 (symbol_check_alias_consistence, symbol_pack, symbol_translation)
13042 (symbol_new, symbol_free, hash_compare_symbol_t, hash_symbol_t)
13043 (symbols_new, symbols_free, symbols_do): these.
13044
13045 2002-04-07 Akim Demaille <akim@epita.fr>
13046
13047 Use lib/hash for the symbol table.
13048
13049 * src/gram.c (ntokens): Initialize to 1, to reserve a slot for
13050 EOF.
13051 * src/lex.c (lex): Set the `number' member of new terminals.
13052 * src/reader.c (bucket_check_defined, bucket_make_alias)
13053 (bucket_check_alias_consistence, bucket_translation): New.
13054 (reader, grammar_free, readgram, token_translations_init)
13055 (packsymbols): Adjust.
13056 (reader): Number the predefined tokens.
13057 * src/reduce.c (inaccessable_symbols): Just use hard coded numbers
13058 for predefined tokens.
13059 * src/symtab.h (bucket): Remove all the hash table related
13060 members.
13061 * src/symtab.c (symtab): Replace by...
13062 (bucket_table): this.
13063 (bucket_new, bucket_free, hash_compare_bucket, hash_bucket)
13064 (buckets_new, buckets_do): New.
13065
13066 2002-04-07 Akim Demaille <akim@epita.fr>
13067
13068 * src/gram.c (nitems, nrules, nsyms, ntokens, nvars, nritems)
13069 (start_symbol, max_user_token_number, semantic_parser)
13070 (error_token_number): Initialize.
13071 * src/reader.c (grammar, start_flag, startval, typed, lastprec):
13072 Initialize.
13073 (reader): Don't.
13074 (errtoken, eoftoken, undeftoken, axiom): Extern.
13075
13076 2002-04-07 Akim Demaille <akim@epita.fr>
13077
13078 * src/gram.h (rule_s): prec and precsym are now pointers
13079 to the bucket giving the priority/associativity.
13080 Member `associativity' removed: useless.
13081 * src/reduce.c, src/conflicts.c: Adjust.
13082
13083 2002-04-07 Akim Demaille <akim@epita.fr>
13084
13085 * src/lalr.c, src/LR0.c, src/closure.c, src/gram.c, src/reduce.c:
13086 Properly escape the symbols' TAG when outputting them.
13087
13088 2002-04-07 Akim Demaille <akim@epita.fr>
13089
13090 * src/lalr.h (LA): Is a bitsetv, not bitset*.
13091
13092 2002-04-07 Akim Demaille <akim@epita.fr>
13093
13094 * src/lalr.h, src/lalr.c (LAruleno): Replace with...
13095 (LArule): this, which is an array to rule_t*.
13096 * src/print.c, src/conflicts.c: Adjust.
13097
13098 2002-04-07 Akim Demaille <akim@epita.fr>
13099
13100 * src/gram.h (rule_t): Rename `number' as `user_number'.
13101 `number' is a new member.
13102 Adjust dependencies.
13103 * src/reduce.c (reduce_grammar_tables): Renumber rule_t.number.
13104
13105 2002-04-07 Akim Demaille <akim@epita.fr>
13106
13107 As a result of the previous patch, it is no longer needed
13108 to reorder ritem itself.
13109
13110 * src/reduce.c (reduce_grammar_tables): Don't sort RITEM.
13111
13112 2002-04-07 Akim Demaille <akim@epita.fr>
13113
13114 Be sure never to walk through RITEMS, but use only data related to
13115 the rules themselves. RITEMS should be banished.
13116
13117 * src/output.c (output_token_translations): Rename as...
13118 (prepare_tokens): this.
13119 In addition to `translate', prepare the muscles `tname' and
13120 `toknum', which were handled by...
13121 (output_rule_data): this.
13122 Remove, and move the remainder of its outputs into...
13123 (prepare_rules): this new routines, which also merges content from
13124 (output_gram): this.
13125 (prepare_rules): Be sure never to walk through RITEMS.
13126 (output_stos): Rename as...
13127 (prepare_stos): this.
13128 (output): Always invoke prepare_states, after all, just don't use it
13129 in the output if you don't need it.
13130
13131 2002-04-07 Akim Demaille <akim@epita.fr>
13132
13133 * src/LR0.c (new_state): Display `nstates' as the name of the
13134 newly created state.
13135 Adjust to initialize first_state and last_state if needed.
13136 Be sure to distinguish the initial from the final state.
13137 (new_states): Create the itemset of the initial state, and use
13138 new_state.
13139 * src/closure.c (closure): Now that the initial state has its
13140 items properly set, there is no need for a special case when
13141 creating `ruleset'.
13142
13143 As a result, now the rule 0, reducing to $axiom, is visible in the
13144 outputs. Adjust the test suite.
13145
13146 * tests/conflicts.at (Solved SR Conflicts)
13147 (Unresolved SR Conflicts): Adjust.
13148 * tests/regression.at (Web2c Report, Rule Line Numbers): Idem.
13149 * tests/conflicts.at (S/R in initial): New.
13150
13151 2002-04-07 Akim Demaille <akim@epita.fr>
13152
13153 * src/LR0.c (allocate_itemsets): Don't loop over ritem: loop over
13154 the RHS of the rules.
13155 * src/output.c (output_gram): Likewise.
13156
13157 2002-04-07 Akim Demaille <akim@epita.fr>
13158
13159 * src/gram.h (rule_t): `lhs' is now a pointer to the symbol's
13160 bucket.
13161 Adjust all dependencies.
13162 * src/reduce.c (nonterminals_reduce): Don't forget to renumber the
13163 `number' of the buckets too.
13164 * src/gram.h: Include `symtab.h'.
13165 (associativity): Move to...
13166 * src/symtab.h: here.
13167 No longer include `gram.h'.
13168
13169 2002-04-07 Akim Demaille <akim@epita.fr>
13170
13171 * src/gram.h, src/gram.c (rules_rhs_length): New.
13172 (ritem_longest_rhs): Use it.
13173 * src/gram.h (rule_t): `number' is a new member.
13174 * src/reader.c (packgram): Set it.
13175 * src/reduce.c (reduce_grammar_tables): Move the useless rules at
13176 the end of `rules', and count them out of `nrules'.
13177 (reduce_output, dump_grammar): Adjust.
13178 * src/print.c (print_grammar): It is no longer needed to check for
13179 the usefulness of a rule, as useless rules are beyond `nrules + 1'.
13180 * tests/reduce.at (Reduced Automaton): New test.
13181
13182 2002-04-07 Akim Demaille <akim@epita.fr>
13183
13184 * src/reduce.c (inaccessable_symbols): Fix a buglet: because of a
13185 lacking `+ 1' to nrules, Bison reported as useless a token if it
13186 was used solely to set the precedence of the last rule...
13187
13188 2002-04-07 Akim Demaille <akim@epita.fr>
13189
13190 * data/bison.c++, data/bison.simple: Don't output the current file
13191 name in #line, to avoid useless diffs between two identical
13192 outputs under different names.
13193
13194 2002-04-07 Akim Demaille <akim@epita.fr>
13195
13196 * src/closure.c, src/print.c, src/reader.c, src/reduce.c:
13197 Normalize loops to using `< nrules + 1', not `<= nrules'.
13198
13199 2002-04-07 Akim Demaille <akim@epita.fr>
13200
13201 * TODO: Update.
13202
13203 2002-04-07 Akim Demaille <akim@epita.fr>
13204
13205 * src/output.c, src/reader.c, src/symtab.c, src/symtab.h: Rename
13206 bucket.value as bucket.number.
13207
13208 2002-04-07 Akim Demaille <akim@epita.fr>
13209
13210 * src/closure.c, src/derives.c, src/gram.h, src/lalr.c,
13211 * src/nullable.c, src/output.c, src/print.c, src/print_graph.c,
13212 * src/reader.c, src/reduce.c: Let rule_t.rhs point directly to the
13213 RHS, instead of being an index in RITEMS.
13214
13215 2002-04-04 Paul Eggert <eggert@twinsun.com>
13216
13217 * doc/bison.texinfo: Update copyright date.
13218 (Rpcalc Lexer, Symbols, Token Decl): Don't assume ASCII.
13219 (Symbols): Warn about running Bison in one character set,
13220 but compiling and/or running in an incompatible one.
13221 Warn about character code 256, too.
13222
13223 2002-04-03 Paul Eggert <eggert@twinsun.com>
13224
13225 * src/bison.data (YYSTACK_ALLOC): Depend on whether
13226 YYERROR_VERBOSE is nonzero, not whether it is defined.
13227
13228 Merge changes from bison-1_29-branch.
13229
13230 2002-03-20 Paul Eggert <eggert@twinsun.com>
13231
13232 Merge fixes from Debian bison_1.34-1.diff.
13233
13234 * configure.in (AC_PREREQ): 2.53.
13235
13236 2002-03-20 Akim Demaille <akim@epita.fr>
13237
13238 * src/conflicts.c (log_resolution): Argument `resolution' is const.
13239
13240 2002-03-19 Paul Eggert <eggert@twinsun.com>
13241
13242 * src/bison.simple (YYCOPY): New macro.
13243 (YYSTACK_RELOCATE): Use it.
13244 Remove Type arg; no longer needed. All callers changed.
13245 (yymemcpy): Remove; no longer needed.
13246
13247 * Makefile.am (AUTOMAKE_OPTIONS): 1.6.
13248 * doc/Makefile.am (AUTOMAKE_OPTIONS): Remove.
13249
13250 2002-03-19 Akim Demaille <akim@epita.fr>
13251
13252 Test and fix the #line outputs.
13253
13254 * tests/atlocal.at (GCC): New.
13255 * tests/synclines.at (AT_TEST_SYNCLINE): New macro.
13256 (Prologue synch line, %union synch line, Postprologue synch line)
13257 (Action synch line, Epilogue synch line): New tests.
13258 * src/reader.c (parse_union_decl): Define the muscle stype_line.
13259 * data/bison.simple, data/bison.c++: Use it.
13260
13261 2002-03-19 Akim Demaille <akim@epita.fr>
13262
13263 * tests/regression.at (%nonassoc and eof, Unresolved SR Conflicts)
13264 (Solved SR Conflicts, %expect not enough, %expect right)
13265 (%expect too much): Move to...
13266 * tests/conflicts.at: this new file.
13267
13268 2002-03-19 Akim Demaille <akim@epita.fr>
13269
13270 * data/m4sugar/m4sugar.m4: Update from CVS Autoconf.
13271 * data/bison.simple, data/bison.c++: Handle the `#define' part, so
13272 that we can move to enums for instance.
13273 * src/output.c (token_definitions_output): Output a list of
13274 `token-name, token-number' instead of the #define.
13275 (output_skeleton): Name this list `b4_tokens', not `b4_tokendefs'.
13276
13277 2002-03-14 Akim Demaille <akim@epita.fr>
13278
13279 Use Gettext 0.11.1.
13280
13281 2002-03-09 Robert Anisko <robert@lrde.epita.fr>
13282
13283 * data/bison.c++: Make the user able to add members to the generated
13284 parser by subclassing.
13285
13286 2002-03-05 Robert Anisko <robert@lrde.epita.fr>
13287
13288 * src/reader.c (read_additionnal_code): `c' should be an integer, not
13289 a character.
13290 Reported by Nicolas Tisserand and Nicolas Burrus.
13291
13292 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
13293
13294 * src/reader.c: Warn about lacking semi-colons, do not complain.
13295
13296 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
13297
13298 * data/bison.c++: Remove a debug line.
13299
13300 2002-03-04 Robert Anisko <robert@lrde.epita.fr>
13301
13302 * data/bison.c++: Unmerge value as yylval and value as yyval. Unmerge
13303 location as yylloc and location as yyloc. Use YYLLOC_DEFAULT, and
13304 provide a default implementation.
13305
13306 2002-03-04 Akim Demaille <akim@epita.fr>
13307
13308 * tests/input.at (Invalid $n, Invalid @n): Add the ending `;'.
13309 * tests/output.at (AT_CHECK_OUTPUT): Likewise.
13310 * tests/headers.at (AT_TEST_CPP_GUARD_H): Ditto.
13311 * tests/semantic.at (Parsing Guards): Similarly.
13312 * src/reader.at (readgram): Complain if the last rule is not ended
13313 with a semi-colon.
13314
13315 2002-03-04 Akim Demaille <akim@epita.fr>
13316
13317 * src/warshall.h, src/warshall.c (bitmatrix_print): Move to...
13318 * src/closure.c: here.
13319 (set_firsts): Use bitsetv_reflexive_transitive_closure instead of
13320 RTC.
13321 * src/warshall.h, src/warshall.c: Remove.
13322 * tests/sets.at (Broken Closure): Adjust.
13323
13324 2002-03-04 Akim Demaille <akim@epita.fr>
13325
13326 * src/output.c (output_skeleton): tempdir is const.
13327 bytes_read is unused.
13328
13329 2002-03-04 Akim Demaille <akim@epita.fr>
13330
13331 * lib/bbitset.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
13332 * lib/bitsetv.h, lib/ebitset.c, lib/lbitset.c, lib/sbitset.c:
13333 Update.
13334 From Michael Hayes.
13335
13336 2002-03-04 Akim Demaille <akim@epita.fr>
13337
13338 * src/closure.c (closure): `r' is unused.
13339
13340 2002-03-04 Akim Demaille <akim@epita.fr>
13341
13342 * tests/sets.at (Broken Closure): Add the ending `;'.
13343 * src/reader.at (readgram): Complain if a rule is not ended with a
13344 semi-colon.
13345
13346 2002-03-04 Akim Demaille <akim@epita.fr>
13347
13348 * src/conflicts.c (set_conflicts): Use bitset_disjoint_p.
13349 (count_sr_conflicts): Use bitset_count.
13350 * src/reduce.c (inaccessable_symbols): Ditto.
13351 (bits_size): Remove.
13352 * src/warshall.h, src/warshall.c: Convert to bitsetv.
13353
13354 2002-03-04 Akim Demaille <akim@epita.fr>
13355
13356 * src/closure.c, src/conflicts.c, src/lalr.c, src/print.c,
13357 * src/reduce.c: Remove the `bitset_zero's following the
13358 `bitset_create's, as now it is performed by the latter.
13359
13360 2002-03-04 Akim Demaille <akim@epita.fr>
13361
13362 * lib/bitset.c, lib/bitset.h, lib/bitsetv.c, lib/bitsetv.h,
13363 * lib/ebitset.c, lib/ebitset.h, lib/lbitset.c, lib/lbitset.h,
13364 * lib/sbitset.c, lib/sbitset.h, lib/bbitset.h: Update from the
13365 latest sources from Michael.
13366
13367 2002-03-04 Akim Demaille <akim@epita.fr>
13368
13369 * src/output.c (output): Don't free the grammar.
13370 * src/reader.c (grammar_free): New.
13371 * src/main.c (main): Call it and don't free symtab here.
13372
13373 2002-03-04 Akim Demaille <akim@epita.fr>
13374
13375 * src/lex.c (parse_percent_token): Be sure to 0-end token_buffer
13376 before returning.
13377 Reported by Benoit Perrot.
13378
13379 2002-03-04 Akim Demaille <akim@epita.fr>
13380
13381 Use bitset operations when possible, not loops over bits.
13382
13383 * src/conflicts.c (set_conflicts, count_sr_conflicts): Use
13384 bitset_or.
13385 * src/print.c (print_reductions): Use bitset_and, bitset_andn.
13386 * src/reduce.c (useless_nonterminals): Formatting changes.
13387 * src/warshall.c (TC): Use bitset_or.
13388
13389 2002-03-04 Akim Demaille <akim@epita.fr>
13390
13391 * src/lalr.h, src/lalr.c (tokensetsize): Remove, unused.
13392 * src/system.h (BITS_PER_WORD, WORDSIZE, SETBIT, RESETBIT, BITISSET):
13393 Ditto.
13394
13395 2002-03-04 Akim Demaille <akim@epita.fr>
13396
13397 * src/lalr.c (F): Now a bitset*.
13398 Adjust all dependencies.
13399
13400 2002-03-04 Akim Demaille <akim@epita.fr>
13401
13402 * src/conflicts.c (shiftset, lookaheadset): Now bitset.
13403 Adjust all dependencies.
13404
13405 2002-03-04 Akim Demaille <akim@epita.fr>
13406
13407 * src/L0.c, src/LR0.h (nstates): Be size_t.
13408 Adjust comparisons (signed vs unsigned).
13409 * src/conflics.c, src/lalr.c, src/lalr.h, src/output.c (LA): Now a
13410 bitset*.
13411 Adjust all dependencies.
13412
13413 2002-03-04 Akim Demaille <akim@epita.fr>
13414
13415 * src/closure.c (firsts): Now, also a bitset.
13416 Adjust all dependencies.
13417 (varsetsize): Remove, now unused.
13418 * src/warshall.h, src/warshall.c: Now work on arrays of bitsets.
13419
13420 2002-03-04 Akim Demaille <akim@epita.fr>
13421
13422 * src/print.c: Convert to use bitset.h, not hand coded iterations
13423 over ints.
13424
13425 2002-03-04 Akim Demaille <akim@epita.fr>
13426
13427 * src/reduce.c: Convert to use bitset.h, not hand coded BSet.
13428
13429 2002-03-04 Akim Demaille <akim@epita.fr>
13430
13431 * src/closure.c (ruleset): Be a bitset.
13432 (rulesetsize): Remove.
13433
13434 2002-03-04 Akim Demaille <akim@epita.fr>
13435
13436 * lib/bitset-int.h, lib/bitset.c, lib/bitset.h, lib/bitsetv.c,
13437 * lib/bitsetv.h, lib/ebitset.c, lib/ebitset.h, lib/lbitset.c,
13438 * lib/lbitset.h, lib/sbitset.c, lib/sbitset.h: New.
13439 * src/closure.c (fderives): Be an array of bitsets.
13440
13441 2002-02-28 Robert Anisko <robert@lrde.epita.fr>
13442
13443 * data/bison.c++: Merge the two generated headers. Insert a copyright
13444 notice in each output file.
13445
13446 2002-02-28 Akim Demaille <akim@epita.fr>
13447
13448 * data/bison.c++: Copy the prologue of bison.simple to fetch
13449 useful M4 definitions, such as b4_header_guard.
13450
13451 2002-02-25 Akim Demaille <akim@epita.fr>
13452
13453 * src/getargs.c (version): Give the name of the authors, and use a
13454 translator friendly scheme for the bgr
13455 copyright notice.
13456
13457 2002-02-25 Akim Demaille <akim@epita.fr>
13458
13459 * src/output.c (header_output): Remove, now handled completely via
13460 M4.
13461
13462 2002-02-25 Akim Demaille <akim@epita.fr>
13463
13464 * m4/m4.m4: New, from CVS Autoconf.
13465 * configure.in: Invoke it.
13466 * src/output.c (output_skeleton): Use its result instead of the
13467 hard coded name.
13468
13469 2002-02-25 Akim Demaille <akim@epita.fr>
13470
13471 * lib/tempname.c, lib/mkstemp.c, m4/mkstemp.m4: New, stolen from
13472 Fileutils 4.1.5.
13473 * configure.in: Invoke UTILS_FUNC_MKSTEMP.
13474 * src/output.c (output_skeleton): Use mkstemp to create a real
13475 temporary file.
13476 Move the filling of `skeleton' and its muscle to...
13477 (prepare): here.
13478 (output): Move the definition of the prologue muscle to...
13479 (prepare): here.
13480 * src/system.h (DEFAULT_TMPDIR): New.
13481
13482 2002-02-14 Paul Eggert <eggert@twinsun.com>
13483
13484 Remove the support for C++ namespace cleanliness; it was
13485 causing more problems than it was curing, since it didn't work
13486 properly on some nonstandard C++ compilers. This can wait
13487 for a proper C++ parser.
13488
13489 * NEWS: Document this.
13490 * doc/bison.texinfo (Bison Parser, Debugging): Remove special mention
13491 of C++, as it's treated like C now.
13492 * src/bison.simple (YYSTD): Remove.
13493 (YYSIZE_T, YYFPRINTF, YYPARSE_PARAM_ARG, YYPARSE_PARAM_DECL):
13494 Treat C++ just like Standard C instead of trying to support
13495 namespace cleanliness.
13496
13497 2002-02-14 Akim Demaille <akim@epita.fr>
13498
13499 * tests/regression.at (else): Adjust to Andreas' change.
13500
13501 2002-02-14 Akim Demaille <akim@epita.fr>
13502
13503 * lib/Makefile.am (EXTRA_DIST): Ship strnlen.c.
13504
13505 2002-02-13 Andreas Schwab <schwab@suse.de>
13506
13507 * src/output.c (output_rule_data): Don't output NULL, it might
13508 not be defined yet.
13509
13510 2002-02-11 Robert Anisko <robert@lrde.epita.fr>
13511
13512 * data/bison.c++ (YYDEBUG, YYERROR_VERBOSE): After the prologue.
13513 (Copyright notice): Update.
13514
13515 2002-02-11 Akim Demaille <akim@epita.fr>
13516
13517 * tests/regression.at (%nonassoc and eof): Don't include
13518 nonportable headers.
13519
13520 2002-02-08 Robert Anisko <robert@lrde.epita.fr>
13521
13522 * data/bison.c++: Correct error recovery. Make the user able to
13523 initialize the starting location.
13524
13525 2002-02-07 Akim Demaille <akim@epita.fr>
13526
13527 * tests/input.at: New.
13528
13529 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13530
13531 * data/bison.c++: Replace some direct m4 expansions by constants. Be
13532 more consistent when naming methods and variables. Put preprocessor
13533 directives around tables only needed for debugging.
13534
13535 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13536
13537 * data/bison.c++ (yy::b4_name::print_): New method, replaces yyprint in
13538 C++ parsers.
13539 (yy::b4_name::parse): Use print_.
13540
13541 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13542
13543 * data/bison.c++ (yy::b4_name::parse): Error recovery is back.
13544
13545 2002-02-07 Robert Anisko <robert@lrde.epita.fr>
13546
13547 * data/bison.c++ (yy::b4_name::error_): New method, replaces yyerror in
13548 C++ parsers.
13549 (yy::b4_name::parse): Build verbose error messages, and use error_.
13550
13551 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
13552
13553 * data/bison.c++: Fix m4 quoting in comments.
13554
13555 2002-02-06 Robert Anisko <robert@lrde.epita.fr>
13556
13557 * data/bison.c++: Adjust the parser code. Fix some muscles that were
13558 not expanded by m4.
13559
13560 2002-02-05 Akim Demaille <akim@epita.fr>
13561
13562 * data/bison.c++: Adjust to the M4 back end.
13563 More is certainly needed.
13564
13565 2002-02-05 Akim Demaille <akim@epita.fr>
13566
13567 Give a try to M4 as a back end.
13568
13569 * lib/readpipe.c: New, from wdiff.
13570 * src/Makefile.am (DEFS): Define PKGDATADIR, not BISON_SIMPLE and
13571 BISON_HAIRY.
13572 * src/system.h (BISON_HAIRY, BISON_SIMPLE): Remove the DOS and VMS
13573 specific values. Now it is m4 that performs the lookup.
13574 * src/parse-skel.y: Remove.
13575 * src/muscle_tab.c, src/muscle_tab.h (muscles_m4_output): New.
13576 * src/output.c (actions_output, guards_output)
13577 (token_definitions_output): No longer keeps track of the output
13578 line number, hence remove the second argument.
13579 (guards_output): Check against the guard member of a rule, not the
13580 action member.
13581 Adjust callers.
13582 (output_skeleton): Don't look for the skeleton location, let m4 do
13583 that.
13584 Create `/tmp/muscles.m4'. This is temporary, a proper temporary
13585 file will be used.
13586 Invoke `m4' on m4sugar.m4, muscles.m4, and the skeleton.
13587 (prepare): Given that for the time being changesyntax is not
13588 usable in M4, rename the muscles using `-' to `_'.
13589 Define `defines_flag', `output_parser_name' and `output_header_name'.
13590 * src/output.h (actions_output, guards_output)
13591 (token_definitions_output): Adjust prototypes.
13592 * src/scan-skel.l: Instead of scanning the skeletons, it now
13593 processes the output of m4: `__oline__' and `#output'.
13594 * data/bison.simple: Adjust to be used by M4(sugar).
13595 * tests/Makefile.am: Use check_SCRIPTS to make sure `bison' is up
13596 to date.
13597 * tests/bison.in: Use the secrete envvar `BISON_PKGDATADIR'
13598 instead of the dead `BISON_SIMPLE' and `BISON_HAIRY'.
13599 * data/m4sugar/m4sugar.m4, data/m4sugar/version.m4: New,
13600 shamelessly stolen from CVS Autoconf.
13601
13602 2002-02-05 Akim Demaille <akim@epita.fr>
13603
13604 * lib/hash.c, lib/hash.h: Replace with Fileutils 4.1's version.
13605 * configure.in: Check for the declarations of free and malloc.
13606 * src/muscle_tab.c: Adjust.
13607
13608 2002-02-05 Akim Demaille <akim@epita.fr>
13609
13610 * src/muscle_tab.c (muscle_init): Don't default to NULL muscle
13611 which have no values.
13612
13613 2002-02-05 Akim Demaille <akim@epita.fr>
13614
13615 * src/bison.simple, src/bison.hairy, src/bison.c++: Move to...
13616 * data/: here.
13617
13618 2002-01-29 Paul Eggert <eggert@twinsun.com>
13619
13620 * src/bison.simple (YYSIZE_T): Do not define merely because
13621 YYSTACK_USE_ALLOCA is nonzero or alloca or _ALLOCA_H are defined.
13622 On some platforms, <alloca.h> does not declare YYSTD (size_t).
13623
13624 2002-01-27 Akim Demaille <akim@epita.fr>
13625
13626 Fix `%nonassoc and eof'.
13627
13628 * src/state.c (errs_dup): Aaaah! The failure was due to bytes
13629 which were not properly copied! Replace
13630 memcpy (res->errs, src->errs, src->nerrs);
13631 with
13632 memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
13633 !!!
13634 * tests/regression.at (%nonassoc and eof): Adjust to newest
13635 Autotest: `.' is not in the PATH.
13636
13637 2002-01-27 Akim Demaille <akim@epita.fr>
13638
13639 * tests/sets.at (AT_EXTRACT_SETS): New.
13640 (Nullable): Use it.
13641 (Firsts): New.
13642
13643 2002-01-26 Akim Demaille <akim@epita.fr>
13644
13645 * tests/actions.at, tests/calc.at, tests/headers.at,
13646 * tests/torture.at: Adjust to the newest Autotest which no longer
13647 forces `.' in the PATH.
13648
13649 2002-01-25 Akim Demaille <akim@epita.fr>
13650
13651 * tests/regression.at (%nonassoc and eof): New.
13652 Suggested by Robert Anisko.
13653
13654 2002-01-24 Akim Demaille <akim@epita.fr>
13655
13656 Bison dumps core when trying to complain about broken input files.
13657 Reported by Cris van Pelt.
13658
13659 * src/lex.c (parse_percent_token): Be sure to set token_buffer.
13660 * tests/regression.at (Invalid input: 1, Invalid input: 2): Merge
13661 into...
13662 (Invalid inputs): Strengthen: exercise parse_percent_token.
13663
13664 2002-01-24 Robert Anisko <robert.anisko@epita.fr>
13665
13666 * src/Makefile.am: Add bison.c++.
13667 * src/bison.c++: New skeleton.
13668
13669 2002-01-21 Paolo Bonzini <bonzini@gnu.org>
13670
13671 * po/it.po: New.
13672
13673 2002-01-21 Kees Zeelenberg <kzlg@users.sourceforge.net>
13674
13675 * src/files.c (skeleton_find) [MSDOS]: Fix cp definition.
13676
13677 2002-01-20 Marc Autret <marc@gnu.org>
13678
13679 * src/files.c (compute_output_file_names): Fix
13680
13681 2002-01-20 Marc Autret <marc@gnu.org>
13682
13683 * tests/output.at: New test.
13684 * src/files.c (compute_base_names): Don't map extensions when
13685 the YACC flag is set, use defaults.
13686 Reported by Evgeny Stambulchik.
13687
13688 2002-01-20 Marc Autret <marc@gnu.org>
13689
13690 * src/system.h: Need to define __attribute__ away for non-GCC
13691 compilers as well (i.e., the vendor C compiler).
13692 Suggested by Albert Chin-A-Young.
13693
13694 2002-01-11 Tim Van Holder <tim.van.holder@pandora.be>
13695
13696 * lib/hash.h, lib/hash.c: Renamed __P to PARAMS and used the
13697 canonical definition.
13698 * src/system.h: Use the canonical definition for PARAMS (avoids
13699 a conflict with the macro from lib/hash.h).
13700
13701 2002-01-11 Akim Demaille <akim@epita.fr>
13702
13703 * configure.in: Use AC_FUNC_STRNLEN.
13704 Fixes the failures observed on AIX 4.3 by H.Merijn Brand.
13705
13706 2002-01-09 Akim Demaille <akim@epita.fr>
13707
13708 * src/files.c, src/files.h (output_infix): New.
13709 (tab_extension): Remove.
13710 (compute_base_names): Compute the former, drop the latter.
13711 * src/output.c (prepare): Insert the muscles `output-infix', and
13712 `output-suffix'.
13713 * src/parse-skel.y (string, string.1): New.
13714 (section.header): Use it.
13715 (section.yacc): Remove.
13716 (prefix): Remove too.
13717 * src/scan-skel.l: Adjust.
13718 * src/bison.simple, src/bison.hairy: Adjust.
13719
13720 2002-01-09 Akim Demaille <akim@epita.fr>
13721
13722 * configure.in (WERROR_CFLAGS): Compute it.
13723 * src/Makefile.am (CFLAGS): Pass it.
13724 * tests/atlocal.in (CFLAGS): Idem.
13725 * src/files.c: Fix a few warnings.
13726 (get_extension_index): Remove, unused.
13727
13728 2002-01-08 Akim Demaille <akim@epita.fr>
13729
13730 * src/getargs.c (AS_FILE_NAME): New.
13731 (getargs): Use it to convert DOSish file names.
13732 * src/files.c (base_name): Rename as full_base_name to avoid
13733 clashes with `base_name ()'.
13734 (filename_split): New.
13735 (compute_base_names): N-th rewrite, using filename_split.
13736
13737 2002-01-08 Akim Demaille <akim@epita.fr>
13738
13739 * lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c:
13740 New, stolen from the Fileutils 4.1.
13741 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
13742 * configure.in: Check for the presence of memrchr, and of its
13743 prototype.
13744
13745 2002-01-07 Tim Van Holder <tim.van.holder@pandora.be>
13746
13747 * lib/hash.h (__P): Added definition for this macro.
13748 * src/Makefile.am: Add parse-skel.c and scan-skel.c to
13749 BUILT_SOURCES, to ensure they are generated first.
13750 * src/parse-skel.y: Use YYERROR_VERBOSE instead of
13751 %error-verbose to allow bootstrapping with bison 1.30x.
13752
13753 2002-01-06 Akim Demaille <akim@epita.fr>
13754
13755 * src/reader.c (parse_braces): Don't fetch the next char, the
13756 convention is to fetch on entry.
13757 * tests/torture.at (GNU Cim Grammar): Reintroduce their weird
13758 'switch' without a following semicolon.
13759 * tests/regression.at (braces parsing): New.
13760
13761 2002-01-06 Akim Demaille <akim@epita.fr>
13762
13763 Bison is dead wrong in its RR conflict reports.
13764
13765 * tests/torture.at (GNU Cim Grammar): New.
13766 * src/conflicts.c (count_rr_conflicts): Fix.
13767
13768 2002-01-06 Akim Demaille <akim@epita.fr>
13769
13770 Creating package.m4 from configure.ac causes too many problems.
13771
13772 * tests/Makefile.am (package.m4): Create it by hand,
13773 AC_CONFIG_TESTDIR no longer does in the most recent CVS Autoconf.
13774
13775 2002-01-06 Akim Demaille <akim@epita.fr>
13776
13777 * src/Makefile.am (bison_SOURCES): Add parse-skel.h and
13778 skeleton.h.
13779
13780 2002-01-04 Paul Eggert <eggert@twinsun.com>
13781
13782 * doc/bison.texinfo (Debugging):
13783 Remove YYSTDERR; it's no longer defined or used.
13784 Also, s/cstdio.h/cstdio/.
13785
13786 2002-01-03 Akim Demaille <akim@epita.fr>
13787
13788 * tests/bison.in, tests/atlocal.in: Adjust to CVS Autoconf.
13789
13790 2002-01-03 Akim Demaille <akim@epita.fr>
13791
13792 * src/parse-skel.y (process_skeleton): Don't bind the parser's
13793 tracing code to --trace, wait for a better --trace option, with
13794 args.
13795
13796 2002-01-03 Akim Demaille <akim@epita.fr>
13797
13798 * src/bison.simple (YYSTDERR): Remove, replace `stderr'.
13799 The ISO C++ standard is extremely clear about it: stderr is
13800 considered a macro, not a regular symbol (see table 94 `Header
13801 <cstdio> synopsis', [lib.c.files] 27.8.2 C Library files).
13802 Therefore std:: does not apply to it. It still does with fprintf.
13803 Also, s/cstdio.h/cstdio/.
13804
13805 2002-01-03 Akim Demaille <akim@epita.fr>
13806
13807 * lib/quotearg.c: Use `#include "..."' instead of `#include <...>'
13808 for non system headers.
13809
13810 2002-01-02 Akim Demaille <akim@epita.fr>
13811
13812 Equip the skeleton chain with location tracking, runtime trace,
13813 pure parser and scanner.
13814
13815 * src/parse-skel.y: Request a pure parser, locations, and prefix
13816 renaming.
13817 (%union): Having several members with the same type does not help
13818 type mismatches, simplify.
13819 (YYPRINT, yyprint): New.
13820 (yyerror): ``Rename'' (there is a #define yyerror skel_error) as...
13821 (skel_error): this.
13822 Handle locations.
13823 * src/scan-skel.l: Adjust to these changes.
13824 * src/skeleton.h (LOCATION_RESET, LOCATION_LINES, LOCATION_STEP)
13825 (LOCATION_PRINT, skel_control_t): New.
13826
13827 2001-12-30 Akim Demaille <akim@epita.fr>
13828
13829 * src/parse-skel.y: Get rid of the shift/reduce conflict:
13830 replace `gb' with BLANKS.
13831 * src/scan-skel.l: Adjust.
13832
13833 2001-12-30 Akim Demaille <akim@epita.fr>
13834
13835 * src/system.h: We don't need nor want bcopy.
13836 Throw away MS-DOS crap: we don't need getpid.
13837 * configure.in: We don't need strndup. It was even causing
13838 problems: because Flex includes the headers *before* us,
13839 _GNU_SOURCE is not defined by config.h, and therefore strndup was
13840 not visible.
13841 * lib/xstrndup.c: New.
13842 * src/scan-skel.l: Use it.
13843 Be sure to initialize yylval.muscle member when scanning a MUSCLE.
13844 * src/parse-skel.y: Use %directives instead of #defines.
13845
13846 2001-12-30 Akim Demaille <akim@epita.fr>
13847
13848 * src/skeleton.h: New.
13849 * src/output.c (output_parser, output_master_parser): Remove, dead
13850 code.
13851 * src/output.h (get_lines_number, actions_output, guards_output)
13852 (token_definitions_output): Prototype them.
13853 * src/parse-skel.y: Add the license notice.
13854 Include output.h and skeleton.h.
13855 (process_skeleton): Returns void, and takes a single parameter.
13856 * src/scan-skel.l: Add the license notice.
13857 Include skeleton.h.
13858 Don't use %option yylineno: it seems that then Flex imagines
13859 REJECT has been used, and therefore it won't reallocate its
13860 buffers (which makes no other sense to me than a bug). It results
13861 in warnings for `unused: yy_flex_realloc'.
13862
13863 2001-12-30 Robert Anisko <robert.anisko@epita.fr>
13864
13865 * src/muscle_tab.h (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
13866 (MUSCLE_INSERT_PREFIX): ...to there.
13867 * src/output.c (MUSCLE_INSERT_INT, MUSCLE_INSERT_STRING)
13868 (MUSCLE_INSERT_PREFIX): Move from here...
13869
13870 * src/bison.hairy: Add a section directive. Put braces around muscle
13871 names. This parser skeleton is still broken, but Bison should not
13872 choke on a bad muscle 'syntax'.
13873 * src/bison.simple: Add a section directive. Put braces around muscle
13874 names.
13875
13876 * src/files.h (strsuffix, stringappend): Add declarations.
13877 (tab_extension): Add declaration.
13878 (short_base_name): Add declaration.
13879
13880 * src/files.c (strsuffix, stringappend): No longer static. These
13881 functions are used in the skeleton parser.
13882 (tab_extension): New.
13883 (compute_base_names): Use the computations done in this function
13884 to guess if the generated parsers should have '.tab' in their
13885 names.
13886 (short_base_name): No longer static.
13887
13888 * src/output.c (output_skeleton): New.
13889 (output): Disable call to output_master_parser, and give a try to
13890 a new skeleton handling system.
13891 (guards_output, actions_output): No longer static.
13892 (token_definitions_output, get_lines_number): No longer static.
13893
13894 * configure.in: Use AM_PROG_LEX and AC_PROG_YACC.
13895
13896 * src/Makefile.am (bison_SOURCES): Add scan-skel.l and
13897 parse-skel.y.
13898
13899 * src/parse-skel.y: New file.
13900 * src/scan-skel.l: New file.
13901
13902 2001-12-29 Akim Demaille <akim@epita.fr>
13903
13904 %name-prefix is broken.
13905
13906 * src/files.c (spec_name_prefix): Initialize to NULL, not to "yy".
13907 Adjust all dependencies.
13908 * tests/headers.at (export YYLTYPE): Strengthen this test: use
13909 %name-prefix.
13910
13911 Renaming yylval but not yylloc is not consistent. Now we do.
13912
13913 * src/bison.simple: Prefix yylloc if used.
13914 * doc/bison.texinfo (Decl Summary): Document that.
13915
13916 2001-12-29 Akim Demaille <akim@epita.fr>
13917
13918 * doc/bison.texinfo: Promote `%long-directive' over
13919 `%long_directive'.
13920 Remove all references to fixed-output-files, yacc is enough.
13921
13922 2001-12-29 Akim Demaille <akim@epita.fr>
13923
13924 * src/bison.simple: Define YYDEBUG and YYERROR_VERBOSE *after* the
13925 user prologue. These are defaults.
13926 * tests/actions.at (Mid-rule actions): Make sure the user can
13927 define YYDEBUG and YYERROR_VERBOSE.
13928
13929 2001-12-29 Akim Demaille <akim@epita.fr>
13930
13931 * src/output.c (header_output): Don't forget to export YYLTYPE and
13932 yylloc.
13933 * tests/headers.at (export YYLTYPE): New, make sure it does.
13934 * tests/regression.at (%union and --defines, Invalid CPP headers):
13935 Move to...
13936 * tests/headers.at: here.
13937
13938 2001-12-29 Akim Demaille <akim@epita.fr>
13939
13940 * src/gram.h (rule_s): Member `assoc' is of type `associativity'.
13941
13942 2001-12-29 Akim Demaille <akim@epita.fr>
13943
13944 * tests/actions.at (Mid-rule actions): Output on a single line
13945 instead of several.
13946
13947 2001-12-29 Akim Demaille <akim@epita.fr>
13948
13949 * doc/bison.texinfo: Formatting changes.
13950
13951 2001-12-29 Akim Demaille <akim@epita.fr>
13952
13953 Don't store the token defs in a muscle, just be ready to output it
13954 on command. Now possible via `symbols'. Fixes a memory leak.
13955
13956 * src/output.c (token_definitions_output): New.
13957 (output_parser, header_output): Use it.
13958 * src/reader.c (symbols_save): Remove.
13959
13960 2001-12-29 Akim Demaille <akim@epita.fr>
13961
13962 * src/bison.simple: Do not provide a default for YYSTYPE and
13963 YYLTYPE before the user's prologue. Otherwise it's hardly... a
13964 default.
13965
13966 2001-12-29 Akim Demaille <akim@epita.fr>
13967
13968 Mid-rule actions are simply... ignored!
13969
13970 * src/reader.c (readgram): Be sure to attach mid-rule actions to
13971 the empty-rule associated to the dummy symbol, not to the host
13972 rule.
13973 * tests/actions.at (Mid-rule actions): New.
13974
13975 2001-12-29 Akim Demaille <akim@epita.fr>
13976
13977 Memory leak.
13978
13979 * src/reader.c (reader): Free grammar.
13980
13981 2001-12-29 Akim Demaille <akim@epita.fr>
13982
13983 Memory leak.
13984
13985 * src/LR0.c (new_itemsets): Don't allocate `shift_symbol' here,
13986 since it allocates it for each state, although only one is needed.
13987 (allocate_storage): Do it here.
13988
13989 2001-12-29 Akim Demaille <akim@epita.fr>
13990
13991 * src/options.h, src/options.c (create_long_option_table): Rename
13992 as...
13993 (long_option_table_new): this, with a clearer prototype.
13994 (percent_table): Remove, unused,
13995 * src/getargs.c (getargs): Adjust.
13996
13997 2001-12-29 Akim Demaille <akim@epita.fr>
13998
13999 * src/LR0.c, src/conflicts.c, src/lalr.c, src/lalr.h, src/output.c
14000 * src/print.c, src/print_graph.c, src/state.h: Rename state_table
14001 as states.
14002
14003 2001-12-29 Akim Demaille <akim@epita.fr>
14004
14005 * src/lalr.c (build_relations): Rename `states' as `states1'.
14006 Sorry, I don't understand exactly what it is, no better name...
14007
14008 2001-12-29 Akim Demaille <akim@epita.fr>
14009
14010 * src/closure.c, src/conflicts.c, src/derives.c, src/gram.c
14011 * src/gram.h, src/lalr.c, src/nullable.c, src/output.c, src/print.c
14012 * src/print_graph.c, src/reader.c, src/reduce.c: Rename rule_table
14013 as rules.
14014
14015 2001-12-29 Akim Demaille <akim@epita.fr>
14016
14017 * src/gram.c (rprec, rprecsym, rassoc): Remove, unused since long
14018 ago.
14019
14020 2001-12-29 Akim Demaille <akim@epita.fr>
14021
14022 * src/reader.c, src/reader.h (user_toknums): Remove.
14023 Adjust all users to use symbols[i]->user_token_number.
14024
14025 2001-12-29 Akim Demaille <akim@epita.fr>
14026
14027 * src/gram.c, src/gram.h (sprec, sassoc): Remove.
14028 Adjust all users to use symbols[i]->prec or ->assoc.
14029
14030 2001-12-29 Akim Demaille <akim@epita.fr>
14031
14032 * src/reader.c, src/reader.h (tags): Remove.
14033 Adjust all users to use symbols[i]->tag.
14034
14035 2001-12-29 Akim Demaille <akim@epita.fr>
14036
14037 * src/gram.h, src/gram.c (symbols): New, similar to state_table
14038 and rule_table.
14039 * src/reader.c (packsymbols): Fill this table.
14040 Drop sprec.
14041 * src/conflicts.c (resolve_sr_conflict): Adjust.
14042 * src/reduce.c (reduce_grammar): Adjust: just sort symbols, a
14043 single table.
14044 Use symbols[i]->tag instead of tags[i].
14045
14046 2001-12-29 Akim Demaille <akim@epita.fr>
14047
14048 * tests/calc.at (_AT_DATA_CALC_Y): Also use %union.
14049 In addition, put a comment in there, to replace...
14050 * tests/regression.at (%union and C comments): Remove.
14051
14052 2001-12-29 Akim Demaille <akim@epita.fr>
14053
14054 * tests/regression.at (Web2c Actions): Blindly move the actual
14055 output as expected output. The contents *seem* right to me, but I
14056 can't pretend reading perfectly parser tables... Nonetheless, all
14057 the other tests pass correctly, the table look OK, even though the
14058 presence of `$axiom' is to be noted: AFAICS it is useless (but
14059 harmless).
14060
14061 2001-12-29 Akim Demaille <akim@epita.fr>
14062
14063 * src/reader.c (readgram): Don't add the rule 0 if there were no
14064 rules read. In other words, add it _after_ having performed
14065 grammar sanity checks.
14066 Fixes the `tests/regression.at (Invalid input: 1)' Failure.
14067
14068 2001-12-29 Akim Demaille <akim@epita.fr>
14069
14070 * tests/regression.at (Web2c Report): Catch up: the rule 0 is now
14071 visible, and some states have now a different number.
14072
14073 2001-12-29 Akim Demaille <akim@epita.fr>
14074
14075 * src/reader.c (readgram): Bind the initial rule's lineno to that
14076 of the first rule.
14077 * tests/regression.at (Rule Line Numbers, Unresolved SR Conflicts):
14078 (Solved SR Conflicts): Adjust rule 0's line number.
14079
14080 2001-12-29 Akim Demaille <akim@epita.fr>
14081
14082 Fix the `GAWK Grammar' failure.
14083
14084 * src/LR0.c (final_state): Initialize to -1 so that we do compute
14085 the reductions of the first state which was mistakenly confused
14086 with the final state because precisely final_state was initialized
14087 to 0.
14088 * tests/sets.at (Nullable): Adjust: state 0 does have lookaheads,
14089 now noticed by Bison.
14090 * tests/regression.at (Rule Line Numbers): Adjust: state 0 does
14091 have a reduction on $default.
14092
14093 2001-12-29 Akim Demaille <akim@epita.fr>
14094
14095 * src/gram.c (ritem_print): Be sure to subtract 1 when displaying
14096 rule line numbers.
14097 * src/closure.c (print_closure): Likewise.
14098 * src/derives.c (print_derives): Likewise.
14099 * tests/sets.at (Nullable): Adjust: the rule numbers are correct
14100 now.
14101
14102 2001-12-29 Akim Demaille <akim@epita.fr>
14103
14104 * src/lalr.c (lookaheads_print): New.
14105 (lalr): Call it when --trace-flag.
14106 * tests/sets.at (Nullable): Adjust: when tracing, the lookaheads
14107 are dumped.
14108
14109 2001-12-29 Akim Demaille <akim@epita.fr>
14110
14111 * src/derives.c (print_derives): Be sure to use `>= 0', not `> 0',
14112 when walking through ritem, even via rule->rhs.
14113 * src/reduce.c (dump_grammar, useful_production, reduce_output)
14114 (useful_production, useless_nonterminals): Likewise.
14115 (reduce_grammar_tables): Likewise, plus update nritems.
14116 * src/nullable.c (set_nullable): Likewise.
14117 * src/lalr.c (build_relations): Likewise.
14118 * tests/sets.at (Nullable): Adjust.
14119 Fortunately, now, the $axiom is no longer nullable.
14120
14121 2001-12-29 Akim Demaille <akim@epita.fr>
14122
14123 * src/LR0.c (generate_states): Use nritems, not nitems, nor using
14124 the 0-sentinel.
14125 * src/gram.c (ritem_longest_rhs): Likewise.
14126 * src/reduce.c (nonterminals_reduce): Likewise.
14127 * src/print_graph.c (print_graph): Likewise.
14128 * src/output.c (output_rule_data): Likewise.
14129 * src/nullable.c (set_nullable): Likewise.
14130
14131 2001-12-29 Akim Demaille <akim@epita.fr>
14132
14133 * src/output.c: Comment changes.
14134
14135 2001-12-27 Paul Eggert <eggert@twinsun.com>
14136
14137 * src/bison.simple (YYSTACK_ALLOC, YYSIZE_T): Remove special
14138 cases for non-GNU systems like AIX, HP-UX, SGI, Sun, and
14139 Sparc, as they were causing more porting problems than the
14140 (minor) performance improvement was worth.
14141
14142 Also, catch up with 1.31's YYSTD.
14143
14144 2001-12-27 Akim Demaille <akim@epita.fr>
14145
14146 * src/output.c (output_gram): Rely on nritems, not the
14147 0-sentinel. See below.
14148 Use -1 as separator, not 0.
14149 * src/bison.simple (yyparse): Subtract 1 to the rule numbers.
14150 Rely on -1 as separator in yyrhs, instead of 0.
14151 * tests/calc.at (AT_CHECK_CALC): Now, the parsers no longer issue
14152 twice `Now at end of input', therefore there are two lines less to
14153 expect.
14154
14155 2001-12-27 Akim Demaille <akim@epita.fr>
14156
14157 * tests/regression.at (Unresolved SR Conflicts):
14158 (Solved SR Conflicts, Rule Line Numbers): Adjust to the changes
14159 below.
14160
14161 2001-12-27 Akim Demaille <akim@epita.fr>
14162
14163 * src/LR0.c (new_state): Recognize the final state by the fact it
14164 is reached by eoftoken.
14165 (insert_start_shifting_state, insert_eof_shifting_state)
14166 (insert_accepting_state, augment_automaton): Remove, since now
14167 these states are automatically computed from the initial state.
14168 (generate_states): Adjust.
14169 * src/print.c: When reporting a rule number to the user, substract
14170 1, so that the axiom rule is rule 0, and the first user rule is 1.
14171 * src/reduce.c: Likewise.
14172 * src/print_graph.c (print_core): For the time being, just as for
14173 the report, depend upon --trace-flags to dump the full set of
14174 items.
14175 * src/reader.c (readgram): Once the grammar read, insert the rule
14176 0: `$axiom: START-SYMBOL $'.
14177 * tests/set.at: Adjust: rule 0 is now displayed, and since the
14178 number of the states has changed (the final state is no longer
14179 necessarily the last), catch up.
14180
14181 2001-12-27 Akim Demaille <akim@epita.fr>
14182
14183 Try to make the use of the eoftoken valid. Given that its value
14184 is 0 which was also used as a sentinel in ritem, (i) make sure >= 0
14185 is used instead of > 0 where appropriate, (ii), depend upon nritems
14186 instead of the 0-sentinel.
14187
14188 * src/gram.h, src/gram.c (nritems): New.
14189 Expected to be duplication of nitems, but for the time being...
14190 * src/reader.c (packgram): Assert nritems and nitems are equal.
14191 * src/LR0.c (allocate_itemsets, new_itemsets): Adjust.
14192 * src/closure.c (print_closure, print_fderives): Likewise.
14193 * src/gram.c (ritem_print): Likewise.
14194 * src/print.c (print_core, print_grammar): Likewise.
14195 * src/print_graph.c: Likewise.
14196
14197 2001-12-27 Akim Demaille <akim@epita.fr>
14198
14199 * src/main.c (main): If there are complains after grammar
14200 reductions, then output the report anyway if requested, then die.
14201 * src/symtab.c (bucket_new): Initialize `value' to -1, not 0.
14202 * src/reader.c (eoftoken): New.
14203 (parse_token_decl): If the token being defined has value `0', it
14204 is the eoftoken.
14205 (packsymbols): No longer hack `tags' to insert `$' by hand.
14206 Be sure to preserve the value of the eoftoken.
14207 (reader): Make sure eoftoken is defined.
14208 Initialize nsyms to 0: now eoftoken is created just like the others.
14209 * src/print.c (print_grammar): Don't special case the eof token.
14210 * src/regression.at: Adjust: `$' has value 0, not -1, which was a
14211 lie anyway, albeit pleasant.
14212 * tests/calc.at: Exercise error messages with eoftoken.
14213 Change the grammar so that empty input is invalid.
14214 Adjust expectations.
14215 When yyungeting, be sure to use a valid yylloc: use last_yylloc.
14216
14217 2001-12-27 Akim Demaille <akim@epita.fr>
14218
14219 * configure.in: Check the protos of strchr ans strspn.
14220 Replace strchr if needed.
14221 * src/system.h: Provide the protos of strchr, strspn and memchr if
14222 missing.
14223 * lib/strchr.c: New.
14224 * src/reader.c (symbols_save): Use strchr.
14225
14226 2001-12-27 Akim Demaille <akim@epita.fr>
14227
14228 * src/print.c, src/print_graph.c (escape): New.
14229 Use it to quote the TAGS outputs.
14230 * src/print_graph.c (print_state): Now errors are in red, and
14231 reductions in green.
14232 Prefer high to wide: output the state number on a line of its own.
14233
14234 2001-12-27 Akim Demaille <akim@epita.fr>
14235
14236 * src/state.h, src/state.c (reductions_new): New.
14237 * src/LR0.c (set_state_table): Let all the states have a
14238 `reductions', even if reduced to 0.
14239 (save_reductions): Adjust.
14240 * src/lalr.c (initialize_LA, initialize_lookaheads): Adjust.
14241 * src/print.c (print_reductions, print_actions): Adjust.
14242 * src/output.c (action_row): Adjust.
14243
14244 2001-12-27 Akim Demaille <akim@epita.fr>
14245
14246 * src/state.h, src/state.c (errs_new, errs_dup): New.
14247 * src/LR0.c (set_state_table): Let all the states have an errs,
14248 even if reduced to 0.
14249 * src/print.c (print_errs, print_reductions): Adjust.
14250 * src/output.c (output_actions, action_row): Adjust.
14251 * src/conflicts.c (resolve_sr_conflict): Adjust.
14252
14253 2001-12-27 Akim Demaille <akim@epita.fr>
14254
14255 * src/lalr.c (set_goto_map, initialize_F): Use SHIFT_SYMBOL.
14256
14257 2001-12-27 Akim Demaille <akim@epita.fr>
14258
14259 * src/conflicts.c, src/conflicts.h (print_reductions): Move to...
14260 * src/print.c: here.
14261 (lookaheadset, shiftset): New, used as additional storage by
14262 print_reductions.
14263 (print_results): Adjust.
14264 (print_shifts, print_gotos, print_errs): New, extracted from...
14265 (print_actions): here.
14266 * src/print_graph.c (print_actions): Remove dead code.
14267
14268 2001-12-27 Akim Demaille <akim@epita.fr>
14269
14270 * src/reader.c (copy_dollar, copy_at): Better checking of `n' in
14271 `$n' and `@n'.
14272
14273 2001-12-27 Akim Demaille <akim@epita.fr>
14274
14275 * src/lalr.c (add_lookback_edge): Use state_t instead of ints.
14276 (build_relations): Adjust.
14277
14278 2001-12-27 Akim Demaille <akim@epita.fr>
14279
14280 * src/lalr.c (set_goto_map): Remove a wrong but benign loop
14281 duplication.
14282
14283 2001-12-27 Akim Demaille <akim@epita.fr>
14284
14285 * src/reader.c (packgram): Catch nitems overflows.
14286
14287 2001-12-27 Akim Demaille <akim@epita.fr>
14288
14289 * src/files.c, src/files.h (guard_obstack): Remove.
14290 * src/output.c (output): Adjust.
14291 * src/reader.c (parse_braces): New, factoring...
14292 (copy_action, copy_guard): these two which are renamed as...
14293 (parse_action, parse_guard): these.
14294 As a voluntary consequence, using braces around guards is now
14295 mandatory.
14296
14297 2001-12-27 Akim Demaille <akim@epita.fr>
14298
14299 * src/gram.h (rule_t): `guard' and `guard_line' are new members.
14300 * src/reader.c (symbol_list): `guard' and `guard_line' are new
14301 members.
14302 (symbol_list_new): Adjust.
14303 (copy_action): action_line is the first line, not the last.
14304 (copy_guard): Just as for actions, store the `action' only, not
14305 the switch/case/break flesh.
14306 Don't parse the user action that might follow the guard, let...
14307 (readgram): do it, i.e., now, there can be an action after a
14308 guard.
14309 In other words the guard is just explicitly optional.
14310 (packgram): Adjust.
14311 * src/output.c (guards_output): New.
14312 (output_parser): Call it when needed.
14313 (output): Also free the guard and attrs obstacks.
14314 * src/files.c, src/files.h (obstack_save): Remove.
14315 (output_files): Remove.
14316 As a result, if one needs the former `.act' file, using an
14317 appropriate skeleton which requires actions and guards is now
14318 required.
14319 * src/main.c (main): Adjust.
14320 * tests/semantic.at: New.
14321 * tests/regression.at: Use `input.y' as input file name.
14322 Avoid 8+3 problems by requiring input.c when the test needs the
14323 parser.
14324
14325 2001-12-27 Akim Demaille <akim@epita.fr>
14326
14327 * src/reader.c (symbol_list_new): Be sure to initialize all the
14328 fields.
14329
14330 2001-12-27 Akim Demaille <akim@epita.fr>
14331
14332 All the hacks using a final pseudo state are now useless.
14333
14334 * src/LR0.c (set_state_table): state_table holds exactly nstates.
14335 * src/lalr.c (nLA): New.
14336 (initialize_LA, compute_lookaheads, initialize_lookaheads): Use it
14337 instead of lookaheadsp from the pseudo state (nstate + 1).
14338
14339 2001-12-27 Akim Demaille <akim@epita.fr>
14340
14341 * src/output.c (action_row, token_actions): Use a state_t instead
14342 of a integer, and nlookaheads instead of the following state's
14343 lookaheadsp.
14344
14345 2001-12-27 Akim Demaille <akim@epita.fr>
14346
14347 * src/conflicts.c (log_resolution, flush_shift)
14348 (resolve_sr_conflict, set_conflicts, solve_conflicts)
14349 (count_sr_conflicts, count_rr_conflicts, conflicts_output)
14350 (conflicts_print, print_reductions): Use a state_t instead of an
14351 integer when referring to a state.
14352 As much as possible, depend upon nlookaheads, instead of the
14353 `lookaheadsp' member of the following state (since lookaheads of
14354 successive states are successive, the difference between state n + 1
14355 and n served as the number of lookaheads for state n).
14356 * src/lalr.c (add_lookback_edge): Likewise.
14357 * src/print.c (print_core, print_actions, print_state)
14358 (print_results): Likewise.
14359 * src/print_graph.c (print_core, print_actions, print_state)
14360 (print_graph): Likewise.
14361 * src/conflicts.h: Adjust.
14362
14363 2001-12-27 Akim Demaille <akim@epita.fr>
14364
14365 * src/bison.hairy: Formatting/comment changes.
14366 ANSIfy.
14367 Remove `register' indications.
14368 Add plenty of `static'.
14369
14370 2001-12-27 Akim Demaille <akim@epita.fr>
14371
14372 * src/output.c (prepare): Drop the muscle `ntbase' which
14373 duplicates ntokens.
14374 * src/bison.simple: Formatting/comment changes.
14375 Use YYNTOKENS only, which is documented, but not YYNTBASE, which
14376 is an undocumented synonym.
14377
14378 2001-12-22 Akim Demaille <akim@epita.fr>
14379
14380 * src/output.c (output_table_data): Change the prototype to use
14381 `int' for array ranges: some invocations do pass an int, not a
14382 short.
14383 Reported by Wayne Green.
14384
14385 2001-12-22 Akim Demaille <akim@epita.fr>
14386
14387 Some actions of web2c.y are improperly triggered.
14388 Reported by Mike Castle.
14389
14390 * src/lalr.c (traverse): s/F (i)[k] = F (j)[k]/F (j)[k] = F (i)[k]/.
14391 * tests/regression.at (Web2c): Rename as...
14392 (Web2c Report): this.
14393 (Web2c Actions): New.
14394
14395 2001-12-22 Akim Demaille <akim@epita.fr>
14396
14397 Reductions in web2c.y are improperly reported.
14398 Reported by Mike Castle.
14399
14400 * src/conflicts.c (print_reductions): Fix.
14401 * tests/regression.at (Web2c): New.
14402
14403 2001-12-18 Akim Demaille <akim@epita.fr>
14404
14405 Some host fail on `assert (!"foo")', which expands to
14406 ((!"foo") ? (void)0 : __assert("!"foo."", __FILE__, __LINE__))
14407 Reported by Nelson Beebee.
14408
14409 * src/output.c, src/vcg.c: Replace `assert (!"it succeeded")' with
14410 `#define it_succeeded 0' and `assert (it_succeeded)'.
14411
14412 2001-12-17 Marc Autret <autret_m@epita.fr>
14413
14414 * src/bison.simple: Don't hard code the skeleton line and filename.
14415 * src/output.c (output_parser): Rename 'line' as 'output_line'.
14416 New line counter 'skeleton_line' (skeleton-line muscle).
14417
14418 2001-12-17 Paul Eggert <eggert@twinsun.com>
14419
14420 * NEWS, doc/bison.texinfo, doc/bison.1, doc/bison.rnh: Document that
14421 YYDEBUG must be defined to a nonzero value.
14422
14423 * src/bison.simple (yytname): Do not assume that the user defines
14424 YYDEBUG to a properly parenthesized expression.
14425
14426 2001-12-17 Akim Demaille <akim@epita.fr>
14427
14428 * src/state.h (state_t): Rename lookaheads as lookaheadsp.
14429 nlookaheads is a new member.
14430 Adjust all users.
14431 * src/lalr.h (nlookaheads): Remove this orphan declaration.
14432 * src/lalr.c (initialize_lookaheads): Set nlookaheads for each
14433 state.
14434
14435 2001-12-17 Akim Demaille <akim@epita.fr>
14436
14437 * src/files.h, src/files.c (open_files, close_files): Remove.
14438 * src/main.c (main): Don't open/close files, nor invoke lex_free,
14439 let...
14440 * src/reader.c (reader): Do it.
14441
14442 2001-12-17 Akim Demaille <akim@epita.fr>
14443
14444 * src/conflicts.c (print_reductions): Formatting changes.
14445
14446 2001-12-17 Akim Demaille <akim@epita.fr>
14447
14448 * src/conflicts.c (flush_shift): Also adjust lookaheadset.
14449 (flush_reduce): New.
14450 (resolve_sr_conflict): Adjust.
14451
14452 2001-12-17 Akim Demaille <akim@epita.fr>
14453
14454 * src/output.c (output_obstack): Be static and rename as...
14455 (format_obstack): this, to avoid any confusion with files.c's
14456 output_obstack.
14457 * src/reader.h (muscle_obstack): Move to...
14458 * src/output.h: here, since it's defined in output.c.
14459
14460 2001-12-17 Akim Demaille <akim@epita.fr>
14461
14462 * src/output.c (action_row, save_column, default_goto)
14463 (sort_actions, matching_state, pack_vector): Better variable
14464 locality.
14465
14466 2001-12-17 Akim Demaille <akim@epita.fr>
14467
14468 * src/output.c: Various formatting changes.
14469
14470 2001-12-17 Akim Demaille <akim@epita.fr>
14471
14472 * src/files.c (output_files): Free the output_obstack.
14473 * src/main.c (main): Call print and print_graph conditionally.
14474 * src/print.c (print): Work unconditionally.
14475 * src/print_graph.c (print_graph): Work unconditionally.
14476 * src/conflicts.c (log_resolution): Output only if verbose_flag.
14477
14478 2001-12-16 Marc Autret <autret_m@epita.fr>
14479
14480 * src/output.c (actions_output): Fix. When we use %no-lines,
14481 there is one less line per action.
14482
14483 2001-12-16 Marc Autret <autret_m@epita.fr>
14484
14485 * src/bison.simple: Remove a useless #line directive.
14486 s/#line %%line %%skeleton/#line %%line "%%parser-file-name"/'.
14487 * src/output.c (get_lines_number): New.
14488 (output_parser): Adjust, now takes care about the lines of a
14489 output muscles.
14490 Fix line numbering.
14491 (actions_output): Computes the number of lines taken by actions.
14492 (output_master_parser): Insert new skeleton which is the name of
14493 the output parser file name.
14494
14495 2001-12-15 Marc Autret <autret_m@epita.fr>
14496
14497 * src/bison.simple [YYERROR_VERBOSE]: Restore backward compatibility.
14498
14499 2001-12-15 Marc Autret <autret_m@epita.fr>
14500
14501 * src/output.c (output_gram): Keep track of the hairy one.
14502
14503 2001-12-15 Akim Demaille <akim@epita.fr>
14504
14505 Make `make distcheck' work.
14506
14507 * lib/Makefile.am (INCLUDES): Add top_srcdir/intl, since hash uses
14508 system.h which uses libgettext.h.
14509
14510 2001-12-15 Akim Demaille <akim@epita.fr>
14511
14512 * src/nullable.c (set_nullable): Useless rules must be skipped,
14513 otherwise, since we range over their symbols, we might look at a
14514 nonterminal which no longer ``exists'', i.e., it is not counted in
14515 `nvars', hence we overflow our arrays.
14516
14517 2001-12-15 Akim Demaille <akim@epita.fr>
14518
14519 The header can also be produced directly, without any obstack!
14520 Yahoo!
14521
14522 * src/files.c, src/files.h (defines_obstack): Remove.
14523 (compute_header_macro): Global.
14524 (defines_obstack_save): Remove.
14525 * src/reader.c (parse_union_decl): No longer output to
14526 defines_obstack: its content can be found in the `stype' muscle
14527 anyway.
14528 (output_token_translations): Merge into...
14529 (symbols_output): this.
14530 Rename as...
14531 (symbols_save): this.
14532 (reader): Adjust.
14533 * src/output.c (header_output): New.
14534 (output): Call it.
14535
14536 2001-12-15 Akim Demaille <akim@epita.fr>
14537
14538 * src/reader.c (parse_union_decl): Instead of handling two obstack
14539 simultaneously, use one to define the `stype' muscle, and use the
14540 value of the latter to fill defines_obstack.
14541 (copy_comment): Remove.
14542 (copy_comment2): Work for a single obstack.
14543 Rename as...
14544 (copy_comment): this.
14545
14546 2001-12-15 Akim Demaille <akim@epita.fr>
14547
14548 * src/lex.c, src/lex.h (xgetc): No longer static.
14549 * src/reader.c (parse_union_decl): Revamp.
14550
14551 2001-12-15 Akim Demaille <akim@epita.fr>
14552
14553 Still making progress in separating Bison into (i) input, (ii)
14554 process, (iii) output: now we can directly output the parser file
14555 without using table_obstack at all.
14556
14557 * src/files.c, src/files.h (table_obstack): Bye bye.
14558 (parser_file_name): New.
14559 * src/files.c (compute_output_file_names): Compute it.
14560 * src/output.c (actions_output, output_parser)
14561 (output_master_parser): To a file instead of an obstack.
14562
14563 2001-12-15 Akim Demaille <akim@epita.fr>
14564
14565 Attach actions to rules, instead of pre-outputting them to
14566 actions_obstack.
14567
14568 * src/gram.h (rule_t): action and action_line are new members.
14569 * src/reader.c (symbol_list): Likewise.
14570 (copy_action): Save the actions within the rule.
14571 (packgram): Save them in rule_table.
14572 * src/output.c (actions_output): New.
14573 (output_parser): Use it on `%%actions'.
14574 (output_rule_data): Don't free rule_table.
14575 (output): Do it.
14576 (prepare): Don't save the `action' muscle.
14577 * src/bison.simple: s/%%action/%%actions/.
14578
14579 2001-12-15 Akim Demaille <akim@epita.fr>
14580
14581 * src/reader.c (copy_action): When --yacc, don't append a `;'
14582 to the user action: let it fail if lacking.
14583 Suggested by Arnold Robbins and Tom Tromey.
14584
14585 2001-12-14 Akim Demaille <akim@epita.fr>
14586
14587 * src/lex.c (literalchar): Simply return the char you decoded, non
14588 longer mess around with obstacks and int pointers.
14589 Adjust all callers.
14590
14591 2001-12-14 Akim Demaille <akim@epita.fr>
14592
14593 * src/lex.c (literalchar): Don't escape the special characters,
14594 just decode them, and keep them as char (before, eol was output as
14595 the 2 char string `\n' etc.).
14596 * src/output.c (output_rule_data): Use quotearg to output the
14597 token strings.
14598
14599 2001-12-13 Paul Eggert <eggert@twinsun.com>
14600
14601 * src/bison.simple (YYSIZE_T, YYSTACK_ALLOC, YYSTACK_FREE):
14602 Do not infringe on the global user namespace when using C++.
14603 (YYFPRINTF, YYSTDERR): New macros, needed for the above.
14604 All uses of `fprintf' and `stderr' changed.
14605
14606 * doc/bison.texinfo: Document YYFPRINTF, YYSTDERR.
14607
14608 2001-12-13 Akim Demaille <akim@epita.fr>
14609
14610 The computation of nullable is broken: it doesn't handle empty
14611 RHS's properly.
14612
14613 * tests/torture.at (GNU AWK Grammar): New.
14614 * tests/sets.at (Nullable): New.
14615 * src/nullable.c (set_nullable): Instead of blindly looping over
14616 `ritems', loop over the rules, and then over their rhs's.
14617
14618 Work around Autotest bugs.
14619
14620 * src/warshall.c (bitmatrix_print): Don't use `+--+' as table
14621 frame, because Autotest understand lines starting with a `+' as
14622 traces from the shell. Then, they are not processed properly.
14623 Admittedly an Autotest bug, but we don't have time to wait for
14624 Autotest to catch up.
14625 * tests/regression.at (Broken Closure): Adjust to the new table
14626 frames.
14627 Move to...
14628 * tests/sets.at: here.
14629
14630 2001-12-13 Akim Demaille <akim@epita.fr>
14631
14632 * src/closure.c (closure): Use nrules instead of playing tricks
14633 with BITS_PER_WORD.
14634
14635 2001-12-13 Akim Demaille <akim@epita.fr>
14636
14637 * src/print.c (print_actions): Output the handling of `$' as the
14638 traces do: shifting the token EOF. Before EOF was treated as a
14639 nonterminal.
14640 * tests/regression.at: Adjust some tests.
14641 * src/print_graph.c (print_core): Complete the set of items via
14642 closure. The next-to-final and final states are still unsatisfying,
14643 but that's to be addressed elsewhere.
14644 No longer output the rule numbers, but do output the state number.
14645 A single loop for the shifts + gotos is enough, but picked a
14646 distinct color for each.
14647 (print_graph): Initialize and finalize closure.
14648
14649 2001-12-13 Akim Demaille <akim@epita.fr>
14650
14651 * src/reader.c (readgram): Remove dead code, an strip useless
14652 braces.
14653 (get_type): Remove, unused.
14654
14655 2001-12-12 Akim Demaille <akim@epita.fr>
14656
14657 * src/complain.h, src/complain.c: Remove error_one_per_line, rely
14658 on that of lib/error.c.
14659
14660 2001-12-12 Akim Demaille <akim@epita.fr>
14661
14662 Some hosts don't like `/' in includes.
14663
14664 * src/system.h: Include libgettext.h without qualifying the path.
14665 * src/Makefile.am (INCLUDES): Add $(top_srcdir)/intl, remove
14666 $(top_srcdir).
14667
14668 2001-12-11 Marc Autret <autret_m@epita.fr>
14669
14670 * src/output.c (output_parser): Remove useless muscle.
14671
14672 2001-12-11 Marc Autret <autret_m@epita.fr>
14673
14674 * src/bison.simple: Remove #line just before %%epilogue. It
14675 is now handled in ...
14676 * src/reader.c (read_additionnal_code): Add the output of a
14677 #line for the epilogue.
14678
14679 2001-12-10 Marc Autret <autret_m@epita.fr>
14680
14681 * src/reader.c (copy_definition): Re-use CPP-outed code which
14682 replace precedent remove.
14683 * src/bison.simple: Remove #line before %%prologue because
14684 %%input-line is wrong at this time.
14685
14686 2001-12-10 Marc Autret <autret_m@epita.fr>
14687
14688 * src/reader.c (symbols_output): Clean up.
14689 * src/output.c (output_gram, output): Clean up.
14690
14691 2001-12-10 Akim Demaille <akim@epita.fr>
14692
14693 * src/lalr.c (initialize_lookaheads): New. Extracted from...
14694 * src/LR0.c (set_state_table): here.
14695 * src/lalr.c (lalr): Call it.
14696
14697 2001-12-10 Akim Demaille <akim@epita.fr>
14698
14699 * src/state.h (shifts): Remove the `number' member: shifts are
14700 attached to state, hence no longer need to be labelled with a
14701 state number.
14702
14703 2001-12-10 Akim Demaille <akim@epita.fr>
14704
14705 Now that states have a complete set of members, the linked list of
14706 shifts is useless: just fill directly the state's shifts member.
14707
14708 * src/state.h (shifts): Remove the `next' member.
14709 * src/LR0.c (first_state, last_state): Remove.
14710 Adjust the callers.
14711 (augment_automaton): Don't look for the shifts that must be added
14712 a shift on EOF: it is those of the state we looked for! But now,
14713 since shifts are attached, it is no longer needed to looking
14714 merely by its id: its number.
14715
14716 2001-12-10 Akim Demaille <akim@epita.fr>
14717
14718 * src/LR0.c (augment_automaton): Better variable locality.
14719 Remove an impossible branch: if there is a state corresponding to
14720 the start symbol being shifted, then there is shift for the start
14721 symbol from the initial state.
14722
14723 2001-12-10 Akim Demaille <akim@epita.fr>
14724
14725 * src/LR0.c (augment_automaton): Call `insert_eof_shifting_state'
14726 only when appropriate: when insert_start_shifting_state' is not
14727 invoked.
14728 * tests/regression.at (Rule Line Numbers): Adjust.
14729
14730 2001-12-10 Akim Demaille <akim@epita.fr>
14731
14732 * src/LR0.c (augment_automaton): Now that all states have shifts,
14733 merge the two cases addition shifts to the initial state.
14734
14735 2001-12-10 Akim Demaille <akim@epita.fr>
14736
14737 * src/lalr.c (set_state_table): Move to...
14738 * src/LR0.c: here.
14739 * src/lalr.c (lalr): Don't call it...
14740 * src/LR0.c (generate_states): do it.
14741 * src/LR0.h (first_state): Remove, only the table is used.
14742
14743 2001-12-10 Akim Demaille <akim@epita.fr>
14744
14745 * src/LR0.h (first_shift, first_reduction): Remove.
14746 * src/lalr.c: Don't use first_shift: find shifts through the
14747 states.
14748
14749 2001-12-10 Akim Demaille <akim@epita.fr>
14750
14751 * src/LR0.c: Attach shifts to states as soon as they are
14752 computed.
14753 * src/lalr.c (set_state_table): Instead of assigning shifts to
14754 state, just assert that the mapping was properly done.
14755
14756 2001-12-10 Akim Demaille <akim@epita.fr>
14757
14758 * src/LR0.c (insert_start_shift): Rename as...
14759 (insert_start_shifting_state): this.
14760 (insert_eof_shifting_state, insert_accepting_state): New.
14761 (augment_automaton): Adjust.
14762 Better locality of the variables.
14763 When looking if the start_symbol is shifted from the initial
14764 state, using `while (... symbol != start_symbol ...)' sounds
14765 better than `while (... symbol < start_symbol ...)': If fail
14766 to see how the order between symbols could be relevant!
14767
14768 2001-12-10 Akim Demaille <akim@epita.fr>
14769
14770 * src/getargs.h: Don't declare `spec_name_prefix' and
14771 `spec_file_prefix', declared by src/files.h.
14772 * src/files.c, src/files.h: Default for spec_name_prefix is "yy".
14773 * src/muscle_tab.c (muscle_init): Default prefix to NULL.
14774 * src/output.c (prepare): Adjust.
14775 * src/reader.c (symbols_output): Likewise.
14776 * src/vmsgetargs.c: Vaguely adjust, but who cares?
14777
14778 2001-12-10 Akim Demaille <akim@epita.fr>
14779
14780 * src/muscle_tab.c (muscle_init): NULL is a better default than
14781 `"0"'.
14782
14783 2001-12-10 Akim Demaille <akim@epita.fr>
14784
14785 * src/reader.c (reader): Calling symbols_output once is enough.
14786
14787 2001-12-10 Akim Demaille <akim@epita.fr>
14788
14789 Now that states have a complete set of members, the linked list of
14790 reductions is useless: just fill directly the state's reductions
14791 member.
14792
14793 * src/state.h (struct reductions): Remove member `number' and
14794 `next'.
14795 * src/LR0.c (first_reduction, last_reduction): Remove.
14796 (save_reductions): Don't link the new reductions, store them in
14797 this_state.
14798 * src/lalr.c (set_state_table): No need to attach reductions to
14799 states, it's already done.
14800 * src/output.c (output_actions): No longer free the shifts, then
14801 the reductions, then the states: free all the states and their
14802 members.
14803
14804 2001-12-10 Akim Demaille <akim@epita.fr>
14805
14806 * src/options.c (OPTN, DRTV, BOTH): New.
14807 (option_table): Use them.
14808
14809 * src/muscle_tab.c: Don't include xalloc.h and string.h: that's
14810 the job of system.h.
14811 * src/options.c: Don't include stdio.h and xalloc.h for the same
14812 reasons.
14813
14814 2001-12-10 Akim Demaille <akim@epita.fr>
14815
14816 * src/output.c (output, prepare): Make sure the values of the
14817 muscles `action' and `prologue' are 0-terminated.
14818
14819 2001-12-10 Akim Demaille <akim@epita.fr>
14820
14821 Clean up GCC warnings.
14822
14823 * src/reader.c (copy_action): `buf' is not used.
14824 (parse_skel_decl): Be static.
14825 * src/muscle_tab.c (mhash1, mhash2, muscle_insert): Preserve `const'.
14826 * src/options.h (create_long_option_table): Have a real prototype.
14827 * lib/hash.c, lib/hash.h (hash_insert, hash_insert_at, hash_delete)
14828 (hash_delete_at): Return const void *.
14829 Adjust casts to preserve the const.
14830
14831 2001-12-10 Akim Demaille <akim@epita.fr>
14832
14833 * configure.in: Require 2.52g.
14834 M4 is not needed, but AUTOM4TE is.
14835 * m4/m4.m4: Remove.
14836 * tests/Makefile.am: Adjust.
14837
14838 2001-12-10 Akim Demaille <akim@epita.fr>
14839
14840 One structure for states is enough, even though theoretically
14841 there are LR(0) states and LALR(1) states.
14842
14843 * src/lalr.h (state_t): Remove.
14844 (state_table): Be state_t **, not state_t *.
14845 * src/state.h (core, CORE_ALLOC): Rename as...
14846 (state_t, STATE_ALLOC): this.
14847 Add the LALR(1) members: shifts, reductions, errs.
14848 * src/LR0.c (state_table): Rename as...
14849 (state_hash): this, to avoid name clashes with the global
14850 `state_table'.
14851 * src/print_graph.c, src/LR0.c, src/LR0.h, src/conflicts.c
14852 * src/lalr.c, src/lalr.h, src/output.c, src/print.c: Adjust.
14853
14854 2001-12-10 Akim Demaille <akim@epita.fr>
14855
14856 Bison dumps core on bash.y.
14857 Reported by Pascal Bart.
14858
14859 * src/warshall.c (bitmatrix_print): New.
14860 (TC): Use it.
14861 When performing a transitive closure R(i, j) && R(j, k) => R(i, k),
14862 j must be the outer loop.
14863 * tests/regression.at (Broken Closure): New.
14864
14865 2001-12-05 Akim Demaille <akim@epita.fr>
14866
14867 * tests/atlocal.in (CPPFLAGS): Do not leave a space between -I and
14868 its argument.
14869 Reported by Peter Hamorsky.
14870
14871 2001-12-05 Akim Demaille <akim@epita.fr>
14872
14873 * src/conflicts.c (err_table): Remove.
14874 (resolve_sr_conflict): Adjust.
14875 * src/lalr.h (state_t.reduction_table, state_t.shift_table):
14876 Rename as...
14877 (state_t.reductions, state_t.shifts): this.
14878
14879 2001-12-05 Akim Demaille <akim@epita.fr>
14880
14881 * src/reduce.c (reduce_grammar_tables): No longer disable the
14882 removal of useless rules via CPP but via `if (0)', so that the
14883 compiler still check the code is valid.
14884 For instance, it should have noticed `rline' no longer exists: use
14885 the `line' member of rule_t.
14886 * src/gram.c (dummy, rline): Remove, unused.
14887
14888 2001-12-05 Akim Demaille <akim@epita.fr>
14889
14890 * src/output.c (pack_vector): Use assert, not berror.
14891 * src/main.c (berror): Remove, unused.
14892
14893 2001-12-05 Akim Demaille <akim@epita.fr>
14894
14895 New experimental feature: if --verbose --trace output all the
14896 items of a state, not only its kernel.
14897
14898 * src/print.c (print_core): If `trace_flag', then invoke closure
14899 before outputting the items of the state (print_core is no longer
14900 a correct name them).
14901 (print_results): Invoke new_closure/free_closure if needed.
14902
14903 2001-12-05 Akim Demaille <akim@epita.fr>
14904
14905 * src/LR0.c (new_itemsets): Use nshifts only, not shiftcount.
14906 * src/closure.c, src/closure.h (itemsetsize): Rename as...
14907 (nitemset): for consistency with the rest of the project.
14908
14909 2001-12-05 Akim Demaille <akim@epita.fr>
14910
14911 * src/closure.c (print_closure): Improve.
14912 (closure): Use it for printing input and output.
14913
14914 2001-12-05 Akim Demaille <akim@epita.fr>
14915
14916 * src/closure.c (FIRSTS, FDERIVES): Adjust to reality: they are
14917 indexed by nonterminals.
14918
14919 2001-12-05 Akim Demaille <akim@epita.fr>
14920
14921 * src/warshall.c (TC, RTC): De-obsfucate (source reduced to 22% of
14922 what it was!).
14923 * src/warshall.h: Remove accidental duplication of the content.
14924
14925 2001-12-05 Akim Demaille <akim@epita.fr>
14926
14927 * src/closure.c (set_fderives): De-obfuscate.
14928
14929 2001-12-05 Akim Demaille <akim@epita.fr>
14930
14931 * src/closure.c (print_firsts, print_fderives): De-obfuscate.
14932
14933 2001-12-05 Akim Demaille <akim@epita.fr>
14934
14935 * src/closure.c (set_firsts): De-obfuscate.
14936
14937 2001-12-05 Akim Demaille <akim@epita.fr>
14938
14939 * src/output.c (action_row): De-obfuscate
14940 using the good o' techniques: arrays not pointers, variable
14941 locality, BITISSET, RESETBIT etc.
14942
14943 2001-12-05 Akim Demaille <akim@epita.fr>
14944
14945 Pessimize the code to simplify it: from now on, all the states
14946 have a valid SHIFTS, which NSHIFTS is possibly 0.
14947
14948 * src/LR0.c (shifts_new): Be global and move to..
14949 * src/state.c, src/state.h: here.
14950 * src/conflicts, src/lalr.c, src/output.c, src/print.c,
14951 * src/print_graph: Adjust.
14952
14953 2001-12-05 Akim Demaille <akim@epita.fr>
14954
14955 * src/state.h (SHIFT_DISABLE, SHIFT_IS_DISABLED): New.
14956 * src/conflicts.c: Use it.
14957 Restore a few missing `if (!SHIFT_IS_DISABLED)' which were
14958 incorrectly ``simplified''.
14959
14960 2001-12-05 Akim Demaille <akim@epita.fr>
14961
14962 * src/conflicts.c (flush_shift, resolve_sr_conflict): De-obfuscate
14963 using the good o' techniques: arrays not pointers, variable
14964 locality, BITISSET, RESETBIT etc.
14965
14966 2001-12-05 Akim Demaille <akim@epita.fr>
14967
14968 * src/state.h (SHIFT_SYMBOL): New.
14969 * src/conflicts.c: Use it to deobfuscate.
14970
14971 2001-12-05 Akim Demaille <akim@epita.fr>
14972
14973 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts)
14974 (print_reductions): De-obfuscate using the good o' techniques:
14975 arrays not pointers, variable locality, BITISSET.
14976
14977 2001-12-05 Akim Demaille <akim@epita.fr>
14978
14979 * src/conflicts.c (print_reductions): Arrays, not pointers.
14980 Use BITISSET.
14981
14982 2001-12-05 Akim Demaille <akim@epita.fr>
14983
14984 * src/conflicts.c (print_reductions): Pessimize, but clarify.
14985
14986 2001-12-05 Akim Demaille <akim@epita.fr>
14987
14988 * src/conflicts.c (print_reductions): Improve variable locality.
14989
14990 2001-12-05 Akim Demaille <akim@epita.fr>
14991
14992 * src/conflicts.c (print_reductions): Pessimize, but clarify.
14993
14994 2001-12-05 Akim Demaille <akim@epita.fr>
14995
14996 * src/conflicts.c (print_reductions): Improve variable locality.
14997
14998 2001-12-05 Akim Demaille <akim@epita.fr>
14999
15000 * src/state.h (SHIFT_IS_ERROR, SHIFT_IS_GOTO, SHIFT_IS_SHIFT): New.
15001 * src/lalr.c: Use them.
15002
15003 2001-12-05 Akim Demaille <akim@epita.fr>
15004
15005 * src/LR0.c (augment_automaton): Formatting changes.
15006 Better variable locality.
15007
15008 2001-12-05 Akim Demaille <akim@epita.fr>
15009
15010 * src/lalr.c (matrix_print): New.
15011 (transpose): Use it.
15012 Use arrays instead of pointers.
15013
15014 2001-12-05 Akim Demaille <akim@epita.fr>
15015
15016 * src/lalr.c (maxrhs): Move to...
15017 * src/gram.c, src/gram.h (ritem_longest_rhs): here.
15018 * src/lalr.c (build_relations): Adjust.
15019
15020 2001-12-05 Akim Demaille <akim@epita.fr>
15021
15022 * src/lalr.c (transpose): Free the memory allocated to the
15023 argument, as it is replaced by the results by the unique caller.
15024 (build_relations): Merely invoke transpose: it handles the memory
15025 deallocation.
15026 Improve variable locality.
15027 Avoid variables used as mere abbreviations.
15028 (compute_lookaheads): Use arrays instead of pointers.
15029
15030 2001-12-05 Akim Demaille <akim@epita.fr>
15031
15032 * src/lalr.c (initialize_F): Improve variable locality.
15033 Avoid variables used as mere abbreviations.
15034
15035 2001-12-05 Akim Demaille <akim@epita.fr>
15036
15037 * src/derives.c (print_derives): Display the ruleno.
15038 * src/lalr.c (initialize_F, transpose): Better variable locality
15039 to improve readability.
15040 Avoid variables used as mere abbreviations.
15041
15042 2001-12-05 Akim Demaille <akim@epita.fr>
15043
15044 * src/lalr.c (traverse): Use arrays instead of pointers.
15045
15046 2001-12-05 Akim Demaille <akim@epita.fr>
15047
15048 * src/nullable.c (set_nullable): Use a for loop to de-obfuscate
15049 the handling of squeue.
15050 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
15051
15052 2001-12-05 Akim Demaille <akim@epita.fr>
15053
15054 Because useless nonterminals are now kept alive (instead of being
15055 `destroyed'), we now sometimes examine them, and store information
15056 related to them. Hence we need to know their number, and adjust
15057 memory allocations.
15058
15059 * src/reduce.c, src/reduce.h (nuseless_nonterminals): No longer
15060 static.
15061 * src/LR0.c (allocate_itemsets): The memory allocated to
15062 `symbol_count' was used for two different purpose: once to count
15063 the number of occurrences of each symbol, and later reassigned to
15064 `shift_symbol', containing the symbol that can be shifted from a
15065 given state.
15066 Deobfuscate, i.e., allocate, use and free `symbol_count' here
15067 only, and...
15068 (new_itemsets): Allocate `shift_symbol' here.
15069 (allocate_itemsets): symbol_count includes useless nonterminals.
15070 Make room for them.
15071 (free_storage): Use `free', not `XFREE', for pointers that cannot
15072 be null.
15073
15074 2001-12-05 Akim Demaille <akim@epita.fr>
15075
15076 * src/nullable.c (set_nullable): Deobfuscate the handling of
15077 ritem.
15078 `symbol >= 0' is wrong now, use `rule_table[ruleno].useful'.
15079
15080 2001-12-05 Akim Demaille <akim@epita.fr>
15081
15082 * src/gram.c, src/gram.h (ritem_print): New.
15083 * src/gram.c (dummy): Remove, now there is actual code in gram.c.
15084 (This useless function was defined only to work around VMS linkers
15085 that can't handle compilation units with variables only).
15086 * src/reduce.c (dump_grammar): Use it to trace the construction of
15087 ritem.
15088
15089 2001-12-04 Paul Eggert <eggert@twinsun.com>
15090
15091 * src/bison.simple (union yyalloc): Change member names
15092 to be the same as the stack names.
15093 (yyparse): yyptr is now union yyalloc *, not char *.
15094 (YYSTACK_RELOCATE): Likewise. This avoids a GCC warning,
15095 and may generate better code on some machines.
15096 (yystpcpy): Use prototype if __STDC__ is defined, not just
15097 if __cplusplus is defined.
15098
15099 2001-11-30 Akim Demaille <akim@epita.fr>
15100
15101 * configure.in (WARNING_CFLAGS): Add -Werror when possible.
15102 (CFLAGS): Do not include the WARNING_CFLAGS here, since GNU
15103 Gettext doesn't compile cleanly, and dies with -Werror.
15104 * src/Makefile.am, lib/Makefile.am, tests/atlocal.in (CFLAGS):
15105 Include WARNING_CFLAGS here.
15106 * lib/xstrdup.c: Include xalloc.h, so that xstrdup be declared
15107 before being defined.
15108
15109 2001-11-27 Paul Eggert <eggert@twinsun.com>
15110
15111 * lib/quotearg.h (quotearg_n, quotearg_n_style):
15112 First arg is int, not unsigned.
15113 * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
15114 (SIZE_MAX, UINT_MAX): New macros.
15115 (quotearg_n_options): Abort if N is negative.
15116 Avoid overflow check on hosts where size_t is 64 bits and int
15117 is 32 bits, as overflow is impossible there.
15118 Fix off-by-one typo that caused unnecessary reallocation.
15119
15120 2001-11-29 Paul Eggert <eggert@twinsun.com>
15121
15122 Name space cleanup in generated parser.
15123
15124 * doc/bison.texinfo (Bison Parser): Discuss system headers
15125 and their effect on the user name space.
15126
15127 * src/bison.simple:
15128 (YYSTACK_ALLOC, YYSTACK_FREE, union yyalloc, YYSTACK_GAP_MAX,
15129 YYSTACK_BYTES, YYSTACK_RELOCATE): Do not define unless necessary,
15130 i.e. unless ! defined (yyoverflow) || defined (YYERROR_VERBOSE).
15131
15132 (YYSIZE_T): New macro. Use it instead of size_t, to avoid infringing
15133 on user names when possible.
15134
15135 (YYSTACK_USE_ALLOCA): Do not define; just use any existing defn.
15136 Simplify test for whather <alloca.h> exists.
15137
15138 (<stdlib.h>): Include if we will use malloc, and if standard C or C++.
15139
15140 (<stdio.h>): Include if YYDEBUG.
15141
15142 (yymemcpy): Renamed from __yy_memcpy. Do not define unless
15143 ! defined (yyoverflow) && ! defined (yymemcpy).
15144
15145 (yymemcpy, yyparse): Rename local variables as needed so that
15146 they all begin with 'yy'.
15147
15148 (yystrlen, yystpcpy): New functions.
15149
15150 (YY_DECL_NON_LSP_VARIABLES): Renamed from _YY_DECL_VARIABLES.
15151 All uses changed.
15152
15153 (yyparse): size_t -> YYSIZE_T. Use yystrlen and yystpcpy
15154 instead of relying on string.h functions. Use YYSTACK_ALLOC
15155 and YYSTACK_FREE instead of malloc and free.
15156
15157 2001-11-30 Akim Demaille <akim@epita.fr>
15158
15159 * src/bison.simple (YYSTYPE, YYLTYPE): Move their definitions
15160 before their first uses.
15161 (YYBISON, YYPURE): Move to the top of the output.
15162
15163 2001-11-30 Akim Demaille <akim@epita.fr>
15164
15165 * tests/reduce.at (Useless Nonterminals): Fix.
15166
15167 2001-11-30 Akim Demaille <akim@epita.fr>
15168
15169 * src/bison.simple (YYSTACK_FREE): Use `do {;} while (0)' as empty
15170 if body instead of `;' to pacify GCC's warnings.
15171
15172 2001-11-30 Akim Demaille <akim@epita.fr>
15173
15174 Instead of mapping the LHS of unused rules to -1, keep the LHS
15175 valid, but flag the rules as invalid.
15176
15177 * src/gram.h (rule_t): `useful' is a new member.
15178 * src/print.c (print_grammar): Adjust.
15179 * src/derives.c (set_derives): Likewise.
15180 * src/reader.c (packgram, reduce_output): Likewise.
15181 * src/reduce.c (reduce_grammar_tables): Likewise.
15182 * tests/reduce.at (Underivable Rules, Useless Rules): New.
15183
15184 2001-11-30 Akim Demaille <akim@epita.fr>
15185
15186 * src/reduce.c (reduce_output): Formatting changes.
15187 * src/print.c (print_results, print_grammar): Likewise.
15188 * tests/regression.at (Rule Line Numbers)
15189 (Solved SR Conflicts, Unresolved SR Conflicts): Adjust.
15190
15191 2001-11-30 Akim Demaille <akim@epita.fr>
15192
15193 * src/reduce.c (nonterminals_reduce): Instead of throwing away
15194 useless nonterminals, move them at the end of the symbol arrays.
15195 (reduce_output): Adjust.
15196 * tests/reduce.at (Useless Nonterminals): Adjust.
15197
15198 2001-11-30 Akim Demaille <akim@epita.fr>
15199
15200 * src/reduce.c: Various comment/formatting changes.
15201 (nonterminals_reduce): New, extracted from...
15202 (reduce_grammar_tables): here.
15203 (reduce_grammar): Call nonterminals_reduce.
15204
15205 2001-11-29 Paul Eggert <eggert@twinsun.com>
15206
15207 * src/bison.simple (YYSTACK_REALLOC): Remove.
15208 (YYSTACK_ALLOC): Resurrect this macro, with its old meaning.
15209 (YYSTACK_FREE, YYSTACK_GAP_MAX, YYSTACK_BYTES, YYSTACK_RELOCATE):
15210 New macros.
15211 (union yyalloc): New type.
15212 (__yy_memcpy): Last arg is size_t, not unsigned int, to remove
15213 an arbitrary restriction on hosts where size_t is wider than int.
15214
15215 (yyparse): Don't dump core if alloca or malloc fails; instead, report
15216 a parser stack overflow. Allocate just one block of memory for all
15217 three stacks, instead of allocating three blocks; this typically is
15218 faster and reduces fragmentation.
15219
15220 Do not limit the number of items in the stack to a value that fits
15221 in 'int', as this is an arbitrary limit on hosts with 64-bit
15222 size_t and 32-bit int.
15223
15224 2001-11-29 Marc Autret <autret_m@epita.fr>
15225
15226 * tests/calc.at [AT_DATA_CALC_Y]: Use %error-verbose instead
15227 of defining YYERROR_VERBOSE.
15228 [AT_DATA]: $4 is now out of C declarations in the prologue.
15229
15230 2001-11-28 Marc Autret <autret_m@epita.fr>
15231
15232 * src/reader.c (parse_dquoted_param): New.
15233 (parse_skel_decl): Use it.
15234 * src/lex.h: Add its prototype.
15235 * src/lex.c (literalchar): Become not static.
15236
15237 2001-11-28 Marc Autret <autret_m@epita.fr>
15238
15239 * src/output.h: And put its extern declaration here.
15240 * src/output.c (error_verbose): Define here.
15241 (prepare): Echo name modification.
15242 * src/getargs.h: Clean its extern declaration.
15243 * src/getargs.c (error_verbose_flag): Remove.
15244 (getargs): Remove case 'e'.
15245 * src/options.c (option_table): 'error-verbose' is now seen as simple
15246 percent option.
15247 Include output.h.
15248
15249 * src/reader.c (read_declarations): Remove case tok_include.
15250 (parse_include_decl): Remove.
15251 * src/lex.h (token_t): Remove tok_include.
15252 * src/options.c (option_table): 'include' is now a simple command line
15253 option.
15254
15255 2001-11-28 Marc Autret <autret_m@epita.fr>
15256
15257 * src/bison.simple: Adjust muscle names.
15258 * src/muscle_tab.c (muscle_init): Also rename the muscles.
15259 * src/output.c (prepare): s/_/-/ for the muscles names.
15260 (output_parser): When scanning for a muscle, allow '-' instead of '_'.
15261
15262 2001-11-28 Marc Autret <autret_m@epita.fr>
15263
15264 * src/bison.simple: Fix debug.
15265 [YYERROR_VERBOSE]: Re-integrate as an internal macro.
15266
15267 2001-11-28 Akim Demaille <akim@epita.fr>
15268
15269 * src/LR0.c (shifts_new): New.
15270 (save_shifts, insert_start_shift, augment_automaton): Use it.
15271
15272 2001-11-28 Akim Demaille <akim@epita.fr>
15273
15274 * src/closure.c (closure): `b' and `ruleno' denote the same value:
15275 keep ruleno only.
15276
15277 2001-11-28 Akim Demaille <akim@epita.fr>
15278
15279 * src/closure.c (closure): Instead of looping over word in array
15280 then bits in words, loop over bits in array.
15281
15282 2001-11-28 Akim Demaille <akim@epita.fr>
15283
15284 * src/closure.c (closure): No longer optimize the special case
15285 where all the bits of `ruleset[r]' are set to 0, to make the code
15286 clearer.
15287
15288 2001-11-28 Akim Demaille <akim@epita.fr>
15289
15290 * src/closure.c (closure): `r' and `c' are new variables, used to
15291 de-obfuscate accesses to RULESET and CORE.
15292
15293 2001-11-28 Akim Demaille <akim@epita.fr>
15294
15295 * src/reduce.c (reduce_print): Use ngettext.
15296 (dump_grammar): Improve the trace accuracy.
15297
15298 2001-11-28 Akim Demaille <akim@epita.fr>
15299
15300 * src/reduce.c (dump_grammar): Don't translate trace messages.
15301
15302 2001-11-28 Akim Demaille <akim@epita.fr>
15303
15304 * tests/reduce.at (Useless Terminals, Useless Nonterminals): New.
15305 * src/reduce.c (reduce_grammar_tables): Do not free useless tags,
15306 as all tags are free'ed afterwards.
15307 From Enrico Scholz.
15308
15309 2001-11-27 Paul Eggert <eggert@twinsun.com>
15310
15311 * src/bison.simple (YYSTACK_REALLOC): Fix typo that caused us to
15312 use alloca when we didn't want to, and vice versa.
15313
15314 2001-11-27 Marc Autret <autret_m@epita.fr>
15315
15316 * src/muscle_tab.c (muscle_init): Remove 'verbose' muscle
15317 initialization.
15318 * src/output.c (prepare): Remove its update.
15319
15320 2001-11-27 Marc Autret <autret_m@epita.fr>
15321
15322 * tests/torture.at [AT_DATA]: Remove YYERROR_VERBOSE definition.
15323 Use %error-verbose.
15324
15325 2001-11-27 Marc Autret <autret_m@epita.fr>
15326
15327 * src/bison.simple: Remove YYERROR_VERBOSE using.
15328 Use %%error_verbose.
15329 (yyparse): Likewise.
15330 * src/output.c (prepare): Give its final value.
15331 * src/muscle_tab.c (muscle_init): Init new muscle 'error_verbose'.
15332 * src/getargs.h: Add its extern declaration.
15333 * src/getargs.c (error_verbose_flag): New int.
15334 (getargs): Update to catch new case.
15335 * src/options.c (option_table): 'error-verbose' is a new option.
15336 (shortopts): Update.
15337
15338 2001-11-27 Akim Demaille <akim@epita.fr>
15339
15340 * src/system.h: Use intl/libgettext.h.
15341 * src/Makefile.am (INCLUDES): Add -I $(top_srcdir).
15342
15343 2001-11-27 Akim Demaille <akim@epita.fr>
15344
15345 * tests/torture.at (Exploding the Stack Size with Malloc):
15346 s/YYSTACK_USE_ALLOCA_ALLOCA/YYSTACK_USE_ALLOCA/.
15347
15348 2001-11-27 Akim Demaille <akim@epita.fr>
15349
15350 * src/files.c: Include error.h.
15351 Reported by Hans Aberg.
15352
15353 2001-11-26 Marc Autret <autret_m@epita.fr>
15354
15355 * src/reader.c (parse_include_decl): New, not yet implemented.
15356 (read_declarations): Add case tok_include.
15357 * src/getargs.h (include): Add its extern definition.
15358 * src/getargs.c (include): New const char *.
15359 (getargs): Add case '-I'.
15360 * src/options.c (option_table): Add include as command line and
15361 percent option.
15362 * src/lex.h (token_t): Add tok_include.
15363
15364 2001-11-26 Akim Demaille <akim@epita.fr>
15365
15366 * src/reader.c (readgram): Make sure rules for mid-rule actions
15367 have a lineno equal to that of their host rule.
15368 Reported by Hans Aberg.
15369 * tests/regression.at (Rule Line Numbers): New.
15370
15371 2001-11-26 Akim Demaille <akim@epita.fr>
15372
15373 * src/LR0.c (allocate_itemsets): kernel_size contains ints, not
15374 size_ts.
15375
15376 2001-11-26 Akim Demaille <akim@epita.fr>
15377
15378 * src/complain.c, src/complain.h (error): Remove, provided by
15379 lib/error.[ch].
15380
15381 2001-11-26 Akim Demaille <akim@epita.fr>
15382
15383 * src/reader.c (read_declarations): Don't abort on tok_illegal,
15384 issue an error message.
15385 * tests/regression.at (Invalid %directive): New.
15386 Reported by Hans Aberg.
15387
15388 2001-11-26 Akim Demaille <akim@epita.fr>
15389
15390 * configure.in: Invoke AC_FUNC_OBSTACK and AC_FUNC_ERROR_AT_LINE.
15391 * lib/Makefile.am (libbison_a_SOURCES): Adjust.
15392
15393 2001-11-26 Akim Demaille <akim@epita.fr>
15394
15395 * src/conflicts.c (conflicts_print): Don't complain at all when
15396 there are no reduce/reduce conflicts, and as many shift/reduce
15397 conflicts as expected.
15398 * tests/regression.at (%expect right): Adjust.
15399
15400 2001-11-23 Akim Demaille <akim@epita.fr>
15401
15402 * lib/alloca.c: Update, from fileutils.
15403
15404 2001-11-23 Akim Demaille <akim@epita.fr>
15405
15406 * lib/Makefile.am (libbison_a_LIBADD): Add @ALLOCA@.
15407
15408 2001-11-23 Akim Demaille <akim@epita.fr>
15409
15410 * src/system.h: Include alloca.h.
15411 * src/main.c (main) [C_ALLOCA]: Call alloca (0).
15412
15413 2001-11-23 Akim Demaille <akim@epita.fr>
15414
15415 * src/print_graph.c (print_actions): Remove `rule', unused.
15416 * src/LR0.c (kernel_size): Contain `int' instead of `size_t' to
15417 pacify GCC's signed < unsigned warnings.
15418 * src/closure.c (itemsetsize): Likewise.
15419 * src/reader.c (symbol_list_new): Static.
15420
15421 2001-11-23 Akim Demaille <akim@epita.fr>
15422
15423 Attaching lineno to buckets is stupid, since only one copy of each
15424 symbol is kept, only the line of the first occurrence is kept too.
15425
15426 * src/symtab.h, src/symtab.c (bucket): Remove the line member.
15427 * src/reader.c (rline_allocated): Remove, unused.
15428 (symbol_list): Have a `line' member.
15429 (symbol_list_new): New.
15430 (readgram): Use it.
15431 * src/print.c (print_grammar): Output the rule line numbers.
15432 * tests/regression.at (Solved SR Conflicts)
15433 (Unresolved SR Conflicts): Adjust.
15434 Reported by Hans Aberg.
15435
15436 2001-11-22 Marc Autret <autret_m@epita.fr>
15437
15438 * src/bison.simple [YYERROR_VERBOSE]: Force its value to be 1 or 0.
15439
15440 2001-11-22 Marc Autret <autret_m@epita.fr>
15441
15442 * src/muscle_tab.c (muscle_init): Remove initialization of
15443 skeleton muscle.
15444 * src/output.c (output_master_parser): Do it here.
15445
15446 2001-11-20 Akim Demaille <akim@epita.fr>
15447
15448 * po/sv.po: New.
15449 * configure.in (ALL_LINGUAS): Adjust.
15450 * po/POTFILE.in: Remove `nullable.c' and `derives.c' which no
15451 longer contains strings to translate.
15452
15453 2001-11-19 Akim Demaille <akim@epita.fr>
15454
15455 * src/conflicts.c (conflicts_print): Add a missing \n.
15456
15457 2001-11-19 Akim Demaille <akim@epita.fr>
15458
15459 * src/nullable.c (nullable_print): New.
15460 (set_nullable): Call it when tracing.
15461 Better locality of variables.
15462
15463 2001-11-19 Akim Demaille <akim@epita.fr>
15464
15465 * src/print.c (print_actions): Better locality of variables.
15466
15467 2001-11-19 Akim Demaille <akim@epita.fr>
15468
15469 * src/derives.c (print_derives): Fix and enrich.
15470 * src/closure.c (print_fderives): Likewise.
15471
15472 2001-11-19 Akim Demaille <akim@epita.fr>
15473
15474 * src/closure.c (itemsetend): Remove, replaced with...
15475 (itemsetsize): new.
15476
15477 2001-11-19 Akim Demaille <akim@epita.fr>
15478
15479 * src/LR0.c (kernel_end): Remove, replaced with...
15480 (kernel_size): new.
15481
15482 2001-11-19 Akim Demaille <akim@epita.fr>
15483
15484 * src/conflicts.c (set_conflicts): Use arrays instead of pointers
15485 to clarify.
15486
15487 2001-11-19 Akim Demaille <akim@epita.fr>
15488
15489 * src/closure.c (closure): Use arrays instead of pointers to clarify.
15490
15491 2001-11-19 Akim Demaille <akim@epita.fr>
15492
15493 * src/closure.c, src/derives.c, src/nullable.c: Adjust various
15494 trace messages.
15495 * src/LR0.c: Likewise.
15496 (allocate_itemsets): Use arrays instead of pointers to clarify.
15497
15498 2001-11-19 Akim Demaille <akim@epita.fr>
15499
15500 * src/getargs.c (statistics_flag): Replace with...
15501 (trace_flag): New.
15502 (longopts): Accept --trace instead of --statistics.
15503 * src/getargs.h, src/options.c: Adjust.
15504 * src/LR0.c, src/closure.c, src/derives.c, src/nullable.c,
15505 * src/reduce.c: Use trace_flags instead of the CPP conditional TRACE.
15506
15507 2001-11-19 Akim Demaille <akim@epita.fr>
15508
15509 * src/LR0.c (new_itemsets, get_state): Use more arrays and fewer
15510 pointers to clarify the code.
15511 (save_reductions, save_shifts): Factor common parts of alternatives.
15512
15513 2001-11-19 Akim Demaille <akim@epita.fr>
15514
15515 * src/LR0.c (new_state, get_state): Complete TRACE code.
15516 * src/closure.c: Include `reader.h' to get `tags', needed by the
15517 trace code.
15518 Rename the conditional DEBUG as TRACE.
15519 Output consistently TRACEs to stderr, not stdout.
15520 * src/derives.c: Likewise.
15521 * src/reduce.c: (inaccessable_symbols): Using if is better style
15522 than goto.
15523 Use `#if TRACE' instead of `#if 0' for tracing code.
15524
15525 2001-11-19 Akim Demaille <akim@epita.fr>
15526
15527 * src/system.h (LIST_FREE, shortcpy): New.
15528 * src/LR0.c: Use them.
15529 * src/output.c (free_itemsets, free_reductions, free_shifts):
15530 Remove, replaced by LIST_FREE.
15531
15532 2001-11-19 Akim Demaille <akim@epita.fr>
15533
15534 * src/state.h (CORE_ALLOC, SHIFTS_ALLOC, ERRS_ALLOC)
15535 (REDUCTIONS_ALLOC): New.
15536 * src/LR0.c, src/conflicts.c: Use them to de-obfuscate memory
15537 allocation.
15538
15539 2001-11-19 Akim Demaille <akim@epita.fr>
15540
15541 * src/LR0.c (new_state): Complete trace code.
15542 * src/nullable.c (set_nullable): Don't translate traces.
15543
15544 2001-11-19 Akim Demaille <akim@epita.fr>
15545
15546 * src/print_graph.c (print_core): Better locality of variables.
15547 * src/print.c (print_core): Likewise.
15548
15549 2001-11-19 Akim Demaille <akim@epita.fr>
15550
15551 * src/vcg.c: You do the output, so you are responsible of the
15552 handling of VCG syntax, in particular: use quotearg.
15553 * src/print_graph.c: Don't.
15554 (print_actions): Don't output the actions as part of the nodes,
15555 since that's the job of the edges.
15556 (print_state): Don't output by hand: fill the node description,
15557 and ask for its output.
15558
15559 2001-11-19 Akim Demaille <akim@epita.fr>
15560
15561 * src/bison.simple (yyparse): When verbosely reporting an error,
15562 no longer put additional quotes around token names.
15563 * tests/calc.at: Adjust.
15564
15565 2001-11-19 Akim Demaille <akim@epita.fr>
15566
15567 * src/symtab.h, src/symtab.c: `line' is a new member of `bucket'.
15568 * src/reader.c (record_rule_lines, rline, rline_allocated): Remove.
15569 * src/output.c: Adjust.
15570
15571 2001-11-19 Akim Demaille <akim@epita.fr>
15572
15573 * src/gram.h (rprec, rprecsym, rassoc): Remove, now part of...
15574 (rule_t): this.
15575 * src/conflicts.c, src/reader.c, src/reduce.c: Adjust.
15576
15577 2001-11-19 Akim Demaille <akim@epita.fr>
15578
15579 * src/gram.h (rule_t): New.
15580 (rule_table): New.
15581 (rrhs, rlhs): Remove, part of state_t.
15582 * src/print_graph.c, src/closure.c, src/conflicts.c, src/derives.c,
15583 * src/lalr.c, src/nullable.c, src/output.c, src/print.c,
15584 * src/reader.c, src/reduce.c: Adjust.
15585
15586 2001-11-19 Akim Demaille <akim@epita.fr>
15587
15588 * src/reader.c (symbols_output): New, extracted from...
15589 (packsymbols): Here.
15590 (reader): Call it.
15591
15592 2001-11-19 Akim Demaille <akim@epita.fr>
15593
15594 * src/lalr.c (set_maxrhs, maxrhs): Remove, replaced with...
15595 (maxrhs): this new function.
15596
15597 2001-11-19 Akim Demaille <akim@epita.fr>
15598
15599 * src/lalr.c (F): New macro to access the variable F.
15600 Adjust.
15601
15602 2001-11-19 Akim Demaille <akim@epita.fr>
15603
15604 * src/lalr.h (LA): New macro to access the variable LA.
15605 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15606 * src/lalr.c: Adjust.
15607
15608 2001-11-19 Akim Demaille <akim@epita.fr>
15609
15610 * src/lalr.c (initialize_LA): Only initialize LA. Let...
15611 (set_state_table): handle the `lookaheads' members.
15612
15613 2001-11-19 Akim Demaille <akim@epita.fr>
15614
15615 * src/lalr.h (lookaheads): Removed array, whose contents is now
15616 a member of...
15617 (state_t): this structure.
15618 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15619 Adjust.
15620
15621 2001-11-19 Akim Demaille <akim@epita.fr>
15622
15623 * src/lalr.h (consistent): Removed array, whose contents is now
15624 a member of...
15625 (state_t): this structure.
15626 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15627 Adjust.
15628
15629 2001-11-19 Akim Demaille <akim@epita.fr>
15630
15631 * src/lalr.h (reduction_table, shift_table): Removed arrays, whose
15632 contents are now members of...
15633 (state_t): this structure.
15634 * src/output.c, src/lalr.c, src/print_graph.c, src/conflicts.c:
15635 Adjust.
15636
15637 2001-11-19 Akim Demaille <akim@epita.fr>
15638
15639 * src/lalr.h (state_t): New.
15640 (state_table): Be a state_t * instead of a core **.
15641 (accessing_symbol): Remove, part of state_t.
15642 * src/lalr.c: Adjust.
15643 (set_accessing_symbol): Merge into...
15644 (set_state_table): this.
15645 * src/print_graph.c, src/conflicts.c: Adjust.
15646
15647 2001-11-14 Akim Demaille <akim@epita.fr>
15648
15649 * tests/calc.at, tests/output.at, tests/regression.at,
15650 * tests/testsuite.at, tests/torture.at: Rely on Autotest 2.52g:
15651 now the tests are run in private dirs, therefore AC_CLEANUP and
15652 family can be simplified to 0-ary.
15653 * tests/atlocal.in: Now that we run `elsewhere' than in tests/,
15654 use abs. path to find config.h.
15655 * tests/calc.at (AT_CHECK_CALC): Don't try to check the compiler's
15656 stderr, there can be way too much random noise.
15657 Instead pass -Werror to GCC and rely on the exit status.
15658 Reported by Wolfram Wagner.
15659
15660 2001-11-14 Akim Demaille <akim@epita.fr>
15661
15662 * src/bison.simple (yyparse): Let yyls1, yyss1 and yyvs1 be
15663 defined only if yyoverflow is defined, to avoid `warning: unused
15664 variable `yyvs1''.
15665 Reported by The Test Suite.
15666
15667 2001-11-14 Akim Demaille <akim@epita.fr>
15668
15669 * src/print.c: Include reduce.h.
15670 Reported by Hans Aberg.
15671
15672 2001-11-14 Akim Demaille <akim@epita.fr>
15673
15674 * src/lex.c, src/lex.h (token_buffer, unlexed_token_buffer):
15675 Revert a previous patch: these are really const.
15676 * src/conflicts.c (conflict_report): Additional useless pair of
15677 braces to pacify GCC's warnings for `if () if () {} else {}'.
15678 * src/lex.c (parse_percent_token): Replace equal_offset with
15679 arg_offset.
15680 arg is const.
15681 Be sure to strdup `arg' when used, since there is no reason for
15682 token_buffer not to change.
15683
15684 2001-11-14 Akim Demaille <akim@epita.fr>
15685
15686 * src/system.h (EXIT_SUCCESS, EXIT_FAILURE): Ensure a proper
15687 definition.
15688 * src/main.c (main): Use them.
15689 Suggested by Hans Aberg.
15690
15691 2001-11-12 Akim Demaille <akim@epita.fr>
15692
15693 * src/system.h (ngettext): Now that we use ngettext, be sure to
15694 provide a default definition when NLS are not used.
15695
15696 2001-11-12 Akim Demaille <akim@epita.fr>
15697
15698 * doc/bison.texinfo: Use `$' as shell prompt, not `%'.
15699 Use @kbd to denote user input.
15700 (Language and Grammar): ANSIfy the example.
15701 Adjust its layout for info/notinfo.
15702 (Location Tracking Calc): Output error messages to stderr.
15703 Output locations in a more GNUtically correct way.
15704 Fix a couple of Englishos.
15705 Adjust @group/@end group pairs.
15706
15707 2001-11-12 Akim Demaille <akim@epita.fr>
15708
15709 %expect was not functioning at all.
15710
15711 * src/conflicts.c (expected_conflicts): Set to -1.
15712 (conflict_report): Use ngettext.
15713 (conflicts_print): Check %expect and make its violation an error.
15714 * doc/bison.texinfo (Expect Decl): Adjust.
15715 * configure.in (AM_GNU_GETTEXT): Ask for ngettext.
15716 * tests/regression.at (%expect not enough, %expect right)
15717 (%expect too much): New.
15718
15719 2001-11-12 Akim Demaille <akim@epita.fr>
15720
15721 * tests/regression.at (Conflicts): Rename as...
15722 (Unresolved SR Conflicts): this.
15723 (Solved SR Conflicts): New.
15724
15725 2001-11-12 Akim Demaille <akim@epita.fr>
15726
15727 * src/reduce.c (print_results): Rename as...
15728 (reduce_output): This.
15729 Output to OUT, passed as argument, instead of output_obstack.
15730 (dump_grammar): Likewise.
15731 (reduce_free): New.
15732 Also free V1.
15733 (reduce_grammar): No longer call reduce_output, since...
15734 * src/print.c (print_results): do it.
15735 * src/main.c (main): Call reduce_free;
15736
15737 2001-11-12 Akim Demaille <akim@epita.fr>
15738
15739 * src/conflicts.c (print_reductions): Accept OUT as argument.
15740 Output to it, not to output_obstack.
15741 * src/print.c (print_actions): Adjust.
15742
15743 2001-11-12 Akim Demaille <akim@epita.fr>
15744
15745 * src/conflicts.c (count_sr_conflicts, count_rr_conflicts): Return
15746 the result instead of using...
15747 (src_total, rrc_total, src_count, rrc_count): Remove.
15748 (any_conflicts): Remove.
15749 (print_conflicts): Split into...
15750 (conflicts_print, conflicts_output): New.
15751 * src/conflicts.h: Adjust.
15752 * src/main.c (main): Invoke both conflicts_output and conflicts_print.
15753 * src/print.c (print_grammar): Issue `\n' between two rules.
15754 * tests/regression.at (Conflicts): New.
15755 Reported by Tom Lane.
15756
15757 2001-11-12 Akim Demaille <akim@epita.fr>
15758
15759 * tests/regression.at (Invalid input): Remove, duplicate with
15760 ``Invalid input: 1''.
15761
15762 2001-11-12 Akim Demaille <akim@epita.fr>
15763
15764 * tests/torture.at (AT_DATA_STACK_TORTURE)
15765 (Exploding the Stack Size with Alloca)
15766 (Exploding the Stack Size with Malloc): New.
15767
15768 2001-11-12 Akim Demaille <akim@epita.fr>
15769
15770 * src/bison.simple (YYSTACK_REALLOC): New.
15771 (yyparse) [!yyoverflow]: Use it and free the old stack.
15772 Reported by Per Allansson.
15773
15774 2001-11-12 Pascal Bart <pascal.bart@epita.fr>
15775
15776 * src/bison.simple: Define type yystype instead of YYSTYPE, and
15777 define CPP macro, which substitute YYSTYPE by yystype.
15778 * src/reader.c (parse_union_decl): Output yystype/YYSTYPE as we do
15779 with yyltype/YYLTYPE. This allows inclusion of the generated
15780 header within the parser if the compiler, such as GGC, accepts
15781 multiple equivalent #defines.
15782 From Akim.
15783
15784 2001-11-05 Akim Demaille <akim@epita.fr>
15785
15786 * src/reader.c (symbols_output): New, extracted from...
15787 (packsymbols): here.
15788 (reader): Adjust.
15789
15790 2001-11-05 Akim Demaille <akim@epita.fr>
15791
15792 * src/lex.c (parse_percent_token): s/quotearg/quote/.
15793
15794 2001-11-05 Akim Demaille <akim@epita.fr>
15795
15796 * tests/regression.at (AT_TEST_CPP_GUARD_H): Adjust the clean up
15797 pattern.
15798
15799 2001-11-05 Akim Demaille <akim@epita.fr>
15800
15801 * src/options.h (struct option_table_struct): set_flags is void*.
15802 * src/options.c (longopts): Support `--output' and `%output'.
15803 (usage): Adjust.
15804 * src/lex.h (tok_setopt): Remove, replaced with...
15805 (tok_intopt, tok_stropt): these new guys.
15806 * src/lex.c (getopt.h): Not needed.
15807 (token_buffer, unlexed_token_buffer): Not const.
15808 (percent_table): Promote `-' over `_' in directive names.
15809 Active `%name-prefix', `file-prefix', and `output'.
15810 (parse_percent_token): Accept possible arguments to directives.
15811 Promote `-' over `_' in directive names.
15812
15813 2001-11-04 Akim Demaille <akim@epita.fr>
15814
15815 * doc/bison.texinfo (Decl Summary): Split the list into
15816 `directives for grammars' and `directives for bison'.
15817 Sort'em.
15818 Add description of `%name-prefix', `file-prefix', and `output'.
15819 Promote `-' over `_' in directive names.
15820 (Bison Options): s/%locactions/%locations/. Nice Freudian slip.
15821 Simplify the description of `--name-prefix'.
15822 Promote `-' over `_' in directive names.
15823 Promote `--output' over `--output-file'.
15824 Fix the description of `--defines'.
15825 * tests/output.at: Exercise %file-prefix and %output.
15826
15827 2001-11-02 Akim Demaille <akim@epita.fr>
15828
15829 * doc/refcard.tex: Update.
15830
15831 2001-11-02 Akim Demaille <akim@epita.fr>
15832
15833 * src/symtab.h (SUNDEF): New.
15834 * src/symtab.c (bucket_new): Init user_token_number to SUNDEF to
15835 stand for `uninitialized', instead of 0.
15836 * src/reader.c (packsymbols, parse_thong_decl): Adjust.
15837 * src/lex.c (lex): Adjust.
15838
15839 * tests/calc.at (_AT_DATA_CALC_Y): Declare a token for EOF.
15840 Number it 0.
15841 Let yylex return it instead of a plain 0.
15842 Reported by Dick Streefland.
15843
15844 2001-11-02 Akim Demaille <akim@epita.fr>
15845
15846 * tests/regression.at (Mixing %token styles): New test.
15847
15848 2001-11-02 Akim Demaille <akim@epita.fr>
15849
15850 * src/reader.c (parse_thong_decl): Formatting changes.
15851 (token_translations_init): New, extracted from...
15852 (packsymbols): Here.
15853 Adjust.
15854
15855 2001-11-01 Akim Demaille <akim@epita.fr>
15856
15857 * tests/regression.at (AT_TEST_CPP_GUARD_H): New.
15858 Check that `9foo.y' produces correct cpp guards.
15859 * src/files.c (compute_header_macro): Prepend `BISON_' to CPP
15860 guards.
15861 Reported by Wwp.
15862
15863 2001-11-01 Akim Demaille <akim@epita.fr>
15864
15865 * tests/regression.at (Invalid input: 2): New.
15866 * src/lex.c (unlexed_token_buffer): New.
15867 (lex, unlex): Adjust: when unlexing, be sure to save token_buffer
15868 too.
15869 Reported by Wwp.
15870
15871 2001-11-01 Akim Demaille <akim@epita.fr>
15872
15873 * tests/calc.at: Catch up with 1.30.
15874 * configure.in: Bump to 1.49a.
15875 Adjust to newer Autotest.
15876
15877 2001-10-19 Pascal Bart <pascal.bart@epita.fr>
15878
15879 * src/conflicts.c: Move global variables rrc_total and src_total ...
15880 (print_conflicts): here.
15881 * src/output.c (output): Free global variable user_toknums.
15882 * src/lex.c (token_obstack): Become static.
15883
15884 2001-10-18 Akim Demaille <akim@epita.fr>
15885
15886 * tests/atlocal.in (GCC): Add.
15887 * tests/calc.at: s/m4_match/m4_bmatch/.
15888 s/m4_patsubst/m4_bpatsubst/.
15889 (AT_CHECK_CALC): Check the compiler's stderr only if it's GCC.
15890 * configure.in: AC_SUBST(GCC).
15891
15892 2001-10-14 Marc Autret <autret_m@epita.fr>
15893
15894 * src/options.c (create_long_option_table): Fix.
15895
15896 2001-10-10 Akim Demaille <akim@epita.fr>
15897
15898 * src/bison.simple: Be sure to set YYSTACK_USE_ALLOCA.
15899
15900 2001-10-04 Akim Demaille <akim@epita.fr>
15901
15902 * src/reader.c (parse_union_decl): Push the caracters in
15903 union_obstack, not attrs_obstack.
15904
15905 2001-10-04 Akim Demaille <akim@epita.fr>
15906
15907 Merge in the branch 1.29.
15908
15909 * src/reader.c (packsymbols): Use a temporary obstack for
15910 `%%tokendef', since output_stack is already used elsewhere.
15911
15912 2001-10-02 Akim Demaille <akim@epita.fr>
15913
15914 Bump 1.29d.
15915
15916 2001-10-02 Akim Demaille <akim@epita.fr>
15917
15918 Version 1.29c.
15919
15920 2001-10-02 Akim Demaille <akim@epita.fr>
15921
15922 * tests/regression.at (Invalid CPP headers): New.
15923 From Alexander Belopolsky.
15924 * src/files.c (compute_header_macro): Map non alnum chars to `_'.
15925
15926 2001-10-02 Akim Demaille <akim@epita.fr>
15927
15928 * tests/regression.at (Invalid input): New.
15929 * src/lex.c (lex): Be sure to set `token_buffer' in any case.
15930 Reported by Shura.
15931
15932 2001-10-02 Akim Demaille <akim@epita.fr>
15933
15934 * tests/calc.at: Now that --debug works, the tests must be adjusted.
15935
15936 2001-10-02 Akim Demaille <akim@epita.fr>
15937
15938 * src/output.c (output_parser): Assert `skeleton'.
15939 * src/files.c (skeleton_find): Look harder for skeletons on DOSish
15940 systems.
15941 From Shura.
15942
15943 2001-10-01 Marc Autret <autret_m@epita.fr>
15944
15945 * src/lex.h: Echo modifications.
15946 * src/lex.c (unlex): Parameter is now token_t.
15947 From Hans Aberg.
15948
15949 2001-10-01 Marc Autret <autret_m@epita.fr>
15950
15951 * src/main.c: Include lex.h.
15952 From Hans Aberg.
15953
15954 2001-09-29 Akim Demaille <akim@epita.fr>
15955
15956 * src/getargs.c (longopts): `--debug' is `-t', not `-d'.
15957
15958 2001-09-28 Akim Demaille <akim@epita.fr>
15959
15960 * tests/testsuite.at: Update to newer Autotest.
15961 * tests/Makefile.am (EXTRA_DIST): bison is not to be shipped.
15962
15963 2001-09-27 Akim Demaille <akim@epita.fr>
15964
15965 Position independent wrapper.
15966
15967 * tests/bison: Remove.
15968 * tests/bison.in: New.
15969 * configure.in: Adjust.
15970
15971 2001-09-27 Paul Eggert <eggert@twinsun.com>
15972
15973 Port quotearg fixes from tar 1.13.24.
15974
15975 * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
15976 tm to be declared.
15977 (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
15978 (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
15979
15980 * m4/Makefile.am (EXTRA_DIST): Add mbrtowc.m4.
15981 * m4/mbrtowc.m4: New file.
15982 * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for mbsinit and stddef.h.
15983 Use jm_FUNC_MBRTOWC instead of AC_CHECK_FUNCS(mbrtowc).
15984
15985 2001-09-27 Akim Demaille <akim@epita.fr>
15986
15987 Bump to 1.29c.
15988
15989 2001-09-27 Akim Demaille <akim@epita.fr>
15990
15991 Version 1.29b.
15992
15993 2001-09-25 Akim Demaille <akim@epita.fr>
15994
15995 * src/system.h: Include `xalloc.h'.
15996 Remove it from the C files.
15997 * src/files.c (output_files): Free the obstacks.
15998 * src/lex.c (init_lex): Rename as...
15999 (lex_init): this.
16000 (lex_free): New.
16001 * src/main.c (main): Use it.
16002
16003 2001-09-24 Marc Autret <autret_m@epita.fr>
16004
16005 * src/vcg.c (open_edge, close_edge, open_node, close_node): Change
16006 to output informations in fout (FILE*).
16007 (open_graph, close_graph): Likewise.
16008 (output_graph, output_edge, output_node): Likewise.
16009 * src/vcg.h: Update function prototypes.
16010 * src/print_graph.c (print_graph): Open output graph file.
16011 (print_actions): Adjust.
16012 * src/files.h: Remove extern declaration.
16013 * src/files.c: Remove graph_obstack declaration.
16014 (open_files): Remove graph_obstack initialization.
16015 (output_files): Remove graph_obstack saving.
16016
16017 2001-09-24 Marc Autret <autret_m@epita.fr>
16018
16019 * src/files.c (compute_output_file_names): Fix.
16020
16021 2001-09-24 Marc Autret <autret_m@epita.fr>,
16022 Akim Demaille <akim@epita.fr>
16023
16024 * src/reader.c (reader): Remove call to free_symtab ().
16025 * src/main.c (main): Call it here.
16026 Include symtab.h.
16027 * src/conflicts.c (initialize_conflicts): Rename as...
16028 (solve_conflicts): this.
16029 * src/print.c (print_core, print_actions, print_state)
16030 (print_grammar): Dump to a file instead a `output_obstack'.
16031 (print_results): Dump `output_obstack', and then proceed with the
16032 FILE *.
16033 * src/files.c (compute_output_file_names, close_files): New.
16034 (output_files): Adjust.
16035 * src/main.c (main): Adjust.
16036
16037 2001-09-23 Marc Autret <autret_m@epita.fr>
16038
16039 * src/files.c (compute_header_macro): Computes header macro name
16040 from spec_defines_file when given.
16041
16042 2001-09-23 Marc Autret <autret_m@epita.fr>
16043
16044 * src/files.c (output_files): Add default extensions.
16045
16046 2001-09-22 Akim Demaille <akim@epita.fr>
16047
16048 * src/conflicts.c (finalize_conflicts): Rename as...
16049 (free_conflicts): this.
16050
16051 2001-09-22 Akim Demaille <akim@epita.fr>
16052
16053 * src/gram.c (gram_free): Rename back as...
16054 (dummy): this.
16055 (output_token_translations): Free `token_translations'.
16056 * src/symtab.c (free_symtab): Free the tag field.
16057
16058 2001-09-22 Akim Demaille <akim@epita.fr>
16059
16060 Remove `translations' as it is always set to true.
16061
16062 * src/gram.h: Adjust.
16063 * src/reader.c (packsymbols, parse_token_decl): Adjust
16064 * src/print.c (print_grammar): Adjust.
16065 * src/output.c (output_token_translations): Adjust.
16066 * src/lex.c (lex): Adjust.
16067 * src/gram.c: Be sure the set pointers to NULL.
16068 (dummy): Rename as...
16069 (gram_free): this.
16070
16071 2001-09-22 Akim Demaille <akim@epita.fr>
16072
16073 * configure.in: Invoke AM_LIB_DMALLOC.
16074 * src/system.h: Use dmalloc.
16075 * src/LR0.c: Be sure to have pointers initialized to NULL.
16076 (allocate_itemsets): Allocate kernel_items only if needed.
16077
16078 2001-09-22 Akim Demaille <akim@epita.fr>
16079
16080 * configure.in: Bump to 1.29b.
16081 * tests/Makefile.am (DISTCLEANFILES): Add package.m4.
16082 * tests/calc.at (_AT_DATA_CALC_Y): #undef malloc so that we don't
16083 need xmalloc.c in calc.y.
16084 From Pascal Bart.
16085
16086 2001-09-21 Akim Demaille <akim@epita.fr>
16087
16088 Version 1.29a.
16089 * Makefile.maint, config/config.guess, config/config.sub,
16090 * config/missing: Update from masters.
16091 * tests/Makefile.am ($(srcdir)/$(TESTSUITE)): No longer depend
16092 upon package.m4.
16093 * configure.in (ALL_LINGUAS): Add `tr'.
16094
16095 2001-09-21 Akim Demaille <akim@epita.fr>
16096
16097 * tests/Makefile.am (package.m4): Move to...
16098 ($(srcdir)/$(TESTSUITE)): here.
16099
16100 2001-09-20 Akim Demaille <akim@epita.fr>
16101
16102 * src/complain.c: No longer try to be standalone: use system.h.
16103 Don't assume __STDC__ is defined to 1. Just test if it is defined.
16104 * src/complain.h: Likewise.
16105 * src/reduce.c (useless_nonterminals, inaccessable_symbols):
16106 Remove the unused variable `n'.
16107 From Albert Chin-A-Young.
16108
16109 2001-09-18 Marc Autret <autret_m@epita.fr>
16110
16111 * doc/bison.1: Update.
16112 * doc/bison.texinfo (Bison Options): Update --defines and --graph
16113 descriptions.
16114 (Option Cross Key): Update.
16115 Add --graph.
16116
16117 2001-09-18 Marc Autret <autret_m@epita.fr>
16118
16119 * tests/regression.at: New test (comment in %union).
16120
16121 2001-09-18 Marc Autret <autret_m@epita.fr>
16122
16123 * src/reader.c (parse_union_decl): Do not output '/'. Let copy_comment
16124 do that.
16125 Reported by Keith Browne.
16126
16127 2001-09-18 Marc Autret <autret_m@epita.fr>
16128
16129 * tests/output.at: Add tests for --defines and --graph.
16130
16131 2001-09-18 Marc Autret <autret_m@epita.fr>
16132
16133 * tests/output.at: Removes tests of %{header,src}_extension features.
16134
16135 2001-09-18 Akim Demaille <akim@epita.fr>
16136
16137 * tests/Makefile.am (package.m4): New.
16138 * tests/calc.at (_AT_CHECK_CALC): Just run `calc input'.
16139 (_AT_CHECK_CALC_ERROR): Likewise.
16140 Factor the `, ' part of verbose error messages.
16141
16142 2001-09-18 Marc Autret <autret_m@epita.fr>
16143
16144 * src/getargs.c (longopts): Declare --defines and --graph as options
16145 with optional arguments.
16146 * src/files.h: Add extern declarations.
16147 * src/files.c (spec_graph_file, spec_defines_file): New.
16148 (output_files): Update.
16149 Remove CPP-outed code.
16150
16151 2001-09-18 Marc Autret <autret_m@epita.fr>
16152
16153 Turn off %{source,header}_extension feature.
16154
16155 * src/files.c (compute_exts_from_gf): Update.
16156 (compute_exts_from_src): Update.
16157 (output_files): CPP-out useless code.
16158 * src/files.h: Remove {header,source}_extension extern declarations.
16159 * src/reader.c (parse_dquoted_param): CPP-out.
16160 (parse_header_extension_decl): Remove.
16161 (parse_source_extension_decl): Remove.
16162 (read_declarations): Remove cases tok_{hdrext,srcext}.
16163 * src/lex.c (percent_table): Remove {header,source}_extension entries.
16164 * src/lex.h (token_t): Remove tok_hdrext and tok_srcext.
16165
16166 2001-09-10 Akim Demaille <akim@epita.fr>
16167
16168 * tests/output.at (AT_CHECK_BISON_FLAGS, AT_CHECK_BISON_PERCENT):
16169 (AT_CHECK_BISON_PERCENT_FLAGS): Merge into...
16170 (AT_CHECK_OUTPUT): this.
16171 Merely check ls' exit status, its output is useless.
16172
16173 2001-09-10 Akim Demaille <akim@epita.fr>
16174
16175 * tests/calc.at: Use m4_match.
16176 (_AT_DATA_CALC_Y): Check `yyin != NULL', not `stdin != NULL'.
16177
16178 2001-09-10 Marc Autret <autret_m@epita.fr>,
16179 Akim Demaille <akim@epita.fr>
16180
16181 * src/vcg.h (graph_s): color, textcolor, bordercolor are now
16182 enum color_e.
16183 * src/print_graph.c (print_graph): Initalize graph.layoutalgorithm
16184 to `normal'.
16185 * src/reader.c (parse_token_decl): Initialize token with tok_eof.
16186 * src/lex.h: Adjust prototype.
16187 (token_t): Add `tok_undef'.
16188 * src/lex.c (struct percent_table_struct): Retval is now a token_t.
16189 (parse_percent_token): Now returns token_t.
16190 Add default statement in switch.
16191 (lex): Separate `c' as an input variable, from the token_t result
16192 part.
16193 (unlexed): Is a token_t.
16194
16195 2001-09-10 Akim Demaille <akim@epita.fr>
16196
16197 * configure.in: Bump to 1.29a.
16198
16199 2001-09-07 Akim Demaille <akim@epita.fr>
16200
16201 Version 1.29.
16202
16203 2001-08-30 Akim Demaille <akim@epita.fr>
16204
16205 * tests/atgeneral.m4, tests/atconfig.in, tests/suite.at: Remove.
16206 * m4/atconfig.m4: Remove.
16207 * tests/testsuite.at, tests/atlocal.in, tests/output.at,
16208 * tests/bison: New.
16209 * tests/regression.at, tests/calc.at: Use m4_define, AT_BANNER,
16210 m4_if, m4_patsubst, and m4_regexp.
16211 * tests/calc.at (_AT_CHECK_CALC, _AT_CHECK_CALC_ERROR): Use an
16212 `input' file instead of echo.
16213
16214 2001-08-29 Akim Demaille <akim@epita.fr>
16215
16216 Bump to 1.28e.
16217
16218 2001-08-29 Akim Demaille <akim@epita.fr>
16219
16220 Version 1.28d.
16221
16222 2001-08-29 Paul Eggert <eggert@twinsun.com>
16223
16224 * src/bison.simple (yyparse): Don't take the address of an
16225 item before the start of an array, as that doesn't conform to
16226 the C Standard.
16227
16228 2001-08-29 Robert Anisko <anisko_r@epita.fr>
16229
16230 * doc/bison.texinfo (Location Tracking Calc): New node.
16231
16232 2001-08-29 Paul Eggert <eggert@twinsun.com>
16233
16234 * src/output.c (output): Do not define const, as this now
16235 causes more problems than it cures.
16236
16237 2001-08-29 Akim Demaille <akim@epita.fr>
16238
16239 * doc/bison.texinfo: Modernize `@node' and `@top' use: just name
16240 the nodes.
16241 Be sure to tag the `detailmenu'.
16242
16243 2001-08-29 Akim Demaille <akim@epita.fr>
16244
16245 * Makefile.maint (do-po-update): Wget refuses to overwrite files:
16246 download in a tmp dir.
16247
16248 2001-08-28 Marc Autret <autret_m@epita.fr>
16249
16250 * config/depcomp: New file.
16251
16252 2001-08-28 Marc Autret <autret_m@epita.fr>
16253
16254 * doc/bison.1 (mandoc): Adjust.
16255 From Juan Manuel Guerrero.
16256
16257 2001-08-28 Marc Autret <autret_m@epita.fr>
16258
16259 * src/print_graph.c (print_state): Fix.
16260
16261 2001-08-27 Marc Autret <autret_m@epita.fr>
16262
16263 * src/vcg.h (classname_s, infoname_s, node_s): Constify the
16264 char * members.
16265 Echo modifications to the functions prototypes.
16266 * src/vcg.c (add_classname, add_infoname): Adjust arguments.
16267
16268 2001-08-27 Marc Autret <autret_m@epita.fr>
16269
16270 * src/vcg.c: Include `xalloc.h'.
16271 (add_colorentry): New.
16272 (add_classname): New.
16273 (add_infoname): New.
16274 * src/vcg.h: Add new prototypes.
16275
16276 2001-08-27 Akim Demaille <akim@epita.fr>
16277
16278 * Makefile.maint: Sync. again with CVS Autoconf.
16279
16280 2001-08-27 Akim Demaille <akim@epita.fr>
16281
16282 * Makefile.maint: Formatting changes.
16283 (po-update, cvs-update, update): New targets.
16284 (AMTAR): Remove.
16285
16286 2001-08-27 Akim Demaille <akim@epita.fr>
16287
16288 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
16289 * Makefile.maint: Sync. with CVS Autoconf.
16290
16291 2001-08-27 Marc Autret <autret_m@epita.fr>
16292
16293 * src/vcg.h (struct infoname_s): New.
16294 (struct colorentry_s): New.
16295 (graph_s): New fields {vertical,horizontal}_order in structure.
16296 Add `infoname' field.
16297 Add `colorentry' field;
16298 * src/vcg_defaults.h (G_VERTICAL_ORDER): New.
16299 (G_HORIZONTAL_ORDER): New.
16300 (G_INFONAME): New.
16301 (G_COLORENTRY): New.
16302 * src/vcg.c (output_graph): Add output of {vertical,horizontal}_order.
16303 Add output of `infoname'.
16304 Add output of `colorentry'.
16305
16306 2001-08-27 Marc Autret <autret_m@epita.fr>
16307
16308 * src/reader.c (parse_dquoted_param): Rename variable `index' to `i'.
16309 This one shadowed a global parameter.
16310
16311 2001-08-24 Marc Autret <autret_m@epita.fr>
16312
16313 * src/print_graph.c (node_output_size): Declared POSIX `size_t' type,
16314 instead of `unsigned'.
16315 (print_state): Do not call obstack_object_size () in obstack_grow ()
16316 to avoid macro variables shadowing.
16317
16318 2001-08-23 Marc Autret <autret_m@epita.fr>
16319
16320 * src/lex.c (percent_table): Typo: s/naem/name/.
16321 Add graph option.
16322 Normalize new options declarations.
16323
16324 2001-08-20 Pascal Bart <pascal.bart@epita.fr>
16325
16326 * tests/suite.at: Exercise %header_extension and %source_extension.
16327
16328 2001-08-16 Marc Autret <autret_m@epita.fr>
16329
16330 * src/reader.c (parse_dquoted_param): New.
16331 (parse_header_extension_decl): Use it.
16332 (parse_source_extension_decl): Likewise.
16333
16334 2001-08-16 Marc Autret <autret_m@epita.fr>
16335
16336 * src/vcg.c: Remove includes of `complain.h' and `xalloc.h'.
16337 (get_xxxx_str): Use assert () instead of complain ().
16338 Remove return invokations in default cases.
16339 (get_decision_str): Modify default behaviour. Remove second argument.
16340 Echo modifications on calls.
16341 (output_graph): Fix.
16342
16343 2001-08-16 Marc Autret <autret_m@epita.fr>
16344
16345 * src/getargs.c (usage): Update with ``-g, --graph''.
16346
16347 2001-08-16 Marc Autret <autret_m@epita.fr>
16348
16349 * doc/bison.texinfo (Bison Options): Add items `-g', `--graph'.
16350 (Option Cross Key): Likewise.
16351 * doc/bison.1: Update.
16352
16353 2001-09-25 Pascal Bart <pascal.bart@epita.fr>
16354
16355 * src/output.c (output_master_parser): Don't finish action_obstack.
16356 (output_parser): Don't care about the muscle action, here.
16357 (prepare): Copy the action_obstack in the action muscle.
16358 (output): Free action_obstack.
16359
16360 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
16361
16362 * src/reader.c (parse_union_decl): Add new obstack union_obstack. Which
16363 will contain `%union' declaration.
16364 (parse_union_decl): Delete #line directive output.
16365 (parse_union_decl): Substitute /attrs_obstack/union_obstack for all
16366 informations about %union.
16367 (parse_union_decl): Copy the union_obstack in the muscle stype.
16368 * src/bison.simple: Add new #line directive.
16369 Add typdef %%stype YYSTYPE.
16370
16371 2001-09-23 Pascal Bart <pascal.bart@epita.fr>
16372
16373 * src/bison.simple: Add new `#line' directive.
16374
16375 2001-09-22 Pascal Bart <pascal.bart@epita.fr>
16376
16377 * src/bison.simple: New `#line' directive.
16378 * src/output.c (output_parser): Support new dynamic muscle input_line.
16379
16380 2001-09-22 Marc Autret <autret_m@epita.fr>
16381
16382 * src/output.c (output_master_parser): New.
16383 (output_parser): Be more re-entrant.
16384
16385 2001-09-21 Marc Autret <autret_m@epita.fr>
16386
16387 * src/reader.c (copy_definition, parse_union_decl): Update and use
16388 `linef' muscle.
16389 (copy_action): Likewise.
16390 Use obstack_1grow ().
16391 * src/muscle_tab.c (muscle_init): Add muscle `linef'.
16392
16393 2001-09-21 Marc Autret <autret_m@epita.fr>
16394
16395 * src/options.c (option_table): Adjust.
16396 * src/lex.c (parse_percent_token): Fix.
16397
16398 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
16399
16400 * src/options.c (symtab.h): Include it, need by lex.h.
16401
16402 2001-09-20 Pascal Bart <pascal.bart@epita.fr>
16403
16404 * src/lex.c (parse_percent_token): Change type of variable `tx', which
16405 is now an option_table_struct*.
16406 (option_strcmp): New function option_strcmp.
16407 (parse_percent_token): Call option_strcmp.
16408 * src/getargs.c (xalloc.h, options.h): Include it.
16409 (getargs): Call create_long_option_table.
16410 (getargs): Free longopts at the end of the function.
16411 (shortopts): Move in options.c.
16412 * src/options.c (create_long_option_table): New function. Convert
16413 information from option_table to option structure.
16414 * src/reader.c (options.h): Include it.
16415
16416 * src/Makefile.am: Adjust.
16417 * src/options.c (option_table): Create from longopts and percent_table.
16418 * src/getargs.c (longopts): Delete.
16419 * src/lex.c (struct percent_table_struct): Delete.
16420 (percent_table): Delete.
16421 (options.h): Include it.
16422 * src/options.c: Create.
16423 * src/options.h: Create.
16424 Declare enum opt_access_e.
16425 Define struct option_table_struct.
16426
16427 2001-09-20 Marc Autret <autret_m@epita.fr>
16428
16429 * doc/bison.texinfo: Adjust terminologies about prologue and epilogue
16430 sections of Bison.
16431
16432 2001-09-19 Pascal Bart <pascal.bart@epita.fr>
16433
16434 * src/bison.simple: s/%%filename/%%skeleton.
16435 * src/muscle_tab.c (getargs.h): Include it.
16436 (muscle_init): Insert new muscle skeleton.
16437
16438 2001-09-18 Pascal Bart <pascal.bart@epita.fr>
16439
16440 * src/output.c (output_parser): Delete unused variable actions_dumped.
16441
16442 2001-09-07 Pascal Bart <pascal.bart@epita.fr>
16443
16444 * src/output.c (output): Delete call to reader_output_yylsp.
16445 * src/reader.c (reader): Likewise.
16446 * src/reader.h: Delete declaration of reader_output_yylsp.
16447
16448 2001-09-02 Marc Autret <autret_m@epita.fr>
16449
16450 * src/reader.c: Include muscle_tab.h.
16451 (parse_union_decl): Update.
16452 (parse_macro_decl): Rename parse_muscle_decl.
16453 Update to use renamed functions and variable.
16454 (read_declarations, copy_action, read_additionnal_code, : Updated
16455 with correct variables and functions names.
16456 (packsymbols, reader): Likewise.
16457
16458 * src/reader.h (muscle_obstack): Extern declaration update.
16459
16460 * src/output.c: Include muscle_tab.h
16461 In all functions using macro_insert, change by using muscle_insert ().
16462 (macro_obstack): Rename muscle_obstack.
16463 Echo modifications in the whole file.
16464 (MACRO_INSERT_INT): Rename MUSCLE_INSERT_INT.
16465 (MACRO_INSERT_STRING): Rename MUSCLE_INSERT_STRING.
16466 (MACRO_INSERT_PREFIX): Rename MUSCLE_INSERT_PREFIX.
16467
16468 * src/muscle_tab.h: Update double inclusion macros.
16469 (macro_entry_s): Rename muscle_entry_s.
16470 Update prototypes.
16471
16472 * src/muscle_tab.c: Include muscle_tab.h.
16473 Rename macro_tabble to muscle_table.
16474 (mhash1, mhash2, mcmp): Use muscle_entry.
16475 (macro_init): Rename muscle_init. Update.
16476 (macro_insert): Rename muscle_insert. Update.
16477 (macro_find): Rename muscle_find. Update.
16478
16479 * src/main.c: Include muscle_tab.h.
16480 (main): Call muscle_init ().
16481 * src/Makefile.am (bison_SOURCES): Echo modifications.
16482
16483 2001-09-02 Marc Autret <autret_m@epita.fr>
16484
16485 Now the files macro_tab.[ch] are named muscle_tab.[ch].
16486
16487 * src/muscle_tab.c, src/muscle_tab.h: Add files.
16488
16489 2001-09-02 Marc Autret <autret_m@epita.fr>
16490
16491 * src/macrotab.c, src/macrotab.h: Remove.
16492
16493 2001-09-01 Pascal Bart <pascal.bart@epita.fr>
16494
16495 * src/reader.c (copy_guard): Use muscle to specify the `#line'
16496 filename.
16497
16498 2001-09-01 Marc Autret <autret_m@epita.fr>
16499
16500 * tests/calc.at (exp): Now, YYERROR_VERBOSE need to be set
16501 to an explicit value to activate the feature. We do it here.
16502
16503 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
16504
16505 * src/output.c (prepare): Delete the `filename' muscule insertion.
16506 * src/reader.c (copy_action): Use `filename' muscule with `#line'.
16507 (parse_union_decl): Likewise.
16508 * src/macrotab.c (macro_init): Initialize filename by infile.
16509
16510 2001-08-31 Marc Autret <autret_m@epita.fr>
16511
16512 * src/bison.simple (YYLSP_NEEDED): New definition.
16513 * src/output.c (prepare): Add macro insertion of `locations_flag'
16514
16515 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
16516
16517 * src/output.c (prepare): Delete insertion of previous muscles,
16518 and insert the `prefix' muscles.
16519 * src/macrotab.c (macro_init): Likewise.
16520 (macro_init): Initialization prefix directive by `yy'.
16521 * src/bison.simple: Substitute all %%yylex, %%yychar, %%yylval,
16522 %%yydebug, %%yyerror, %%yynerrs and %%yyparse by yylex, yychar,
16523 yylval, yydebug, yyerror, yynerrs and yyparse.
16524 New directive `#define' to substitute yydebug, ... with option
16525 name_prefix.
16526
16527 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
16528
16529 * src/main.c (main): Standardize.
16530 * src/output.c (output_table_data, output_parser): Likewise.
16531 * src/macrotab.h, src/macrotab.c, src/bison.simple: Likewise.
16532
16533 2001-08-31 Pascal Bart <pascal.bart@epita.fr>, Marc Autret <autret_m@epita.fr>
16534
16535 * src/reader.c (read_additionnal_code): Rename %%user_code to
16536 %%epilogue.
16537 * src/output.c (output): Rename %%declarations to %%prologue.
16538 * src/bison.simple: Echo modifications.
16539
16540 2001-08-31 Marc Autret <autret_m@epita.fr>
16541
16542 * src/reader.c (readgram): CleanUp.
16543 (output_token_defines): Likewise.
16544 (packsymbols): Likewise.
16545 (reader): Likewise.
16546 * src/output.c (output): CPP-out useless code.
16547
16548 2001-08-31 Pascal Bart <pascal.bart@epita.fr>
16549
16550 * src/reader.c (reader): Delete obsolete call to function
16551 output_trailers and output_headers.
16552 * src/output.h: Remove obsolete functions prototypes of output_headers
16553 and output_trailers.
16554
16555 2001-08-30 Pascal Bart <pascal.bart@epita.fr>
16556
16557 * src/main.c: Include macrotab.h.
16558 * src/macrotab.h (macro_entry_s): Constify fields.
16559 Adjust functions prototypes.
16560 * src/macrotab.c (macro_insert): Constify key and value.
16561 (macro_find): Constify key.
16562 (macro_insert): Include 'xalloc.h'
16563 (macro_insert): Use XMALLOC.
16564 (macro_find): Constify return value.
16565 * src/output.c (output_table_data): Rename table to table_data.
16566 (output_parser): Constify macro_key, macro_value.
16567
16568 2001-08-30 Marc Autret <autret_m@epita.fr>
16569
16570 * src/reader.c (parse_skel_decl): New.
16571 (read_declarations): Add case `tok_skel', call parse_skel_decl ().
16572 * src/lex.h (token_t): New token `tok_skel'.
16573 * src/lex.c (percent_table): Add skeleton option entry.
16574 Standardize.
16575
16576 2001-08-29 Marc Autret <autret_m@epita.fr>
16577
16578 * src/bison.simple: Add %%user_code directive at the end.
16579 * src/reader.c (read_additionnal_code): New.
16580 (reader): Use it.
16581 * src/output.c (output_program): Remove.
16582 (output): Update.
16583
16584 2001-08-28 Marc Autret <autret_m@epita.fr>
16585
16586 * src/output.c (output_actions): Clean up.
16587 (output_gram): CPP-out useless code.
16588 * src/reader.c (reader): Clean up, CPP-out useless code.
16589
16590 2001-08-28 Pascal Bart <pascal.bart@epita.fr>
16591
16592 * src/output.c (output): Copy attrs_obstack in the '%%definitions'
16593 directive.
16594 * src/bison.simple: Add `%%definitions'.
16595
16596 2001-08-28 Marc Autret <autret_m@epita.fr>
16597
16598 * config/depcomp: New file.
16599
16600 2001-08-27 Paul Eggert <eggert@twinsun.com>
16601
16602 * src/bison.simple (yyparse): Don't take the address of an
16603 item before the start of an array, as that doesn't conform to
16604 the C Standard.
16605
16606 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
16607
16608 * src/output.c (output): Remove the initialization of the macro
16609 obstack. It was done too late here.
16610
16611 * src/reader.c (parse_macro_decl): Fix. Use of the macro obstack was
16612 completely wrong.
16613 (reader): Initialize the macro obstack here, since we need it to grow
16614 '%define' directives.
16615
16616 * src/reader.h: Declare the macro obstack as extern.
16617
16618 2001-08-27 Robert Anisko <robert.anisko@epita.fr>
16619
16620 * src/output.c (output_parser): Fix. Store single '%' characters in
16621 the output obstack instead of throwing them away.
16622
16623 2001-08-27 Akim Demaille <akim@epita.fr>
16624
16625 * Makefile.am (AUTOMAKE_OPTIONS): 1.5.
16626
16627 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16628
16629 * lib/Makefile.am: Adjust.
16630
16631 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16632
16633 * src/bison.simple: Update and add '%%' directives.
16634
16635 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16636
16637 * src/reader.c (reader): Remove calls to 'output_headers' and
16638 'output_trailers'. Remove some C output.
16639 (readgram): Disable a piece of code that was writing a default
16640 definition for 'YYSTYPE'.
16641 (reader_output_yylsp): Remove.
16642 (packsymbols): Output token defintions to a macro.
16643 (copy_definition): Disable C output.
16644
16645 * src/reader.c (parse_macro_decl): New function used to parse macro
16646 declarations.
16647 (copy_string2): Put the body of copy_string into this new function.
16648 Add a parameter to let the caller choose whether he wants to copy the
16649 string delimiters or not.
16650 (copy_string): Be a simple call to copy_string2 with the last argument
16651 bound to true.
16652 (read_declarations): Add case for macro definition.
16653 (copy_identifier): New.
16654 (parse_macro_decl): Read macro identifiers using copy_identifier
16655 rather than lex.
16656
16657 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16658
16659 * src/output.c (prepare): Add prefixed names.
16660 (output_parser): Output semantic actions.
16661 (output_parser): Fix bug on '%%line' directives.
16662
16663 * src/output.c (output_headers): Remove. The C code printed by this
16664 function should now be in the skeletons.
16665 (output_trailers): Remove.
16666 (output): Disable call to 'reader_output_yylsp'.
16667 (output_rule_data): Do not output tables to the table obstack.
16668
16669 * src/output.c: Remove some C dedicated output.
16670 Improve the use of macro and output obstacks.
16671 (output_defines): Remove.
16672
16673 * src/output.c (output_token_translations): Associate 'translate'
16674 table with a macro. No output to the table obstack.
16675 (output_gram): Same for 'rhs' and 'prhs'.
16676 (output_stos): Same for 'stos'.
16677 (output_rule_data): Same for 'r1' and 'r2'.
16678 (token_actions): Same for 'defact'.
16679 (goto_actions): Same for 'defgoto'.
16680 (output_base): Same for 'pact' and 'pgoto'.
16681 (output_table): Same for 'table'.
16682 (output_check): Same for 'check'.
16683
16684 * src/output.c (output_table_data): New function.
16685 (output_short_table): Remove.
16686 (output_short_or_char_table): Remove.
16687
16688 * src/output.c (output_parser): Replace most of the skeleton copy code
16689 with something new. Skeletons are now processed character by character
16690 rather than line by line, and Bison looks for '%%' macros. This is the
16691 first step in making Bison's output process (a lot) more flexible.
16692 (output_parser): Use the macro table.
16693
16694 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16695
16696 * src/main.c (main): Initialize the macro table.
16697
16698 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16699
16700 * src/lex.c (percent_table): Add tok_define.
16701 * src/lex.h: Add tok_define.
16702
16703 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16704
16705 * src/macrotab.c: New file.
16706 * src/macrotab.h: New file.
16707 * src/Makefile.am: Update.
16708
16709 2001-08-25 Robert Anisko <robert.anisko@epita.fr>
16710
16711 * lib/hash.c: New file.
16712 * lib/hash.h: New file.
16713 * lib/Makefile.am: Update.
16714
16715 2001-08-15 Akim Demaille <akim@epita.fr>
16716
16717 Version 1.28c.
16718
16719 2001-08-15 Marc Autret <autret_m@epita.fr>
16720
16721 * src/reader.c (readgram): Indent output macro YYSTYPE.
16722 (packsymbols): Likewise.
16723 (output_token_defines): Likewise.
16724 * src/files.c: Standardize.
16725 (compute_header_macro): New.
16726 (defines_obstack_save): New. Use compute_header_macro.
16727 (output_files): Update. Use defines_obstack_save.
16728
16729 2001-08-15 Akim Demaille <akim@epita.fr>
16730
16731 * doc/bison.texinfo (Table of Symbols): Document
16732 YYSTACK_USE_ALLOCA.
16733
16734 2001-08-15 Akim Demaille <akim@epita.fr>
16735
16736 * missing: Update from CVS Automake.
16737 * config/config.guess, config/config.sub, config/texinfo.tex:
16738 Update from gnu.org.
16739
16740 2001-08-15 Akim Demaille <akim@epita.fr>
16741
16742 * Makefile.maint: Sync with CVS Autoconf.
16743
16744 2001-08-14 Pascal Bart <pascal.bart@epita.fr>
16745
16746 * doc/bison.texinfo: Include GNU Free Documentation License from
16747 `fdl.texi'.
16748 * doc/fdl.texi: Add to package.
16749
16750 2001-08-14 Marc Autret <autret_m@epita.fr>
16751
16752 Turn on %{source,header}_extension features.
16753
16754 * src/lex.c (percent_table): Un-CPP out header_extension and
16755 source_extension.
16756 * src/files.c (compute_exts_from_gf): Compare pointers with NULL.
16757 (compute_exts_from_src): Remove conditions. It restores priorities
16758 between options.
16759
16760 2001-08-14 Marc Autret <autret_m@epita.fr>
16761
16762 * src/files.c (compute_base_names): Add extensions computing when
16763 `--file-prefix' used.
16764 Standardize function calls.
16765
16766 2001-08-13 Marc Autret <autret_m@epita.fr>
16767
16768 * src/bison.simple (YYSTACK_USE_ALLOCA): Changed to allow users
16769 defining it (defined but null disables alloca).
16770
16771 2001-08-13 Marc Autret <autret_m@epita.fr>
16772
16773 * src/bison.simple (_yy_memcpy): CPP reformat.
16774
16775 2001-08-13 Pascal Bart <pascal.bart@epita.fr>
16776
16777 * tests/atconfig.in (CPPFLAGS): Fix.
16778
16779 2001-08-10 Pascal Bart <pascal.bart@epita.fr>
16780
16781 * doc/bison.texinfo: Include GNU General Public License from
16782 `gpl.texi'.
16783 * doc/gpl.texi: Add to package.
16784
16785 2001-08-10 Marc Autret <autret_m@epita.fr>
16786
16787 * src/print_graph.h: Fix.
16788 * src/reader.c (read_declarations): Use parse_header_extension_decl ().
16789
16790 2001-08-10 Akim Demaille <akim@epita.fr>
16791
16792 * src/system.h: Provide default declarations for stpcpy, strndup,
16793 and strnlen.
16794
16795 2001-08-10 Robert Anisko <anisko_r@epita.fr>
16796
16797 * doc/bison.texinfo (Locations): Update @$ stuff.
16798
16799 2001-08-09 Robert Anisko <anisko_r@epita.fr>
16800
16801 * src/bison.simple (YYLLOC_DEFAULT): Update.
16802 (yyparse): Adjust.
16803
16804 2001-08-08 Marc Autret <autret_m@epita.fr>
16805
16806 * doc/bison.texinfo: Change @samp{$<@dots{}>} to
16807 @samp{$<@dots{}>@var{n}} in Section Actions in Mid-Rule.
16808 Reported by Fabrice Bauzac.
16809
16810 2001-08-08 Marc Autret <autret_m@epita.fr>
16811
16812 * src/vcg_default.h: Use NULL instead of 0 to initialize pointers.
16813 * src/vcg.c (output_node): Fix.
16814 * src/vcg.h: Cleanup.
16815 * src/print_graph.c: Add comments.
16816 (node_output_size): New global variable. Simplify the formatting of
16817 the VCG graph output.
16818 (print_actions): Unused code is now used. It notifies the final state
16819 and no action states in the VCG graph. It also give the reduce actions.
16820 The `shift and goto' edges are red and the `go to state' edges are
16821 blue.
16822 Get the current node name and node_obstack by argument.
16823 (node_obstack): New variable.
16824 (print_state): Manage node_obstack.
16825 (print_core): Use node_obstack given by argument.
16826 A node is not only computed here but in print_actions also.
16827 (print_graph): CPP out useless code instead of commenting it.
16828
16829 2001-08-07 Pascal Bart <pascal.bart@epita.fr>
16830
16831 * tests/atconfig.in (CPPFLAGS): Fix.
16832
16833 2001-08-07 Akim Demaille <akim@epita.fr>
16834
16835 * src/print_graph.c (quote): New.
16836 (print_core): Use it.
16837
16838 2001-08-06 Akim Demaille <akim@epita.fr>, Marc Autret <autret_m@epita.fr>
16839
16840 * src/vcg.c (complain.h): Include it.
16841 Unepitaize `return' invocations.
16842 [NDEBUG] (main): Remove.
16843 * src/vcg.h (node_t, edge_t, graph_t): Constify the char * members.
16844 * src/files.c (open_files): Initialize graph_obstack.
16845 * src/print_graph.c (print_actions): CPP out useless code.
16846 (print_core): Don't output the last `\n' in labels.
16847 Use `quote'.
16848 * src/files.c (output_files): Output the VCG file.
16849 * src/main.c (main): Invoke print_graph ();
16850
16851 2001-08-06 Marc Autret <autret_m@epita.fr>
16852
16853 Automaton VCG graph output.
16854 Using option ``-g'' or long option ``--graph'', you can generate
16855 a gram_filename.vcg file containing a VCG description of the LALR (1)
16856 automaton of your grammar.
16857
16858 * src/main.c: Call to print_graph() function.
16859 * src/getargs.h: Update.
16860 * src/getargs.c (options): Update to catch `-g' and `--graph' options.
16861 (graph_flag): New flag.
16862 (longopts): Update.
16863 (getargs): Add case `g'.
16864 * src/files.c (graph_obstack): New obstack struct.
16865 (open_files): Initialize new obstack.
16866 (output_files): Saves graph_obstack if required.
16867 * src/files.h (graph_obstack): New extern declaration.
16868 * src/Makefile.am: Add new source files.
16869
16870 2001-08-06 Marc Autret <autret_m@epita.fr>
16871
16872 * src/print_graph.c, src/print_graph.h (graph): New.
16873 * src/vcg.h: New file.
16874 * src/vcg.c: New file, VCG graph handling.
16875
16876 2001-08-06 Marc Autret <autret_m@epita.fr>
16877
16878 Add of %source_extension and %header_extension which specify
16879 the source or/and the header output file extension.
16880
16881 * src/files.c (compute_base_names): Remove initialisation of
16882 src_extension and header_extension.
16883 (compute_exts_from_gf): Update.
16884 (compute_exts_from_src): Update.
16885 (output_files): Update.
16886 * src/reader.c (parse_header_extension_decl): New.
16887 (parse_source_extension_decl): New.
16888 (read_declarations): New case statements for the new tokens.
16889 * src/lex.c (percent_table): Add entries for %source_extension
16890 and %header_extension.
16891 * src/lex.h (token_e): New tokens tok_hdrext and tok_srcext.
16892
16893 2001-08-06 Marc Autret <autret_m@epita.fr>
16894
16895 * configure.in: Bump to 1.28c.
16896 * doc/bison.texinfo: Texinfo thingies.
16897
16898 2001-08-04 Pascal Bart <pascal.bart@epita.fr>
16899
16900 * tests/atconfig.in (CPPFLAGS): Add.
16901 * tests/calc.at (AT_CHECK): Use CPPFLAGS.
16902
16903 2001-08-03 Akim Demaille <akim@epita.fr>
16904
16905 Version 1.28b.
16906
16907 2001-08-03 Akim Demaille <akim@epita.fr>
16908
16909 * tests/Makefile.am (check-local): Ship testsuite.
16910 * tests/calc.at (_AT_DATA_CALC_Y): Prototype all the functions.
16911 Include `string.h'.
16912
16913 2001-08-03 Akim Demaille <akim@epita.fr>
16914
16915 * configure.in: Try using -Wformat when compiling.
16916
16917 2001-08-03 Akim Demaille <akim@epita.fr>
16918
16919 * configure.in: Bump to 1.28b.
16920
16921 2001-08-03 Akim Demaille <akim@epita.fr>
16922
16923 * src/complain.c: Adjust strerror_r portability issues.
16924
16925 2001-08-03 Akim Demaille <akim@epita.fr>
16926
16927 Version 1.28a.
16928
16929 2001-08-03 Akim Demaille <akim@epita.fr>
16930
16931 * src/getargs.c, src/getarg.h (skeleton)): Constify.
16932 * src/lex.c (literalchar): Avoid name clashes on `buf'.
16933 * src/getargs.c: Include complain.h.
16934 * src/files.c, src/files.h (skeleton_find): Avoid name clashes.
16935 * lib/quotearg.c, lib/quotearg.h: Update from fileutils 4.1.
16936
16937 2001-08-03 Akim Demaille <akim@epita.fr>
16938
16939 * src/reader.c (readgram): Display hidden chars in error messages.
16940
16941 2001-08-03 Akim Demaille <akim@epita.fr>
16942
16943 Update to gettext 0.10.39.
16944
16945 2001-08-03 Akim Demaille <akim@epita.fr>
16946
16947 * lib/strspn.c: New.
16948
16949 2001-08-01 Marc Autret <autret_m@epita.fr>
16950
16951 * doc/bison.texinfo: Update.
16952 * doc/bison.1 (mandoc): Update.
16953 * src/system.h (EXT_GUARD_C, EXT_STYPE_H): Remove .c and .h.
16954 * src/files.c: Support output files extensions computing.
16955 (src_extension): New static variable.
16956 (header_extension): New static variable.
16957 (tr): New function.
16958 (get_extension_index): New function, gets the index of an extension
16959 filename in a string.
16960 (compute_exts_from_gf): New function, computes extensions from the
16961 grammar file extension.
16962 (compute_exts_from_src): New functions, computes extensions from the
16963 C source file extension, file given by ``-o'' option.
16964 (compute_base_names): Update.
16965 (output_files): Update.
16966
16967 2001-08-01 Robert Anisko <anisko_r@epita.fr>
16968
16969 * doc/bison.texi: Document @$.
16970 (Locations): New section.
16971
16972 2001-07-18 Akim Demaille <akim@epita.fr>
16973
16974 * Makefile.maint, GNUmakefile: New, from Autoconf 2.52.
16975 * config/prev-version.txt, config/move-if-change: New.
16976 * Makefile.am: Adjust.
16977
16978 2001-07-08 Pascal Bart <pascal.bart@epita.fr>
16979
16980 * src/bison.simple (yyparse): Suppress warning `comparaison
16981 between signed and unsigned'.
16982
16983 2001-07-05 Pascal Bart <pascal.bart@epita.fr>
16984
16985 * src/getargs.h (raw_flag): Remove.
16986 * src/getargs.c: Die on `-r'/`--raw'.
16987 * src/lex.c (parse_percent_token): Die on `%raw'.
16988 * src/reader.c (output_token_defines): Suppress call to `raw_flag'.
16989 * tests/calc.at: Suppress test with option `--raw'.
16990
16991 2001-07-14 Akim Demaille <akim@epita.fr>
16992
16993 * config/: New.
16994 * configure.in: Require Autoconf 2.50.
16995 Update to gettext 0.10.38.
16996
16997 2001-03-16 Akim Demaille <akim@epita.fr>
16998
16999 * doc/bison.texinfo: ANSIfy the examples.
17000
17001 2001-03-16 Akim Demaille <akim@epita.fr>
17002
17003 * getargs.c (skeleton): New variable.
17004 (longopts): --skeleton is a new option.
17005 (shortopts, getargs): -S is a new option.
17006 * getargs.h: Declare skeleton.
17007 * output.c (output_parser): Use it.
17008
17009 2001-03-16 Akim Demaille <akim@epita.fr>
17010
17011 * m4/strerror_r.m4: New.
17012 * m4/error.m4: Run AC_FUNC_STRERROR_R.
17013 * lib/error.h, lib/error.c: Update.
17014
17015 2001-03-16 Akim Demaille <akim@epita.fr>
17016
17017 * src/getargs.c (longopts): Clean up.
17018
17019 2001-02-21 Akim Demaille <akim@epita.fr>
17020
17021 * src/reader.c (gensym): `gensym_count' is your own.
17022 Use a static buf to create the symbol name, as token_buffer is no
17023 longer a buffer.
17024
17025 2001-02-08 Akim Demaille <akim@epita.fr>
17026
17027 * src/conflicts.c (conflict_report): Be sure not to append to res
17028 between two calls, which could happen if both first sprintf were
17029 skipped, but not the first cp += strlen.
17030
17031 2001-02-08 Akim Demaille <akim@epita.fr>
17032
17033 * lib/memchr.c, lib/stpcpy.c, lib/strndup.c, lib/strnlen.c:
17034 New, from fileutils 4.0.37.
17035 * configure.in: Require Autoconf 2.49c. I took some time before
17036 making this decision. This is the only way out for portability
17037 issues in Bison, it would mean way too much duplicate effort to
17038 import in Bison features implemented in 2.49c since 2.13.
17039 AC_REPLACE_FUNCS and AC_CHECK_DECLS the functions above.
17040
17041 2001-02-02 Akim Demaille <akim@epita.fr>
17042
17043 * lib/malloc.c, lib/realloc.c: New, from the fileutils 4.0.37.
17044 * lib/xalloc.h, lib/xmalloc.c: Update.
17045
17046 2001-01-19 Akim Demaille <akim@epita.fr>
17047
17048 Get rid of the ad hoc handling of token_buffer in the scanner: use
17049 the obstacks.
17050
17051 * src/lex.c (token_obstack): New.
17052 (init_lex): Initialize it. No longer call...
17053 (grow_token_buffer): this. Remove it.
17054 Adjust all the places which used it to use the obstack.
17055
17056 2001-01-19 Akim Demaille <akim@epita.fr>
17057
17058 * src/lex.h: Rename all the tokens:
17059 s/\bENDFILE\b/tok_eof/g;
17060 s/\bIDENTIFIER\b/tok_identifier/g;
17061 etc.
17062 Let them be enums, not #define, to ease debugging.
17063 Adjust all the code.
17064
17065 2001-01-18 Akim Demaille <akim@epita.fr>
17066
17067 * src/lex.h (MAXTOKEN, maxtoken, grow_token_buffer): Remove, private.
17068 * src/lex.c (maxtoken, grow_token_buffer): Static.
17069
17070 2001-01-18 Akim Demaille <akim@epita.fr>
17071
17072 Since we now use obstacks, more % directives can be enabled.
17073
17074 * src/lex.c (percent_table): Also accept `%yacc',
17075 `%fixed_output_files', `%defines', `%no_parser', `%verbose', and
17076 `%debug'.
17077 Handle the actions for `%semantic_parser' and `%pure_parser' here,
17078 instead of returning a token.
17079 * src/lex.h (SEMANTIC_PARSER, PURE_PARSER): Remove, unused.
17080 * src/reader.c (read_declarations): Adjust.
17081 * src/files.c (open_files): Don't call `compute_base_names', don't
17082 compute `attrsfile' since they depend upon data which might be
17083 *in* the input file now.
17084 (output_files): Do it here.
17085 * src/output.c (output_headers): Document the fact that this patch
17086 introduces a guaranteed SEGV for semantic parsers.
17087 * doc/bison.texinfo: Document them.
17088 * tests/suite.at: Exercise these %options.
17089
17090 2000-12-20 Akim Demaille <akim@epita.fr>
17091
17092 Also handle the output file (--verbose) with obstacks.
17093
17094 * files.c (foutput): Remove.
17095 (output_obstack): New.
17096 Adjust all dependencies.
17097 * src/conflicts.c: Return a string.
17098 * src/system.h (obstack_grow_string): Rename as...
17099 (obstack_sgrow): this. Be ready to work with non literals.
17100 (obstack_fgrow4): New.
17101
17102 2000-12-20 Akim Demaille <akim@epita.fr>
17103
17104 * src/files.c (open_files): Fix the computation of short_base_name
17105 in the case of `-o foo.tab.c'.
17106
17107 2000-12-20 Akim Demaille <akim@epita.fr>
17108
17109 * src/reader.c (copy_string, copy_comment, copy_comment2, copy_at)
17110 (copy_dollar): Now that everything uses obstacks, get rid of the
17111 FILE * parameters.
17112
17113 2000-12-20 Akim Demaille <akim@epita.fr>
17114
17115 * src/files.c (open_files): Actually the `.output' file is based
17116 on the short_base_name, not base_name.
17117 * tests/suite.at (Checking output file names): Adjust.
17118
17119 2000-12-20 Akim Demaille <akim@epita.fr>
17120
17121 * src/bison.s1: Remove, we now use directly...
17122 * src/bison.simple: this.
17123 * src/Makefile.am: Use pkgdata instead of data.
17124
17125 2000-12-20 Akim Demaille <akim@epita.fr>
17126
17127 * src/files.c (guard_obstack): New.
17128 (open_files): Initialize it.
17129 (output_files): Dump it...
17130 * src/files.h: Export it.
17131 * src/reader.c (copy_guard): Use it.
17132
17133 2000-12-19 Akim Demaille <akim@epita.fr>
17134
17135 * src/files.c (outfile, defsfile, actfile): Removed as global
17136 vars.
17137 (open_files): Don't compute them.
17138 (output_files): Adjust.
17139 (base_name, short_base_name): Be global.
17140 Adjust dependencies.
17141
17142 2000-12-19 Akim Demaille <akim@epita.fr>
17143
17144 * src/files.c (strsuffix): New.
17145 (stringappend): Be just like strcat but allocate.
17146 (base_names): Eve out from open_files.
17147 Try to simplify the rather hairy computation of base_name and
17148 short_base_name.
17149 (open_files): Use it.
17150 * tests/suite.at (Checking output file names): New test.
17151
17152 2000-12-19 Akim Demaille <akim@epita.fr>
17153
17154 * src/system.h (obstack_grow_literal_string): Rename as...
17155 (obstack_grow_string): this.
17156 * src/output.c (output_parser): Recognize `%% actions' instead of
17157 `$'.
17158 * src/bison.s1: s/$/%% actions/.
17159 * src/bison.hairy: Likewise.
17160
17161 2000-12-19 Akim Demaille <akim@epita.fr>
17162
17163 * src/output.c (output_parser): Compute the `#line' lines when
17164 there are.
17165 * src/Makefile.am (bison.simple): Be a simple copy of bison.s1.
17166 Suggested by Hans Aberg.
17167
17168 2000-12-19 Akim Demaille <akim@epita.fr>
17169
17170 Let the handling of the skeleton files be local to the procedures
17171 that use it.
17172
17173 * src/files.c (xfopen, xfclose, skeleton_find, guardfile): No
17174 longer static.
17175 (fparser, open_extra_files): Remove.
17176 (open_files, output_files): Don't take care of fparser.
17177 * src/files.h: Adjust.
17178 * src/output.c (output_parser): Open and close the file to the
17179 skeleton.
17180 * src/reader.c (read_declarations): When %semantic_parser, open
17181 fguard.
17182
17183 2000-12-19 Akim Demaille <akim@epita.fr>
17184
17185 * src/file.h (BISON_SIMPLE, BISON_HAIRY): Move from here...
17186 * src/system.h (BISON_SIMPLE, BISON_HAIRY): ... to here.
17187
17188 2000-12-19 Akim Demaille <akim@epita.fr>
17189
17190 * src/files.c (open_files): Yipee! We no longer need all the code
17191 looking for `/tmp' since we have no tmp file.
17192
17193 2000-12-19 Akim Demaille <akim@epita.fr>
17194
17195 * src/system.h (EXT_TAB, EXT_OUTPUT, EXT_STYPE_H, EXT_GUARD_C):
17196 New macros.
17197 * src/files.c (open_files): Less dependency on MSDOS etc.
17198
17199 2000-12-14 Akim Demaille <akim@epita.fr>
17200
17201 * src/bison.s1 (YYLLOC_DEFAULT): New macro.
17202 Provide a default definition.
17203 Use it when executing the default @ action.
17204 * src/reader.c (reader_output_yylsp): No longer include
17205 `timestamp' and `text' in the default YYLTYPE.
17206
17207 2000-12-12 Akim Demaille <akim@epita.fr>
17208
17209 * src/reader.c (copy_definition, parse_union_decl, copy_action)
17210 (copy_guard): Quote the file names.
17211 Reported by Laurent Mascherpa.
17212
17213 2000-12-12 Akim Demaille <akim@epita.fr>
17214
17215 * src/output.c (output_headers, output_program, output): Be sure
17216 to escape special characters when outputting filenames.
17217 (ACTSTR_PROLOGUE, ACTSTR_EPILOGUE): Remove.
17218 (output_headers): Don't depend on them, Use ACTSTR.
17219
17220 2000-11-17 Akim Demaille <akim@epita.fr>
17221
17222 * lib/obstack.h: Formatting changes.
17223 (obstack_grow, obstack_grow0): Don't cast WHERE at all: it
17224 prevents type checking.
17225 (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
17226 cast the value to (void *): assigning a `foo *' to a `void *'
17227 variable is valid.
17228 (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
17229 * src/reader.c (parse_union_decl): Typo: use obstack_1grow to
17230 append characters.
17231
17232 2000-11-17 Akim Demaille <akim@epita.fr>
17233
17234 * tests/Makefile.am (suite.m4, regression.m4, calc.m4): Rename
17235 as...
17236 (suite.m4, regression.m4, calc.m4): these.
17237 * tests/atgeneral.m4: Update from CVS Autoconf.
17238
17239 2000-11-17 Akim Demaille <akim@epita.fr>
17240
17241 * tests/regression.m4 (%union and --defines): New test,
17242 demonstrating a current bug in the obstack implementation.
17243
17244 2000-11-17 Akim Demaille <akim@epita.fr>
17245
17246 * src/bison.s1 (_YY_DECL_VARIABLES, YY_DECL_VARIABLES): New
17247 macros.
17248 Use them to declare the variables which are global or local to
17249 `yyparse'.
17250
17251 2000-11-17 Akim Demaille <akim@epita.fr>
17252
17253 * acconfig.h: Remove, no longer used.
17254
17255 2000-11-07 Akim Demaille <akim@epita.fr>
17256
17257 * src: s/Copyright (C)/Copyright/g.
17258
17259 2000-11-07 Akim Demaille <akim@epita.fr>
17260
17261 * src/reader.c (reader): #define YYLSP_NEEDED to 1 instead of just
17262 defining.
17263 * src/bison.s1: s/#ifdef YYLSP_NEEDED/#if YYLSP_NEEDED/.
17264
17265 2000-11-07 Akim Demaille <akim@epita.fr>
17266
17267 * src/bison.s1 (YYLEX): Use #if instead of #ifdef.
17268 Merge in a single CPP if/else.
17269
17270 2000-11-07 Akim Demaille <akim@epita.fr>
17271
17272 * src/output.c (output): Remove useless variables.
17273 * lib/obstack.c (obstack_grow, obstack_grow0): Rename the second
17274 argument `data' for consistency with the prototypes.
17275 Qualify it `const'.
17276 (obstack_copy, obstack_copy0): Rename the second argument as
17277 `address' for consistency. Qualify it `const'.
17278 * lib/obstack.h (obstack_copy, obstack_copy0, obstack_grow)
17279 (obstack_grow0, obstack_ptr_grow, obstack_ptr_grow_fast): Qualify
17280 `const' their input argument (`data' or `address').
17281 Adjust the corresponding macros to include `const' in casts.
17282
17283 2000-11-03 Akim Demaille <akim@epita.fr>
17284
17285 * src/Makefile.am (INCLUDES): s/PFILE/BISON_SIMPLE/.
17286 s/PFILE1/BISON_HAIRY/.
17287 Adjust dependencies.
17288
17289 2000-11-03 Akim Demaille <akim@epita.fr>
17290
17291 For some reason, this was not applied.
17292
17293 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
17294 `unlink': it's no longer used.
17295
17296 2000-11-03 Akim Demaille <akim@epita.fr>
17297
17298 * src/files.c (skeleton_find): New function, eved out of...
17299 (open_files, open_extra_files): here.
17300
17301 2000-11-03 Akim Demaille <akim@epita.fr>
17302
17303 Don't use `atexit'.
17304
17305 * src/files.c (obstack_save): New function.
17306 (done): Rename as...
17307 (output_files): this.
17308 Use `obstack_save'.
17309 * src/main.c (main): Don't use `atexit' to register `done', since
17310 it no longer has to remove tmp files, just call `output_files'
17311 when there are no errors.
17312
17313 2000-11-02 Akim Demaille <akim@epita.fr>
17314
17315 * src/files.c [VMS]: No longer include `ssdef.h', no longer define
17316 `unlink': it's no longer used.
17317 * src/files.h: Formatting changes.
17318
17319 2000-11-02 Akim Demaille <akim@epita.fr>
17320
17321 Remove the last uses of mktemp and unlink/delete.
17322
17323 * src/files.c (fdefines, ftable): Removed.
17324 (defines_ostack, table_obstack): New.
17325 Adjust dependencies of the former into uses of the latter.
17326 * src/output.c (output_short_or_char_table, output_short_table):
17327 Convert to using obstacks.
17328 * src/reader.c (copy_comment2): Accept one FILE * and two
17329 obstacks.
17330 (output_token_defines, reader_output_yylsp): Use obstacks.
17331 * src/system.h (obstack_fgrow3): New.
17332 * po/POTFILES.in: Adjust.
17333
17334 2000-11-01 Akim Demaille <akim@epita.fr>
17335
17336 Change each use of `fattrs' into a use of `attrs_obstack'.
17337
17338 * src/reader.c (copy_at): Typo: s/yylloc/yyloc/.
17339 * src/files.c (fattrs): Remove.
17340 (attrs_obstack): New.
17341 Adjust all dependencies.
17342 (done): If SEMANTIC_PARSER, dump attrs_obstack into attrsfile.
17343
17344 2000-11-01 Akim Demaille <akim@epita.fr>
17345
17346 Introduce obstacks.
17347 Change each use of `faction' into a use of `action_obstack'.
17348
17349 * lib/obstack.h, lib/obstack.c: New files.
17350 * src/files.c (faction): Remove.
17351 (action_obstack): New.
17352 Adjust all dependencies.
17353
17354 2000-10-20 Akim Demaille <akim@epita.fr>
17355
17356 * lib/quote.h (PARAMS): New macro. Use it.
17357
17358 2000-10-16 Akim Demaille <akim@epita.fr>
17359
17360 * src/output.c (output_short_or_char_table): New function.
17361 (output_short_table, output_token_translations): Use it.
17362 (goto_actions): Use output_short_table.
17363
17364 2000-10-16 Akim Demaille <akim@epita.fr>
17365
17366 * src/symtab.c (bucket_new): New function.
17367 (getsym): Use it.
17368
17369 * src/output.c (output_short_table): New argument to display the
17370 comment associated with the table.
17371 Adjust dependencies.
17372 (output_gram): Use it.
17373 (output_rule_data): Nicer output layout for YYTNAME.
17374
17375 2000-10-16 Akim Demaille <akim@epita.fr>
17376
17377 * src/lex.c (read_typename): New function.
17378 (lex): Use it.
17379 * src/reader.c (copy_dollar): Likewise.
17380
17381 2000-10-16 Akim Demaille <akim@epita.fr>
17382
17383 * src/reader.c (copy_comment2): Expect the input stream to be on
17384 the `/' which is suspected to open a comment, instead of being
17385 called after `//' or `/*' was read.
17386 (copy_comment, copy_definition, parse_union_decl, copy_action)
17387 (copy_guard): Adjust.
17388
17389 2000-10-16 Akim Demaille <akim@epita.fr>
17390
17391 * src/reader.c (parse_expect_decl): Use `skip_white_space' and
17392 `read_signed_integer'.
17393
17394 2000-10-16 Akim Demaille <akim@epita.fr>
17395
17396 * src/reader.c (copy_dollar): New function.
17397 (copy_guard, copy_action): Use it.
17398
17399 2000-10-16 Akim Demaille <akim@epita.fr>
17400
17401 * lib/quote.h, lib/quote.c, lib/quotearg.h, lib/quotearg.c:
17402 * m4/prereq.m4, m4/c-bs-a.m4, m4/mbstate.m4:
17403 New files, from Fileutils 4.0.27.
17404 * src/main.c (printable_version): Remove.
17405 * src/lex.c, src/reader.c: Use `quote'.
17406
17407 2000-10-04 Akim Demaille <akim@epita.fr>
17408
17409 * lib/error.c, lib/error.h: New files, needed by xmalloc.c.
17410
17411 2000-10-04 Akim Demaille <akim@epita.fr>
17412
17413 * doc/bison.texinfo: Various typos spotted by Neil Booth.
17414
17415 2000-10-04 Akim Demaille <akim@epita.fr>
17416
17417 When a literal string is used to define two different tokens,
17418 `bison -v' segfaults.
17419 Reported by Piotr Gackiewicz, and fixed by Neil Booth.
17420
17421 * tests/regression.m4: New file.
17422 Include the core of the sample provided by Piotr Gackiewicz.
17423 * src/reader.c (parse_token_decl): Diagnose bad cases, and proceed
17424 properly.
17425
17426 2000-10-04 Akim Demaille <akim@epita.fr>
17427
17428 * src/reader.c (parse_expect_decl): Keep `count' within the size
17429 of `buffer'.
17430 From Neil Booth.
17431
17432 2000-10-02 Paul Eggert <eggert@twinsun.com>
17433
17434 * bison.s1 (yyparse): Assign the default value
17435 unconditionally, to avoid a GCC warning and make the parser a
17436 tad smaller.
17437
17438 2000-10-02 Akim Demaille <akim@epita.fr>
17439
17440 * src/getargs.c (getargs): Don't dump `--help' on unrecognized
17441 options.
17442
17443 2000-10-02 Akim Demaille <akim@epita.fr>
17444
17445 * src/derives.c, src/print.c, src/reduce.c: To ease the
17446 translation, move some `\n' out of the translated strings.
17447
17448 2000-10-02 Akim Demaille <akim@epita.fr>
17449
17450 The location tracking mechanism is precious for parse error
17451 messages. Nevertheless, it is enabled only when `@n' is used in
17452 the grammar, which is a different issue (you can use it in error
17453 message, but not in the grammar per se). Therefore, there should
17454 be another means to enable it.
17455
17456 * src/getargs.c (getargs): Support `--locations'.
17457 (usage): Report it.
17458 * src/getargs.h (locationsflag): Export it.
17459 * src/lex.c (percent_table): Support `%locations'.
17460 * src/reader.c (yylsp_needed): Remove this variable, now replaced
17461 with `locationsflag'.
17462 * doc/bison.texinfo: Document `--locations' and `%locations'.
17463 Sort the options.
17464 * tests/calc.m4: Test it.
17465
17466 For regularity of the names, replace each
17467 (nolineflag, toknumflag, rawtokenumflag, noparserflag): with...
17468 (no_lineflag, token_tableflag, rawflag, no_parserflag): this.
17469 In addition replace each `flag' with `_flag'.
17470
17471 2000-10-02 Akim Demaille <akim@epita.fr>
17472
17473 Also test parse error messages, including with YYERROR_VERBOSE.
17474
17475 * tests/calc.m4 (calc.y): Add support for `exp = exp' (non
17476 associative).
17477 Use it to check the computations.
17478 Use it to check `nonassoc' is honored.
17479 (AT_DATA_CALC_Y): Equip `calc.y' with YYERROR_VERBOSE when passed
17480 `--yyerror-verbose'.
17481 (_AT_CHECK_CALC): Adjust to this option.
17482 (_AT_CHECK_CALC_ERROR): New macro to check parse error messages.
17483
17484 2000-10-02 Akim Demaille <akim@epita.fr>
17485
17486 Test also `--verbose', `--defines' and `--name-prefix'. Testing
17487 the latter demonstrates a flaw in the handling of non debugging
17488 parsers introduced by myself on 2000-03-16: `#define yydebug 0'
17489 was used in order to simplify:
17490
17491 #if YYDEBUG
17492 if (yydebug)
17493 {
17494 ...
17495 }
17496 #endif
17497
17498 into
17499
17500 if (yydebug)
17501 {
17502 ...
17503 }
17504
17505 unfortunately this leads to a CPP conflict when
17506 `--name-prefix=foo' is used since it produces `#define yydebug
17507 foodebug'.
17508
17509 * src/bison.s1 [!YYDEBUG]: Do not define yydebug.
17510 (YYDPRINTF): New macro.
17511 Spread its use.
17512 * tests/calc.m4 (AT_CHECK_CALC): Do require a title, build it from
17513 the bison options.
17514 Also test `--verbose', `--defines' and `--name-prefix'.
17515
17516 2000-10-02 Akim Demaille <akim@epita.fr>
17517
17518 Improve the readability of the produced parsers.
17519
17520 * src/bison.s1: Formatting changes.
17521 Improve the comment related to the `$' mark.
17522 (yydefault): Don't fall through to `yyresume': `goto' there.
17523 * src/output.c (output_parser): When the `$' is met, skip the end
17524 of its line.
17525 New variable, `number_of_dollar_signs', to check there's exactly
17526 one `$' in the parser skeleton.
17527
17528 2000-10-02 Akim Demaille <akim@epita.fr>
17529
17530 * lib/xstrdup.c: New file, from the fileutils.
17531 * src/reader.c (parse_token_decl, get_type_name, parse_type_decl)
17532 (parse_assoc_decl, parse_thong_decl, get_type): Use `xstrdup'
17533 instead of strlen + xmalloc + strcpy.
17534 * src/symtab.c (copys): Remove, use xstrdup instead.
17535
17536 2000-10-02 Akim Demaille <akim@epita.fr>
17537
17538 * src/gram.h (associativity): New enum type which replaces the
17539 former CPP macros `RIGHT_ASSOC', `LEFT_ASSOC' and `NON_ASSOC' with
17540 `right_assoc', `left_assoc' and `non_assoc'.
17541 Adjust all dependencies.
17542 * src/reader.c: Formatting changes.
17543 (LTYPESTR): Don't define it, use it as a literal in
17544 `reader_output_yylsp'.
17545 * src/symtab.h (symbol_class): New enum type which replaces the
17546 former CPP macros `SUNKNOWN', `STOKEN and `SNTERM' with
17547 `sunknown', `stoken and `snterm'.
17548
17549 2000-10-02 Akim Demaille <akim@epita.fr>
17550
17551 * src/getargs.c (fixed_outfiles): Rename as...
17552 (yaccflag): for consistency and accuracy.
17553 Adjust dependencies.
17554
17555 2000-10-02 Akim Demaille <akim@epita.fr>
17556
17557 Use the more standard files `xalloc.h' and `xmalloc.c' instead of
17558 Bison's `allocate.c' and `alloc.h'. This patch was surprisingly
17559 difficult and introduced a lot of core dump. It turns out that
17560 Bison used an implementation of `xmalloc' based on `calloc', and
17561 at various places it does depend upon the initialization to 0. I
17562 have not tried to isolate the pertinent places, and all the former
17563 calls to Bison's `xmalloc' are now using `XCALLOC'. Someday,
17564 someone should address this issue.
17565
17566 * src/allocate.c, src/alloc.h, m4/bison-decl.m4: Remove.
17567 * lib/xmalloc.c, lib/xalloc.h, m4/malloc.m4, m4/realloc.m4: New
17568 files.
17569 Adjust dependencies.
17570 * src/warshall.h: New file.
17571 Propagate.
17572
17573 2000-10-02 Akim Demaille <akim@epita.fr>
17574
17575 Various anti-`extern in *.c' changes.
17576
17577 * src/system.h: Include `assert.h'.
17578
17579 2000-10-02 Akim Demaille <akim@epita.fr>
17580
17581 * src/state.h (nstates, final_state, first_state, first_shift)
17582 (first_reduction): Move their exportation from here...
17583 * src/LR0.h: to here.
17584 Adjust dependencies.
17585 * src/getargs.c (statisticsflag): New variable.
17586 Add support for `--statistics'.
17587 Adjust dependencies.
17588
17589 Remove a lot of now useless `extern' statements in most files.
17590
17591 2000-10-02 Akim Demaille <akim@epita.fr>
17592
17593 * src/LR0.h: New file.
17594 Propagate its use.
17595
17596 2000-10-02 Akim Demaille <akim@epita.fr>
17597
17598 * src/print.h: New file.
17599 Propagate its use.
17600 * src/print.c: Formatting and ordering changes.
17601 (verbose, terse): Replace with...
17602 (print_results): this new function.
17603 Adjust dependencies.
17604
17605 2000-10-02 Akim Demaille <akim@epita.fr>
17606
17607 * src/conflicts.c (conflict_report): New function.
17608 (conflict_log, verbose_conflict_log): Replace with...
17609 (print_conflicts): this function.
17610 Adjust dependencies.
17611 * src/conflicts.h: New file.
17612 Propagate its inclusion.
17613
17614 2000-10-02 Akim Demaille <akim@epita.fr>
17615
17616 * src/nullable.h: New file.
17617 Propagate its inclusion.
17618 * src/nullable.c: Formatting changes.
17619
17620 2000-10-02 Akim Demaille <akim@epita.fr>
17621
17622 * src/reduce.h: New file.
17623 Propagate its inclusion.
17624 * src/reduce.c: Topological sort and other formatting changes.
17625 (bool, TRUE, FALSE): Move their definition to...
17626 * src/system.h: here.
17627
17628 2000-10-02 Akim Demaille <akim@epita.fr>
17629
17630 * src/files.c: Formatting changes.
17631 (tryopen, tryclose, openfiles): Rename as...
17632 (xfopen, xfclose, open_files): this.
17633 (stringappend): static.
17634 * src/files.h: Complete the list of exported symbols.
17635 Propagate its use.
17636
17637 2000-10-02 Akim Demaille <akim@epita.fr>
17638
17639 * src/reader.h: New file.
17640 Propagate its use instead of tedious list of `extern' and
17641 prototypes.
17642 * src/reader.c: Formatting changes, topological sort,
17643 s/register//.
17644
17645 2000-10-02 Akim Demaille <akim@epita.fr>
17646
17647 * src/lex.h: Prototype `lex.c' exported functions.
17648 * src/reader.c: Adjust.
17649 * src/lex.c: Formatting changes.
17650 (safegetc): Rename as...
17651 (xgetc): this.
17652
17653 2000-10-02 Akim Demaille <akim@epita.fr>
17654
17655 * src/lalr.h: New file.
17656 Propagate its inclusion instead of prototypes and `extern'.
17657 * src/lalr.c: Formatting changes, topological sorting etc.
17658
17659 2000-10-02 Akim Demaille <akim@epita.fr>
17660
17661 * src/output.c (token_actions): Introduce a temporary array,
17662 YYDEFACT, that makes it possible for this function to use
17663 output_short_table.
17664
17665 2000-10-02 Akim Demaille <akim@epita.fr>
17666
17667 `user_toknums' is output as a `short[]' in `output.c', while it is
17668 defined as a `int[]' in `reader.c'. For consistency with the
17669 other output tables, `user_toknums' is now defined as a table of
17670 shorts.
17671
17672 * src/reader.c (user_toknums): Be a short table instead of an int
17673 table.
17674 Adjust dependencies.
17675
17676 Factor the short table outputs.
17677
17678 * src/output.c (output_short_table): New function.
17679 * src/output.c (output_gram, output_stos, output_rule_data)
17680 (output_base, output_table, output_check): Use it.
17681
17682 2000-10-02 Akim Demaille <akim@epita.fr>
17683
17684 * src/output.c (output): Topological sort of the functions, in
17685 order to get rid of the `static' prototypes.
17686 No longer use `register'.
17687 * src/output.h: New file.
17688 Propagate its inclusion in files explicitly prototyping functions
17689 from output.c.
17690
17691 2000-09-21 Akim Demaille <akim@epita.fr>
17692
17693 * src/atgeneral.m4: Update from Autoconf.
17694
17695 2000-09-21 Akim Demaille <akim@epita.fr>
17696
17697 * src/closure.h: New file.
17698 * src/closure.c: Formatting changes, topological sort over the
17699 functions, use of closure.h.
17700 (initialize_closure, finalize_closure): Rename as...
17701 (new_closure, free_closure): these. Adjust dependencies.
17702 * src/LR0.c: Formatting changes, topological sort, use of
17703 cloture.h.
17704 (initialize_states): Rename as...
17705 (new_states): this.
17706 * src/Makefile.am (noinst_HEADERS): Adjust.
17707
17708 2000-09-20 Akim Demaille <akim@epita.fr>
17709
17710 * src/acconfig.h: Don't protect config.h against multiple
17711 inclusion.
17712 Don't define PARAMS.
17713 * src/system.h: Define PARAMS.
17714 Remove some of the ad-hoc CPP magic for DOS, VMS etc.: this is the
17715 purpose of config.h. system.h must not try to fix wrong
17716 definitions in config.h.
17717
17718 2000-09-20 Akim Demaille <akim@epita.fr>
17719
17720 * src/derives.h: New file.
17721 * src/main.c, src/derives.h: Use it.
17722 Formatting changes.
17723 * src/Makefile.am (noinst_HEADERS): Adjust.
17724
17725 2000-09-20 Akim Demaille <akim@epita.fr>
17726
17727 * tests/atgeneral.m4: Update from Autoconf.
17728 * tests/calc.m4 (_AT_DATA_CALC_Y, AT_DATA_CALC_Y, _AT_CHECK_CALC)
17729 (AT_CHECK_CALC): New macros.
17730 Use these macros to test bison with options `', `--raw',
17731 `--debug', `--yacc', `--yacc --debug'.
17732
17733 2000-09-19 Akim Demaille <akim@epita.fr>
17734
17735 * src/output.c: Formatting changes.
17736 * src/machine.h: Remove, leaving its contents in...
17737 * src/system.h: here.
17738 Include stdio.h.
17739 Adjust all dependencies on stdio.h and machine.h.
17740 * src/getargs.h: New file.
17741 Let all `extern' declarations about getargs.c be replaced with
17742 inclusion of `getargs.h'.
17743 * src/Makefile.am (noinst_HEADERS): Adjust.
17744
17745 * tests/calc.m4 (yyin): Be initialized in main, not on the global
17746 scope.
17747 (yyerror): Returns void, not int.
17748 * doc/bison.texinfo: Formatting changes.
17749
17750 2000-09-19 Akim Demaille <akim@epita.fr>
17751
17752 * tests/calc.m4 (calc.y): Do not assign to stdin, as it's not
17753 portable.
17754
17755 2000-09-18 Akim Demaille <akim@epita.fr>
17756
17757 * configure.in: Append WARNING_CFLAGS to CFLAGS.
17758 * src/Makefile.am (INCLUDES): Don't.
17759 Be ready to fetch headers in lib/.
17760
17761 2000-09-18 Akim Demaille <akim@epita.fr>
17762
17763 * doc/bison.texinfo: Update the copyright.
17764 ANSIfy and GNUify the examples.
17765 Remove the old menu.
17766
17767 2000-09-18 Akim Demaille <akim@epita.fr>
17768
17769 First set of tests: use the `calc' example from the documentation.
17770
17771 * src/bison.s1 (yyparse): Condition the code using `yytname' which
17772 is defined only when YYDEBUG is.
17773 * m4/atconfig.m4 (AT_CONFIG): Adjust to Autoconf 2.13.
17774 * src/files.c (tryopen, tryclose): Formatting changes.
17775 Move to the top and be static.
17776 * src/reader.c (read_signed_integer): Likewise.
17777 * tests/calc.m4: New file.
17778 * Makefile.am, suite.m4: Adjust.
17779 * m4/atconfig.m4: Set BISON_SIMPLE and BISON_HAIRY.
17780
17781 2000-09-18 Akim Demaille <akim@epita.fr>
17782
17783 Add support for an Autotest test suite for Bison.
17784
17785 * m4/m4.m4, m4/atconfig.m4: New files.
17786 * m4/Makefile.am (EXTRA_DIST): Adjust.
17787 * tests/suite.m4, tests/Makefile.am, tests/atgeneral.m4: New
17788 files.
17789 * src/getargs.c: Display a more standard --version message.
17790 * src/reader.c (reader): Formatting changes.
17791 No longer depend upon VERSION_STRING.
17792 * configure.in: No longer use `dnl'.
17793 Set up the test suite and the new directory `tests/.
17794 (VERSION_STRING): Remove.
17795
17796 2000-04-14 Akim Demaille <akim@epita.fr>
17797
17798 * src/reader.c (copy_comment2): New function, same as former
17799 `copy_comment', but outputs into two FILE *.
17800 (copy_comment): Use it.
17801 (parse_union_decl): Use it.
17802 (get_type, parse_start_decl): Use the same `invalid' message.
17803 (parse_start_decl, parse_union_decl): Use the same `multiple'
17804 message.
17805 (parse_union_decl, copy_guard, copy_action): Use the same
17806 `unmatched' message.
17807 * m4/Makefile.am (EXTRA_DIST): Add `warning.m4'.
17808
17809 2000-03-31 Akim Demaille <akim@epita.fr>
17810
17811 * src/files.c (tryopen, tryclose): Move to the top.
17812 Be static.
17813
17814 2000-03-31 Akim Demaille <akim@epita.fr>
17815
17816 * src/main.c (main): Don't call `done', exit does it.
17817
17818 2000-03-31 Akim Demaille <akim@epita.fr>
17819
17820 * allocate.c: s/return (foo)/return foo/.
17821 * lalr.c: Likewise.
17822 * LR0.c: Likewise.
17823 * output.c: Likewise.
17824 * reader.c: Likewise.
17825 * symtab.c: Likewise.
17826 * vmsgetargs.c: Likewise.
17827
17828 2000-03-31 Akim Demaille <akim@epita.fr>
17829
17830 Clean up the error reporting functions.
17831
17832 * src/report.c: New file.
17833 * src/report.h: Likewise.
17834 * src/Makefile.am: Adjust.
17835 * m4/error.m4: New file.
17836 * m4/Makefile.am: Adjust.
17837 * configure.in (jm_PREREQ_ERROR): Call it.
17838 * src/main.c (int_to_string, banner, fatal_banner, warn_banner):
17839 Remove.
17840 (fatal, fatals): Remove. All callers use complain.c::fatal.
17841 (warn, warni, warns, warnss, warnss): Remove. All callers use
17842 complain.c::complain.
17843 (toomany): Remove, use fatal instead.
17844 * src/files.c (done): No argument, use complain_message_count.
17845 * src/main.c (main): Register `done' to `atexit'.
17846
17847 * src/getargs.c (usage): More `fputs', less `fprintf'.
17848
17849 2000-03-28 Akim Demaille <akim@epita.fr>
17850
17851 * lib/: New directory.
17852 * Makefile.am (SUBDIRS): Adjust.
17853 * configure.in: Adjust.
17854 (LIBOBJS): Although not used yet, AC_SUBST it, otherwise it's
17855 useless.
17856 * src/alloca.c: Moved to lib/.
17857 * src/getopt.c: Likewise.
17858 * src/getopt1.c: Likewise.
17859 * src/getopt.h: Likewise.
17860 * src/ansi2knr.c: Likewise.
17861 * src/ansi2knr.1: Likewise.
17862 * src/Makefile.am: Adjust.
17863 * lib/Makefile.am: New file.
17864
17865 2000-03-28 Akim Demaille <akim@epita.fr>
17866
17867 * src/getargs.c (usage): Refresh the help message.
17868
17869 2000-03-17 Akim Demaille <akim@epita.fr>
17870
17871 * src/getopt1.c: Updated from textutils 2.0e
17872 * src/getopt.c: Likewise.
17873 * src/getopt.h: Likewise.
17874
17875 2000-03-17 Akim Demaille <akim@epita.fr>
17876
17877 * src/Makefile.am (bison.simple): Fix the awk program: quote only
17878 the file name, not the whole `#line LINE FILE'.
17879
17880 2000-03-17 Akim Demaille <akim@epita.fr>
17881
17882 On syntax errors, report the token on which we choked.
17883
17884 * src/bison.s1 (yyparse): In the label yyerrlab, when
17885 YYERROR_VERBOSE, add yychar in msg.
17886
17887 2000-03-17 Akim Demaille <akim@epita.fr>
17888
17889 * src/reader.c (copy_at): New function.
17890 (copy_guard): Use it.
17891 (copy_action): Use it.
17892
17893 2000-03-17 Akim Demaille <akim@epita.fr>
17894
17895 Be kind to translators, save some useless translations.
17896
17897 * src/main.c (banner): New function.
17898 (fatal_banner): Use it.
17899 (warn_banner): Use it.
17900
17901 2000-03-17 Akim Demaille <akim@epita.fr>
17902
17903 * src/reader.c (copy_definition): Use copy_string and
17904 copy_comment. Removed now unused `match', `ended',
17905 `cplus_comment'.
17906 (copy_comment, copy_string): Moved, to be visible from
17907 copy_definition.
17908
17909 2000-03-17 Akim Demaille <akim@epita.fr>
17910
17911 * src/reader.c (copy_string): Declare `static inline'. No
17912 problems with inline, since it is checked by configure.
17913 (copy_comment): Likewise.
17914
17915 2000-03-17 Akim Demaille <akim@epita.fr>
17916
17917 * src/reader.c (packsymbols): Formatting changes.
17918
17919 2000-03-17 Akim Demaille <akim@epita.fr>
17920
17921 * src/reader.c (copy_comment): New function, factored out from:
17922 (copy_action): Use it. Removed now unused `match', `ended',
17923 `cplus_comment'.
17924 (copy_guard): Likewise.
17925
17926 2000-03-17 Akim Demaille <akim@epita.fr>
17927
17928 * src/reader.c (copy_string): New function, factored out from:
17929 (copy_action): Use it.
17930 (copy_guard): Likewise.
17931
17932 2000-03-17 Akim Demaille <akim@epita.fr>
17933
17934 Change the handling of @s so that they behave exactly like $s.
17935 There is now a pseudo variable @$ (readble and writable), location
17936 of the lhs of the rule (by default ranging from the location of
17937 the first symbol of the rhs, to the location of the last symbol,
17938 or, if the rhs is empty, YYLLOC).
17939
17940 * src/bison.s1 [YYLSP_NEEDED] (yyloc): New variable, twin of
17941 yyval.
17942 (yyparse): When providing a default semantic action, provide a
17943 default location action.
17944 (after the $): No longer change `*YYLSP', just stack YYLOC the
17945 same way you stack YYVAL.
17946 * src/reader.c (read_declarations): Use warns.
17947 (copy_guard, case '@'): Also recognize `@$', expanded as `YYLOC'.
17948 (copy_action, case '@'): Likewise.
17949 Use a standard error message, to save useless work from
17950 translators.
17951
17952 2000-03-17 Akim Demaille <akim@epita.fr>
17953
17954 * src/bison.s1: Formatting and cosmetics changes.
17955 * src/reader.c: Likewise.
17956 Update the Copyright notice.
17957
17958 2000-03-17 Akim Demaille <akim@epita.fr>
17959
17960 * src/bison.s1 (#line): All set to `#line' only, since the
17961 Makefile now handles them.
17962
17963 2000-03-16 Akim Demaille <akim@epita.fr>
17964
17965 * src/output.c (output_rule_data): Output the documentation of
17966 some of the tables.
17967 (Copyright notice): Update.
17968 Formatting changes.
17969
17970 2000-03-16 Akim Demaille <akim@epita.fr>
17971
17972 * src/bison.s1 [!YYDEBUG]: Define yydebug to 0. This allows to
17973 remove most `#if YYDEBUG != 0', since `if (yydebug)' is enough.
17974 One `#if YYDEBUG' remains, since it uses variables which are
17975 defined only if `YYDEBUG != 0'.
17976
17977 2000-03-16 Akim Demaille <akim@epita.fr>
17978
17979 * src/bison.s1 (yyparse): Reorganize the definitions of the stacks
17980 and related variables so that the similarities are highlighted.
17981
17982 2000-03-16 Akim Demaille <akim@epita.fr>
17983
17984 * src/bison.s1: Properly indent CPP directives.
17985
17986 2000-03-16 Akim Demaille <akim@epita.fr>
17987
17988 * src/bison.s1: Properly indent the `alloca' CPP section.
17989
17990 2000-03-16 Akim Demaille <akim@epita.fr>
17991
17992 Do not hard code values of directories in `configure.in'.
17993 Update the `configure' tool chain.
17994
17995 * configure.in (XPFILE, XPFILE1, LOCALEDIR): Remove, handled by
17996 src/makefile.am.
17997 (VERSION_STRING): Use the third arg of AC_DEFINE_UNQUOTED.
17998 (AC_OUTPUT): Add m4/Makefile.
17999 Bump to bison 1.28a, 1.29 has never been released.
18000 * acconfig.h (XPFILE, XPFILE1, LOCALEDIR): Remove, since they are
18001 handled via src/Makefile.am.
18002 (VERSION_STRING, PROTOTYPES, ENABLE_NLS, HAVE_CATGETS,
18003 HAVE_GETTEXT, HAVE_LC_MESSAGES, HAVE_STPCPY): Remove, handled by
18004 autoheader.
18005 * Makefile.am (SUBDIRS): Add m4.
18006 (ACLOCAL_AM_FLAGS): New variable.
18007 (AUTOMAKE_OPTIONS): Add check-news.
18008 * src/Makefile.am (bison.simple): Use awk to replace #line lines with
18009 the proper line number and file name.
18010 (DEFS): Propagate the location of bison library files and of the
18011 locale files.
18012 (INCLUDES): Added `-I ..' so that one can compile with srcdir !=
18013 builddir.
18014 * acinclude.m4: Remove, replaced by the directory m4.
18015 * m4/Makefile.am (EXTRA_DIST): New variable.
18016 * m4/gettext.m4: New file, from the fileutils.
18017 * m4/lcmessage.m4: Likewise
18018 * m4/progtest.m4: Likewise.
18019 * m4/bison-decl.m4: New file, extracted from former acinclude.m4.
18020
18021 2000-03-10 Akim Demaille <akim@epita.fr>
18022
18023 * src/closure.c:
18024 Formatting changes of various comments.
18025 Respect the GNU coding standards at various places.
18026 Don't use `_()' when no translation is needed.
18027
18028 1999-12-13 Jesse Thilo <jthilo@gnu.org>
18029
18030 * src/files.c:
18031 OS/2 honors TMPDIR environment variable.
18032
18033 1999-12-13 Jesse Thilo <jthilo@gnu.org>
18034
18035 * doc/bison.texinfo: Tweaked spelling and grammar.
18036 Updated ISBN.
18037 Removed reference to price of printed copy.
18038 Mention BISON_SIMPLE and BISON_HAIRY.
18039
18040 1999-12-13 Jesse Thilo <jthilo@gnu.org>
18041
18042 * configure.in, NEWS:
18043 Bison 1.29 released.
18044
18045 1999-10-27 Jesse Thilo <jthilo@gnu.org>
18046
18047 * doc/.cvsignore, doc/Makefile.am, doc/refcard.tex:
18048 Added reference card.
18049
18050 1999-07-26 Jesse Thilo <jthilo@gnu.org>
18051
18052 * po/ru.po: Added Russian translation.
18053
18054 1999-07-26 Jesse Thilo <jthilo@gnu.org>
18055
18056 * configure.in: Added Russian translation.
18057
18058 1999-07-06 Jesse Thilo <jthilo@gnu.org>
18059
18060 * configure.in, NEWS, README:
18061 Released version 1.28.
18062
18063 1999-06-14 Jesse Thilo <jthilo@gnu.org>
18064
18065 * src/system.h:
18066 Squashed redefinition warning on some systems.
18067
18068 * src/getargs.c, src/Makefile.am, src/reader.c, src/version.c:
18069 Have configure build version string instead of relying on ANSI string
18070 concatentation.
18071
18072 1999-06-14 Jesse Thilo <jthilo@gnu.org>
18073
18074 * po/POTFILES.in: Got rid of version.c.
18075
18076 1999-06-14 Jesse Thilo <jthilo@gnu.org>
18077
18078 * acconfig.h, configure.in:
18079 Have configure build version string instead of relying on ANSI string
18080 concatentation.
18081
18082 1999-06-08 Jesse Thilo <jthilo@gnu.org>
18083
18084 * doc/bison.1:
18085 Dropped mention of `+' for long-named options.
18086
18087 1999-05-30 Jesse Thilo <jthilo@gnu.org>
18088
18089 * src/files.c: Added <unistd.h> for unlink().
18090
18091 * src/Makefile.am, src/system.h:
18092 I18n fixes.
18093
18094 1999-05-30 Jesse Thilo <jthilo@gnu.org>
18095
18096 * README: Added a FAQ list.
18097
18098 * configure.in, acconfig.h:
18099 I18n fixes.
18100
18101 1999-05-30 Jesse Thilo <jthilo@gnu.org>
18102
18103 * doc/FAQ, doc/Makefile.am:
18104 Added a FAQ list.
18105
18106 1999-05-19 Jesse Thilo <jthilo@gnu.org>
18107
18108 * src/alloc.h, src/symtab.h, src/version.c:
18109 Protected inclusion of "config.h" with HAVE_CONFIG_H.
18110
18111 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18112
18113 * src/.cvsignore, src/Makefile.am:
18114 Reorganized: sources in `src', documentation in `doc'.
18115
18116 * src/lex.c (literalchar):
18117 fixed the code for escaping double quotes (thanks
18118 Jonathan Czisny.)
18119
18120 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18121
18122 * po/de.po, po/es.po, po/fr.po, po/nl.po, po/POTFILES.in:
18123 Adjusted paths to reflect directory reorganization.
18124
18125 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18126
18127 * doc/.cvsignore, doc/Makefile.am:
18128 Reorganized: sources in `src', documentation in `doc'.
18129
18130 1999-04-18 Jesse Thilo <jthilo@gnu.org>
18131
18132 * configure.in:
18133 Updated AC_INIT file to reflect directory reorganization.
18134
18135 * configure.in, .cvsignore, Makefile.am, POTFILES.in:
18136 Reorganized: sources in `src', documentation in `doc'.
18137
18138 1999-04-13 Jesse Thilo <jthilo@gnu.org>
18139
18140 * src/allocate.c:
18141 Don't declare calloc() and realloc() if not necessary.
18142
18143 1999-04-13 Jesse Thilo <jthilo@gnu.org>
18144
18145 * configure.in, acconfig.h, acinclude.m4:
18146 Don't declare calloc() and realloc() if not necessary.
18147
18148 1999-03-23 Jesse Thilo <jthilo@gnu.org>
18149
18150 * po/.cvsignore: Added i18n support.
18151
18152 1999-03-23 Jesse Thilo <jthilo@gnu.org>
18153
18154 * acconfig.h, configure.in, Makefile.am:
18155 Added i18n support.
18156
18157 1999-03-22 Jesse Thilo <jthilo@gnu.org>
18158
18159 * src/bison.s1: Fixed #line numbers.
18160
18161 1999-03-15 Jesse Thilo <jthilo@gnu.org>
18162
18163 * po/es.po, po/fr.po, po/nl.po, po/de.po:
18164 Added PO files from Translation Project.
18165
18166 1999-03-03 Jesse Thilo <jthilo@gnu.org>
18167
18168 * Makefile.am:
18169 Added support for non-ANSI compilers (ansi2knr).
18170
18171 1999-02-16 Jesse Thilo <jthilo@gnu.org>
18172
18173 * configure.in: Bumped version number to 1.27.
18174
18175 * Makefile.am:
18176 Added `bison.simple' to list of files removed by `make distclean'.
18177
18178 1999-02-12 Jesse Thilo <jthilo@gnu.org>
18179
18180 * src/files.c, src/files.h:
18181 Defined locations of parser files in config.h instead of Makefile.
18182
18183 1999-02-12 Jesse Thilo <jthilo@gnu.org>
18184
18185 * acconfig.h, acinclude.m4, configure.in, Makefile.am:
18186 Defined locations of parser files in config.h instead of Makefile.
18187
18188 1999-02-09 Jesse Thilo <jthilo@gnu.org>
18189
18190 * Makefile.am:
18191 Removed inappropriate use of $< macro.
18192
18193 1999-02-05 Jesse Thilo <jthilo@gnu.org>
18194
18195 * po/Makefile.in.in, po/POTFILES.in:
18196 Add `po' directory skeleton.
18197
18198 1999-01-27 Jesse Thilo <jthilo@gnu.org>
18199
18200 * README: Document help-bison list.
18201
18202 * configure.in: Add check for mkstemp().
18203
18204 1999-01-20 Jesse Thilo <jthilo@gnu.org>
18205
18206 * src/conflicts.c, src/LR0.c, src/output.c, src/reader.c:
18207 Hush a few compiler warnings.
18208
18209 * src/files.c:
18210 Add tryclose(), which verifies that fclose was successful.
18211 Hush a couple of compiler warnings.
18212
18213 1999-01-20 Jesse Thilo <jthilo@gnu.org>
18214
18215 * Makefile.am, OChangeLog:
18216 ChangeLog is now automatically generated. Include the old version as
18217 OChangeLog.
18218
18219 1999-01-14 Jesse Thilo <jthilo@gnu.org>
18220
18221 * 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:
18222 Update FSF address.
18223
18224 1999-01-14 Jesse Thilo <jthilo@gnu.org>
18225
18226 * doc/bison.texinfo: Fix formatting glitch.
18227
18228 * doc/bison.texinfo: Update FSF address.
18229
18230 1999-01-14 Jesse Thilo <jthilo@gnu.org>
18231
18232 * acconfig.h: Update FSF address.
18233
18234 1999-01-08 Jesse Thilo <jthilo@gnu.org>
18235
18236 * src/system.h:
18237 Don't define PACKAGE here, since config.h defines it.
18238
18239 1998-12-30 Jesse Thilo <jthilo@gnu.org>
18240
18241 * src/reader.c: Update copyright date.
18242
18243 * src/main.c:
18244 Ditch sprintf to statically-sized buffers in fatal/warn functions in
18245 favor of output directly to stderr (avoids buffer overruns).
18246
18247 * src/reader.c: Some checks for premature EOF.
18248
18249 * 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:
18250 Use prototypes if the compiler understands them.
18251
18252 * src/files.c: Honor TMPDIR on Unix hosts.
18253 Use prototypes if the compiler understands them.
18254
18255 * src/reader.c:
18256 Fix a couple of buffer overrun bugs.
18257 Use prototypes if the compiler understands them.
18258
18259 * src/system.h: Include unistd.h and ctype.h.
18260 Use #ifdef instead of #if for NLS symbols.
18261
18262 1998-12-30 Jesse Thilo <jthilo@gnu.org>
18263
18264 * doc/bison.texinfo:
18265 Delete comment "consider using @set for edition number, etc..." since
18266 we now are doing so.
18267
18268 1998-12-30 Jesse Thilo <jthilo@gnu.org>
18269
18270 * configure.in:
18271 Use prototypes if the compiler understands them.
18272
18273 * NEWS: Document 1.26 highlights.
18274
18275 * Makefile.am: Require Automake 1.3 or later.
18276
18277 * acconfig.h:
18278 Use prototypes if the compiler understands them.
18279
18280 1998-12-29 Jesse Thilo <jthilo@gnu.org>
18281
18282 * src/version.c:
18283 Use VERSION symbol from automake for version number.
18284
18285 1998-12-29 Jesse Thilo <jthilo@gnu.org>
18286
18287 * acconfig.h, configure.in, version.cin:
18288 Use VERSION symbol from automake for version number.
18289
18290 1998-11-28 Jesse Thilo <jthilo@gnu.org>
18291
18292 * Makefile.am:
18293 Distribute original version of simple parser (bison.s1), not built
18294 version (bison.simple).
18295
18296 1998-11-28 Jesse Thilo <jthilo@gnu.org>
18297
18298 * doc/bison.texinfo: Add info dir entry.
18299
18300 * doc/bison.texinfo:
18301 Let automake put version number into documentation.
18302
18303 1998-11-26 Jesse Thilo <jthilo@gnu.org>
18304
18305 * src/bison.cld, src/build.com, src/vmshlp.mar:
18306 Add non-RCS files from /gd/gnu/bison.
18307
18308 1998-11-26 Jesse Thilo <jthilo@gnu.org>
18309
18310 * doc/bison.1:
18311 Document the BISON_HAIRY and BISON_SIMPLE variables.
18312
18313 1998-11-25 Jesse Thilo <jthilo@gnu.org>
18314
18315 * src/version.c: Build version.c automatically.
18316
18317 * src/reader.c:
18318 Fix token numbering (used to start at 258, not 257).
18319
18320 * src/system.h: Include config.h.
18321
18322 * src/getargs.c: Update bug report address.
18323
18324 * src/alloca.c, src/getopt1.c, src/getopt.c, src/getopt.h:
18325 Get latest copies of alloca.c, getopt.c, getopt.h, getopt1.c from gnu.org.
18326
18327 1998-11-25 Jesse Thilo <jthilo@gnu.org>
18328
18329 * Makefile.am:
18330 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
18331
18332 * configure.in, version.cin:
18333 Build version.c automatically.
18334
18335 * AUTHORS: Add AUTHORS file.
18336
18337 * README: Update bug report address.
18338
18339 * bison.simple:
18340 Rename bison.simple to bison.s1 (bison.simple is then built from bison.s1).
18341
18342 * configure.in, Makefile.am, Makefile.in, stamp-h.in:
18343 Add automake stuff.
18344
18345 1998-11-25 Jesse Thilo <jthilo@gnu.org>
18346
18347 * doc/bison.texinfo: Clean up some formatting.
18348
18349 1998-05-05 Richard Stallman <rms@gnu.org>
18350
18351 * doc/bison.texinfo:
18352 Explain better why to make a pure parser.
18353
18354 1998-01-05 Richard Stallman <rms@gnu.org>
18355
18356 * src/files.c (openfiles):
18357 [_WIN32 && !__CYGWIN32__] Use TEMP or Temp to
18358 find a temporary directory, if possible. Do not unlink files while
18359 they are open.
18360
18361 1997-08-25 Richard Stallman <rms@gnu.org>
18362
18363 * src/reader.c (stack_offset;):
18364 Change some warni to warns.
18365
18366 * src/lex.c (literalchar): Use warns, not warni.
18367
18368 1997-06-28 Richard Stallman <rms@gnu.org>
18369
18370 * src/bison.s1: Add a Bison version comment.
18371
18372 * src/main.c (fatal, warn, berror):
18373 Use program_name.
18374
18375 1997-06-28 Richard Stallman <rms@gnu.org>
18376
18377 * Makefile.in (bison_version): New variable.
18378 (dist): Use that variable.
18379 (bison.s1): Substitute the Bison version into bison.simple.
18380
18381 * bison.simple: Add a Bison version comment.
18382
18383 1997-06-18 Richard Stallman <rms@gnu.org>
18384
18385 * src/main.c (fatal, warn, berror):
18386 Make error messages standard.
18387 (toomany): Improve error message text.
18388
18389 * 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:
18390 new.h renamed to alloc.h.
18391
18392 1997-06-18 Richard Stallman <rms@gnu.org>
18393
18394 * Makefile.in: new.h renamed to alloc.h.
18395
18396 1997-05-24 Richard Stallman <rms@gnu.org>
18397
18398 * src/lex.c (literalchar):
18399 Fix the code for escaping \, " and '.
18400
18401 (lex): Avoid trouble when there are many chars
18402 to discard in a char literal with just several chars in it.
18403
18404 1997-05-17 Richard Stallman <rms@gnu.org>
18405
18406 * src/bison.s1:
18407 Use malloc, if using alloca is troublesome.
18408 (YYSTACK_USE_ALLOCA): New flag macro.
18409 Define it for some systems and compilers.
18410 (YYSTACK_ALLOC): New macro.
18411 (yyparse): Use YYSTACK_ALLOC to allocate stack.
18412 If it was malloc'd, free it.
18413
18414 1997-05-17 Richard Stallman <rms@gnu.org>
18415
18416 * bison.simple:
18417 Use malloc, if using alloca is troublesome.
18418 (YYSTACK_USE_ALLOCA): New flag macro.
18419 Define it for some systems and compilers.
18420 (YYSTACK_ALLOC): New macro.
18421 (yyparse): Use YYSTACK_ALLOC to allocate stack.
18422 If it was malloc'd, free it.
18423
18424 1997-04-23 Richard Stallman <rms@gnu.org>
18425
18426 * src/bison.s1:
18427 (alloca) [__hpux]: Always define as __builtin_alloca.
18428
18429 1997-04-23 Richard Stallman <rms@gnu.org>
18430
18431 * bison.simple:
18432 (alloca) [__hpux]: Always define as __builtin_alloca.
18433
18434 1997-04-22 Richard Stallman <rms@gnu.org>
18435
18436 * src/bison.s1:
18437 [__hpux]: Include alloca.h (right for HPUX 10)
18438 instead of declaring alloca (right for HPUX 9).
18439
18440 * src/bison.s1 (__yy_memcpy):
18441 Declare arg `count' as unsigned int.
18442 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
18443
18444 1997-04-22 Richard Stallman <rms@gnu.org>
18445
18446 * bison.simple:
18447 [__hpux]: Include alloca.h (right for HPUX 10)
18448 instead of declaring alloca (right for HPUX 9).
18449
18450 * bison.simple (__yy_memcpy):
18451 Declare arg `count' as unsigned int.
18452 (yyparse): Cast third arg to __yy_memcpy to unsigned int.
18453
18454 1997-01-03 Richard Stallman <rms@gnu.org>
18455
18456 * src/allocate.c: [__STDC__ or _MSC_VER]:
18457 Declare calloc and realloc to return void *.
18458
18459 1997-01-02 Richard Stallman <rms@gnu.org>
18460
18461 * src/system.h:
18462 [_MSC_VER]: Include stdlib.h and process.h.
18463 [_MSC_VER] (getpid): Define as macro--translate it to _getpid.
18464
18465 * src/main.c (main): Return FAILURE as a value.
18466 (printable_version): Declare arg as int, not char.
18467
18468 1997-01-02 Richard Stallman <rms@gnu.org>
18469
18470 * Makefile.in (dist):
18471 Explicitly check for symlinks, and copy them.
18472
18473 1996-12-19 Richard Stallman <rms@gnu.org>
18474
18475 * src/files.c:
18476 [_MSC_VER] (XPFILE, XPFILE1): Define, if not already defined.
18477
18478 1996-12-18 Paul Eggert <eggert@gnu.org>
18479
18480 * src/bison.s1 (yyparse):
18481 If __GNUC__ and YYPARSE_PARAM are both defined,
18482 declare yyparse to have a void * argument.
18483
18484 1996-12-18 Paul Eggert <eggert@gnu.org>
18485
18486 * bison.simple (yyparse):
18487 If __GNUC__ and YYPARSE_PARAM are both defined,
18488 declare yyparse to have a void * argument.
18489
18490 1996-12-17 Richard Stallman <rms@gnu.org>
18491
18492 * src/reduce.c (nbits): Add some casts.
18493
18494 1996-08-12 Richard Stallman <rms@gnu.org>
18495
18496 * src/bison.s1: Test _MSDOS as well as _MSDOS_.
18497
18498 1996-08-12 Richard Stallman <rms@gnu.org>
18499
18500 * bison.simple: Test _MSDOS as well as _MSDOS_.
18501
18502 1996-07-31 Richard Stallman <rms@gnu.org>
18503
18504 * src/bison.s1:
18505 [__sun && __i386]: Include alloca.h.
18506
18507 1996-07-31 Richard Stallman <rms@gnu.org>
18508
18509 * bison.simple:
18510 [__sun && __i386]: Include alloca.h.
18511
18512 1996-07-30 Richard Stallman <rms@gnu.org>
18513
18514 * src/bison.s1: Comment change.
18515
18516 * src/bison.s1: Test _MSDOS_, not MSDOS.
18517
18518 1996-07-30 Richard Stallman <rms@gnu.org>
18519
18520 * bison.simple: Comment change.
18521
18522 * bison.simple: Test _MSDOS_, not MSDOS.
18523
18524 1996-06-01 Richard Stallman <rms@gnu.org>
18525
18526 * 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:
18527 Insert `_' macro around many string constants.
18528
18529 * src/main.c:
18530 Insert `_' macro around many string constants.
18531
18532 (main): Call setlocale, bindtextdomain and textdomain.
18533
18534 * src/system.h: [HAVE_LOCALE_H]: Include locale.h.
18535 [! HAVE_LOCALE_H] (setlocale): Define as no-op.
18536 [ENABLE_NLS]: Include libintl.h.
18537 [ENABLE_NLS] (gettext): Define.
18538 [! ENABLE_NLS] (bintextdomain, textdomain, _): Consolation definitions.
18539 (N_, PACKAGE, LOCALEDIR): New macros.
18540
18541 1996-06-01 Richard Stallman <rms@gnu.org>
18542
18543 * POTFILES.in: New file.
18544
18545 * Makefile.in (allocate.o):
18546 Define target explicitly.
18547
18548 * Makefile.in (CFLAGS): Set to @CFLAGS@.
18549 (LDFLAGS): Set to @LDFLAGS@.
18550 (configure): Run autoconf only if preceding `cd' succeeds.
18551 (bison.s1): Redirect output to temporary file then move the
18552 temporary to the target, rather than redirecting directly to bison.s1.
18553 (clean): Remove config.status and config.log.
18554 (distclean): Don't remove config.status here.
18555
18556 1996-05-12 Richard Stallman <rms@gnu.org>
18557
18558 * src/bison.s1:
18559 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
18560
18561 1996-05-12 Richard Stallman <rms@gnu.org>
18562
18563 * bison.simple:
18564 (__yy_memcpy) [__cplusplus]: Reorder declarations of variables f and t.
18565
18566 1996-05-11 Richard Stallman <rms@gnu.org>
18567
18568 * src/bison.s1 (__yy_memcpy):
18569 Really reorder the args, as was supposedly done on Feb 14 1995.
18570 (yyparse): Calls changed accordingly.
18571
18572 1996-05-11 Richard Stallman <rms@gnu.org>
18573
18574 * Makefile.in (dist): Don't use $(srcdir).
18575
18576 * bison.simple (__yy_memcpy):
18577 Really reorder the args, as was supposedly done on Feb 14 1995.
18578 (yyparse): Calls changed accordingly.
18579
18580 1996-01-27 Richard Stallman <rms@gnu.org>
18581
18582 * src/output.c (output_rule_data):
18583 Test YYERROR_VERBOSE in the conditional
18584 around the definition of ttyname.
18585
18586 1995-12-29 Richard Stallman <rms@gnu.org>
18587
18588 * src/bison.s1:
18589 Fix line numbers in #line commands.
18590
18591 1995-12-29 Richard Stallman <rms@gnu.org>
18592
18593 * bison.simple:
18594 Fix line numbers in #line commands.
18595
18596 1995-12-27 Richard Stallman <rms@gnu.org>
18597
18598 * src/bison.s1 (YYPARSE_PARAM_DECL):
18599 In C++, make it always null.
18600 (YYPARSE_PARAM_ARG): New macro.
18601 (yyparse): Use YYPARSE_PARAM_ARG.
18602
18603 1995-12-27 Richard Stallman <rms@gnu.org>
18604
18605 * bison.simple (YYPARSE_PARAM_DECL):
18606 In C++, make it always null.
18607 (YYPARSE_PARAM_ARG): New macro.
18608 (yyparse): Use YYPARSE_PARAM_ARG.
18609
18610 1995-11-29 Richard Stallman <rms@gnu.org>
18611
18612 * doc/bison.texinfo:
18613 Describe literal string tokens, %raw, %no_lines, %token_table.
18614
18615 1995-11-29 Daniel Hagerty <hag@gnu.org>
18616
18617 * doc/bison.texinfo: Fixed update date
18618
18619 1995-10-16 Richard Stallman <rms@gnu.org>
18620
18621 * src/version.c: Version 1.25.
18622
18623 1995-10-16 Richard Stallman <rms@gnu.org>
18624
18625 * NEWS: *** empty log message ***
18626
18627 1995-10-16 Richard Stallman <rms@gnu.org>
18628
18629 * doc/bison.1, doc/bison.rnh:
18630 Add new options.
18631
18632 1995-10-15 Richard Stallman <rms@gnu.org>
18633
18634 * src/vmsgetargs.c, src/getargs.c:
18635 Added -n, -k, and -raw switches.
18636 (noparserflag, toknumflag, rawtoknumflag): New variables.
18637
18638 * src/symtab.h (SALIAS):
18639 New #define for adding aliases to %token.
18640 (struct bucket): Added `alias' field.
18641
18642 * src/reduce.c (reduce_grammar):
18643 Revise error message.
18644 (print_notices): Remove final `.' from error message.
18645
18646 * src/reader.c (reader_output_yylsp):
18647 New function.
18648 (readgram): Use `#if 0' around code that accepted %command
18649 inside grammar rules: The documentation doesn't allow it,
18650 and it will fail since the %command processors scan for the next %.
18651 (parse_token_decl): Extended the %token
18652 declaration to allow a multi-character symbol as an alias.
18653 (parse_thong_decl): New function.
18654 (read_declarations): Added %thong declarations.
18655 (read_declarations): Handle NOOP to deal with allowing
18656 % declarations as another means to specify the flags.
18657 (readgram): Allow %prec prior to semantics embedded in a rule.
18658 (skip_to_char, read_declarations, copy_definition)
18659 (parse_token_decl, parse_start_decl, parse_type_decl)
18660 (parse_assoc_decl, parse_union_decl, parse_expect_decl)
18661 (get_type_name, copy_guard, copy_action, readgram)
18662 (get_type, packsymbols): Revised most error messages.
18663 Changed `fatal' to `warnxxx' to avoid aborting for error.
18664 Revised and use multiple warnxxx functions to avoid using VARARGS1.
18665 (read_declarations): Improve the error message for
18666 an invalid character. Do not abort.
18667 (read_declarations, copy_guard, copy_action): Use
18668 printable_version to avoid unprintable characters in printed output.
18669 (parse_expect_decl): Error if argument to %expect exceeds 10 digits.
18670 (parse_token_decl, parse_assoc_decl, parse_type_decl, get_type):
18671 Allow the type of a non-terminal can be given
18672 more than once, as long as all specifications give the same type.
18673
18674 * src/output.c:
18675 (output_headers, output_trailers, output, output_gram)
18676 (output_rule_data): Implement noparserflag variable.
18677 Implement toknumflag variable.
18678 (output): Call reader_output_yylsp to output LTYPESTR.
18679
18680 * src/main.c (main):
18681 If reader sees an error, don't process the grammar.
18682 (fatals): Updated to not use VARARGS1.
18683 (printable_version, int_to_string, warn, warni, warns, warnss)
18684 (warnsss): New error reporting functions. Avoid abort for error.
18685
18686 * src/lex.h:
18687 Added THONG and NOOP for alias processing.
18688 Added SETOPT for the new code that allows setting options with %flags.
18689
18690 * src/lex.c:
18691 Include getopt.h. Add some extern decls.
18692 (safegetc): New function to deal with EOF gracefully.
18693 (literalchar); new function to deal with reading \ escapes.
18694 (lex): Use literalchar.
18695 (lex): Implemented "..." tokens.
18696 (literalchar, lex, parse_percent_token): Made tokenbuffer
18697 always contain the token. This includes growing the token
18698 buffer while reading an integer.
18699 (parse_percent_token): Replaced if-else statement with percent_table.
18700 (parse_percent_token): Added % declarations as another
18701 way to specify the flags -n, -l, and -r. Also added hooks for
18702 -d, -k, -y, -v, -t, -p, -b, -o, but implementation requires
18703 major changes to files.c.
18704 (lex) Retain in the incoming stream a character following
18705 an incorrect '/'.
18706 (skip_white_space, lex): Revised most error messages
18707 and changed fatal to warn to avoid aborting.
18708 (percent_table): Added %thong declarations.
18709
18710 * src/gram.h: Comment changes.
18711
18712 * src/files.c (openfiles, open_extra_files, done):
18713 Add faction flag
18714 and actfile file. Handle noparserflag. Both for -n switch.
18715
18716 * src/conflicts.c (resolve_sr_conflict):
18717 Remove use of alloca.
18718
18719 1995-06-01 Jim Meyering <meyering@gnu.org>
18720
18721 * doc/bison.texinfo: *** empty log message ***
18722
18723 1995-05-06 Richard Stallman <rms@gnu.org>
18724
18725 * src/bison.s1: Comment change.
18726
18727 1995-05-06 Richard Stallman <rms@gnu.org>
18728
18729 * bison.simple: Comment change.
18730
18731 1995-05-03 Richard Stallman <rms@gnu.org>
18732
18733 * src/version.c: Version now 1.24.
18734
18735 * src/bison.s1: Change distribution terms.
18736
18737 * src/version.c: Version now 1.23.
18738
18739 1995-05-03 Richard Stallman <rms@gnu.org>
18740
18741 * doc/bison.texinfo:
18742 Rewrite "Conditions for Using Bison".
18743 Update version to 1.24.
18744
18745 1995-05-03 Richard Stallman <rms@gnu.org>
18746
18747 * bison.simple: Change distribution terms.
18748
18749 1995-02-23 Richard Stallman <rms@gnu.org>
18750
18751 * src/files.c: Test __VMS_POSIX as well as VMS.
18752
18753 1995-02-14 Jim Meyering <meyering@gnu.org>
18754
18755 * src/bison.s1 (__yy_memcpy):
18756 Renamed from __yy_bcopy to avoid
18757 confusion. Reverse FROM and TO arguments to be consistent with
18758 those of memcpy.
18759
18760 1995-02-14 Jim Meyering <meyering@gnu.org>
18761
18762 * bison.simple (__yy_memcpy):
18763 Renamed from __yy_bcopy to avoid
18764 confusion. Reverse FROM and TO arguments to be consistent with
18765 those of memcpy.
18766
18767 1994-11-10 David J. MacKenzie <djm@gnu.org>
18768
18769 * NEWS: reformat
18770
18771 * NEWS: New file.
18772
18773 * Makefile.in (DISTFILES): Include NEWS.
18774
18775 * Makefile.in (DISTFILES):
18776 Include install-sh, not install.sh.
18777
18778 * configure.in: Update to Autoconf v2 macro names.
18779
18780 1994-10-05 David J. MacKenzie <djm@gnu.org>
18781
18782 * Makefile.in: fix typo
18783
18784 * Makefile.in (prefix, exec_prefix):
18785 Let configure set them.
18786
18787 1994-09-28 David J. MacKenzie <djm@gnu.org>
18788
18789 * Makefile.in: Set datadir to $(prefix)/share.
18790
18791 1994-09-15 Richard Stallman <rms@gnu.org>
18792
18793 * src/bison.s1:
18794 Update copyright notice and GPL version.
18795
18796 1994-09-15 Richard Stallman <rms@gnu.org>
18797
18798 * bison.simple:
18799 Update copyright notice and GPL version.
18800
18801 1994-07-12 Richard Stallman <rms@gnu.org>
18802
18803 * src/reduce.c, src/reader.c:
18804 entered into RCS
18805
18806 1994-05-05 David J. MacKenzie <djm@gnu.org>
18807
18808 * Makefile.in: entered into RCS
18809
18810 1994-03-26 Richard Stallman <rms@gnu.org>
18811
18812 * src/bison.s1: entered into RCS
18813
18814 1994-03-26 Richard Stallman <rms@gnu.org>
18815
18816 * bison.simple: entered into RCS
18817
18818 1994-03-25 Richard Stallman <rms@gnu.org>
18819
18820 * src/main.c: entered into RCS
18821
18822 1994-03-24 Richard Stallman <rms@gnu.org>
18823
18824 * src/conflicts.c: entered into RCS
18825
18826 1994-01-02 Richard Stallman <rms@gnu.org>
18827
18828 * Makefile.in: *** empty log message ***
18829
18830 1993-11-21 Richard Stallman <rms@gnu.org>
18831
18832 * src/bison.s1: *** empty log message ***
18833
18834 1993-11-21 Richard Stallman <rms@gnu.org>
18835
18836 * doc/bison.texinfo: entered into RCS
18837
18838 * doc/bison.texinfo: *** empty log message ***
18839
18840 1993-11-21 Richard Stallman <rms@gnu.org>
18841
18842 * bison.simple: *** empty log message ***
18843
18844 1993-10-25 David J. MacKenzie <djm@gnu.org>
18845
18846 * doc/bison.texinfo: *** empty log message ***
18847
18848 1993-10-19 Richard Stallman <rms@gnu.org>
18849
18850 * src/bison.s1: *** empty log message ***
18851
18852 1993-10-19 Richard Stallman <rms@gnu.org>
18853
18854 * bison.simple: *** empty log message ***
18855
18856 1993-10-14 Richard Stallman <rms@gnu.org>
18857
18858 * src/bison.s1: *** empty log message ***
18859
18860 1993-10-14 Richard Stallman <rms@gnu.org>
18861
18862 * bison.simple: *** empty log message ***
18863
18864 1993-09-14 David J. MacKenzie <djm@gnu.org>
18865
18866 * doc/bison.texinfo: *** empty log message ***
18867
18868 1993-09-13 Noah Friedman <friedman@gnu.org>
18869
18870 * Makefile.in: *** empty log message ***
18871
18872 1993-09-10 Richard Stallman <rms@gnu.org>
18873
18874 * src/conflicts.c: *** empty log message ***
18875
18876 * src/system.h: entered into RCS
18877
18878 1993-09-10 Richard Stallman <rms@gnu.org>
18879
18880 * doc/bison.1: entered into RCS
18881
18882 1993-09-06 Noah Friedman <friedman@gnu.org>
18883
18884 * src/version.c: entered into RCS
18885
18886 1993-09-06 Noah Friedman <friedman@gnu.org>
18887
18888 * Makefile.in: *** empty log message ***
18889
18890 1993-07-30 David J. MacKenzie <djm@gnu.org>
18891
18892 * Makefile.in: *** empty log message ***
18893
18894 1993-07-24 Richard Stallman <rms@gnu.org>
18895
18896 * src/bison.s1: *** empty log message ***
18897
18898 1993-07-24 Richard Stallman <rms@gnu.org>
18899
18900 * bison.simple: *** empty log message ***
18901
18902 1993-07-08 David J. MacKenzie <djm@gnu.org>
18903
18904 * Makefile.in: *** empty log message ***
18905
18906 1993-07-04 Richard Stallman <rms@gnu.org>
18907
18908 * src/bison.s1: *** empty log message ***
18909
18910 1993-07-04 Richard Stallman <rms@gnu.org>
18911
18912 * bison.simple: *** empty log message ***
18913
18914 1993-06-26 David J. MacKenzie <djm@gnu.org>
18915
18916 * src/getargs.c: entered into RCS
18917
18918 1993-06-26 David J. MacKenzie <djm@gnu.org>
18919
18920 * doc/bison.texinfo: *** empty log message ***
18921
18922 * doc/bison.1: New file.
18923
18924 1993-06-25 Richard Stallman <rms@gnu.org>
18925
18926 * src/getargs.c: New file.
18927
18928 1993-06-16 Richard Stallman <rms@gnu.org>
18929
18930 * src/bison.s1: *** empty log message ***
18931
18932 1993-06-16 Richard Stallman <rms@gnu.org>
18933
18934 * bison.simple: *** empty log message ***
18935
18936 1993-06-03 Richard Stallman <rms@gnu.org>
18937
18938 * src/bison.s1: New file.
18939
18940 1993-06-03 Richard Stallman <rms@gnu.org>
18941
18942 * doc/bison.texinfo: *** empty log message ***
18943
18944 1993-06-03 Richard Stallman <rms@gnu.org>
18945
18946 * bison.simple: New file.
18947
18948 1993-05-19 Richard Stallman <rms@gnu.org>
18949
18950 * doc/bison.texinfo: New file.
18951
18952 1993-05-07 Noah Friedman <friedman@gnu.org>
18953
18954 * Makefile.in: *** empty log message ***
18955
18956 1993-04-28 Noah Friedman <friedman@gnu.org>
18957
18958 * src/reader.c: *** empty log message ***
18959
18960 1993-04-23 Noah Friedman <friedman@gnu.org>
18961
18962 * src/alloc.h: entered into RCS
18963
18964 1993-04-20 David J. MacKenzie <djm@gnu.org>
18965
18966 * src/version.c: *** empty log message ***
18967
18968 * src/files.c, src/allocate.c:
18969 entered into RCS
18970
18971 * src/reader.c: *** empty log message ***
18972
18973 * src/lex.c: entered into RCS
18974
18975 * src/conflicts.c: New file.
18976
18977 * src/symtab.c: entered into RCS
18978
18979 * src/alloc.h: New file.
18980
18981 * src/LR0.c: entered into RCS
18982
18983 1993-04-18 Noah Friedman <friedman@gnu.org>
18984
18985 * src/reader.c: New file.
18986
18987 * src/version.c: *** empty log message ***
18988
18989 1993-04-18 Noah Friedman <friedman@gnu.org>
18990
18991 * Makefile.in: *** empty log message ***
18992
18993 1993-04-17 Noah Friedman <friedman@gnu.org>
18994
18995 * Makefile.in: *** empty log message ***
18996
18997 1993-04-15 Richard Stallman <rms@gnu.org>
18998
18999 * src/main.c, src/files.c:
19000 New file.
19001
19002 1993-04-15 Noah Friedman <friedman@gnu.org>
19003
19004 * configure.in: entered into RCS
19005
19006 * configure.in: *** empty log message ***
19007
19008 * configure.in: New file.
19009
19010 1993-04-14 Richard Stallman <rms@gnu.org>
19011
19012 * Makefile.in: New file.
19013
19014 1993-04-13 Richard Stallman <rms@gnu.org>
19015
19016 * src/version.c: New file.
19017
19018 1993-03-25 Richard Stallman <rms@gnu.org>
19019
19020 * src/output.c: entered into RCS
19021
19022 1992-09-25 Richard Stallman <rms@gnu.org>
19023
19024 * configure.bat: entered into RCS
19025
19026 1992-06-22 Richard Stallman <rms@gnu.org>
19027
19028 * src/vmsgetargs.c: entered into RCS
19029
19030 1992-06-22 Richard Stallman <rms@gnu.org>
19031
19032 * doc/bison.rnh: entered into RCS
19033
19034 1992-04-20 David J. MacKenzie <djm@gnu.org>
19035
19036 * README: entered into RCS
19037
19038 1992-01-22 Richard Stallman <rms@gnu.org>
19039
19040 * src/machine.h: entered into RCS
19041
19042 1991-12-21 Richard Stallman <rms@gnu.org>
19043
19044 * src/lalr.c, src/closure.c:
19045 entered into RCS
19046
19047 1991-12-20 Richard Stallman <rms@gnu.org>
19048
19049 * src/state.h: entered into RCS
19050
19051 1991-12-18 Richard Stallman <rms@gnu.org>
19052
19053 * src/print.c, src/nullable.c, src/derives.c:
19054 entered into RCS
19055
19056 1991-11-03 David J. MacKenzie <djm@gnu.org>
19057
19058 * src/warshall.c, src/types.h, src/symtab.h, src/lex.h, src/gram.c, src/gram.h, src/files.h:
19059 entered into RCS
19060
19061 1988-09-09 Richard Stallman <rms@gnu.org>
19062
19063 * src/bison.hairy: entered into RCS
19064
19065 1987-12-16 Richard Stallman <rms@gnu.org>
19066
19067 * REFERENCES: entered into RCS
19068
19069
19070 -----
19071
19072 Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
19073 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
19074 Free Software Foundation, Inc.
19075
19076 Copying and distribution of this file, with or without
19077 modification, are permitted provided the copyright notice and this
19078 notice are preserved.
19079
19080 $Id$